Commit c4889f54 authored by Alexey Kardashevskiy's avatar Alexey Kardashevskiy Committed by Stefan Hajnoczi
Browse files

powerpc pci: fixed packing of ranges[]



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: default avatarAlexey Kardashevskiy <aik@ozlabs.ru>
Tested-by: default avatarStefan Weil <sw@weilnetz.de>
Reviewed-by: default avatarStefan Weil <sw@weilnetz.de>
Acked-by: default avatarAlexander Graf <agraf@suse.de>
Signed-off-by: default avatarStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
parent 61dc008f
......@@ -418,7 +418,7 @@ int spapr_populate_pci_devices(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),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment