Re: [PATCH v2] KVM: Specify byte order for KVM_EXIT_MMIO

2014-01-28 Thread Peter Maydell
On 28 January 2014 01:59, Scott Wood wrote: > On Sat, 2014-01-25 at 03:15 +0100, Alexander Graf wrote: >> Ok, let's go through the combinations for a 32-bit write of 0x01020304 on >> PPC and what data[] looks like >> >> your proposal: >> >> BE guest, BE host: { 0x01, 0x02, 0x03, 0x04 } >> LE

Re: [PATCH v2] KVM: Specify byte order for KVM_EXIT_MMIO

2014-01-27 Thread Scott Wood
On Sat, 2014-01-25 at 03:15 +0100, Alexander Graf wrote: > Ok, let's go through the combinations for a 32-bit write of 0x01020304 on PPC > and what data[] looks like > > your proposal: > > BE guest, BE host: { 0x01, 0x02, 0x03, 0x04 } > LE guest, BE host: { 0x04, 0x03, 0x02, 0x01 } > BE gu

Re: [PATCH v2] KVM: Specify byte order for KVM_EXIT_MMIO

2014-01-27 Thread Peter Maydell
On 27 January 2014 07:52, Alexander Graf wrote: > > On 26.01.2014, at 06:43, Victor Kamensky wrote: >> Scott's definition interpretation does not depend on CPU type. >> It is much simpler. It does not use notion not very well defined >> like "real bus". it does not use word 'endianness', byteswap

Re: [PATCH v2] KVM: Specify byte order for KVM_EXIT_MMIO

2014-01-26 Thread Alexander Graf
On 26.01.2014, at 06:43, Victor Kamensky wrote: > On 25 January 2014 19:46, Victor Kamensky wrote: >> On 25 January 2014 10:31, Christoffer Dall >> wrote: >>> On Sat, Jan 25, 2014 at 04:23:00PM +, Peter Maydell wrote: On 25 January 2014 02:15, Alexander Graf wrote: > Ok, let's g

Re: [PATCH v2] KVM: Specify byte order for KVM_EXIT_MMIO

2014-01-26 Thread Alexander Graf
On 26.01.2014, at 04:46, Victor Kamensky wrote: > On 25 January 2014 10:31, Christoffer Dall > wrote: >> On Sat, Jan 25, 2014 at 04:23:00PM +, Peter Maydell wrote: >>> On 25 January 2014 02:15, Alexander Graf wrote: Ok, let's go through the combinations for a 32-bit write of 0x010203

Re: [PATCH v2] KVM: Specify byte order for KVM_EXIT_MMIO

2014-01-25 Thread Victor Kamensky
On 25 January 2014 19:46, Victor Kamensky wrote: > On 25 January 2014 10:31, Christoffer Dall > wrote: >> On Sat, Jan 25, 2014 at 04:23:00PM +, Peter Maydell wrote: >>> On 25 January 2014 02:15, Alexander Graf wrote: >>> > Ok, let's go through the combinations for a 32-bit write of 0x010203

Re: [PATCH v2] KVM: Specify byte order for KVM_EXIT_MMIO

2014-01-25 Thread Victor Kamensky
On 25 January 2014 10:31, Christoffer Dall wrote: > On Sat, Jan 25, 2014 at 04:23:00PM +, Peter Maydell wrote: >> On 25 January 2014 02:15, Alexander Graf wrote: >> > Ok, let's go through the combinations for a 32-bit write of 0x01020304 on >> > PPC and what data[] looks like Alex, could yo

Re: [PATCH v2] KVM: Specify byte order for KVM_EXIT_MMIO

2014-01-25 Thread Christoffer Dall
On Sat, Jan 25, 2014 at 04:23:00PM +, Peter Maydell wrote: > On 25 January 2014 02:15, Alexander Graf wrote: > > Ok, let's go through the combinations for a 32-bit write of 0x01020304 on > > PPC and what data[] looks like > > > > your proposal: > > > > BE guest, BE host: { 0x01, 0x02, 0x03,

