Re: [RFC 0/5] Making KVM_GET_ONE_REG/KVM_SET_ONE_REG generic.

2012-09-06 Thread Peter Maydell
On 6 September 2012 02:44, Rusty Russell rusty.russ...@linaro.org wrote: Actually, I hadn't realized ARM didn't do 128-bit FP regs already. But I'd guess they'll arrive one day. AArch64 has them. I had thought that you'd be able to treat one 128-bit reg as two 64 bit regs (in the same way that

Re: [RFC 0/5] Making KVM_GET_ONE_REG/KVM_SET_ONE_REG generic.

2012-09-06 Thread Avi Kivity
On 09/04/2012 04:59 PM, Alexander Graf wrote: Not is you pack the pointer in a __u64, which is what we do to preserve padding. Then it is only s390 which needs extra love. I doubt that anyone wants to run 31-bit user space on an s390x system. In fact, I wouldn't be surprised if exactly

Re: [RFC 0/5] Making KVM_GET_ONE_REG/KVM_SET_ONE_REG generic.

2012-09-06 Thread Avi Kivity
On 09/05/2012 09:48 AM, Rusty Russell wrote: Peter Maydell peter.mayd...@linaro.org writes: On 1 September 2012 13:28, Rusty Russell ru...@rustcorp.com.au wrote: Rusty Russell (8): KVM: ARM: Fix walk_msrs() KVM: Move KVM_SET_ONE_REG/KVM_GET_ONE_REG to generic code. KVM: Add

Re: [RFC 0/5] Making KVM_GET_ONE_REG/KVM_SET_ONE_REG generic.

2012-09-06 Thread Alexander Graf
On 06.09.2012, at 10:48, Avi Kivity a...@redhat.com wrote: On 09/05/2012 09:48 AM, Rusty Russell wrote: Peter Maydell peter.mayd...@linaro.org writes: On 1 September 2012 13:28, Rusty Russell ru...@rustcorp.com.au wrote: Rusty Russell (8): KVM: ARM: Fix walk_msrs() KVM: Move

Re: [RFC 0/5] Making KVM_GET_ONE_REG/KVM_SET_ONE_REG generic.

2012-09-06 Thread Avi Kivity
On 09/06/2012 06:08 PM, Alexander Graf wrote: On 06.09.2012, at 10:48, Avi Kivity a...@redhat.com wrote: On 09/05/2012 09:48 AM, Rusty Russell wrote: Peter Maydell peter.mayd...@linaro.org writes: On 1 September 2012 13:28, Rusty Russell ru...@rustcorp.com.au wrote: Rusty Russell (8):

Re: [RFC 0/5] Making KVM_GET_ONE_REG/KVM_SET_ONE_REG generic.

2012-09-06 Thread Peter Maydell
On 6 September 2012 16:16, Avi Kivity a...@redhat.com wrote: (and the APIC, if treated as one-large-register) is 4k) ...so don't do that then. Trying to treat the whole APIC as a single register means you don't get any of the advantages of does this kernel support this register? etc. Is there

Re: [RFC 0/5] Making KVM_GET_ONE_REG/KVM_SET_ONE_REG generic.

2012-09-06 Thread Avi Kivity
On 09/06/2012 06:23 PM, Peter Maydell wrote: On 6 September 2012 16:16, Avi Kivity a...@redhat.com wrote: (and the APIC, if treated as one-large-register) is 4k) ...so don't do that then. Trying to treat the whole APIC as a single register means you don't get any of the advantages of does

Re: [RFC 0/5] Making KVM_GET_ONE_REG/KVM_SET_ONE_REG generic.

2012-09-06 Thread Rusty Russell
Avi Kivity a...@redhat.com writes: On 09/06/2012 06:23 PM, Peter Maydell wrote: On 6 September 2012 16:16, Avi Kivity a...@redhat.com wrote: (and the APIC, if treated as one-large-register) is 4k) ...so don't do that then. Trying to treat the whole APIC as a single register means you don't

Re: [RFC 0/5] Making KVM_GET_ONE_REG/KVM_SET_ONE_REG generic.

