Skip to content

Commit 64bc656

Browse files
philmdmstsirkin
authored andcommitted
hw/i386/amd_iommu: Add description/category to TYPE_AMD_IOMMU_PCI
TYPE_AMD_IOMMU_PCI is user-creatable but not well described. Implement its class_init() handler to add it to the 'Misc devices' category, and add a description. Signed-off-by: Philippe Mathieu-Daudé <[email protected]> Message-Id: <[email protected]> Reviewed-by: Michael S. Tsirkin <[email protected]> Signed-off-by: Michael S. Tsirkin <[email protected]>
1 parent 8f6b730 commit 64bc656

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

hw/i386/amd_iommu.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1621,10 +1621,19 @@ static const TypeInfo amdvi_sysbus = {
16211621
.class_init = amdvi_sysbus_class_init
16221622
};
16231623

1624+
static void amdvi_pci_class_init(ObjectClass *klass, void *data)
1625+
{
1626+
DeviceClass *dc = DEVICE_CLASS(klass);
1627+
1628+
set_bit(DEVICE_CATEGORY_MISC, dc->categories);
1629+
dc->desc = "AMD IOMMU (AMD-Vi) DMA Remapping device";
1630+
}
1631+
16241632
static const TypeInfo amdvi_pci = {
16251633
.name = TYPE_AMD_IOMMU_PCI,
16261634
.parent = TYPE_PCI_DEVICE,
16271635
.instance_size = sizeof(AMDVIPCIState),
1636+
.class_init = amdvi_pci_class_init,
16281637
.interfaces = (InterfaceInfo[]) {
16291638
{ INTERFACE_CONVENTIONAL_PCI_DEVICE },
16301639
{ },

0 commit comments

Comments
 (0)