summary refs log tree commit diff stats
path: root/hw/vfio-user/pci.c
diff options
context:
space:
mode:
authorJohn Levon <john.levon@nutanix.com>2025-08-27 20:08:10 +0100
committerCédric Le Goater <clg@redhat.com>2025-09-08 16:46:31 +0200
commit1b50621881241ac5bc75ae7f8aa4c278ada8a668 (patch)
treef97ba11fc60c84a1be758c23db01a2dce3aee3df /hw/vfio-user/pci.c
parentceb59c1cc61dee57c8806571e7c723e555914547 (diff)
downloadfocaccia-qemu-1b50621881241ac5bc75ae7f8aa4c278ada8a668.tar.gz
focaccia-qemu-1b50621881241ac5bc75ae7f8aa4c278ada8a668.zip
hw/vfio-user: add x-pci-class-code
This new option was not added to vfio_user_pci_dev_properties, which
caused an incorrect class code for vfio-user devices.

Fixes: a59d06305fff ("vfio/pci: Introduce x-pci-class-code option")
Signed-off-by: John Levon <john.levon@nutanix.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20250827190810.1645340-1-john.levon@nutanix.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
Diffstat (limited to '')
-rw-r--r--hw/vfio-user/pci.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/vfio-user/pci.c b/hw/vfio-user/pci.c
index be71c77729..dfaa89498d 100644
--- a/hw/vfio-user/pci.c
+++ b/hw/vfio-user/pci.c
@@ -406,6 +406,8 @@ static const Property vfio_user_pci_dev_properties[] = {
                        sub_vendor_id, PCI_ANY_ID),
     DEFINE_PROP_UINT32("x-pci-sub-device-id", VFIOPCIDevice,
                        sub_device_id, PCI_ANY_ID),
+    DEFINE_PROP_UINT32("x-pci-class-code", VFIOPCIDevice,
+                       class_code, PCI_ANY_ID),
     DEFINE_PROP_BOOL("x-send-queued", VFIOUserPCIDevice, send_queued, false),
     DEFINE_PROP_UINT32("x-msg-timeout", VFIOUserPCIDevice, wait_time, 5000),
     DEFINE_PROP_BOOL("x-no-posted-writes", VFIOUserPCIDevice, no_post, false),