2012-09-05 Thread Rusty Russell
Avi Kivity a...@redhat.com writes: On 09/03/2012 03:33 PM, Rusty Russell wrote: Avi Kivity a...@redhat.com writes: On 09/01/2012 03:35 PM, Rusty Russell wrote: Passing an address in a struct is pretty bad, since it involves compatibility wrappers. Right, some s390 thing. Err, no, i386

Re: [RFC 0/5] Making KVM_GET_ONE_REG/KVM_SET_ONE_REG generic.

2012-09-05 Thread Rusty Russell
Peter Maydell peter.mayd...@linaro.org writes: On 1 September 2012 13:28, Rusty Russell ru...@rustcorp.com.au wrote: Rusty Russell (8): KVM: ARM: Fix walk_msrs() KVM: Move KVM_SET_ONE_REG/KVM_GET_ONE_REG to generic code. KVM: Add KVM_REG_SIZE() helper. KVM: ARM: use

Re: [RFC 0/5] Making KVM_GET_ONE_REG/KVM_SET_ONE_REG generic.

2012-09-05 Thread Peter Maydell
On 5 September 2012 07:48, Rusty Russell ru...@rustcorp.com.au wrote: Peter Maydell peter.mayd...@linaro.org writes: This is a problem because it means userspace needs to know the size of each register, and the kernel doesn't provide any way to determine the size. This defeats the idea that

Re: [RFC 0/5] Making KVM_GET_ONE_REG/KVM_SET_ONE_REG generic.

2012-09-05 Thread Rusty Russell
Peter Maydell peter.mayd...@linaro.org writes: On 5 September 2012 07:48, Rusty Russell ru...@rustcorp.com.au wrote: Peter Maydell peter.mayd...@linaro.org writes: I could live with always read/write 64 bits. I definitely don't want to have to deal with matching up register widths to accesses

Re: [RFC 0/5] Making KVM_GET_ONE_REG/KVM_SET_ONE_REG generic.

2012-09-04 Thread Avi Kivity
On 09/03/2012 03:33 PM, Rusty Russell wrote: Avi Kivity a...@redhat.com writes: On 09/01/2012 03:35 PM, Rusty Russell wrote: Passing an address in a struct is pretty bad, since it involves compatibility wrappers. Right, some s390 thing. Err, no, i386 on x86-64, or ppc32 on ppc64, or arm

Re: [RFC 0/5] Making KVM_GET_ONE_REG/KVM_SET_ONE_REG generic.

2012-09-04 Thread Peter Maydell
On 1 September 2012 13:28, Rusty Russell ru...@rustcorp.com.au wrote: Rusty Russell (8): KVM: ARM: Fix walk_msrs() KVM: Move KVM_SET_ONE_REG/KVM_GET_ONE_REG to generic code. KVM: Add KVM_REG_SIZE() helper. KVM: ARM: use KVM_SET_ONE_REG/KVM_GET_ONE_REG. KVM: Add

Re: [RFC 0/5] Making KVM_GET_ONE_REG/KVM_SET_ONE_REG generic.

2012-09-04 Thread Alexander Graf
On 04.09.2012, at 07:48, Avi Kivity a...@redhat.com wrote: On 09/03/2012 03:33 PM, Rusty Russell wrote: Avi Kivity a...@redhat.com writes: On 09/01/2012 03:35 PM, Rusty Russell wrote: Passing an address in a struct is pretty bad, since it involves compatibility wrappers. Right, some

Re: [RFC 0/5] Making KVM_GET_ONE_REG/KVM_SET_ONE_REG generic.

2012-09-04 Thread Alexander Graf
On 04.09.2012, at 09:31, Peter Maydell wrote: On 1 September 2012 13:28, Rusty Russell ru...@rustcorp.com.au wrote: Rusty Russell (8): KVM: ARM: Fix walk_msrs() KVM: Move KVM_SET_ONE_REG/KVM_GET_ONE_REG to generic code. KVM: Add KVM_REG_SIZE() helper. KVM: ARM: use

Re: [RFC 0/5] Making KVM_GET_ONE_REG/KVM_SET_ONE_REG generic.

2012-09-03 Thread Avi Kivity
On 09/01/2012 03:35 PM, Rusty Russell wrote: Avi Kivity a...@redhat.com writes: -Capability: basic +Capability: KVM_CAP_REG_LIST Architectures: arm all OK, I guess that's to be true in future. Fixed. Type: vcpu ioctl -Parameters: struct kvm_msr_list (in/out) +Parameters: struct

