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