Re: [PATCH v4 0/4] KVM: arm64: BUG FIX: Correctly handle zero register transfers

2015-12-08 Thread Andrew Jones
On Tue, Dec 08, 2015 at 09:57:21AM +0300, Pavel Fedin wrote: > Hello! > > > I messed up the "load into xzr" test royally in the last attached patch. > > It was quite wrong. > > Yes, because "mov %0, xzr" is not trapped. > > > I have now tested > > > > asm volatile( > > "str %3,

RE: [PATCH v4 0/4] KVM: arm64: BUG FIX: Correctly handle zero register transfers

2015-12-07 Thread Pavel Fedin
Hello! > I messed up the "load into xzr" test royally in the last attached patch. > It was quite wrong. Yes, because "mov %0, xzr" is not trapped. > I have now tested > > asm volatile( > "str %3, [%1]\n\t" > "ldr wzr, [%1]\n\t" > "str wzr, [%2]\n\t" > "ldr %0, [%2]\n\t"

RE: [PATCH v4 0/4] KVM: arm64: BUG FIX: Correctly handle zero register transfers

2015-12-07 Thread Pavel Fedin
Hello! > But, if Pavel doesn't > mind trying them out on his system, then it'd be good to know if they > reproduce there. I'd like to find out if it's a test case problem or > something else strange going on with environments. Does not build, applied to master: --- cut ---

RE: [PATCH v4 0/4] KVM: arm64: BUG FIX: Correctly handle zero register transfers

2015-12-07 Thread Pavel Fedin
Hello! > FYI, I tried writing test cases for this issue with kvm-unit-tests. The > issue didn't reproduce for me. It's quite possible my test cases are > flawed, so I'm not making any claims about the validity of the series This is indeed very interesting, so i'll take a look at it. For now

RE: [PATCH v4 0/4] KVM: arm64: BUG FIX: Correctly handle zero register transfers

2015-12-07 Thread Pavel Fedin
Hello! > FYI, I tried writing test cases for this issue with kvm-unit-tests. The > issue didn't reproduce for me. It's quite possible my test cases are > flawed Indeed they are, a very little thing fell through again... :) It's not just SP, it's SP_EL0. And you never initialize it to anything

Re: [PATCH v4 0/4] KVM: arm64: BUG FIX: Correctly handle zero register transfers

2015-12-07 Thread Andrew Jones
On Mon, Dec 07, 2015 at 04:36:31PM -0600, Andrew Jones wrote: > On Mon, Dec 07, 2015 at 11:36:28AM +0300, Pavel Fedin wrote: > > Hello! > > > > > FYI, I tried writing test cases for this issue with kvm-unit-tests. The > > > issue didn't reproduce for me. It's quite possible my test cases are > >

Re: [PATCH v4 0/4] KVM: arm64: BUG FIX: Correctly handle zero register transfers

2015-12-07 Thread Andrew Jones
On Mon, Dec 07, 2015 at 11:47:44AM +0300, Pavel Fedin wrote: > Hello! > > > But, if Pavel doesn't > > mind trying them out on his system, then it'd be good to know if they > > reproduce there. I'd like to find out if it's a test case problem or > > something else strange going on with

Re: [PATCH v4 0/4] KVM: arm64: BUG FIX: Correctly handle zero register transfers

2015-12-07 Thread Andrew Jones
On Mon, Dec 07, 2015 at 12:48:12PM +0300, Pavel Fedin wrote: > Hello! > > > FYI, I tried writing test cases for this issue with kvm-unit-tests. The > > issue didn't reproduce for me. It's quite possible my test cases are > > flawed > > Indeed they are, a very little thing fell through again...

Re: [PATCH v4 0/4] KVM: arm64: BUG FIX: Correctly handle zero register transfers

2015-12-07 Thread Andrew Jones
On Mon, Dec 07, 2015 at 03:58:11PM -0600, Andrew Jones wrote: > On Mon, Dec 07, 2015 at 12:48:12PM +0300, Pavel Fedin wrote: > > Hello! > > > > > FYI, I tried writing test cases for this issue with kvm-unit-tests. The > > > issue didn't reproduce for me. It's quite possible my test cases are > >

Re: [PATCH v4 0/4] KVM: arm64: BUG FIX: Correctly handle zero register transfers

2015-12-07 Thread Andrew Jones
On Mon, Dec 07, 2015 at 11:36:28AM +0300, Pavel Fedin wrote: > Hello! > > > FYI, I tried writing test cases for this issue with kvm-unit-tests. The > > issue didn't reproduce for me. It's quite possible my test cases are > > flawed, so I'm not making any claims about the validity of the series >

Re: [PATCH v4 0/4] KVM: arm64: BUG FIX: Correctly handle zero register transfers

2015-12-04 Thread Andrew Jones
On Fri, Dec 04, 2015 at 03:03:10PM +0300, Pavel Fedin wrote: > ARM64 CPU has zero register which is read-only, with a value of 0. > However, KVM currently incorrectly recognizes it being SP (because > Rt == 31, and in struct user_pt_regs 'regs' array is followed by SP), > resulting in invalid