From: Gleb Natapov <gleb@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: kvm@vger.kernel.org, virtualization@lists.linux-foundation.org
Subject: Re: [PATCH] KVM: Fix kvm_irqfd_init initialization
Date: Tue, 7 May 2013 18:16:09 +0300 [thread overview]
Message-ID: <20130507151609.GD7899@redhat.com> (raw)
In-Reply-To: <20130507151133.GB23608@redhat.com>
On Tue, May 07, 2013 at 06:11:33PM +0300, Michael S. Tsirkin wrote:
> On Tue, May 07, 2013 at 11:05:12PM +0800, Asias He wrote:
> > On Tue, May 07, 2013 at 05:59:38PM +0300, Michael S. Tsirkin wrote:
> > > On Tue, May 07, 2013 at 10:54:16PM +0800, Asias He wrote:
> > > > In commit a0f155e96 'KVM: Initialize irqfd from kvm_init()', when
> > > > kvm_init() is called the second time (e.g kvm-amd.ko and kvm-intel.ko),
> > > > kvm_arch_init() will fail with -EEXIST,
> > >
> > > Wow. Is this intentional?
> >
> > I think it is. You can not be amd and intel at the same time ;-)
> >
> > kvm_arch_init
> >
> > if (kvm_x86_ops) {
> > printk(KERN_ERR "kvm: already loaded the other module\n");
> > r = -EEXIST;
> > goto out;
> > }
> >
>
> Interesting. So we check it with
> if (kvm_x86_ops)
> and later we do
> kvm_x86_ops = ops;
>
>
> This looks racy - or is something serializing
> module loading?
>
I think module loading is serialized.
--
Gleb.
next prev parent reply other threads:[~2013-05-07 15:16 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-07 14:54 [PATCH] KVM: Fix kvm_irqfd_init initialization Asias He
2013-05-07 14:59 ` Michael S. Tsirkin
2013-05-07 15:05 ` Asias He
2013-05-07 15:11 ` Michael S. Tsirkin
2013-05-07 15:16 ` Gleb Natapov [this message]
2013-05-07 15:24 ` Michael S. Tsirkin
2013-05-07 15:29 ` Gleb Natapov
2013-05-07 15:54 ` Cornelia Huck
2013-05-07 16:01 ` Michael S. Tsirkin
2013-05-08 2:57 ` [PATCH v2] " Asias He
2013-05-08 6:49 ` Cornelia Huck
2013-05-08 10:16 ` Gleb Natapov
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=20130507151609.GD7899@redhat.com \
--to=gleb@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=mst@redhat.com \
--cc=virtualization@lists.linux-foundation.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox