target/i386: fix INHIBIT_IRQ/TF/RF handling for VMRUN
authorPaolo Bonzini <pbonzini@redhat.com>
Sat, 25 May 2024 08:30:50 +0000 (10:30 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Sat, 8 Jun 2024 08:33:38 +0000 (10:33 +0200)
commit1a150d331d9bbd882c8b93146ff7fbc6259f0961
tree241ed8caddbf74dd7ef3026819cba303c13f4b58
parent8aa76496dfaac0d7b0dd34793359680c90d9aea0
target/i386: fix INHIBIT_IRQ/TF/RF handling for VMRUN

From vm entry to exit, VMRUN is handled as a single instruction.  It
uses DISAS_NORETURN in order to avoid processing TF or RF before
the first instruction executes in the guest.  However, the corresponding
handling is missing in vmexit.  Add it, and at the same time reorganize
the comments with quotes from the manual about the tasks performed
by a #VMEXIT.

Another gen_eob() task that is missing in VMRUN is preparing the
HF_INHIBIT_IRQ flag for the next instruction, in this case by loading
it from the VMCB control state.

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