From: Paolo Bonzini <pbonzini@redhat.com>
To: Steve Rutherford <srutherford@google.com>
Cc: kvm@vger.kernel.org
Subject: Re: [PATCH v5 4/4] KVM: x86: Add support for local interrupt requests from userspace
Date: Wed, 29 Jul 2015 12:21:01 +0200 [thread overview]
Message-ID: <55B8A90D.3030202@redhat.com> (raw)
In-Reply-To: <20150728190635.GA7460@google.com>
On 28/07/2015 21:06, Steve Rutherford wrote:
>>> > > +static inline int pic_in_kernel(struct kvm *kvm)
>>> > > +{
>>> > > + int ret;
>>> > > +
>>> > > + ret = (pic_irqchip(kvm) != NULL);
>>> > > + smp_rmb();
>> >
>> > What does this memory barrier pair with? I don't think it's necessary.
> To be honest, it's probably not necessary. I couldn't find why
> irqchip_in_kernel (which this function is more or less a copy of)
> needed it's memory barrier, so I cargo culted this one in.
It's for stuff like injecting an interrupt before any CPU is created,
while another thread is doing KVM_CREATE_IRQCHIP. In your case a VCPU
has been created so you don't need it (the synchronization point is the
mutex_lock(&kvm->lock) in kvm_vm_ioctl_create_vcpu).
Paolo
next prev parent reply other threads:[~2015-07-29 10:21 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-27 23:17 [PATCH v5 1/4] KVM: x86: Split the APIC from the rest of IRQCHIP Steve Rutherford
2015-07-27 23:17 ` [PATCH v5 2/4] KVM: x86: Add KVM exit for IOAPIC EOIs Steve Rutherford
2015-07-27 23:17 ` [PATCH v5 3/4] KVM: x86: Add EOI exit bitmap inference Steve Rutherford
2015-07-29 12:38 ` Paolo Bonzini
2015-07-29 20:27 ` Steve Rutherford
2015-07-30 6:23 ` Jan Kiszka
2015-07-30 6:27 ` Steve Rutherford
2015-07-27 23:17 ` [PATCH v5 4/4] KVM: x86: Add support for local interrupt requests from userspace Steve Rutherford
2015-07-28 15:58 ` Paolo Bonzini
2015-07-28 19:06 ` Steve Rutherford
2015-07-28 22:05 ` Paolo Bonzini
2015-07-29 0:50 ` Steve Rutherford
2015-07-29 10:21 ` Paolo Bonzini [this message]
2015-07-29 10:15 ` Paolo Bonzini
2015-07-29 12:56 ` [PATCH v5 1/4] KVM: x86: Split the APIC from the rest of IRQCHIP Paolo Bonzini
2015-07-30 3:04 ` Steve Rutherford
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55B8A90D.3030202@redhat.com \
--to=pbonzini@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=srutherford@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.