]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
KVM: x86: Dedup kvm_sev_es_mmio_{read,write}()
authorSean Christopherson <seanjc@google.com>
Wed, 25 Feb 2026 01:20:43 +0000 (17:20 -0800)
committerSean Christopherson <seanjc@google.com>
Tue, 3 Mar 2026 00:02:52 +0000 (16:02 -0800)
commit33e09e2f9735fef7255aa96d1fe00782777bc44b
tree0615f8413adef8ddba1d65a39e189b5889729304
parent144089f5c3944cf6383d53ab5d941b74924a0989
KVM: x86: Dedup kvm_sev_es_mmio_{read,write}()

Dedup the SEV-ES emulated MMIO code by using the read vs. write emulator
ops to handle the few differences between reads and writes.

Opportunistically tweak the comment about fragments to call out that KVM
should verify that userspace can actually handle MMIO requests that cross
page boundaries.  Unlike emulated MMIO, the request is made in the GPA
space, not the GVA space, i.e. emulation across page boundaries can work
generically, at least in theory.

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-9-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/x86.c