-
- Downloads
RISC-V: KVM: Implement VMID allocator
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 Signed-off-by:Anup Patel <anup.patel@wdc.com> Acked-by:
Paolo Bonzini <pbonzini@redhat.com> Reviewed-by:
Paolo Bonzini <pbonzini@redhat.com> Reviewed-by:
Alexander Graf <graf@amazon.com> Acked-by:
Palmer Dabbelt <palmerdabbelt@google.com>
Showing
- arch/riscv/include/asm/kvm_host.h 24 additions, 0 deletionsarch/riscv/include/asm/kvm_host.h
- arch/riscv/kvm/Makefile 12 additions, 2 deletionsarch/riscv/kvm/Makefile
- arch/riscv/kvm/main.c 4 additions, 0 deletionsarch/riscv/kvm/main.c
- arch/riscv/kvm/tlb.S 74 additions, 0 deletionsarch/riscv/kvm/tlb.S
- arch/riscv/kvm/vcpu.c 9 additions, 0 deletionsarch/riscv/kvm/vcpu.c
- arch/riscv/kvm/vm.c 6 additions, 0 deletionsarch/riscv/kvm/vm.c
- arch/riscv/kvm/vmid.c 120 additions, 0 deletionsarch/riscv/kvm/vmid.c
Loading
Please register or sign in to comment