public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] KVM: x86/emulator: Fix handing of POP SS to correctly set interruptibility
@ 2022-08-21 21:59 Michal Luczaj
  2022-08-21 22:06 ` [kvm-unit-tests PATCH] x86/emulator: Test POP-SS blocking Michal Luczaj
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Michal Luczaj @ 2022-08-21 21:59 UTC (permalink / raw)
  To: kvm; +Cc: seanjc, pbonzini, Michal Luczaj

The emulator checks the wrong variable while setting the CPU
interruptibility state.  Fix the condition.

Signed-off-by: Michal Luczaj <mhal@rbox.co>
---
I'll follow up with a testcase.

 arch/x86/kvm/emulate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index b4eeb7c75dfa..5cfd07f483b3 100644
--- a/arch/x86/kvm/emulate.c
+++ b/arch/x86/kvm/emulate.c
@@ -1967,7 +1967,7 @@ static int em_pop_sreg(struct x86_emulate_ctxt *ctxt)
 	if (rc != X86EMUL_CONTINUE)
 		return rc;
 
-	if (ctxt->modrm_reg == VCPU_SREG_SS)
+	if (seg == VCPU_SREG_SS)
 		ctxt->interruptibility = KVM_X86_SHADOW_INT_MOV_SS;
 	if (ctxt->op_bytes > 2)
 		rsp_increment(ctxt, ctxt->op_bytes - 2);
-- 
2.37.2


^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2022-08-30 21:41 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-21 21:59 [PATCH] KVM: x86/emulator: Fix handing of POP SS to correctly set interruptibility Michal Luczaj
2022-08-21 22:06 ` [kvm-unit-tests PATCH] x86/emulator: Test POP-SS blocking Michal Luczaj
2022-08-22  2:40   ` Michal Luczaj
2022-08-22 15:42     ` Sean Christopherson
2022-08-22 18:30       ` Nadav Amit
2022-08-22 18:37         ` Sean Christopherson
2022-08-23  0:16       ` Michal Luczaj
2022-08-24 18:32         ` Sean Christopherson
2022-08-24 21:49           ` Michal Luczaj
2022-08-25 17:03             ` Sean Christopherson
2022-08-25 17:32               ` Michal Luczaj
2022-08-25 17:56                 ` Sean Christopherson
2022-08-24  0:20 ` [PATCH] KVM: x86/emulator: Fix handing of POP SS to correctly set interruptibility Sean Christopherson
2022-08-24 17:19   ` Paolo Bonzini
2022-08-30 21:41 ` Sean Christopherson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox