Received: from eggs.gnu.org ([2001:4830:134:3::10]:54546) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bKKoW-0006rY-Uo for qemu-devel@nongnu.org; Tue, 05 Jul 2016 03:30:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bKKoT-00080q-N0 for qemu-devel@nongnu.org; Tue, 05 Jul 2016 03:30:36 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33835) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bKKoT-00080V-Cy for qemu-devel@nongnu.org; Tue, 05 Jul 2016 03:30:33 -0400 Date: Tue, 5 Jul 2016 15:30:25 +0800 From: Peter Xu Message-ID: <20160705073025.GB1153@pxdev.xzpeter.org> References: <1466495274-5011-1-git-send-email-peterx@redhat.com> <1466495274-5011-9-git-send-email-peterx@redhat.com> <20160704181941-mutt-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20160704181941-mutt-send-email-mst@redhat.com> Subject: Re: [Qemu-devel] [PATCH v10 08/26] acpi: add DMAR scope definition for root IOAPIC List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: qemu-devel@nongnu.org, imammedo@redhat.com, rth@twiddle.net, ehabkost@redhat.com, jasowang@redhat.com, marcel@redhat.com, pbonzini@redhat.com, jan.kiszka@web.de, rkrcmar@redhat.com, alex.williamson@redhat.com, wexu@redhat.com, davidkiarie4@gmail.com On Mon, Jul 04, 2016 at 06:22:56PM +0300, Michael S. Tsirkin wrote: [...] > > @@ -2425,6 +2427,9 @@ build_dmar_q35(GArray *table_data, BIOSLinker *linker) > > AcpiDmarHardwareUnit *drhd; > > uint8_t dmar_flags = 0; > > X86IOMMUState *iommu = x86_iommu_get_default(); > > + AcpiDmarDeviceScope *scope = NULL; > > + /* Root complex IOAPIC use one path[0] only */ > > + uint8_t ioapic_scope_size = sizeof(*scope) + sizeof(scope->path[0]); > > just use int or unsigned or size_t for types like this. Will fix. [...] > > diff --git a/include/hw/acpi/acpi-defs.h b/include/hw/acpi/acpi-defs.h > > index ea9be0b..0dbdde3 100644 > > --- a/include/hw/acpi/acpi-defs.h > > +++ b/include/hw/acpi/acpi-defs.h > > @@ -571,6 +571,20 @@ enum { > > /* > > * Sub-structures for DMAR > > */ > > + > > +#define ACPI_DMAR_DEV_SCOPE_TYPE_IOAPIC (0x03) > > Again, pls use literal with comment in code. Will fix. [...] > > diff --git a/include/hw/pci-host/q35.h b/include/hw/pci-host/q35.h > > index c5c073d..312b47f 100644 > > --- a/include/hw/pci-host/q35.h > > +++ b/include/hw/pci-host/q35.h > > @@ -175,4 +175,12 @@ typedef struct Q35PCIHost { > > > > uint64_t mch_mcfg_base(void); > > > > +/* > > + * Arbitary but unique BNF number for IOAPIC device. > > + * > > + * TODO: make sure there would have no conflict with real PCI bus > > How are you going to do this? Still not think about it yet (on my todo list). Please shoot if there's any suggestion. Thanks, -- peterx