]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86: emulator: introduce emulator_recalc_and_set_mode
authorMaxim Levitsky <mlevitsk@redhat.com>
Tue, 25 Oct 2022 12:47:29 +0000 (15:47 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Nov 2022 16:57:57 +0000 (17:57 +0100)
commit829a8e45db6babf5dba90f4aa117ba731d8cfaad
tree2db9cc9a323fb24091e56cea8e6d490c58343bf9
parent78af8fad88fecf2d56e636678eeb111cd216ed76
KVM: x86: emulator: introduce emulator_recalc_and_set_mode

commit 29a975beff7eaa90c493f5876ca5b8457f982b43 upstream.

Some instructions update the cpu execution mode, which needs to update the
emulation mode.

Extract this code, and make assign_eip_far use it.

assign_eip_far now reads CS, instead of getting it via a parameter,
which is ok, because callers always assign CS to the same value
before calling this function.

No functional change is intended.

Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
Message-Id: <20221025124741.228045-12-mlevitsk@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kvm/emulate.c