From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:36703) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hBFnD-0002da-V8 for qemu-devel@nongnu.org; Tue, 02 Apr 2019 05:33:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hBFnB-0008HC-W7 for qemu-devel@nongnu.org; Tue, 02 Apr 2019 05:33:19 -0400 References: <20190401181621.GA31851@erokenlabserver> From: Auger Eric Message-ID: Date: Tue, 2 Apr 2019 11:23:01 +0200 MIME-Version: 1.0 In-Reply-To: <20190401181621.GA31851@erokenlabserver> Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v3 3/3] Categorize devices: iommu List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Ernest Esene , qemu-devel@nongnu.org Cc: Stefan Hajnoczi , Paolo Bonzini , "Michael S. Tsirkin" , Marcel Apfelbaum , Richard Henderson , Eduardo Habkost , qemu-arm@nongnu.org Hi Ernest, On 4/1/19 8:16 PM, Ernest Esene wrote: > Set category and description for iommu devices. > > Signed-off-by: Ernest Esene Reviewed-by: Eric Auger 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 = { >