[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160309160050.GB31328@potion.brq.redhat.com>
Date: Wed, 9 Mar 2016 17:00:50 +0100
From: Radim Krčmář <rkrcmar@...hat.com>
To: Paolo Bonzini <pbonzini@...hat.com>
Cc: Suravee Suthikulpanit <Suravee.Suthikulpanit@....com>,
joro@...tes.org, bp@...en8.de, gleb@...nel.org,
alex.williamson@...hat.com, kvm@...r.kernel.org,
linux-kernel@...r.kernel.org, wei@...hat.com,
sherry.hurwitz@....com
Subject: Re: [PART1 RFC v2 06/10] svm: Add interrupt injection via AVIC
2016-03-09 12:10+0100, Paolo Bonzini:
> On 08/03/2016 22:54, Radim Krčmář wrote:
>> 2016-03-07 16:36+0100, Paolo Bonzini:
>>> On 04/03/2016 21:46, Suravee Suthikulpanit wrote:
>>>> +static void svm_deliver_avic_intr(struct kvm_vcpu *vcpu, int vec)
>>>> +{
>>>> + struct vcpu_svm *svm = to_svm(vcpu);
>>>> +
>>>> + kvm_lapic_set_vector(vec, avic_get_bk_page_entry(svm, APIC_IRR));
>>
>> (I think that smp_mb here would make sense, even though we're fine now
>> thanks to re-checking vcpu->mode in kvm_vcpu_kick.
>
> Right, though only a smp_mb__after_atomic() is required (which is a
> compiler barrier). It is similarly required in vmx.
True, kvm_lapic_set_vector uses a lock prefix.
(I thought it behaves like atomic_set, which would require MFENCE for
correct ordering here ... I don't like smp_mb__after_atomic much
because of the discrepancy on some atomic operations.)
> Offtopic remark, kvm_make_request() and kvm_check_request() should
> probably have a smp_wmb() and a smp_rmb().
Yeah, noted.
Powered by blists - more mailing lists