aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm
diff options
context:
space:
mode:
authorJoerg Roedel <joerg.roedel@amd.com>2010-12-07 11:15:06 -0500
committerAvi Kivity <avi@redhat.com>2011-01-12 04:30:49 -0500
commit81dd35d42c9aef3c1f7ae6ce4cf6a0d382661db5 (patch)
treeac263e921a56954c8e72668e1bcf5afb82a24bb7 /arch/x86/include/asm
parentd4dbf470096c51cb4785167ea59fdbdea87ccbe4 (diff)
KVM: SVM: Add xsetbv intercept
This patch implements the xsetbv intercept to the AMD part of KVM. This makes AVX usable in a save way for the guest on AVX capable AMD hardware. The patch is tested by using AVX in the guest and host in parallel and checking for data corruption. I also used the KVM xsave unit-tests and they all pass. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/include/asm')
-rw-r--r--arch/x86/include/asm/svm.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/include/asm/svm.h b/arch/x86/include/asm/svm.h
index 82ecaa32fcf7..f7087bf9caf0 100644
--- a/arch/x86/include/asm/svm.h
+++ b/arch/x86/include/asm/svm.h
@@ -47,6 +47,7 @@ enum {
47 INTERCEPT_MONITOR, 47 INTERCEPT_MONITOR,
48 INTERCEPT_MWAIT, 48 INTERCEPT_MWAIT,
49 INTERCEPT_MWAIT_COND, 49 INTERCEPT_MWAIT_COND,
50 INTERCEPT_XSETBV,
50}; 51};
51 52
52 53
@@ -329,6 +330,7 @@ struct __attribute__ ((__packed__)) vmcb {
329#define SVM_EXIT_MONITOR 0x08a 330#define SVM_EXIT_MONITOR 0x08a
330#define SVM_EXIT_MWAIT 0x08b 331#define SVM_EXIT_MWAIT 0x08b
331#define SVM_EXIT_MWAIT_COND 0x08c 332#define SVM_EXIT_MWAIT_COND 0x08c
333#define SVM_EXIT_XSETBV 0x08d
332#define SVM_EXIT_NPF 0x400 334#define SVM_EXIT_NPF 0x400
333 335
334#define SVM_EXIT_ERR -1 336#define SVM_EXIT_ERR -1