Re: [PATCH virt-manager v2 0/4] Enable MDEV support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


On 5/31/21 3:54 PM, Shalini Chellathurai Saroja wrote:
> Enable support for mediated devices in virt-xml tool and virt-manager
> GUI tool.

Thanks! I pushed 1-3 with a small tweak to patch #1 to keep code
coverage at 100%.

In order to get the parent naming stuff in to trigger I
needed to change things a bit:

diff --git a/virtManager/ b/virtManager/
index 2df84bf5..13b899c3 100644
--- a/virtManager/
+++ b/virtManager/
@@ -783,9 +783,10 @@ class vmmAddHardware(vmmGObjectUI):
                         prettyname += " (%s)" % subdev.pretty_name()

             if devtype == "mdev":
-                for subdev in self.conn.filter_nodedevs("mdev"):
-                    if == subdev.xmlobj.parent:
-                        prettyname += " (%s)" % subdev.pretty_name()
+                for parentdev in self.conn.list_nodedevs():
+                    if dev.xmlobj.parent ==
+                        prettyname = "%s %s" % (
+                                parentdev.pretty_name(), prettyname)

             model.append([dev.xmlobj, prettyname])

Was it working in your code before that, like on a real system with mdev
devices? Or was the Add Hardware->MDEV only listing devices with name
`mdev_$UUID` ?

The point of this code is to give more descriptive names to what we list
in the UI, if we can help it. The names for 'mdev' devices are not
descriptive. Their type id=XXX values are a bit better:
vfio_ap-passthrough, nvidia-11, etc. Maybe we can just use that? The
parent devices have a bit more info under <capability><type><name> but
it's not clear if that's always available. Maybe we can get away with
just using the <type id=XXX> value in the mdev pretty_name() definition


[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux