OSDN Git Service

target/i386: check intercept for XSETBV
authorPaolo Bonzini <pbonzini@redhat.com>
Fri, 13 Oct 2023 07:27:02 +0000 (09:27 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 17 Oct 2023 13:20:53 +0000 (15:20 +0200)
Note that this intercept is special; it is checked before the #GP
exception.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
target/i386/svm.h
target/i386/tcg/translate.c

index f9a7854..1bd7844 100644 (file)
 /* 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
index d2061ec..4f6f9fa 100644 (file)
@@ -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;
             }