[libvirt] [RFC PATCH] hostdev: add support for "managed='detach'"

Gerd Hoffmann kraxel at redhat.com
Fri Mar 18 12:40:17 UTC 2016


  Hi,

> So what do you do after shutting down the guest? Your host
> ends up having no usable GPU, so you have to access it using
> some other mean (eg. ssh) and reboot it, right?

If I need a console, yes, I have to reboot.
Usually I just start another guest though.

> My point is that if your devices are dedicated to guest
> assignment, you're better off if they're never bound to the
> host driver to begin with - if the facilities one can use to
> ensure that is the case are not flexible or user-friendly
> enough, we should improve them.

Well, this is a development machine, so it switches roles depending on
what I'm working on.  So, no, it isn't igd device assignment all the
time, sometimes I need the igd for the host machine to test stuff.

> If you're instead working mostly on bare metal (eg. your
> laptop) and you want to, every once in a while, assign your
> card reader or some other secondary peripheral to a guest,
> then manged='yes' should be what you're looking for.

Depends.  I actually do that with a usb card reader now and then.  With
usb you don't have the option to permanently detach the device.  And it
is annoying at times, because assigning it back to the host implies
hotplug events for the device and your desktop poping up with "Oh, and
here I have a new device for you to use".  Even if you don't want to use
it on the host.

> But, in that case, doing something like assigning your
> primary and only GPU to a guest is a behaviour that falls
> entirely into the "hacks" category, and libvirt should not
> grow code dedicated to support it.

/me goes write "declare as unsupported hack" on a yellow note sticker.
I guess I'll find uses for that in the future ;)

cheers,
  Gerd





More information about the libvir-list mailing list