Re: [PATCH v2 3/5] KVM: VMX: Add error handling to VMREAD helper

2019-07-29 Thread Paolo Bonzini
On 28/07/19 21:36, Josh Poimboeuf wrote: > On Fri, Jul 19, 2019 at 01:41:08PM -0700, Sean Christopherson wrote: >> @@ -68,8 +67,22 @@ static __always_inline unsigned long >> __vmcs_readl(unsigned long field) >> { >> unsigned long value; >> >> -asm volatile (__ex_clear("vmread %1, %0",

Re: [PATCH v2 3/5] KVM: VMX: Add error handling to VMREAD helper

2019-07-28 Thread Josh Poimboeuf
On Fri, Jul 19, 2019 at 01:41:08PM -0700, Sean Christopherson wrote: > @@ -68,8 +67,22 @@ static __always_inline unsigned long __vmcs_readl(unsigned > long field) > { > unsigned long value; > > - asm volatile (__ex_clear("vmread %1, %0", "%k0") > - : "=r"(value) :

[PATCH v2 3/5] KVM: VMX: Add error handling to VMREAD helper

2019-07-19 Thread Sean Christopherson
Now that VMREAD flows require a taken branch, courtesy of commit 3901336ed9887 ("x86/kvm: Don't call kvm_spurious_fault() from .fixup") bite the bullet and add full error handling to VMREAD, i.e. replace the JMP added by __ex()/kvm_handle_fault_on_reboot() with a hinted Jcc. To minimize