From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: xen-devel@lists.xenproject.org
Subject: Re: [PATCH] dpci: Put the dpci back on the list if scheduled from another CPU.
Date: Wed, 18 Mar 2015 12:14:58 -0400 [thread overview]
Message-ID: <20150318161458.GB15158@x230.dumpdata.com> (raw)
In-Reply-To: <5509B09D020000780006B47F@mail.emea.novell.com>
On Wed, Mar 18, 2015 at 04:06:37PM +0000, Jan Beulich wrote:
> >>> On 18.03.15 at 14:58, <konrad.wilk@oracle.com> wrote:
> > On Wed, Mar 18, 2015 at 07:38:12AM +0000, Jan Beulich wrote:
> >> >>> On 17.03.15 at 18:15, <konrad.wilk@oracle.com> wrote:
> >> > The latest one (please see attached) would cause an dead-lock iff
> >> > on the CPU we are running the softirq and an do_IRQ comes for the
> >> > exact dpci we are in process of executing.
> >>
> >> I'm afraid I'm not seeing it - please explain.
> >
> > Lets assume that the device is an PCIe with MSI. We have only one
> > VCPU in the guest.
> >
> > We receive the first interrupt, end up going:
> > vmx_vmexit_handler
> > - case EXIT_REASON_EXTERNAL_INTERRUPT
> > \- vmx_do_extint
> > \- do_IRQ
> > \- __do_IRQ_guest
> > \- hvm_do_IRQ_dpci
> > \- raise_softirq_for
> > [DPCI_SOFTIRQ bit set]
> > vmx_process_softirq
> > sti
> > do_softirq
> > -\ __do_sofitq_
> > \- dpci_softirq
> > -\ hvm_dirq_assist
> > [state is 'running']
> >
> > [Same vector comes in]
>
> Is that indeed possible? Afaict nothing in the code sequence above
> ack-ed the interrupt, and hence another one can't come in.
The do_IRQ acks it:
854 spin_lock(&desc->lock);
855 desc->handler->ack(desc);
which is:
424 static void ack_maskable_msi_irq(struct irq_desc *desc)
425 {
426 ack_nonmaskable_msi_irq(desc);
427 ack_APIC_irq(); /* ACKTYPE_NONE */
428 }
.. snip..
857 if ( likely(desc->status & IRQ_GUEST) )
..
886 __do_IRQ_guest(irq);
>
> Jan
>
next prev parent reply other threads:[~2015-03-18 16:15 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-17 15:38 [PATCH] dpci: Put the dpci back on the list if scheduled from another CPU Konrad Rzeszutek Wilk
2015-03-17 16:06 ` Jan Beulich
2015-03-17 17:15 ` Konrad Rzeszutek Wilk
2015-03-18 7:38 ` Jan Beulich
2015-03-18 13:58 ` Konrad Rzeszutek Wilk
2015-03-18 16:06 ` Jan Beulich
2015-03-18 16:14 ` Konrad Rzeszutek Wilk [this message]
2015-03-19 7:53 ` Jan Beulich
2015-03-19 19:18 ` Konrad Rzeszutek Wilk
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=20150318161458.GB15158@x230.dumpdata.com \
--to=konrad.wilk@oracle.com \
--cc=JBeulich@suse.com \
--cc=xen-devel@lists.xenproject.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 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.