[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 6/9] hw/i386: Have X86_IOMMU devices inherit from DYNAMIC_SYS
From: |
CLEMENT MATHIEU--DRIF |
Subject: |
Re: [PATCH 6/9] hw/i386: Have X86_IOMMU devices inherit from DYNAMIC_SYS_BUS_DEVICE |
Date: |
Mon, 27 Jan 2025 06:14:46 +0000 |
Reviewed-by: Clément Mathieu--Drif<clement.mathieu--drif@eviden.com>
Thanks phil
On 25/01/2025 19:13, Philippe Mathieu-Daudé wrote:
> Caution: External email. Do not open attachments or click links, unless this
> email comes from a known sender and you know the content is safe.
>
>
> Do not explain why _X86_IOMMU devices are user_creatable,
> have them inherit TYPE_DYNAMIC_SYS_BUS_DEVICE, to explicit
> they can optionally be plugged on TYPE_PLATFORM_BUS_DEVICE.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
> hw/i386/amd_iommu.c | 2 --
> hw/i386/intel_iommu.c | 2 --
> hw/i386/x86-iommu.c | 2 +-
> 3 files changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/hw/i386/amd_iommu.c b/hw/i386/amd_iommu.c
> index 6b13ce894b1..e8e084c7cf8 100644
> --- a/hw/i386/amd_iommu.c
> +++ b/hw/i386/amd_iommu.c
> @@ -1687,8 +1687,6 @@ static void amdvi_sysbus_class_init(ObjectClass *klass,
> void *data)
> dc->hotpluggable = false;
> dc_class->realize = amdvi_sysbus_realize;
> dc_class->int_remap = amdvi_int_remap;
> - /* Supported by the pc-q35-* machine types */
> - dc->user_creatable = true;
> set_bit(DEVICE_CATEGORY_MISC, dc->categories);
> dc->desc = "AMD IOMMU (AMD-Vi) DMA Remapping device";
> device_class_set_props(dc, amdvi_properties);
> diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c
> index f366c223d0e..7fde0603bfe 100644
> --- a/hw/i386/intel_iommu.c
> +++ b/hw/i386/intel_iommu.c
> @@ -4871,8 +4871,6 @@ static void vtd_class_init(ObjectClass *klass, void
> *data)
> dc->hotpluggable = false;
> x86_class->realize = vtd_realize;
> x86_class->int_remap = vtd_int_remap;
> - /* Supported by the pc-q35-* machine types */
> - dc->user_creatable = true;
> set_bit(DEVICE_CATEGORY_MISC, dc->categories);
> dc->desc = "Intel IOMMU (VT-d) DMA Remapping device";
> }
> diff --git a/hw/i386/x86-iommu.c b/hw/i386/x86-iommu.c
> index fed34b2fcfa..5cdd165af0d 100644
> --- a/hw/i386/x86-iommu.c
> +++ b/hw/i386/x86-iommu.c
> @@ -146,7 +146,7 @@ bool x86_iommu_ir_supported(X86IOMMUState *s)
>
> static const TypeInfo x86_iommu_info = {
> .name = TYPE_X86_IOMMU_DEVICE,
> - .parent = TYPE_SYS_BUS_DEVICE,
> + .parent = TYPE_DYNAMIC_SYS_BUS_DEVICE,
> .instance_size = sizeof(X86IOMMUState),
> .class_init = x86_iommu_class_init,
> .class_size = sizeof(X86IOMMUClass),
> --
> 2.47.1
>
- [PATCH 3/9] hw/sysbus: Introduce TYPE_DYNAMIC_SYS_BUS_DEVICE, (continued)
- [PATCH 3/9] hw/sysbus: Introduce TYPE_DYNAMIC_SYS_BUS_DEVICE, Philippe Mathieu-Daudé, 2025/01/25
- [PATCH 4/9] hw/vfio: Have VFIO_PLATFORM devices inherit from DYNAMIC_SYS_BUS_DEVICE, Philippe Mathieu-Daudé, 2025/01/25
- [PATCH 5/9] hw/display: Have RAMFB device inherit from DYNAMIC_SYS_BUS_DEVICE, Philippe Mathieu-Daudé, 2025/01/25
- [PATCH 6/9] hw/i386: Have X86_IOMMU devices inherit from DYNAMIC_SYS_BUS_DEVICE, Philippe Mathieu-Daudé, 2025/01/25
- [PATCH 7/9] hw/net: Have eTSEC device inherit from DYNAMIC_SYS_BUS_DEVICE, Philippe Mathieu-Daudé, 2025/01/25
- [PATCH 8/9] hw/tpm: Have TPM TIS sysbus device inherit from DYNAMIC_SYS_BUS_DEVICE, Philippe Mathieu-Daudé, 2025/01/25
- [RFC PATCH 9/9] hw/xen: Have legacy Xen backend inherit from DYNAMIC_SYS_BUS_DEVICE, Philippe Mathieu-Daudé, 2025/01/25