From: Elena Afanasova <eafanasova@gmail.com>
To: Paolo Bonzini <pbonzini@redhat.com>,
Jason Wang <jasowang@redhat.com>,
kvm@vger.kernel.org
Cc: stefanha@redhat.com, jag.raman@oracle.com,
elena.ufimtseva@oracle.com, mst@redhat.com, cohuck@redhat.com,
john.levon@nutanix.com
Subject: Re: [RFC v3 4/5] KVM: add ioregionfd context
Date: Wed, 10 Mar 2021 08:41:53 -0800 [thread overview]
Message-ID: <95b1dc00ff533ce004ecc656bd130bd07e29a1f0.camel@gmail.com> (raw)
In-Reply-To: <50823987-d285-7a18-7c46-771f08c3c0ff@redhat.com>
On Wed, 2021-03-10 at 15:11 +0100, Paolo Bonzini wrote:
> On 10/03/21 14:20, Elena Afanasova wrote:
> > On Tue, 2021-03-09 at 09:01 +0100, Paolo Bonzini wrote:
> > > On 09/03/21 08:54, Jason Wang wrote:
> > > > > + return;
> > > > > +
> > > > > + spin_lock(&ctx->wq.lock);
> > > > > + wait_event_interruptible_exclusive_locked(ctx->wq, !ctx-
> > > > > > busy);
> > > >
> > > > Any reason that a simple mutex_lock_interruptible() can't work
> > > > here?
> > >
> > > Or alternatively why can't the callers just take the spinlock.
> > >
> > I'm not sure I understand your question. Do you mean why locked
> > version
> > of wait_event() is used?
>
> No, I mean why do you need to use ctx->busy and wait_event, instead
> of
> operating directly on the spinlock or on a mutex.
>
When ioregionfd communication is interrupted by a signal ioctl(KVM_RUN)
has to return to userspace. I'm not sure it's ok to do that with the
spinlock/mutex being held.
> Paolo
>
next prev parent reply other threads:[~2021-03-10 16:43 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-21 12:04 [RFC v3 0/5] Introduce MMIO/PIO dispatch file descriptors (ioregionfd) Elena Afanasova
2021-02-21 12:04 ` [RFC v3 1/5] KVM: add initial support for KVM_SET_IOREGION Elena Afanasova
2021-02-24 10:06 ` Stefan Hajnoczi
2021-03-05 13:09 ` Cornelia Huck
2021-03-09 5:26 ` Jason Wang
2021-03-22 9:57 ` Stefan Hajnoczi
2021-02-21 12:04 ` [RFC v3 2/5] KVM: x86: add support for ioregionfd signal handling Elena Afanasova
2021-02-24 10:42 ` Stefan Hajnoczi
2021-03-09 5:51 ` Jason Wang
2021-03-17 14:19 ` Elena Afanasova
2021-03-26 6:00 ` Jason Wang
2021-02-21 12:04 ` [RFC v3 3/5] KVM: implement wire protocol Elena Afanasova
2021-02-24 11:02 ` Stefan Hajnoczi
2021-03-09 6:19 ` Jason Wang
2021-03-17 13:08 ` Elena Afanasova
2021-03-26 6:21 ` Jason Wang
2021-03-29 16:17 ` Stefan Hajnoczi
2021-02-21 12:04 ` [RFC v3 4/5] KVM: add ioregionfd context Elena Afanasova
2021-02-24 11:27 ` Stefan Hajnoczi
2021-03-09 7:54 ` Jason Wang
2021-03-09 8:01 ` Paolo Bonzini
2021-03-10 13:20 ` Elena Afanasova
2021-03-10 14:11 ` Paolo Bonzini
2021-03-10 16:41 ` Elena Afanasova [this message]
[not found] ` <6ff79d0b-3b6a-73d3-ffbd-e4af9758735f@redhat.com>
2021-03-17 10:46 ` Elena Afanasova
2021-03-26 6:47 ` Jason Wang
2021-02-21 12:04 ` [RFC v3 5/5] KVM: enforce NR_IOBUS_DEVS limit if kmemcg is disabled Elena Afanasova
2021-02-21 17:06 ` [RFC v3 0/5] Introduce MMIO/PIO dispatch file descriptors (ioregionfd) Paolo Bonzini
2021-02-22 16:40 ` Elena Afanasova
2021-02-24 11:34 ` Stefan Hajnoczi
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=95b1dc00ff533ce004ecc656bd130bd07e29a1f0.camel@gmail.com \
--to=eafanasova@gmail.com \
--cc=cohuck@redhat.com \
--cc=elena.ufimtseva@oracle.com \
--cc=jag.raman@oracle.com \
--cc=jasowang@redhat.com \
--cc=john.levon@nutanix.com \
--cc=kvm@vger.kernel.org \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=stefanha@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox