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

2011-12-06 Thread Matt Evans
On 07/12/11 00:38, Cyrill Gorcunov wrote: > 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; >

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; > > #

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

2011-12-06 Thread Pekka Enberg
On Tue, 6 Dec 2011, Cyrill Gorcunov wrote: On Tue, Dec 06, 2011 at 01:58:24PM +0200, Pekka Enberg wrote: 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 wrote: On Tue, Dec

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:58:24PM +0200, Pekka Enberg wrote: > 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 > > > wrote: > > > > On Tue, Dec 06, 2011 at 12:25:29P

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 wrote: > > > On Tue, Dec 06, 2011 at 12:25:29PM +0200, Pekka Enberg wrote: > > >> On Tue, Dec 6, 2011 at 5:42 AM, Matt Evan

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 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 wrote: > >> > vesa, pci-shmem and virtio-pci devices need to se

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 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 wrote: >> > vesa, pci-shmem and virtio-pci devices need to set up config space with >> > little-endian conversions (as config space

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 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 needs to be

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 5:42 AM, Matt Evans 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 needs to be reversed when building on BE systems. > > Signed-off-by: Matt Evans

[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 --- tools/kvm/hw/pci-shmem.c | 23 +++--