Re: [PATCH v2] KVM: Specify byte order for KVM_EXIT_MMIO

2014-01-25 Thread Peter Maydell
On 25 January 2014 02:15, Alexander Graf wrote: > Ok, let's go through the combinations for a 32-bit write of 0x01020304 on PPC > and what data[] looks like > > your proposal: > > BE guest, BE host: { 0x01, 0x02, 0x03, 0x04 } > LE guest, BE host: { 0x04, 0x03, 0x02, 0x01 } > BE guest, LE ho

Re: [PATCH v2] KVM: Specify byte order for KVM_EXIT_MMIO

2014-01-25 Thread Alexander Graf
On 25.01.2014, at 16:36, Victor Kamensky wrote: > On 25 January 2014 01:20, Alexander Graf wrote: > >> It even >> does it on BE PPC if you access devices through swizzling >> buses, but we don't care as hypervisor. All we know in kvm is: >> >> - instruction used for access >> -> originating

Re: [PATCH v2] KVM: Specify byte order for KVM_EXIT_MMIO

2014-01-25 Thread Victor Kamensky
On 25 January 2014 01:20, Alexander Graf wrote: > > >> Am 25.01.2014 um 03:37 schrieb Victor Kamensky : >> >>> On 24 January 2014 18:15, Alexander Graf wrote: >>> On 25.01.2014, at 02:58, Scott Wood wrote: > On Sat, 2014-01-25 at 00:24 +, Peter Maydell wrote: >> On 24 Janua

Re: [PATCH v2] KVM: Specify byte order for KVM_EXIT_MMIO

2014-01-25 Thread Alexander Graf
> Am 25.01.2014 um 03:37 schrieb Victor Kamensky : > >> On 24 January 2014 18:15, Alexander Graf wrote: >> >>> On 25.01.2014, at 02:58, Scott Wood wrote: >>> On Sat, 2014-01-25 at 00:24 +, Peter Maydell wrote: > On 24 January 2014 23:51, Scott Wood wrote: >> On Fri, 2014-01

Re: [PATCH v2] KVM: Specify byte order for KVM_EXIT_MMIO

2014-01-25 Thread Alexander Graf
> Am 25.01.2014 um 03:34 schrieb Christoffer Dall : > >> On Sat, Jan 25, 2014 at 03:15:35AM +0100, Alexander Graf wrote: >> >>> On 25.01.2014, at 02:58, Scott Wood wrote: >>> On Sat, 2014-01-25 at 00:24 +, Peter Maydell wrote: > On 24 January 2014 23:51, Scott Wood wrote: >>

Re: [PATCH v2] KVM: Specify byte order for KVM_EXIT_MMIO

2014-01-24 Thread Victor Kamensky
On 24 January 2014 18:15, Alexander Graf wrote: > > On 25.01.2014, at 02:58, Scott Wood wrote: > >> On Sat, 2014-01-25 at 00:24 +, Peter Maydell wrote: >>> On 24 January 2014 23:51, Scott Wood wrote: On Fri, 2014-01-24 at 15:39 -0800, Christoffer Dall wrote: > diff --git a/Documenta

Re: [PATCH v2] KVM: Specify byte order for KVM_EXIT_MMIO

2014-01-24 Thread Christoffer Dall
On Sat, Jan 25, 2014 at 03:15:35AM +0100, Alexander Graf wrote: > > On 25.01.2014, at 02:58, Scott Wood wrote: > > > On Sat, 2014-01-25 at 00:24 +, Peter Maydell wrote: > >> On 24 January 2014 23:51, Scott Wood wrote: > >>> On Fri, 2014-01-24 at 15:39 -0800, Christoffer Dall wrote: > d

Re: [PATCH v2] KVM: Specify byte order for KVM_EXIT_MMIO

