[RFC: vf-token 3/5] conf: vf-token flag

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

 



Define PCI address extension flag for vf-token

Signed-off-by: Vivek Kashyap <vivek.kashyap@xxxxxxxxxxxxxxx>
---
 src/conf/device_conf.h         | 3 +++
 src/conf/domain_addr.h         | 1 +
 src/qemu/qemu_domain_address.c | 3 +++
 3 files changed, 7 insertions(+)

diff --git a/src/conf/device_conf.h b/src/conf/device_conf.h
index a83377417a..29e03baa99 100644
--- a/src/conf/device_conf.h
+++ b/src/conf/device_conf.h
@@ -188,6 +188,9 @@ bool virDeviceInfoPCIAddressExtensionIsPresent(const virDomainDeviceInfo *info);
 int virPCIDeviceAddressParseXML(xmlNodePtr node,
                                 virPCIDeviceAddress *addr);
 
+int virPCIDeviceTokenParseXML(xmlNodePtr node,
+                                virPCIDeviceAddress *addr);
+
 void virPCIDeviceAddressFormat(virBuffer *buf,
                                virPCIDeviceAddress addr,
                                bool includeTypeInAddr);
diff --git a/src/conf/domain_addr.h b/src/conf/domain_addr.h
index e72fb48847..bca96ee797 100644
--- a/src/conf/domain_addr.h
+++ b/src/conf/domain_addr.h
@@ -29,6 +29,7 @@
 typedef enum {
     VIR_PCI_ADDRESS_EXTENSION_NONE = 0, /* no extension */
     VIR_PCI_ADDRESS_EXTENSION_ZPCI = 1 << 0, /* zPCI support */
+    VIR_PCI_ADDRESS_EXTENSION_VFTOKEN = 1 << 1, /* Token support */
 } virPCIDeviceAddressExtensionFlags;
 
 typedef enum {
diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c
index 099778b2a8..3be5acbc9e 100644
--- a/src/qemu/qemu_domain_address.c
+++ b/src/qemu/qemu_domain_address.c
@@ -575,6 +575,9 @@ qemuDomainDeviceCalculatePCIAddressExtensionFlags(virQEMUCaps *qemuCaps,
         extFlags |= VIR_PCI_ADDRESS_EXTENSION_ZPCI;
     }
 
+    if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_VFIO_VFTOKEN))
+        extFlags |= VIR_PCI_ADDRESS_EXTENSION_VFTOKEN;
+
     return extFlags;
 }
 
-- 
2.25.1




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux