Re: [PATCH 23/28] kvm tools: Endian-sanitise pci.h and PCI device setup

2011-12-06 Thread Cyrill Gorcunov
On Tue, Dec 06, 2011 at 12:25:29PM +0200, Pekka Enberg wrote: On Tue, Dec 6, 2011 at 5:42 AM, Matt Evans m...@ozlabs.org wrote: vesa, pci-shmem and virtio-pci devices need to set up config space with little-endian conversions (as config space is LE).  The pci_config_address bitfield also

Re: [PATCH 23/28] kvm tools: Endian-sanitise pci.h and PCI device setup

2011-12-06 Thread Pekka Enberg
On Tue, Dec 6, 2011 at 12:28 PM, Cyrill Gorcunov gorcu...@gmail.com wrote: On Tue, Dec 06, 2011 at 12:25:29PM +0200, Pekka Enberg wrote: On Tue, Dec 6, 2011 at 5:42 AM, Matt Evans m...@ozlabs.org wrote: vesa, pci-shmem and virtio-pci devices need to set up config space with little-endian

Re: [PATCH 23/28] kvm tools: Endian-sanitise pci.h and PCI device setup

2011-12-06 Thread Cyrill Gorcunov
On Tue, Dec 06, 2011 at 01:41:56PM +0200, Pekka Enberg wrote: On Tue, Dec 6, 2011 at 12:28 PM, Cyrill Gorcunov gorcu...@gmail.com wrote: On Tue, Dec 06, 2011 at 12:25:29PM +0200, Pekka Enberg wrote: On Tue, Dec 6, 2011 at 5:42 AM, Matt Evans m...@ozlabs.org wrote: vesa, pci-shmem and

Re: [PATCH 23/28] kvm tools: Endian-sanitise pci.h and PCI device setup

2011-12-06 Thread Pekka Enberg
On Tue, 2011-12-06 at 15:47 +0400, Cyrill Gorcunov wrote: On Tue, Dec 06, 2011 at 01:41:56PM +0200, Pekka Enberg wrote: On Tue, Dec 6, 2011 at 12:28 PM, Cyrill Gorcunov gorcu...@gmail.com wrote: On Tue, Dec 06, 2011 at 12:25:29PM +0200, Pekka Enberg wrote: On Tue, Dec 6, 2011 at 5:42 AM,

Re: [PATCH 23/28] kvm tools: Endian-sanitise pci.h and PCI device setup

2011-12-06 Thread Cyrill Gorcunov
On Tue, Dec 06, 2011 at 03:29:00PM +0200, Pekka Enberg wrote: Hehe, this is because it should be rtaher defined as union pci_config_address { struct { #if __BYTE_ORDER == __LITTLE_ENDIAN unsignedzeros : 2; unsignedregister_number : 6; #else ...

[PATCH 23/28] kvm tools: Endian-sanitise pci.h and PCI device setup

2011-12-05 Thread Matt Evans
vesa, pci-shmem and virtio-pci devices need to set up config space with little-endian conversions (as config space is LE). The pci_config_address bitfield also needs to be reversed when building on BE systems. Signed-off-by: Matt Evans m...@ozlabs.org --- tools/kvm/hw/pci-shmem.c | 23