[libvirt PATCH v3 00/21] Add support for persistent mediated devices

Jonathon Jongsma jjongsma at redhat.com
Fri Jan 29 23:34:36 UTC 2021

On Thu, 7 Jan 2021 17:43:54 +0100
Erik Skultety <eskultet at redhat.com> wrote:

> > Tested with v6.10.0-283-g1948d4e61e.
> > 
> > 1.Can define/start/destroy mdev device successfully;
> > 
> > 2.'virsh nodedev-list' has no '--active' option, which is
> > inconsistent with the description in the patch:
> > # virsh nodedev-list --active
> > error: command 'nodedev-list' doesn't support option --active
> > 
> > 3.virsh client hang when trying to destroy a mdev device which is
> > using by a vm, and after that all 'virsh nodev*' cmds will hang. If
> > restarting llibvirtd after that, libvirtd will hang.  
> It hangs because underneath a write to the 'remove' sysfs attribute
> is now blocking for some reason and since we're relying on mdevctl to
> do it for us, hence "it hangs". I'm not trying to make an excuse,
> it's plain wrong. I'd love to rely on such a basic functionality, but
> it looks like we'll have to go with a extremely ugly workaround and
> try to get the list of active domains from the nodedev driver and see
> whether any of them has the device assigned before we try to destroy
> the mdev via the nodedev driver.

So, I've been trying to figure out a way to do this, but as far as
I know, there's no way to get a list of active domains from within the
nodedev driver, and I can't think of any better ways to handle it. Any


More information about the libvir-list mailing list