[virt-tools-list] [virt-manager PATCH v2] virtManager: UI: add support enable setting multifunction on hostdev

Cole Robinson crobinso at redhat.com
Thu May 11 18:12:20 UTC 2017


On 05/10/2017 06:57 AM, Pavel Hrdina wrote:
> On Wed, May 10, 2017 at 06:40:30PM +0800, Chen Hanxiao wrote:
>> From: Chen Hanxiao <chenhanxiao at gmail.com>
>>
>>   We could turn on/off multifunction of hostdev
>>   in page details.
>>
>> Signed-off-by: Chen Hanxiao <chenhanxiao at gmail.com>
>> ---
>> v2: drop irrelevant cli part
>>
>>  ui/details.ui          | 74 ++++++++++++++++++++++++++++++--------------------
>>  virtManager/details.py | 11 +++++++-
>>  virtManager/domain.py  |  8 +++++-
>>  3 files changed, 62 insertions(+), 31 deletions(-)
> 
> Remove the unrelated changes to the UI file.  It's caused by newer
> Glade that uses different order of the elements.  You can use
> "git add -p" to select only the relevant hunks before committing
> the changes instead of "git commit -a".
> 

Though if it's any more involved than that I'm fine with having a prep patch
that resaves the file with glade and gets all the churn out of the way. It's
basically unavoidable over the long term

> Adding only the "multifunction" check-box isn't good enough to
> help users to configure GPU device assignment.  Like I wrote,
> we need to expose UI bits to configure the PCI address as well
> not only the "multifunction" attribute or create the address somehow
> automatically.  Enabling only "multifunction" would still require
> to manually edit the domain XML.
> 
> There might be another option, add a feature into libvirt where we
> would somehow tell libvirt, that some group of devices should be
> grouped together as a different functions and libvirt would handle
> the PCI address generation correctly.  Virt-manager would simply
> tell libvirt what devices should be assigned the same PCI address
> with different function.
> 
I haven't played with GPU passthrough so I'm trying to understand the caveats
here. Sounds like for some (all?) configs 1) the guest <address> needs to
match the host <address> and 2) if the device has multiple functions they all
need to be assigned to the VM, and multifunction=on set

Maybe if in 'add hardware' the user selects a GPU device we unhide a checkbox
like 'Assign all GPU device functions', or 'Mirror device address' or
something, which will handle all that magic. Not sure how we would
differentiate a graphics device though, probably needs a nodedev XML extension

- Cole




More information about the virt-tools-list mailing list