mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
Revert "ANDROID: KVM: arm64: Don't update IOMMUs unnecessarily"
This reverts commit dbd1cb3025.
Bug: 233587962
Signed-off-by: Will Deacon <willdeacon@google.com>
Change-Id: Icc12e018efd1c01248db641417404e6f6ef4843a
This commit is contained in:
@@ -78,8 +78,7 @@ int __pkvm_remove_ioguard_page(struct kvm_vcpu *vcpu, u64 ipa);
|
||||
bool __pkvm_check_ioguard_page(struct kvm_vcpu *vcpu);
|
||||
|
||||
bool addr_is_memory(phys_addr_t phys);
|
||||
int host_stage2_idmap_locked(phys_addr_t addr, u64 size, enum kvm_pgtable_prot prot,
|
||||
bool update_iommu);
|
||||
int host_stage2_idmap_locked(phys_addr_t addr, u64 size, enum kvm_pgtable_prot prot);
|
||||
int host_stage2_set_owner_locked(phys_addr_t addr, u64 size, pkvm_id owner_id);
|
||||
int host_stage2_unmap_dev_locked(phys_addr_t start, u64 size);
|
||||
int kvm_host_prepare_stage2(void *pgt_pool_base);
|
||||
|
||||
@@ -465,8 +465,7 @@ static bool range_is_memory(u64 start, u64 end)
|
||||
}
|
||||
|
||||
static inline int __host_stage2_idmap(u64 start, u64 end,
|
||||
enum kvm_pgtable_prot prot,
|
||||
bool update_iommu)
|
||||
enum kvm_pgtable_prot prot)
|
||||
{
|
||||
int ret;
|
||||
|
||||
@@ -475,8 +474,7 @@ static inline int __host_stage2_idmap(u64 start, u64 end,
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
if (update_iommu)
|
||||
pkvm_iommu_host_stage2_idmap(start, end, prot);
|
||||
pkvm_iommu_host_stage2_idmap(start, end, prot);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -538,9 +536,9 @@ static int host_stage2_adjust_range(u64 addr, struct kvm_mem_range *range)
|
||||
}
|
||||
|
||||
int host_stage2_idmap_locked(phys_addr_t addr, u64 size,
|
||||
enum kvm_pgtable_prot prot, bool update_iommu)
|
||||
enum kvm_pgtable_prot prot)
|
||||
{
|
||||
return host_stage2_try(__host_stage2_idmap, addr, addr + size, prot, update_iommu);
|
||||
return host_stage2_try(__host_stage2_idmap, addr, addr + size, prot);
|
||||
}
|
||||
|
||||
#define KVM_INVALID_PTE_OWNER_MASK GENMASK(32, 1)
|
||||
@@ -614,7 +612,7 @@ static int host_stage2_idmap(u64 addr)
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
return host_stage2_idmap_locked(range.start, range.end - range.start, prot, false);
|
||||
return host_stage2_idmap_locked(range.start, range.end - range.start, prot);
|
||||
}
|
||||
|
||||
static bool is_dabt(u64 esr)
|
||||
@@ -835,7 +833,7 @@ static int __host_set_page_state_range(u64 addr, u64 size,
|
||||
{
|
||||
enum kvm_pgtable_prot prot = pkvm_mkstate(PKVM_HOST_MEM_PROT, state);
|
||||
|
||||
return host_stage2_idmap_locked(addr, size, prot, true);
|
||||
return host_stage2_idmap_locked(addr, size, prot);
|
||||
}
|
||||
|
||||
static int host_request_owned_transition(u64 *completer_addr,
|
||||
|
||||
@@ -222,7 +222,7 @@ static int fix_host_ownership_walker(u64 addr, u64 end, u32 level,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
return host_stage2_idmap_locked(phys, PAGE_SIZE, prot, false);
|
||||
return host_stage2_idmap_locked(phys, PAGE_SIZE, prot);
|
||||
}
|
||||
|
||||
static int fix_hyp_pgtable_refcnt_walker(u64 addr, u64 end, u32 level,
|
||||
|
||||
Reference in New Issue
Block a user