p***@xen.org
2018-11-14 18:55:46 UTC
commit 2593a14e20d0d9017b6b771c99b58f7094f62f17
Author: Sergey Dyasli <***@citrix.com>
AuthorDate: Wed Nov 14 10:23:18 2018 +0000
Commit: Andrew Cooper <***@citrix.com>
CommitDate: Wed Nov 14 18:42:48 2018 +0000
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 <***@citrix.com>
Acked-by: Kevin Tian <***@intel.com>
---
xen/arch/x86/hvm/vmx/vvmx.c | 4 ++--
xen/include/asm-x86/hvm/vmx/vmcs.h | 1 +
2 files changed, 3 insertions(+), 2 deletions(-)
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,
};
--
generated by git-patchbot for /home/xen/git/xen.git#staging
Author: Sergey Dyasli <***@citrix.com>
AuthorDate: Wed Nov 14 10:23:18 2018 +0000
Commit: Andrew Cooper <***@citrix.com>
CommitDate: Wed Nov 14 18:42:48 2018 +0000
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 <***@citrix.com>
Acked-by: Kevin Tian <***@intel.com>
---
xen/arch/x86/hvm/vmx/vvmx.c | 4 ++--
xen/include/asm-x86/hvm/vmx/vmcs.h | 1 +
2 files changed, 3 insertions(+), 2 deletions(-)
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,
};
--
generated by git-patchbot for /home/xen/git/xen.git#staging