From: Paolo Bonzini Date: Fri, 16 Jun 2023 21:57:30 +0000 (+0200) Subject: target/i386: fix INVD vmexit X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=4d714d1a0bf1fca9576ee53a1a5dfa3fd5ddae99;p=qemu.git target/i386: fix INVD vmexit Due to a typo or perhaps a brain fart, the INVD vmexit was never generated. Fix it (but not that fixing just the typo would break both INVD and WBINVD, due to a case of two wrongs making a right). Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c index 08c4cab73f..0de068d4b7 100644 --- a/target/i386/tcg/translate.c +++ b/target/i386/tcg/translate.c @@ -6119,7 +6119,7 @@ static bool disas_insn(DisasContext *s, CPUState *cpu) case 0x108: /* invd */ case 0x109: /* wbinvd */ if (check_cpl0(s)) { - gen_svm_check_intercept(s, (b & 2) ? SVM_EXIT_INVD : SVM_EXIT_WBINVD); + gen_svm_check_intercept(s, (b & 1) ? SVM_EXIT_WBINVD : SVM_EXIT_INVD); /* nothing to do */ } break;