Re: [RFC 0/5] Making KVM_GET_ONE_REG/KVM_SET_ONE_REG generic.

2012-09-03 Thread Rusty Russell
Avi Kivity a...@redhat.com writes: On 09/01/2012 03:35 PM, Rusty Russell wrote: Passing an address in a struct is pretty bad, since it involves compatibility wrappers. Right, some s390 thing. Err, no, i386 on x86-64, or ppc32 on ppc64, or arm on arm64 Any time you put a pointer in a

Re: [RFC 0/5] Making KVM_GET_ONE_REG/KVM_SET_ONE_REG generic.

2012-09-03 Thread Peter Maydell
On 3 September 2012 13:33, Rusty Russell ru...@rustcorp.com.au wrote: I have no idea, since I didn't hear the complaints. But any non-fixed size array has issues in C; there's not much we can do about it. x86 manages this fine for msrs, and I didn't have a problem using it for my test

Re: [RFC 0/5] Making KVM_GET_ONE_REG/KVM_SET_ONE_REG generic.

2012-09-01 Thread Avi Kivity
On 08/29/2012 11:39 AM, Rusty Russell wrote: -4.76 KVM_VCPU_GET_MSR_INDEX_LIST +4.76 KVM_VCPU_GET_REG_LIST -Capability: basic +Capability: KVM_CAP_REG_LIST Architectures: arm all Type: vcpu ioctl -Parameters: struct kvm_msr_list (in/out) +Parameters: struct kvm_reg_list

Re: [RFC 0/5] Making KVM_GET_ONE_REG/KVM_SET_ONE_REG generic.

2012-09-01 Thread Rusty Russell
Rusty Russell rusty.russ...@linaro.org writes: Hi all, This compiles, completely untested, but it's my attempt to give Avi (and Alexander) what he asked for in a generic register accessor. And here's the tested version: see my new onereg-abi branch. My next step is to demux CSELR,

Re: [RFC 0/5] Making KVM_GET_ONE_REG/KVM_SET_ONE_REG generic.

2012-09-01 Thread Rusty Russell
Avi Kivity a...@redhat.com writes: -Capability: basic +Capability: KVM_CAP_REG_LIST Architectures: arm all OK, I guess that's to be true in future. Fixed. Type: vcpu ioctl -Parameters: struct kvm_msr_list (in/out) +Parameters: struct kvm_reg_list (in/out) Returns: 0 on success; -1

Re: [RFC 0/5] Making KVM_GET_ONE_REG/KVM_SET_ONE_REG generic.

2012-09-01 Thread Rusty Russell
Rusty Russell ru...@rustcorp.com.au writes: Rusty Russell rusty.russ...@linaro.org writes: Hi all, This compiles, completely untested, but it's my attempt to give Avi (and Alexander) what he asked for in a generic register accessor. And here's the tested version: see my new

Re: [RFC 0/5] Making KVM_GET_ONE_REG/KVM_SET_ONE_REG generic.

2012-08-29 Thread Peter Maydell
On 29 August 2012 00:37, Rusty Russell rusty.russ...@linaro.org wrote: This compiles, completely untested, but it's my attempt to give Avi (and Alexander) what he asked for in a generic register accessor. Mingled in these patches is the conversion of the latest KVM ARM code, which is

Re: [RFC 0/5] Making KVM_GET_ONE_REG/KVM_SET_ONE_REG generic.

2012-08-29 Thread Rusty Russell
Peter Maydell peter.mayd...@linaro.org writes: On 29 August 2012 00:37, Rusty Russell rusty.russ...@linaro.org wrote: This compiles, completely untested, but it's my attempt to give Avi (and Alexander) what he asked for in a generic register accessor. Mingled in these patches is the

[RFC 0/5] Making KVM_GET_ONE_REG/KVM_SET_ONE_REG generic.

2012-08-28 Thread Rusty Russell
Hi all, This compiles, completely untested, but it's my attempt to give Avi (and Alexander) what he asked for in a generic register accessor. Mingled in these patches is the conversion of the latest KVM ARM code, which is the first proposed user: by the end, we use these accessors for