RISC-V: KVM: Implement VMID allocator
euleros inclusion category: feature feature: initial KVM RISC-V support bugzilla: 46845 CVE: NA We implement a simple VMID allocator for Guests/VMs which: 1. Detects number of VMID bits at boot-time 2. Uses atomic number to track VMID version and increments VMID version whenever we run-out of VMIDs 3. Flushes Guest TLBs on all host CPUs whenever we run-out of VMIDs 4. Force updates HW Stage2 VMID for each Guest VCPU whenever VMID changes using VCPU request KVM_REQ_UPDATE_HGATP Reference: https://gitee.com/openeuler/kernel/issues/I26X9VSigned-off-by: NAnup Patel <anup.patel@wdc.com> Acked-by: NPaolo Bonzini <pbonzini@redhat.com> Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com> Reviewed-by: NAlexander Graf <graf@amazon.com> Reviewed-by: NYifei Jiang <jiangyifei@huawei.com> Acked-by: NXie XiuQi <xiexiuqi@huawei.com> Signed-off-by: NChen Jun <chenjun102@huawei.com>
Showing
arch/riscv/kvm/tlb.S
0 → 100644
arch/riscv/kvm/vmid.c
0 → 100644
想要评论请 注册 或 登录