Re: [Qemu-devel] [PATCH v2 6/6] Categorize devices: iommu

2019-04-01 Thread Auger Eric
Hi Ernest,

On 3/27/19 6:05 PM, Ernest Esene wrote:
> Set category and description for iommu devices
> Signed-off-by: Ernest Esene 
> 
> ---
> v2:
>   * split into separate patches
> ---
>  hw/i386/amd_iommu.c   | 2 ++
>  hw/i386/intel_iommu.c | 2 ++
>  2 files changed, 4 insertions(+)
> 
> 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 b90de6c664..4d0e60423c 100644
> --- a/hw/i386/intel_iommu.c
> +++ b/hw/i386/intel_iommu.c
> @@ -3702,6 +3702,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";
>  }

The same can be done as well for ARM IOMMU, aka SMMUv3 (hw/arm/smmuv3.c,
smmuv3_class_init).

Thanks

Eric
>  
>  static const TypeInfo vtd_info = {
> 



Re: [Qemu-devel] [PATCH v2 6/6] Categorize devices: iommu

2019-03-30 Thread Eduardo Habkost
On Wed, Mar 27, 2019 at 06:05:18PM +0100, Ernest Esene wrote:
> Set category and description for iommu devices
> Signed-off-by: Ernest Esene 

Reviewed-by: Eduardo Habkost 

-- 
Eduardo



[Qemu-devel] [PATCH v2 6/6] Categorize devices: iommu

2019-03-27 Thread Ernest Esene
Set category and description for iommu devices
Signed-off-by: Ernest Esene 

---
v2:
  * split into separate patches
---
 hw/i386/amd_iommu.c   | 2 ++
 hw/i386/intel_iommu.c | 2 ++
 2 files changed, 4 insertions(+)

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 b90de6c664..4d0e60423c 100644
--- a/hw/i386/intel_iommu.c
+++ b/hw/i386/intel_iommu.c
@@ -3702,6 +3702,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



signature.asc
Description: PGP signature