lkml.org 
[lkml]   [2019]   [Jul]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC PATCH 10/16] RISC-V: KVM: Implement VMID allocator
From
Date
On 29/07/19 13:57, Anup Patel wrote:
> + /* First user of a new VMID version? */
> + if (unlikely(vmid_next == 0)) {
> + atomic_long_inc(&vmid_version);
> + vmid_next = 1;
> +

vmid_version is only written under vmid_lock, so it doesn't need to be
atomic. You only need WRITE_ONCE/READ_ONCE.

> +
> + /* Request stage2 page table update for all VCPUs */
> + kvm_for_each_vcpu(i, v, vcpu->kvm)
> + kvm_make_request(KVM_REQ_UPDATE_PGTBL, v);

Perhaps rename kvm_riscv_stage2_update_pgtbl and KVM_REQ_UPDATE_PGTBL to
kvm_riscv_update_hgatp and KVM_REQ_UPDATE_HGATP?

Paolo

\
 
 \ /
  Last update: 2019-07-30 11:00    [W:0.548 / U:0.180 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site