Re: [PATCH v3 9/9] kvmtool: virtio: enable arm/arm64 support for bi-endianness

2014-05-08 Thread Rusty Russell
Alexander Graf ag...@suse.de writes: On 05/07/2014 11:57 AM, Marc Zyngier wrote: How virtio implementations should determine their endianness is a spec question, I think; at any rate QEMU and kvmtool ought to agree on how it's done. I think the most recent suggestion on the QEMU mailing list

Re: [PATCH v3 9/9] kvmtool: virtio: enable arm/arm64 support for bi-endianness

2014-05-07 Thread Peter Maydell
On 6 May 2014 19:38, Peter Maydell peter.mayd...@linaro.org wrote: On 6 May 2014 18:25, Marc Zyngier marc.zyng...@arm.com wrote: On Tue, May 06 2014 at 3:28:07 pm BST, Will Deacon will.dea...@arm.com wrote: On Thu, Apr 24, 2014 at 07:17:23PM +0100, Marc Zyngier wrote: +reg.addr =

Re: [PATCH v3 9/9] kvmtool: virtio: enable arm/arm64 support for bi-endianness

2014-05-07 Thread Alexander Graf
Am 07.05.2014 um 11:34 schrieb Peter Maydell peter.mayd...@linaro.org: On 6 May 2014 19:38, Peter Maydell peter.mayd...@linaro.org wrote: On 6 May 2014 18:25, Marc Zyngier marc.zyng...@arm.com wrote: On Tue, May 06 2014 at 3:28:07 pm BST, Will Deacon will.dea...@arm.com wrote: On Thu,

Re: [PATCH v3 9/9] kvmtool: virtio: enable arm/arm64 support for bi-endianness

2014-05-07 Thread Marc Zyngier
On Wed, May 07 2014 at 10:34:30 am BST, Peter Maydell peter.mayd...@linaro.org wrote: On 6 May 2014 19:38, Peter Maydell peter.mayd...@linaro.org wrote: On 6 May 2014 18:25, Marc Zyngier marc.zyng...@arm.com wrote: On Tue, May 06 2014 at 3:28:07 pm BST, Will Deacon will.dea...@arm.com

Re: [PATCH v3 9/9] kvmtool: virtio: enable arm/arm64 support for bi-endianness

2014-05-07 Thread Alexander Graf
Am 07.05.2014 um 11:52 schrieb Marc Zyngier marc.zyng...@arm.com: On Wed, May 07 2014 at 10:34:30 am BST, Peter Maydell peter.mayd...@linaro.org wrote: On 6 May 2014 19:38, Peter Maydell peter.mayd...@linaro.org wrote: On 6 May 2014 18:25, Marc Zyngier marc.zyng...@arm.com wrote: On

Re: [PATCH v3 9/9] kvmtool: virtio: enable arm/arm64 support for bi-endianness

2014-05-07 Thread Marc Zyngier
On Wed, May 07 2014 at 10:42:54 am BST, Alexander Graf ag...@suse.de wrote: Am 07.05.2014 um 11:34 schrieb Peter Maydell peter.mayd...@linaro.org: On 6 May 2014 19:38, Peter Maydell peter.mayd...@linaro.org wrote: On 6 May 2014 18:25, Marc Zyngier marc.zyng...@arm.com wrote: On Tue, May 06

Re: [PATCH v3 9/9] kvmtool: virtio: enable arm/arm64 support for bi-endianness

2014-05-07 Thread Alexander Graf
On 05/07/2014 11:57 AM, Marc Zyngier wrote: On Wed, May 07 2014 at 10:42:54 am BST, Alexander Graf ag...@suse.de wrote: Am 07.05.2014 um 11:34 schrieb Peter Maydell peter.mayd...@linaro.org: On 6 May 2014 19:38, Peter Maydell peter.mayd...@linaro.org wrote: On 6 May 2014 18:25, Marc Zyngier

Re: [PATCH v3 9/9] kvmtool: virtio: enable arm/arm64 support for bi-endianness

2014-05-07 Thread Peter Maydell
On 7 May 2014 10:52, Marc Zyngier marc.zyng...@arm.com wrote: On Wed, May 07 2014 at 10:34:30 am BST, Peter Maydell peter.mayd...@linaro.org wrote: Current opinion on the qemu-devel thread seems to be that we should just define that the endianness of the virtio device is the endianness of

