Skip to contentSkip to conversation

vfio: Add property documentation

PATCH Superseded Cédric Le Goater 1 participant 1 message Feb 13, 2025

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 vfio: Add property documentation

Investigate the git history to uncover when and why the VFIO properties were introduced and update the models. This is mostly targeting vfio-pci device, since vfio-plateform, vfio-ap and vfio-ccw devices are simpler.

Fpr PCI, it would be great to have a way to organize the output by
topics : display, igd, nvidia, migration, debug, other

Cc Tony Krowiak <[email protected]>
Cc Eric Farman <[email protected]>
Cc Eric Auger <[email protected]>
---
 hw/vfio/ap.c       |   9 ++++
 hw/vfio/ccw.c      |  15 +++++++
 hw/vfio/pci.c      | 102 +++++++++++++++++++++++++++++++++++++++++++++
 hw/vfio/platform.c |  23 ++++++++++
 4 files changed, 149 insertions(+)
hw/vfio/ap.c +9 -0
index 30b08ad375d5ecae886c5000fbaa364799fe76d0..322bb0ed03e7a5c57f9d4ea33bd6eed4088b874b 100644
@@ -257,6 +257,15 @@ static void vfio_ap_class_init(ObjectClass *klass, void *data)
     dc->hotpluggable = true;
     device_class_set_legacy_reset(dc, vfio_ap_reset);
     dc->bus_type = TYPE_AP_BUS;
+
+    object_class_property_set_description(klass, /* 3.0 */
+                                          "sysfsdev",
+                                          "Host sysfs path of assigned device");
+#ifdef CONFIG_IOMMUFD
+    object_class_property_set_description(klass, /* 8.2 */
+                                          "iommufd",
+                                          "Set host IOMMUFD backend device ");
+#endif
 }
 
 static const TypeInfo vfio_ap_info = {
hw/vfio/ccw.c +15 -0
index 67bc137f9be6d43c5970c6271f3cdbfffd8a32de..df9e48c1635fb23aa436ea29daadbdb49977e4d3 100644
@@ -717,6 +717,21 @@ static void vfio_ccw_class_init(ObjectClass *klass, void *data)
     cdc->handle_halt = vfio_ccw_handle_halt;
     cdc->handle_clear = vfio_ccw_handle_clear;
     cdc->handle_store = vfio_ccw_handle_store;
+
+    object_class_property_set_description(klass, /* 2.9 */
+                                          "sysfsdev",
+                                          "Host sysfs path of assigned device");
+    object_class_property_set_description(klass, /* 2.12 */
+                                          "force-orb-pfch",
+                                          "Force unlimited prefetch");
+#ifdef CONFIG_IOMMUFD
+    object_class_property_set_description(klass, /* 8.2 */
+                                          "iommufd",
+                                          "Set host IOMMUFD backend device ");
+    object_class_property_set_description(klass, /* 9.2 */
+                                          "loadparm",
+                                          "Define which devices that can be used for booting");
+#endif
 }
 
 static const TypeInfo vfio_ccw_info = {
hw/vfio/pci.c +102 -0

108 lines not on this page · raw message

hw/vfio/platform.c +23 -0
index 1070a2113a17edb9ebafb5066e51ee2bc52a767d..7c4baa593b858b1f9b06bc9485c1eb00ef82ceaa 100644
@@ -674,6 +674,29 @@ static void vfio_platform_class_init(ObjectClass *klass, void *data)
     set_bit(DEVICE_CATEGORY_MISC, dc->categories);
     /* Supported by TYPE_VIRT_MACHINE */
     dc->user_creatable = true;
+
+    object_class_property_set_description(klass, /* 2.3 */
+                                          "host",
+                                          "Host device name of assigned device");
+    object_class_property_set_description(klass, /* 2.3 */
+                                          "sysfsdev",
+                                          "Host sysfs path of assigned device");
+    object_class_property_set_description(klass, /* 2.3 and 2.4 */
+                                          "x-no-mmap",
+                                          "Disable MMAP for device. Allows to trace MMIO accesses");
+    object_class_property_set_description(klass, /* 2.3 */
+                                          "mmap-timeout-ms",
+                                          "Timeout value in milliseconds to re-enable BAR mapping");
+    object_class_property_set_description(klass, /* 2.3 */
+                                          "x-irqfd",
+                                          "Use irqfd for IRQ handling");
+
+#ifdef CONFIG_IOMMUFD
+    object_class_property_set_description(klass, /* 8.2 */
+                                          "iommufd",
+                                          "Set host IOMMUFD backend device ");
+#endif
+
 }
 
 static const TypeInfo vfio_platform_dev_info = {
Signature · 1 line
2.48.1