lkml.org 
[lkml]   [2016]   [Mar]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PART1 RFC v2 06/10] svm: Add interrupt injection via AVIC
From
Date
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

\
 
 \ /
  Last update: 2016-03-14 11:21    [W:0.125 / U:0.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site