>> >+
>>>+ if (vcpu->mode == IN_GUEST_MODE) {
>>>+ wrmsrl(SVM_AVIC_DOORBELL,
>>>+ __default_cpu_present_to_apicid(vcpu->cpu));
>>>+ } else {
>>>+ kvm_vcpu_kick(vcpu);
>>>+ }
>And what aboutYes, both of this should work. I like the latter.
> [...]
> else if (!vcpu->...->is_running)
> kvm_vcpu_kick(vcpu);
>
>?
>The kick isn't needed unless the VCPU is scheduled out.
>Or maybe just
> if (vcpu->...->is_running)
> wrmsrl()
> else
> kvm_vcpu_kick();
>?
>Which doesn't use the information we have on top AVIC, making our logic
>a bit simpler.