2014-01-24 Thread Alexander Graf
On 25.01.2014, at 03:04, Scott Wood wrote: > On Fri, 2014-01-24 at 17:56 -0800, Christoffer Dall wrote: >> On Sat, Jan 25, 2014 at 12:24:08AM +, Peter Maydell wrote: >>> Finally, I think it's a bit confusing in that "as if the guest had >>> accessed memory" is assigning implicit semantics to

Re: [PATCH v2] KVM: Specify byte order for KVM_EXIT_MMIO

2014-01-24 Thread Alexander Graf
On 25.01.2014, at 02:58, Scott Wood wrote: > On Sat, 2014-01-25 at 00:24 +, Peter Maydell wrote: >> On 24 January 2014 23:51, Scott Wood wrote: >>> On Fri, 2014-01-24 at 15:39 -0800, Christoffer Dall wrote: diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kv

Re: [PATCH v2] KVM: Specify byte order for KVM_EXIT_MMIO

2014-01-24 Thread Scott Wood
On Fri, 2014-01-24 at 17:56 -0800, Christoffer Dall wrote: > On Sat, Jan 25, 2014 at 12:24:08AM +, Peter Maydell wrote: > > Finally, I think it's a bit confusing in that "as if the guest had > > accessed memory" is assigning implicit semantics to memory > > in the emulated system, when memory i

Re: [PATCH v2] KVM: Specify byte order for KVM_EXIT_MMIO

2014-01-24 Thread Scott Wood
On Sat, 2014-01-25 at 00:24 +, Peter Maydell wrote: > On 24 January 2014 23:51, Scott Wood wrote: > > On Fri, 2014-01-24 at 15:39 -0800, Christoffer Dall wrote: > >> diff --git a/Documentation/virtual/kvm/api.txt > >> b/Documentation/virtual/kvm/api.txt > >> index 366bf4b..6dbd68c 100644 > >>

Re: [PATCH v2] KVM: Specify byte order for KVM_EXIT_MMIO

2014-01-24 Thread Christoffer Dall
On Sat, Jan 25, 2014 at 12:24:08AM +, Peter Maydell wrote: > On 24 January 2014 23:51, Scott Wood wrote: > > On Fri, 2014-01-24 at 15:39 -0800, Christoffer Dall wrote: > >> The KVM API documentation is not clear about the semantics of the data > >> field on the mmio struct on the kvm_run struc

Re: [PATCH v2] KVM: Specify byte order for KVM_EXIT_MMIO

2014-01-24 Thread Peter Maydell
On 24 January 2014 23:51, Scott Wood wrote: > On Fri, 2014-01-24 at 15:39 -0800, Christoffer Dall wrote: >> The KVM API documentation is not clear about the semantics of the data >> field on the mmio struct on the kvm_run struct. >> >> This has become problematic when supporting ARM guests on big-

Re: [PATCH v2] KVM: Specify byte order for KVM_EXIT_MMIO

2014-01-24 Thread Victor Kamensky
On 24 January 2014 15:51, Scott Wood wrote: > On Fri, 2014-01-24 at 15:39 -0800, Christoffer Dall wrote: >> The KVM API documentation is not clear about the semantics of the data >> field on the mmio struct on the kvm_run struct. >> >> This has become problematic when supporting ARM guests on big-

Re: [PATCH v2] KVM: Specify byte order for KVM_EXIT_MMIO

2014-01-24 Thread Scott Wood
On Fri, 2014-01-24 at 15:39 -0800, Christoffer Dall wrote: > The KVM API documentation is not clear about the semantics of the data > field on the mmio struct on the kvm_run struct. > > This has become problematic when supporting ARM guests on big-endian > host systems with guests of both endianne

[PATCH v2] KVM: Specify byte order for KVM_EXIT_MMIO

2014-01-24 Thread Christoffer Dall
The KVM API documentation is not clear about the semantics of the data field on the mmio struct on the kvm_run struct. This has become problematic when supporting ARM guests on big-endian host systems with guests of both endianness types, because it is unclear how the data should be exported to us