mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 02:50:49 +09:00
ANDROID: KVM: arm64: Flush the vcpu iflags for non-protected VMs
The iflags are meant as input flags to the hypervisor, and will be used in future patches by calls to functions that sync debug and pmu state. Ensure that the hyp_vcpu copy is up-to-date with the host's on entry. Bug: 228011917 Signed-off-by: Fuad Tabba <tabba@google.com> Change-Id: Id04d65ee084c3745ddc283ff5e30348511a4a1d2
This commit is contained in:
@@ -509,6 +509,7 @@ static void flush_hyp_vcpu(struct pkvm_hyp_vcpu *hyp_vcpu)
|
||||
if (vcpu_get_flag(host_vcpu, PKVM_HOST_STATE_DIRTY))
|
||||
__flush_hyp_vcpu(hyp_vcpu);
|
||||
|
||||
hyp_vcpu->vcpu.arch.iflags = READ_ONCE(host_vcpu->arch.iflags);
|
||||
hyp_vcpu->vcpu.arch.hcr_el2 = HCR_GUEST_FLAGS & ~(HCR_RW | HCR_TWI | HCR_TWE);
|
||||
hyp_vcpu->vcpu.arch.hcr_el2 |= READ_ONCE(host_vcpu->arch.hcr_el2);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user