Hi,
On 03/09/2016 06:10 PM, Paolo Bonzini wrote:
+
>>>+ if (vcpu->mode == IN_GUEST_MODE) {
>>>+ wrmsrl(SVM_AVIC_DOORBELL,
>>>+ __default_cpu_present_to_apicid(vcpu->cpu));
>>>+ } else {
>>>+ kvm_vcpu_kick(vcpu);
>>>+ }
>> >
>And what about
> [...]
> 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.
Yes, both of this should work. I like the latter.
Ok, I'll modify this to check the is_running bit of the AVIC Physical
APIC ID table entry to determine if we should kick vcpu.
Thanks,
Suravee
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html