Re: [PATCH v3 9/9] kvmtool: virtio: enable arm/arm64 support for bi-endianness

2014-05-07 Thread Marc Zyngier
On Wed, May 07 2014 at 10:55:45 am BST, Alexander Graf ag...@suse.de wrote: Am 07.05.2014 um 11:52 schrieb Marc Zyngier marc.zyng...@arm.com: On Wed, May 07 2014 at 10:34:30 am BST, Peter Maydell peter.mayd...@linaro.org wrote: On 6 May 2014 19:38, Peter Maydell peter.mayd...@linaro.org

Re: [PATCH v3 9/9] kvmtool: virtio: enable arm/arm64 support for bi-endianness

2014-05-07 Thread Michael S. Tsirkin
On Wed, May 07, 2014 at 12:11:13PM +0200, Alexander Graf wrote: On 05/07/2014 11:57 AM, Marc Zyngier wrote: On Wed, May 07 2014 at 10:42:54 am BST, Alexander Graf ag...@suse.de wrote: Am 07.05.2014 um 11:34 schrieb Peter Maydell peter.mayd...@linaro.org: On 6 May 2014 19:38, Peter Maydell

Re: [PATCH v3 9/9] kvmtool: virtio: enable arm/arm64 support for bi-endianness

2014-05-07 Thread Marc Zyngier
On Wed, May 07 2014 at 11:11:13 am BST, Alexander Graf ag...@suse.de wrote: On 05/07/2014 11:57 AM, Marc Zyngier wrote: Huh? What if my guest has usespace using an idmap, with Stage-1 MMU for isolation only (much like an MPU)? R-class guests anyone? Agreed, this is not the general use case,

Re: [PATCH v3 9/9] kvmtool: virtio: enable arm/arm64 support for bi-endianness

2014-05-07 Thread Greg Kurz
On Wed, 07 May 2014 10:52:01 +0100 Marc Zyngier marc.zyng...@arm.com wrote: On Wed, May 07 2014 at 10:34:30 am BST, Peter Maydell peter.mayd...@linaro.org wrote: On 6 May 2014 19:38, Peter Maydell peter.mayd...@linaro.org wrote: On 6 May 2014 18:25, Marc Zyngier marc.zyng...@arm.com wrote:

Re: [PATCH v3 9/9] kvmtool: virtio: enable arm/arm64 support for bi-endianness

2014-05-07 Thread Marc Zyngier
On Wed, May 07 2014 at 11:10:56 am BST, Peter Maydell peter.mayd...@linaro.org wrote: On 7 May 2014 10:52, Marc Zyngier marc.zyng...@arm.com wrote: On Wed, May 07 2014 at 10:34:30 am BST, Peter Maydell peter.mayd...@linaro.org wrote: Current opinion on the qemu-devel thread seems to be that

Re: [PATCH v3 9/9] kvmtool: virtio: enable arm/arm64 support for bi-endianness

2014-05-07 Thread Marc Zyngier
On Wed, May 07 2014 at 11:40:54 am BST, Greg Kurz gk...@linux.vnet.ibm.com wrote: On Wed, 07 May 2014 10:52:01 +0100 Marc Zyngier marc.zyng...@arm.com wrote: On Wed, May 07 2014 at 10:34:30 am BST, Peter Maydell peter.mayd...@linaro.org wrote: On 6 May 2014 19:38, Peter Maydell

Re: [PATCH v3 9/9] kvmtool: virtio: enable arm/arm64 support for bi-endianness

2014-05-07 Thread Alexander Graf
On 05/07/2014 12:46 PM, Marc Zyngier wrote: On Wed, May 07 2014 at 11:10:56 am BST, Peter Maydell peter.mayd...@linaro.org wrote: On 7 May 2014 10:52, Marc Zyngier marc.zyng...@arm.com wrote: On Wed, May 07 2014 at 10:34:30 am BST, Peter Maydell peter.mayd...@linaro.org wrote: Current

Re: [PATCH v3 9/9] kvmtool: virtio: enable arm/arm64 support for bi-endianness

2014-05-07 Thread Marc Zyngier
On 07/05/14 12:49, Alexander Graf wrote: On 05/07/2014 12:46 PM, Marc Zyngier wrote: On Wed, May 07 2014 at 11:10:56 am BST, Peter Maydell peter.mayd...@linaro.org wrote: On 7 May 2014 10:52, Marc Zyngier marc.zyng...@arm.com wrote: On Wed, May 07 2014 at 10:34:30 am BST, Peter Maydell

