From: Stefan Hajnoczi <stefanha@gmail.com>
To: Alexander Graf <agraf@suse.de>
Cc: Alexey Kardashevskiy <aik@ozlabs.ru>,
Stefan Weil <sw@weilnetz.de>,
qemu-devel@nongnu.org, qemu-trivial <qemu-trivial@nongnu.org>,
qemu-ppc@nongnu.org, David Gibson <david@gibson.dropbear.id.au>
Subject: Re: [Qemu-devel] [PATCH] powerpc pci: fixed packing of ranges[]
Date: Sat, 21 Jul 2012 10:41:45 +0100 [thread overview]
Message-ID: <20120721094145.GA13913@stefanha-thinkpad.localdomain> (raw)
In-Reply-To: <5006D930.8080205@suse.de>
On Wed, Jul 18, 2012 at 05:41:36PM +0200, Alexander Graf wrote:
> On 07/18/2012 05:40 PM, Stefan Weil wrote:
> >Am 18.07.2012 10:22, schrieb Alexey Kardashevskiy:
> >>By default mingw-gcc is trying to pack structures the way to
> >>preserve binary compatibility with MS Visual C what leads to
> >>incorrect and unexpected padding in the PCI bus ranges property of
> >>the sPAPR PHB.
> >>
> >>The patch replaces __attribute__((packed)) with more strict QEMU_PACKED
> >>which actually is __attribute__((gcc_struct, packed)) on Windows.
> >>
> >>Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
> >>---
> >> hw/spapr_pci.c | 2 +-
> >> 1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >>diff --git a/hw/spapr_pci.c b/hw/spapr_pci.c
> >>index b3032d2..0261d2e 100644
> >>--- a/hw/spapr_pci.c
> >>+++ b/hw/spapr_pci.c
> >>@@ -418,7 +418,7 @@ int spapr_populate_pci_dt(sPAPRPHBState *phb,
> >> uint64_t child;
> >> uint64_t parent;
> >> uint64_t size;
> >>- } __attribute__((packed)) ranges[] = {
> >>+ } QEMU_PACKED ranges[] = {
> >> {
> >> cpu_to_be32(b_ss(1)), cpu_to_be64(0),
> >> cpu_to_be64(phb->io_win_addr),
> >
> >
> >The patch changes sizeof(ranges[0]) from 32 to 28 bytes
> >and can be applied as a trivial patch.
> >
> >Tested-by: Stefan Weil <sw@weilnetz.de>
> >Reviewed-by: Stefan Weil <sw@weilnetz.de>
> >
>
> So do you want to take it through the trivial queue? I'm fine either way.
>
> Acked-by: Alexander Graf <agraf@suse.de>
Merged into the trivial patches tree with your Acked-by:.
Stefan
prev parent reply other threads:[~2012-07-21 9:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-18 8:22 [Qemu-devel] [PATCH] powerpc pci: fixed packing of ranges[] Alexey Kardashevskiy
2012-07-18 15:40 ` Stefan Weil
2012-07-18 15:41 ` Alexander Graf
2012-07-21 9:41 ` Stefan Hajnoczi [this message]
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=20120721094145.GA13913@stefanha-thinkpad.localdomain \
--to=stefanha@gmail.com \
--cc=agraf@suse.de \
--cc=aik@ozlabs.ru \
--cc=david@gibson.dropbear.id.au \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=qemu-trivial@nongnu.org \
--cc=sw@weilnetz.de \
/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).