Re: [RFC PATCH v2 07/19] RISC-V: KVM: Implement KVM_GET_ONE_REG/KVM_SET_ONE_REG ioctls

From: Paolo Bonzini
Date: Mon Aug 05 2019 - 07:07:52 EST


On 05/08/19 13:00, Anup Patel wrote:
>>> I think we can do this at start of kvm_riscv_vcpu_flush_interrupts() as well.
>> Did you mean at the end? (That is, after modifying
>> vcpu->arch.guest_csr.vsip based on mask and val). With the above switch
>> to percpu, the only write of CSR_VSIP and vsip_shadow should be in
>> kvm_riscv_vcpu_flush_interrupts, which in turn is only called from
>> kvm_vcpu_ioctl_run.
> Yes, I meant at the end of kvm_riscv_vcpu_flush_interrupts() but I am
> fine having separate kvm_riscv_update_vsip() function as well.

At end is certainly fine for me.

Paolo