Revert "ANDROID: KVM: arm64: Avoid switching to guest context if guest is already loaded"

This reverts commit 42fe901800.

Bug: 233587962
Signed-off-by: Will Deacon <willdeacon@google.com>
Change-Id: Icfe3e376901026537c30d82f582f4ea1b70f95df
This commit is contained in:
Will Deacon
2022-07-07 15:51:29 +01:00
parent a0ef0f6062
commit 595bc3a9a9

View File

@@ -17,17 +17,6 @@ struct tlb_inv_context {
static void __tlb_switch_to_guest(struct kvm_s2_mmu *mmu,
struct tlb_inv_context *cxt)
{
struct kvm_cpu_context *host_ctxt;
struct kvm_vcpu *vcpu;
host_ctxt = &this_cpu_ptr(&kvm_host_data)->host_ctxt;
vcpu = host_ctxt->__hyp_running_vcpu;
if (vcpu) {
WARN_ON(vcpu->arch.hw_mmu->vmid.vmid != mmu->vmid.vmid);
return;
}
if (cpus_have_final_cap(ARM64_WORKAROUND_SPECULATIVE_AT)) {
u64 val;
@@ -56,12 +45,6 @@ static void __tlb_switch_to_guest(struct kvm_s2_mmu *mmu,
static void __tlb_switch_to_host(struct tlb_inv_context *cxt)
{
struct kvm_cpu_context *host_ctxt;
host_ctxt = &this_cpu_ptr(&kvm_host_data)->host_ctxt;
if (host_ctxt->__hyp_running_vcpu)
return;
__load_host_stage2();
if (cpus_have_final_cap(ARM64_WORKAROUND_SPECULATIVE_AT)) {