qemu-trivial
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-trivial] [Qemu-devel] [PATCH] powerpc pci: fixed packing of ra


From: Stefan Hajnoczi
Subject: Re: [Qemu-trivial] [Qemu-devel] [PATCH] powerpc pci: fixed packing of ranges[]
Date: Sat, 21 Jul 2012 10:41:45 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

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 <address@hidden>
> >>---
> >>  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 <address@hidden>
> >Reviewed-by: Stefan Weil <address@hidden>
> >
> 
> So do you want to take it through the trivial queue? I'm fine either way.
> 
> Acked-by: Alexander Graf <address@hidden>

Merged into the trivial patches tree with your Acked-by:.

Stefan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]