]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
KVM: x86: Open code handling of completed MMIO reads in emulator_read_write()
authorSean Christopherson <seanjc@google.com>
Wed, 25 Feb 2026 01:20:37 +0000 (17:20 -0800)
committerSean Christopherson <seanjc@google.com>
Tue, 3 Mar 2026 00:02:52 +0000 (16:02 -0800)
commit4046823e78b0c9abd25d23bffd7f1c773532dbfd
tree63d93bbb8c794c68b1e9d9bf7077017fb8054273
parent0b16e69d17d8c35c5c9d5918bf596c75a44655d3
KVM: x86: Open code handling of completed MMIO reads in emulator_read_write()

Open code the handling of completed MMIO reads instead of using an ops
hook, as burying the logic behind a (likely RETPOLINE'd) indirect call,
and with an unintuitive name, makes relatively straightforward code hard
to comprehend.

Opportunistically add comments to explain the dependencies between the
emulator's mem_read cache and the MMIO read completion logic, as it's very
easy to overlook the cache's role in getting the read data into the
correct destination.

No functional change intended.

Tested-by: Tom Lendacky <thomas.lendacky@gmail.com>
Tested-by: Rick Edgecombe <rick.p.edgecombe@intel.com>
Link: https://patch.msgid.link/20260225012049.920665-3-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/emulate.c
arch/x86/kvm/x86.c