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

2014-05-08 Thread Rusty Russell
Alexander Graf 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 mailin

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 wrote: > On 7 May 2014 12:04, Marc Zyngier wrote: > > On Wed, May 07 2014 at 11:40:54 am BST, Greg Kurz > > wrote: > >> All the fuzz is not really about enforcing kernel access... PPC also > >> has a current endianness selector (MSR_LE) but it on

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 wrote: >> On Wed, May 07 2014 at 11:40:54 am BST, Greg Kurz >> 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

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 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 virtio-legacy behaviour :-)

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 wrote: > On Wed, May 07 2014 at 11:40:54 am BST, Greg Kurz > 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 in the cpu context. Initial versions o

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 >> wrote: >>> On 7 May 2014 10:52, Marc Zyngier wrote: On Wed, May 07 2014 at 10:34:30 am BST, Peter Maydell wrote: > Current opinion on

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 wrote: On 7 May 2014 10:52, Marc Zyngier wrote: On Wed, May 07 2014 at 10:34:30 am BST, Peter Maydell wrote: Current opinion on the qemu-devel thread seems to be that we should just define tha

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 wrote: > On Wed, 07 May 2014 10:52:01 +0100 > Marc Zyngier wrote: > >> On Wed, May 07 2014 at 10:34:30 am BST, Peter Maydell >> wrote: >> > On 6 May 2014 19:38, Peter Maydell wrote: >> >> On 6 May 2014 18:25, Marc Zyngier wrote: >> >>> On Tue,

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 wrote: > On 7 May 2014 10:52, Marc Zyngier wrote: >> On Wed, May 07 2014 at 10:34:30 am BST, Peter Maydell >> wrote: >>> Current opinion on the qemu-devel thread seems to be that we >>> should just define that the endianness of the virtio de

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 wrote: > On Wed, May 07 2014 at 10:34:30 am BST, Peter Maydell > wrote: > > On 6 May 2014 19:38, Peter Maydell wrote: > >> On 6 May 2014 18:25, Marc Zyngier wrote: > >>> On Tue, May 06 2014 at 3:28:07 pm BST, Will Deacon > >>> wrote: > O

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 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, but t

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 wrote: > >>>Am 07.05.2014 um 11:34 schrieb Peter Maydell : > >>> > On 6 May 2014 19:38, Peter Maydell wrote: > >On 6 May

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 wrote: >> Am 07.05.2014 um 11:52 schrieb Marc Zyngier : >> >>> On Wed, May 07 2014 at 10:34:30 am BST, Peter Maydell >>> wrote: On 6 May 2014 19:38, Peter Maydell wrote: > On 6 May 2014 18:25, Marc Zyngier wrote: >> On Tue, Ma

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 wrote: Am 07.05.2014 um 11:34 schrieb Peter Maydell : On 6 May 2014 19:38, Peter Maydell wrote: On 6 May 2014 18:25, Marc Zyngier wrote: On Tue, May 06 2014 at 3:28:07 pm BST, Will Deacon

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 wrote: > On Wed, May 07 2014 at 10:34:30 am BST, Peter Maydell > 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 the guest kernel at the point where the

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 wrote: >> Am 07.05.2014 um 11:34 schrieb Peter Maydell : >> >>> On 6 May 2014 19:38, Peter Maydell wrote: On 6 May 2014 18:25, Marc Zyngier wrote: > On Tue, May 06 2014 at 3:28:07 pm BST, Will Deacon > wrote: >> On Thu,

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 : > >> On Wed, May 07 2014 at 10:34:30 am BST, Peter Maydell >> wrote: >>> On 6 May 2014 19:38, Peter Maydell wrote: On 6 May 2014 18:25, Marc Zyngier wrote: > On Tue, May 06 2014 at 3:28:07 pm BST, Will Deacon > 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:34:30 am BST, Peter Maydell wrote: > On 6 May 2014 19:38, Peter Maydell wrote: >> On 6 May 2014 18:25, Marc Zyngier wrote: >>> On Tue, May 06 2014 at 3:28:07 pm BST, Will Deacon >>> wrote: On Thu, Apr 24, 2014 at 07:17:23PM +0100, Marc Zyngier wrote: > +

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 : > >> On 6 May 2014 19:38, Peter Maydell wrote: >>> On 6 May 2014 18:25, Marc Zyngier wrote: On Tue, May 06 2014 at 3:28:07 pm BST, Will Deacon wrote: > On Thu, Apr 24, 2014 at 07:17:23PM +0100, Marc Zyngier wrote: > +reg

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 wrote: > On 6 May 2014 18:25, Marc Zyngier wrote: >> On Tue, May 06 2014 at 3:28:07 pm BST, Will Deacon >> 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

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 wrote: > On Tue, May 06 2014 at 3:28:07 pm BST, Will Deacon > 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, ®) < 0) >>> +die("KVM_GET_ONE_RE

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 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, and advertis

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 > --- > tools/kvm/arm/aarch32/kvm-cpu.c | 14