Re: [PATCH] selftests: kvm: fix sync_regs_test with newer gccs

2019-10-09 Thread Sean Christopherson
On Wed, Oct 09, 2019 at 01:11:24PM +0200, Paolo Bonzini wrote: > On 09/10/19 12:42, Vitaly Kuznetsov wrote: > > Paolo Bonzini writes: > >> There is no practical difference with Vitaly's patch. The first > >> _vcpu_run has no pre-/post-conditions on the value of %rbx: > > > > I think what Sean wa

Re: [PATCH] selftests: kvm: fix sync_regs_test with newer gccs

2019-10-09 Thread Vitaly Kuznetsov
Paolo Bonzini writes: > On 09/10/19 12:42, Vitaly Kuznetsov wrote: >> Paolo Bonzini writes: >>> There is no practical difference with Vitaly's patch. The first >>> _vcpu_run has no pre-/post-conditions on the value of %rbx: >> >> I think what Sean was suggesting is to prevent GCC from insertin

Re: [PATCH] selftests: kvm: fix sync_regs_test with newer gccs

2019-10-09 Thread Paolo Bonzini
On 09/10/19 12:42, Vitaly Kuznetsov wrote: > Paolo Bonzini writes: >> There is no practical difference with Vitaly's patch. The first >> _vcpu_run has no pre-/post-conditions on the value of %rbx: > > I think what Sean was suggesting is to prevent GCC from inserting > anything (and thus clobberi

Re: [PATCH] selftests: kvm: fix sync_regs_test with newer gccs

2019-10-09 Thread Vitaly Kuznetsov
Paolo Bonzini writes: > On 08/10/19 20:36, Sean Christopherson wrote: >> On Tue, Oct 08, 2019 at 08:08:08PM +0200, Vitaly Kuznetsov wrote: >>> Commit 204c91eff798a ("KVM: selftests: do not blindly clobber registers in >>> guest asm") was intended to make test more gcc-proof, however, the result

Re: [PATCH] selftests: kvm: fix sync_regs_test with newer gccs

2019-10-09 Thread Paolo Bonzini
On 08/10/19 20:36, Sean Christopherson wrote: > On Tue, Oct 08, 2019 at 08:08:08PM +0200, Vitaly Kuznetsov wrote: >> Commit 204c91eff798a ("KVM: selftests: do not blindly clobber registers in >> guest asm") was intended to make test more gcc-proof, however, the result >> is exactly the opposite: o

Re: [PATCH] selftests: kvm: fix sync_regs_test with newer gccs

2019-10-08 Thread Sean Christopherson
On Tue, Oct 08, 2019 at 11:29:32AM -0700, Jim Mattson wrote: > On Tue, Oct 8, 2019 at 11:08 AM Vitaly Kuznetsov wrote: > > > > Commit 204c91eff798a ("KVM: selftests: do not blindly clobber registers in > > guest asm") was intended to make test more gcc-proof, however, the result > > is exactly th

Re: [PATCH] selftests: kvm: fix sync_regs_test with newer gccs

2019-10-08 Thread Sean Christopherson
On Tue, Oct 08, 2019 at 08:08:08PM +0200, Vitaly Kuznetsov wrote: > Commit 204c91eff798a ("KVM: selftests: do not blindly clobber registers in > guest asm") was intended to make test more gcc-proof, however, the result > is exactly the opposite: on newer gccs (e.g. 8.2.1) the test breaks with > >

Re: [PATCH] selftests: kvm: fix sync_regs_test with newer gccs

2019-10-08 Thread Jim Mattson
On Tue, Oct 8, 2019 at 11:08 AM Vitaly Kuznetsov wrote: > > Commit 204c91eff798a ("KVM: selftests: do not blindly clobber registers in > guest asm") was intended to make test more gcc-proof, however, the result > is exactly the opposite: on newer gccs (e.g. 8.2.1) the test breaks with > > Te

[PATCH] selftests: kvm: fix sync_regs_test with newer gccs

2019-10-08 Thread Vitaly Kuznetsov
Commit 204c91eff798a ("KVM: selftests: do not blindly clobber registers in guest asm") was intended to make test more gcc-proof, however, the result is exactly the opposite: on newer gccs (e.g. 8.2.1) the test breaks with Test Assertion Failure x86_64/sync_regs_test.c:168: run->s.regs