[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 08/13] AMDVI-PCI: put it into the 'misc' category
From: |
Gan Qixin |
Subject: |
[PATCH 08/13] AMDVI-PCI: put it into the 'misc' category |
Date: |
Mon, 16 Nov 2020 02:48:58 +0800 |
The category of the AMDVI-PCI device is not set, put it into the 'misc'
category.
Signed-off-by: Gan Qixin <ganqixin@huawei.com>
---
Cc: Paolo Bonzini <pbonzini@redhat.com>
---
hw/i386/amd_iommu.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/hw/i386/amd_iommu.c b/hw/i386/amd_iommu.c
index 74a93a5d93..1d4e488f7f 100644
--- a/hw/i386/amd_iommu.c
+++ b/hw/i386/amd_iommu.c
@@ -1621,6 +1621,13 @@ static const TypeInfo amdvi = {
.class_init = amdvi_class_init
};
+static void amdvi_pci_class_init(ObjectClass *klass, void *data)
+{
+ DeviceClass *dc = DEVICE_CLASS(klass);
+
+ set_bit(DEVICE_CATEGORY_MISC, dc->categories);
+}
+
static const TypeInfo amdviPCI = {
.name = TYPE_AMD_IOMMU_PCI,
.parent = TYPE_PCI_DEVICE,
@@ -1629,6 +1636,7 @@ static const TypeInfo amdviPCI = {
{ INTERFACE_CONVENTIONAL_PCI_DEVICE },
{ },
},
+ .class_init = amdvi_pci_class_init
};
static void amdvi_iommu_memory_region_class_init(ObjectClass *klass, void
*data)
--
2.23.0
- Re: [PATCH 03/13] vmmouse: put it into the 'input' category, (continued)
- [PATCH 08/13] AMDVI-PCI: put it into the 'misc' category,
Gan Qixin <=
- [PATCH 11/13] spitz: put some Spitz-family devices into the correct category, Gan Qixin, 2020/11/16
- [PATCH 10/13] tosa-ssp: put it into the 'misc' category, Gan Qixin, 2020/11/16
- [PATCH 06/13] ipmi: put some ipmi devices into the correct category, Gan Qixin, 2020/11/16
- [PATCH 12/13] SPI flash devices: put them into the 'storage' category, Gan Qixin, 2020/11/16
- [PATCH 13/13] bcm2835_cprman: put some peripherals of bcm2835 cprman into the 'misc' category, Gan Qixin, 2020/11/16