qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel]  [PATCH v3 3/3] Categorize devices: iommu
@ 2019-04-01 18:16 Ernest Esene
  2019-04-02  9:23 ` Auger Eric
  0 siblings, 1 reply; 2+ messages in thread
From: Ernest Esene @ 2019-04-01 18:16 UTC (permalink / raw)
  To: qemu-devel
  Cc: Stefan Hajnoczi, Paolo Bonzini, Eric Auger, Michael S. Tsirkin,
	Marcel Apfelbaum, Richard Henderson, Eduardo Habkost, qemu-arm

[-- Attachment #1: Type: text/plain, Size: 1943 bytes --]

Set category and description for iommu devices.

Signed-off-by: Ernest Esene <eroken1@gmail.com>

---
v3:
  * set category and describe smmuv3 as suggested by Eric
v2:
  * split into separate patches
---
 hw/arm/smmuv3.c       | 2 ++
 hw/i386/amd_iommu.c   | 2 ++
 hw/i386/intel_iommu.c | 2 ++
 3 files changed, 6 insertions(+)

diff --git a/hw/arm/smmuv3.c b/hw/arm/smmuv3.c
index 8c4e99fecc..d5a3df047d 100644
--- a/hw/arm/smmuv3.c
+++ b/hw/arm/smmuv3.c
@@ -1463,6 +1463,8 @@ static void smmuv3_class_init(ObjectClass *klass, void *data)
     device_class_set_parent_reset(dc, smmu_reset, &c->parent_reset);
     c->parent_realize = dc->realize;
     dc->realize = smmu_realize;
+    set_bit(DEVICE_CATEGORY_MISC, dc->categories);
+    dc->desc = "ARM IOMMU (SMMUv3) DMA Remapping device"
 }
 
 static void smmuv3_notify_flag_changed(IOMMUMemoryRegion *iommu,
diff --git a/hw/i386/amd_iommu.c b/hw/i386/amd_iommu.c
index 6eabdf9917..4a4e2c7fd4 100644
--- a/hw/i386/amd_iommu.c
+++ b/hw/i386/amd_iommu.c
@@ -1601,6 +1601,8 @@ static void amdvi_class_init(ObjectClass *klass, void* data)
     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";
 }
 
 static const TypeInfo amdvi = {
diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c
index 055a1e865d..f9781a5d20 100644
--- a/hw/i386/intel_iommu.c
+++ b/hw/i386/intel_iommu.c
@@ -3727,6 +3727,8 @@ static void vtd_class_init(ObjectClass *klass, void *data)
     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";
 }
 
 static const TypeInfo vtd_info = {
-- 
2.14.2


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [PATCH v3 3/3] Categorize devices: iommu
  2019-04-01 18:16 [Qemu-devel] [PATCH v3 3/3] Categorize devices: iommu Ernest Esene
@ 2019-04-02  9:23 ` Auger Eric
  0 siblings, 0 replies; 2+ messages in thread
From: Auger Eric @ 2019-04-02  9:23 UTC (permalink / raw)
  To: Ernest Esene, qemu-devel
  Cc: Stefan Hajnoczi, Paolo Bonzini, Michael S. Tsirkin,
	Marcel Apfelbaum, Richard Henderson, Eduardo Habkost, qemu-arm

Hi Ernest,

On 4/1/19 8:16 PM, Ernest Esene wrote:
> Set category and description for iommu devices.
> 
> Signed-off-by: Ernest Esene <eroken1@gmail.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>

Thanks

Eric

> 
> ---
> v3:
>   * set category and describe smmuv3 as suggested by Eric
> v2:
>   * split into separate patches
> ---
>  hw/arm/smmuv3.c       | 2 ++
>  hw/i386/amd_iommu.c   | 2 ++
>  hw/i386/intel_iommu.c | 2 ++
>  3 files changed, 6 insertions(+)
> 
> diff --git a/hw/arm/smmuv3.c b/hw/arm/smmuv3.c
> index 8c4e99fecc..d5a3df047d 100644
> --- a/hw/arm/smmuv3.c
> +++ b/hw/arm/smmuv3.c
> @@ -1463,6 +1463,8 @@ static void smmuv3_class_init(ObjectClass *klass, void *data)
>      device_class_set_parent_reset(dc, smmu_reset, &c->parent_reset);
>      c->parent_realize = dc->realize;
>      dc->realize = smmu_realize;
> +    set_bit(DEVICE_CATEGORY_MISC, dc->categories);
> +    dc->desc = "ARM IOMMU (SMMUv3) DMA Remapping device"
>  }
>  
>  static void smmuv3_notify_flag_changed(IOMMUMemoryRegion *iommu,
> diff --git a/hw/i386/amd_iommu.c b/hw/i386/amd_iommu.c
> index 6eabdf9917..4a4e2c7fd4 100644
> --- a/hw/i386/amd_iommu.c
> +++ b/hw/i386/amd_iommu.c
> @@ -1601,6 +1601,8 @@ static void amdvi_class_init(ObjectClass *klass, void* data)
>      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";
>  }
>  
>  static const TypeInfo amdvi = {
> diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c
> index 055a1e865d..f9781a5d20 100644
> --- a/hw/i386/intel_iommu.c
> +++ b/hw/i386/intel_iommu.c
> @@ -3727,6 +3727,8 @@ static void vtd_class_init(ObjectClass *klass, void *data)
>      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";
>  }
>  
>  static const TypeInfo vtd_info = {
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-04-02  9:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-01 18:16 [Qemu-devel] [PATCH v3 3/3] Categorize devices: iommu Ernest Esene
2019-04-02  9:23 ` Auger Eric

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).