summaryrefslogtreecommitdiff
path: root/arch/x86/kvm/emulate.c
diff options
context:
space:
mode:
authorSean Christopherson <seanjc@google.com>2025-02-01 04:55:13 +0300
committerSean Christopherson <seanjc@google.com>2025-02-24 20:01:07 +0300
commit407d03fe924c69d04bca980402fb11d1542cd74c (patch)
treefd0f7a42daee6723908a3d4d116b832015a03ccb /arch/x86/kvm/emulate.c
parent08e3d89eb330ef579a8a494264e6f192b4434fc0 (diff)
downloadlinux-407d03fe924c69d04bca980402fb11d1542cd74c.tar.xz
KVM: x86: Plumb the src/dst operand types through to .check_intercept()
When checking for intercept when emulating an instruction on behalf of L2, forward the source and destination operand types to vendor code so that VMX can synthesize the correct EXIT_QUALIFICATION for port I/O VM-Exits. Link: https://lore.kernel.org/r/20250201015518.689704-7-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'arch/x86/kvm/emulate.c')
-rw-r--r--arch/x86/kvm/emulate.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index 0915b5e8aa71..ca613796b5af 100644
--- a/arch/x86/kvm/emulate.c
+++ b/arch/x86/kvm/emulate.c
@@ -477,6 +477,8 @@ static int emulator_check_intercept(struct x86_emulate_ctxt *ctxt,
.dst_val = ctxt->dst.val64,
.src_bytes = ctxt->src.bytes,
.dst_bytes = ctxt->dst.bytes,
+ .src_type = ctxt->src.type,
+ .dst_type = ctxt->dst.type,
.ad_bytes = ctxt->ad_bytes,
.next_rip = ctxt->_eip,
};