aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2023-10-13 09:27:02 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2023-10-17 15:20:53 +0200
commit24b34590d07f885a906ebb52fd84aa5e33d4e421 (patch)
tree8085ef37991e517c137bd5cffc22af83cedd5c9e
parent83629b14614a7b56358addd96ff85d92eb6f72dc (diff)
target/i386: check intercept for XSETBV
Note that this intercept is special; it is checked before the #GP exception. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r--target/i386/svm.h1
-rw-r--r--target/i386/tcg/translate.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/target/i386/svm.h b/target/i386/svm.h
index f9a785489d..1bd7844730 100644
--- a/target/i386/svm.h
+++ b/target/i386/svm.h
@@ -132,6 +132,7 @@
/* only included in documentation, maybe wrong */
#define SVM_EXIT_MONITOR 0x08a
#define SVM_EXIT_MWAIT 0x08b
+#define SVM_EXIT_XSETBV 0x08d
#define SVM_EXIT_NPF 0x400
#define SVM_EXIT_ERR -1
diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c
index d2061ec44a..4f6f9fa7e5 100644
--- a/target/i386/tcg/translate.c
+++ b/target/i386/tcg/translate.c
@@ -5916,6 +5916,7 @@ static bool disas_insn(DisasContext *s, CPUState *cpu)
| PREFIX_REPZ | PREFIX_REPNZ))) {
goto illegal_op;
}
+ gen_svm_check_intercept(s, SVM_EXIT_XSETBV);
if (!check_cpl0(s)) {
break;
}