KVM: VMX: Add AX to list of registers clobbered by guest switch
By chance this caused no harm so far. We overwrite AX during switch to/from guest context, so we must declare this.
Signed-off-by Jan Kiszka <[email protected]>
--- arch/x86/kvm/vmx.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/kvm/vmx.c +1 -1
@@ -4013,7 +4013,7 @@ static void vmx_vcpu_run(struct kvm_vcpu *vcpu) #endif [cr2]"i"(offsetof(struct vcpu_vmx, vcpu.arch.cr2)) : "cc", "memory" - ,R "bx" ,R "di" ,R "si" + ,R "ax" ,R "bx" ,R "di" ,R "si" #ifdef CONFIG_X86_64 ,"r8" ,"r9" ,"r10" ,"r11" ,"r12" ,"r13" ,"r14" ,"r15" #endif
Signature · 1 line
1.7.1
Avi Kivity
AppliedQuoted 2 lines · Jan Kiszka
By chance this caused no harm so far. We overwrite AX during switch to/from guest context, so we must declare this.
Applied, thanks.
I think we can remove the use of ax, which should reduce the chance of a compile failure due to register pressure. But that can come later.
Signature · 2 lines
I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.