Skip to content

Commit

Permalink
target/i386: check intercept for XSETBV
Browse files Browse the repository at this point in the history
Note that this intercept is special; it is checked before the #GP
exception.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
  • Loading branch information
bonzini committed Oct 17, 2023
1 parent 83629b1 commit 24b3459
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions target/i386/svm.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions target/i386/tcg/translate.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 24b3459

Please sign in to comment.