[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v10 08/26] acpi: add DMAR scope definition for r
From: |
Peter Xu |
Subject: |
Re: [Qemu-devel] [PATCH v10 08/26] acpi: add DMAR scope definition for root IOAPIC |
Date: |
Tue, 5 Jul 2016 15:30:25 +0800 |
User-agent: |
Mutt/1.5.24 (2015-08-30) |
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