[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_BUS_DEVICE
- To: Philippe Mathieu-Daudé <philmd@xxxxxxxxxx>, "qemu-devel@xxxxxxxxxx" <qemu-devel@xxxxxxxxxx>
- From: CLEMENT MATHIEU--DRIF <clement.mathieu--drif@xxxxxxxxxx>
- Date: Mon, 27 Jan 2025 06:14:46 +0000
- Accept-language: en-GB, fr-FR, en-US
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=eviden.com; dmarc=pass action=none header.from=eviden.com; dkim=pass header.d=eviden.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=CAQbx6bVUkOqbYZAAavrHDY9le2cUdZVdJsvPtn/D4o=; b=nK0Ucq9+Zn610pfTOLHtfLdAIwBoR9qdMZ0+A0PT7No/l7+E4VCdrrOYE1jUQnVbc0ina4mnCBrwrfqSThJ2k0odBsDydg4L7c0QKNmbb3JlWtWTG08ExydX0y8dqzwze7ih7Dv5AJIr6e0EQPgAcszn+sUtxImK5nOKtRF7RFg+YpfHIUTyXWBMpnpzrgnv7uU+wuc5o53mHHOuBetEfTsG6ehym3oYirpYSIHYqKNwCpBs5mOdl5gV9pPQo6T8sPoBJvDj0eod+sg+lA07PELeYMAjxPUVYVrXUdD8KO6wU7grFaub4HPeAUyyAfjTCt7f0CSOv8xGDSL98WKgKg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Vz7irmhebvmJIdFEupMlP6sI9fFeG6uuRnj1pkcX+KIZLfLlOkuIoHTYxVocULQSJpELaizRv5tp9hvG4AOChpE2G0voaTi/GtUKNYV05iwfHJJMBxldooJbXr+gS7xtSv5JPKX3yJfcYnMA8s+7vGvoJmfLv0U1TzSGHCmQYnEudD1u0eibl/BQVCEq2xARdnc2yMjyx5TQ+JVb8ikOxTbXHTR74Y9DECcCK1wqeOzNvpFAfnyRzzWqT9Hd9M/B4bFLAd5FZDYh99JfwsTTIAzzCc63SG7Ns7rGaDBpwQiWPbeSmar2ArhlZiEAm5mL0gnssJKajekXU0BClLUkCw==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=eviden.com;
- Cc: Yi Liu <yi.l.liu@xxxxxxxxx>, Markus Armbruster <armbru@xxxxxxxxxx>, Eduardo Habkost <eduardo@xxxxxxxxxxx>, Anthony PERARD <anthony@xxxxxxxxxxxxxx>, Gustavo Romero <gustavo.romero@xxxxxxxxxx>, Jason Wang <jasowang@xxxxxxxxxx>, "qemu-ppc@xxxxxxxxxx" <qemu-ppc@xxxxxxxxxx>, "Michael S. Tsirkin" <mst@xxxxxxxxxx>, Paolo Bonzini <pbonzini@xxxxxxxxxx>, Alexander Graf <graf@xxxxxxxxxx>, Richard Henderson <richard.henderson@xxxxxxxxxx>, Stefan Berger <stefanb@xxxxxxxxxxxxxxxxxx>, Bernhard Beschow <shentey@xxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Gerd Hoffmann <kraxel@xxxxxxxxxx>, Daniel P. Berrangé <berrange@xxxxxxxxxx>, "Edgar E. Iglesias" <edgar.iglesias@xxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Marcel Apfelbaum <marcel.apfelbaum@xxxxxxxxx>, Alex Williamson <alex.williamson@xxxxxxxxxx>, Paul Durrant <paul@xxxxxxx>, Cédric Le Goater <clg@xxxxxxxxxx>
- Delivery-date: Mon, 27 Jan 2025 06:15:09 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Thread-index: AQHbb1T1v1PK9knjfUCFEoU3xo3CqLMqJsYA
- Thread-topic: [PATCH 6/9] hw/i386: Have X86_IOMMU devices inherit from DYNAMIC_SYS_BUS_DEVICE
Reviewed-by: Clément Mathieu--Drif<clement.mathieu--drif@xxxxxxxxxx>
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@xxxxxxxxxx>
> ---
> 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
>
|