x86/AMD: Inject #GP instead of #UD when unable to map vmcb
authorSuravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Tue, 13 Aug 2013 12:24:16 +0000 (14:24 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 13 Aug 2013 12:24:16 +0000 (14:24 +0200)
commit910daaf5aaa837624099c0fc5c373bea7202ff43
tree8141b7d441482b3f6fb035dbb1802aed728a1e46
parent85fc517ec3055e8e8d9c9e36e15a81e630237252
x86/AMD: Inject #GP instead of #UD when unable to map vmcb

According to AMD Programmer's Manual vol2, vmrun, vmsave and vmload
should inject #GP instead of #UD when unable to access memory
location for vmcb.  Also, the code should make sure that L1 guest
EFER.SVME is not zero.  Otherwise, #UD should be injected.

Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Reviewed-by: Tim Deegan <tim@xen.org>
xen/arch/x86/hvm/svm/svm.c
xen/include/asm-x86/hvm/svm/nestedsvm.h