All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] KVM: arm64: Fix FEAT_MOPS in pKVM
@ 2025-01-06 11:23 Vladimir Murzin
  2025-01-06 23:20 ` Oliver Upton
  0 siblings, 1 reply; 4+ messages in thread
From: Vladimir Murzin @ 2025-01-06 11:23 UTC (permalink / raw)
  To: kvmarm; +Cc: oliver.upton, maz, joey.gouly

Flush HCRX_EL2 when switching between the host and the guests.

Fixes: 84de212d739e ("KVM: arm64: Make FEAT_MOPS UNDEF if not advertised to the guest")
Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
---
 arch/arm64/kvm/hyp/nvhe/hyp-main.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm64/kvm/hyp/nvhe/hyp-main.c b/arch/arm64/kvm/hyp/nvhe/hyp-main.c
index 6aa0b13d86..d9a41ddc63 100644
--- a/arch/arm64/kvm/hyp/nvhe/hyp-main.c
+++ b/arch/arm64/kvm/hyp/nvhe/hyp-main.c
@@ -109,6 +109,7 @@ static void flush_hyp_vcpu(struct pkvm_hyp_vcpu *hyp_vcpu)
 	hyp_vcpu->vcpu.arch.hcr_el2 &= ~(HCR_TWI | HCR_TWE);
 	hyp_vcpu->vcpu.arch.hcr_el2 |= READ_ONCE(host_vcpu->arch.hcr_el2) &
 						 (HCR_TWI | HCR_TWE);
+	hyp_vcpu->vcpu.arch.hcrx_el2    = host_vcpu->arch.hcrx_el2;
 
 	hyp_vcpu->vcpu.arch.iflags	= host_vcpu->arch.iflags;
 
-- 
2.24.0


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

end of thread, other threads:[~2025-01-07  9:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-06 11:23 [PATCH] KVM: arm64: Fix FEAT_MOPS in pKVM Vladimir Murzin
2025-01-06 23:20 ` Oliver Upton
2025-01-07  8:08   ` Fuad Tabba
2025-01-07  9:59     ` Vladimir Murzin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.