Re: [PATCH RFC v2 6/9] target/loongarch: Implement kvm_arch_init_vcpu

2023-05-03 Thread Tianrui Zhao
在 2023年05月02日 19:32, Richard Henderson 写道: On 4/27/23 08:26, Tianrui Zhao wrote: +static void kvm_loongarch_vm_stage_change(void *opaque, bool running, Typo: state +uint64_t counter_value; I know naming is hard, but this is so generic it is difficult to

Re: [PATCH RFC v2 6/9] target/loongarch: Implement kvm_arch_init_vcpu

2023-05-02 Thread Richard Henderson
On 4/27/23 08:26, Tianrui Zhao wrote: +static void kvm_loongarch_vm_stage_change(void *opaque, bool running, Typo: state +uint64_t counter_value; I know naming is hard, but this is so generic it is difficult to determine what it does. Perhaps

[PATCH RFC v2 6/9] target/loongarch: Implement kvm_arch_init_vcpu

2023-04-27 Thread Tianrui Zhao
Implement kvm_arch_init_vcpu interface for loongarch, in this function, we register VM change state handler. And when VM state changes to running, the counter value should be put into kvm to keep consistent with kvm, and when state change to stop, counter value should be refreshed from kvm.