summaryrefslogtreecommitdiffstats
path: root/arch/riscv/kvm
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2021-12-02 11:44:56 -0800
committerJakub Kicinski <kuba@kernel.org>2021-12-02 11:44:56 -0800
commitfc993be36f9ea7fc286d84d8471a1a20e871aad4 (patch)
treecef440a299ed7d1c2418992f7d724b4d86e6d83b /arch/riscv/kvm
parent36d7d36fcf69e7f95068307f8bc519af31085431 (diff)
parenta51e3ac43ddbad891c2b1a4f3aa52371d6939570 (diff)
downloadlinux-stable-fc993be36f9ea7fc286d84d8471a1a20e871aad4.tar.gz
linux-stable-fc993be36f9ea7fc286d84d8471a1a20e871aad4.tar.bz2
linux-stable-fc993be36f9ea7fc286d84d8471a1a20e871aad4.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'arch/riscv/kvm')
-rw-r--r--arch/riscv/kvm/mmu.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/riscv/kvm/mmu.c b/arch/riscv/kvm/mmu.c
index d81bae8eb55e..fc058ff5f4b6 100644
--- a/arch/riscv/kvm/mmu.c
+++ b/arch/riscv/kvm/mmu.c
@@ -453,6 +453,12 @@ void kvm_arch_flush_shadow_all(struct kvm *kvm)
void kvm_arch_flush_shadow_memslot(struct kvm *kvm,
struct kvm_memory_slot *slot)
{
+ gpa_t gpa = slot->base_gfn << PAGE_SHIFT;
+ phys_addr_t size = slot->npages << PAGE_SHIFT;
+
+ spin_lock(&kvm->mmu_lock);
+ stage2_unmap_range(kvm, gpa, size, false);
+ spin_unlock(&kvm->mmu_lock);
}
void kvm_arch_commit_memory_region(struct kvm *kvm,