Re: [PATCH v3 9/9] kvmtool: virtio: enable arm/arm64 support for bi-endianness

2014-05-07 Thread Peter Maydell
On 7 May 2014 12:04, Marc Zyngier marc.zyng...@arm.com wrote: On Wed, May 07 2014 at 11:40:54 am BST, Greg Kurz gk...@linux.vnet.ibm.com wrote: All the fuzz is not really about enforcing kernel access... PPC also has a current endianness selector (MSR_LE) but it only makes sense if you are

Re: [PATCH v3 9/9] kvmtool: virtio: enable arm/arm64 support for bi-endianness

2014-05-07 Thread Peter Maydell
On 7 May 2014 13:16, Marc Zyngier marc.zyng...@arm.com wrote: That being said, I'm going to stop replying to this thread, and instead go back writing code, posting it, and getting on with my life in virtio-legacy land. Some of us are trying to have a conversation in this thread about

Re: [PATCH v3 9/9] kvmtool: virtio: enable arm/arm64 support for bi-endianness

2014-05-07 Thread Marc Zyngier
On 07/05/14 13:17, Peter Maydell wrote: On 7 May 2014 12:04, Marc Zyngier marc.zyng...@arm.com wrote: On Wed, May 07 2014 at 11:40:54 am BST, Greg Kurz gk...@linux.vnet.ibm.com wrote: All the fuzz is not really about enforcing kernel access... PPC also has a current endianness selector

Re: [PATCH v3 9/9] kvmtool: virtio: enable arm/arm64 support for bi-endianness

2014-05-07 Thread Greg Kurz
On Wed, 7 May 2014 13:17:51 +0100 Peter Maydell peter.mayd...@linaro.org wrote: On 7 May 2014 12:04, Marc Zyngier marc.zyng...@arm.com wrote: On Wed, May 07 2014 at 11:40:54 am BST, Greg Kurz gk...@linux.vnet.ibm.com wrote: All the fuzz is not really about enforcing kernel access... PPC

Re: [PATCH v3 9/9] kvmtool: virtio: enable arm/arm64 support for bi-endianness

2014-05-06 Thread Will Deacon
Hi Marc, On Thu, Apr 24, 2014 at 07:17:23PM +0100, Marc Zyngier wrote: Implement the kcm_cpu__get_endianness call for both AArch32 and s/kcm/kvm/ AArch64, and advertise the bi-endianness support. Signed-off-by: Marc Zyngier marc.zyng...@arm.com --- tools/kvm/arm/aarch32/kvm-cpu.c

Re: [PATCH v3 9/9] kvmtool: virtio: enable arm/arm64 support for bi-endianness

2014-05-06 Thread Marc Zyngier
Hi Will, On Tue, May 06 2014 at 3:28:07 pm BST, Will Deacon will.dea...@arm.com wrote: Hi Marc, On Thu, Apr 24, 2014 at 07:17:23PM +0100, Marc Zyngier wrote: Implement the kcm_cpu__get_endianness call for both AArch32 and s/kcm/kvm/ Are you saying that I hace fat fingers? ;-) AArch64,

Re: [PATCH v3 9/9] kvmtool: virtio: enable arm/arm64 support for bi-endianness

2014-05-06 Thread Peter Maydell
On 6 May 2014 18:25, Marc Zyngier marc.zyng...@arm.com wrote: On Tue, May 06 2014 at 3:28:07 pm BST, Will Deacon will.dea...@arm.com wrote: On Thu, Apr 24, 2014 at 07:17:23PM +0100, Marc Zyngier wrote: +reg.addr = (u64)data; +if (ioctl(vcpu-vcpu_fd, KVM_GET_ONE_REG, reg) 0) +

[PATCH v3 9/9] kvmtool: virtio: enable arm/arm64 support for bi-endianness

2014-04-24 Thread Marc Zyngier
Implement the kcm_cpu__get_endianness call for both AArch32 and AArch64, and advertise the bi-endianness support. Signed-off-by: Marc Zyngier marc.zyng...@arm.com --- tools/kvm/arm/aarch32/kvm-cpu.c | 14 + tools/kvm/arm/aarch64/include/kvm/kvm-cpu-arch.h | 2 ++