From: Igor Mammedov <imammedo@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Shannon Zhao <zhaoshenglong@huawei.com>,
Shannon Zhao <shannon.zhao@linaro.org>,
Christoffer Dall <christoffer.dall@linaro.org>,
QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [RFC PATCH] hw/arm/virt-acpi-build: Add GICv2m description in ACPI MADT table
Date: Fri, 12 Jun 2015 18:21:35 +0200 [thread overview]
Message-ID: <20150612182135.63fa688e@nial.brq.redhat.com> (raw)
In-Reply-To: <CAFEAcA9r1MpCt-MBk+udGroMH-3iP3k4pQ3BkZjAVA13O=EnRg@mail.gmail.com>
On Fri, 12 Jun 2015 15:55:22 +0100
Peter Maydell <peter.maydell@linaro.org> wrote:
> On 1 June 2015 at 11:15, <shannon.zhao@linaro.org> wrote:
> > From: Shannon Zhao <shannon.zhao@linaro.org>
> >
> > Add GICv2m description in ACPI MADT table, so guest can use MSI when
> > booting with ACPI.
> >
> > Signed-off-by: Shannon Zhao <zhaoshenglong@huawei.com>
> > Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org>
> > ---
> > This is based on Christoffer's GICv2m patchset.
> > Test virtio-net-pci, e1000.
> > ---
> > hw/arm/virt-acpi-build.c | 11 +++++++++++
> > include/hw/acpi/acpi-defs.h | 12 ++++++++++++
> > 2 files changed, 23 insertions(+)
> >
> > diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c
> > index a9373cc..d8dcf45 100644
> > --- a/hw/arm/virt-acpi-build.c
> > +++ b/hw/arm/virt-acpi-build.c
> > @@ -385,8 +385,10 @@ build_madt(GArray *table_data, GArray *linker, VirtGuestInfo *guest_info,
> > {
> > int madt_start = table_data->len;
> > const MemMapEntry *memmap = guest_info->memmap;
> > + const int *irqmap = guest_info->irqmap;
> > AcpiMultipleApicTable *madt;
> > AcpiMadtGenericDistributor *gicd;
> > + AcpiMadtGenericMsiFrame *gic_msi;
> > int i;
> >
> > madt = acpi_data_push(table_data, sizeof *madt);
> > @@ -410,6 +412,15 @@ build_madt(GArray *table_data, GArray *linker, VirtGuestInfo *guest_info,
> > gicd->length = sizeof(*gicd);
> > gicd->base_address = memmap[VIRT_GIC_DIST].base;
> >
> > + gic_msi = acpi_data_push(table_data, sizeof *gic_msi);
> > + gic_msi->type = ACPI_APIC_GENERIC_MSI_FRAME;
> > + gic_msi->length = sizeof(*gic_msi);
> > + gic_msi->gic_msi_frame_id = 0;
> > + gic_msi->base_address = memmap[VIRT_GIC_V2M].base;
> > + gic_msi->flags = cpu_to_le32(1);
> > + gic_msi->spi_count = NUM_GICV2M_SPIS;
> > + gic_msi->spi_base = irqmap[VIRT_GIC_V2M] + ARM_SPI_BASE;
>
> Why do we need to convert the flags to little-endian,
> but not the length, base address or other fields?
+1 all ACPI numbers should be converted to little-endian.
>
> thanks
> -- PMM
>
next prev parent reply other threads:[~2015-06-12 16:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-01 10:15 [Qemu-devel] [RFC PATCH] hw/arm/virt-acpi-build: Add GICv2m description in ACPI MADT table shannon.zhao
2015-06-12 14:55 ` Peter Maydell
2015-06-12 16:21 ` Igor Mammedov [this message]
2015-06-15 18:09 ` Andrew Jones
2015-06-16 1:21 ` Shannon Zhao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150612182135.63fa688e@nial.brq.redhat.com \
--to=imammedo@redhat.com \
--cc=christoffer.dall@linaro.org \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=shannon.zhao@linaro.org \
--cc=zhaoshenglong@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).