From: Sergey Dyasli Date: Wed, 14 Nov 2018 10:23:18 +0000 (+0000) Subject: x86/vvmx: add VMX_INSN_INVEPT_INVVPID_INVALID_OP errno X-Git-Tag: archive/raspbian/4.14.0+80-gd101b417b7-1+rpi1^2~63^2~2960 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=2593a14e20d0d9017b6b771c99b58f7094f62f17;p=xen.git x86/vvmx: add VMX_INSN_INVEPT_INVVPID_INVALID_OP errno And use it in nvmx_handle_invept() and nvmx_handle_invvpid(). Signed-off-by: Sergey Dyasli Acked-by: Kevin Tian --- diff --git a/xen/arch/x86/hvm/vmx/vvmx.c b/xen/arch/x86/hvm/vmx/vvmx.c index 071ee61d19..a9b92a5b95 100644 --- a/xen/arch/x86/hvm/vmx/vvmx.c +++ b/xen/arch/x86/hvm/vmx/vvmx.c @@ -1891,7 +1891,7 @@ static int nvmx_handle_invept(struct cpu_user_regs *regs) __invept(INVEPT_ALL_CONTEXT, 0); break; default: - vmfail_invalid(regs); + vmfail(regs, VMX_INSN_INVEPT_INVVPID_INVALID_OP); return X86EMUL_OKAY; } vmsucceed(regs); @@ -1916,7 +1916,7 @@ static int nvmx_handle_invvpid(struct cpu_user_regs *regs) hvm_asid_flush_vcpu_asid(&vcpu_nestedhvm(current).nv_n2asid); break; default: - vmfail_invalid(regs); + vmfail(regs, VMX_INSN_INVEPT_INVVPID_INVALID_OP); return X86EMUL_OKAY; } diff --git a/xen/include/asm-x86/hvm/vmx/vmcs.h b/xen/include/asm-x86/hvm/vmx/vmcs.h index 76dd04a72d..6d0ae56fc1 100644 --- a/xen/include/asm-x86/hvm/vmx/vmcs.h +++ b/xen/include/asm-x86/hvm/vmx/vmcs.h @@ -538,6 +538,7 @@ enum vmx_insn_errno VMX_INSN_UNSUPPORTED_VMCS_COMPONENT = 12, VMX_INSN_VMXON_IN_VMX_ROOT = 15, VMX_INSN_VMENTRY_BLOCKED_BY_MOV_SS = 26, + VMX_INSN_INVEPT_INVVPID_INVALID_OP = 28, VMX_INSN_FAIL_INVALID = ~0, };