Re: [RFC 5/5] KVM: ARM: Access all registers via KVM_GET_ONE_REG/KVM_SET_ONE_REG.

2012-09-05 Thread Rusty Russell
Christoffer Dall c.d...@virtualopensystems.com writes: that's fine, but then the #define's shouldn't be called something with COPROC in their names. Sure, feel free to rename it. I failed to come up with a concise, clear name, so coproc stuck. Cheers, Rusty. -- To unsubscribe from this list:

Re: [RFC 5/5] KVM: ARM: Access all registers via KVM_GET_ONE_REG/KVM_SET_ONE_REG.

2012-09-04 Thread Peter Maydell
On 1 September 2012 20:40, Christoffer Dall c.d...@virtualopensystems.com wrote: On Sep 1, 2012, at 6:25 AM, Peter Maydell peter.mayd...@linaro.org wrote: On 1 September 2012 10:16, Avi Kivity a...@redhat.com wrote: On 08/29/2012 11:21 AM, Rusty Russell wrote: Peter Maydell wrote: ...but if

Re: [RFC 5/5] KVM: ARM: Access all registers via KVM_GET_ONE_REG/KVM_SET_ONE_REG.

2012-09-04 Thread Christoffer Dall
On Tue, Sep 4, 2012 at 9:09 AM, Peter Maydell peter.mayd...@linaro.org wrote: On 1 September 2012 20:40, Christoffer Dall c.d...@virtualopensystems.com wrote: On Sep 1, 2012, at 6:25 AM, Peter Maydell peter.mayd...@linaro.org wrote: On 1 September 2012 10:16, Avi Kivity a...@redhat.com wrote:

Re: [RFC 5/5] KVM: ARM: Access all registers via KVM_GET_ONE_REG/KVM_SET_ONE_REG.

2012-09-01 Thread Avi Kivity
On 08/29/2012 08:29 AM, Christoffer Dall wrote: On Tue, Aug 28, 2012 at 4:48 PM, Rusty Russell rusty.russ...@linaro.org wrote: No structures at all any more. I fail to see the great benefit of all this. The code is certainly not easier to read and it's certainly not more clear what is

Re: [RFC 5/5] KVM: ARM: Access all registers via KVM_GET_ONE_REG/KVM_SET_ONE_REG.

2012-09-01 Thread Avi Kivity
On 08/29/2012 11:21 AM, Rusty Russell wrote: + /* Coprocessor 0 means we want a core register. */ + if ((u32)reg-id KVM_REG_ARM_COPROC_START == 0) + return set_core_reg(vcpu, reg); ...but if we do go this path, you can't use coprocessor 0 to mean core

Re: [RFC 5/5] KVM: ARM: Access all registers via KVM_GET_ONE_REG/KVM_SET_ONE_REG.

2012-09-01 Thread Peter Maydell
On 1 September 2012 10:16, Avi Kivity a...@redhat.com wrote: On 08/29/2012 11:21 AM, Rusty Russell wrote: + /* Coprocessor 0 means we want a core register. */ + if ((u32)reg-id KVM_REG_ARM_COPROC_START == 0) + return set_core_reg(vcpu, reg); ...but if we do go

Re: [RFC 5/5] KVM: ARM: Access all registers via KVM_GET_ONE_REG/KVM_SET_ONE_REG.

2012-09-01 Thread Christoffer Dall
On Sep 1, 2012, at 6:25 AM, Peter Maydell peter.mayd...@linaro.org wrote: On 1 September 2012 10:16, Avi Kivity a...@redhat.com wrote: On 08/29/2012 11:21 AM, Rusty Russell wrote: + /* Coprocessor 0 means we want a core register. */ + if ((u32)reg-id KVM_REG_ARM_COPROC_START ==

Re: [RFC 5/5] KVM: ARM: Access all registers via KVM_GET_ONE_REG/KVM_SET_ONE_REG.

2012-08-29 Thread Christoffer Dall
On Tue, Aug 28, 2012 at 4:48 PM, Rusty Russell rusty.russ...@linaro.org wrote: No structures at all any more. I fail to see the great benefit of all this. The code is certainly not easier to read and it's certainly not more clear what is going on. Is this simply so we don't have to copy

Re: [RFC 5/5] KVM: ARM: Access all registers via KVM_GET_ONE_REG/KVM_SET_ONE_REG.

2012-08-29 Thread Peter Maydell
On 29 August 2012 00:48, Rusty Russell rusty.russ...@linaro.org wrote: No structures at all any more. I'm not fussed whether we use structs for the core regs or not; they're not exactly going to change in future so it's purely a question of whether you think it's aesthetically prettier to have

Re: [RFC 5/5] KVM: ARM: Access all registers via KVM_GET_ONE_REG/KVM_SET_ONE_REG.

2012-08-29 Thread Rusty Russell
Peter Maydell peter.mayd...@linaro.org writes: On 29 August 2012 00:48, Rusty Russell rusty.russ...@linaro.org wrote: No structures at all any more. I'm not fussed whether we use structs for the core regs or not; they're not exactly going to change in future so it's purely a question of

Re: [RFC 5/5] KVM: ARM: Access all registers via KVM_GET_ONE_REG/KVM_SET_ONE_REG.

2012-08-29 Thread Rusty Russell
Rusty Russell rusty.russ...@linaro.org writes: No structures at all any more. Note: the encoding of general registers makes sense, but it's not completely logical so the code is quite messy. It would actually be far neater to expose the struct kvm_vcpu_regs, and use offsets into that as the

[RFC 5/5] KVM: ARM: Access all registers via KVM_GET_ONE_REG/KVM_SET_ONE_REG.

2012-08-28 Thread Rusty Russell
No structures at all any more. Note: the encoding of general registers makes sense, but it's not completely logical so the code is quite messy. It would actually be far neater to expose the struct kvm_vcpu_regs, and use offsets into that as the ABI. Peter? Signed-off-by: Rusty Russell