From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
To: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Stefano Stabellini <Stefano.Stabellini@eu.citrix.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Subject: Re: [PATCH 0/7] PV on HVM: receive interrupts as xen events
Date: Fri, 3 Sep 2010 14:51:50 +0100 [thread overview]
Message-ID: <alpine.DEB.2.00.1009031240510.2714@kaball-desktop> (raw)
In-Reply-To: <4C7FF538.7020704@goop.org>
On Thu, 2 Sep 2010, Jeremy Fitzhardinge wrote:
> On 08/30/2010 04:20 AM, Stefano Stabellini wrote:
> > Hi all,
> > this patch series introduces some performance improvements for xen PV on
> > HVM guests: interacting with the emulated APIC is slow because it causes
> > traps in the hypervisor while receiving xen events using the vector callback
> > mechanism allow us to skip all that. For this reason we remap interrupts
> > and MSIs into xen pirqs so that from that point on we can receive them
> > as xen events instead.
> > This series is based on Konrad's pcifront series (not upstream yet):
> >
> > http://lkml.org/lkml/2010/8/4/374
> >
> > and requires a patch to xen and a patch to qemu-xen (just sent to
> > xen-devel).
>
> My only concern with this series is the pirq remapping stuff. Why do
> pirq and irq need to be non-identical? Is it because pirq is a global
> namespace, and dom0 has already assigned it?
>
> Why do guests need to know about max pirq? Would it be better to make
> Xen use a more dynamic structure for pirqs so that any arbitrary value
> can be used?
>
No, pirq is a per-domain namespace, but pirq and irq are conceptually
different: pirqs are used by xen as a reference for interrupts of
devices assigned to the guest, while linux uses irqs for its
internal purposes.
The pirq namespace is chosen by xen while the linux irq namespace is
chosen by linux.
Linux is allowed to choose the pirq number it wants when mapping an
interrupt, this is why linux needs to know the max pirq, so that it can
safely chose a pirq that is in the allowed range.
The difference between pirqs and linux irqs increases when we talk about
PV on HVM guests: in this case qemu also maps interrupts in the guests
getting pirqs in return, so the linux kernel has to be able to cope with
already assigned pirq numbers.
The current PHYSDEVOP_map_pirq interface is already flexible enough for
that because it provides the possibility for the caller to let xen
choose the pirq, something that linux never does in the pure PV case,
but it is still possible. Obviously if you let xen choose the pirq
number you are safe from conflicts but you must be able to cope with
pirq numbers different from linux irq numbers.
prev parent reply other threads:[~2010-09-03 13:52 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-30 11:20 Stefano Stabellini
2010-08-30 11:21 ` [PATCH 1/7] xen: support pirq != irq stefano.stabellini
2010-08-30 11:21 ` [PATCH 2/7] xen: get the maximum number of pirqs from xen stefano.stabellini
2010-08-30 11:21 ` [PATCH 3/7] xen: implement xen_hvm_register_pirq stefano.stabellini
2010-08-30 11:21 ` [PATCH 4/7] acpi: use indirect call to register gsi in different modes stefano.stabellini
2010-10-06 17:00 ` Stefano Stabellini
2010-10-06 17:31 ` H. Peter Anvin
2010-10-06 18:48 ` Thomas Gleixner
2010-10-07 10:41 ` Stefano Stabellini
2010-08-30 11:21 ` [PATCH 5/7] xen: add xen hvm acpi_register_gsi variant stefano.stabellini
2010-08-30 11:21 ` [PATCH 6/7] xen: support GSI -> pirq remapping in PV on HVM guests stefano.stabellini
2010-08-30 11:21 ` [PATCH 7/7] xen: map MSIs into pirqs stefano.stabellini
2010-09-02 19:04 ` [PATCH 0/7] PV on HVM: receive interrupts as xen events Jeremy Fitzhardinge
2010-09-03 13:51 ` Stefano Stabellini [this message]
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=alpine.DEB.2.00.1009031240510.2714@kaball-desktop \
--to=stefano.stabellini@eu.citrix.com \
--cc=jeremy@goop.org \
--cc=konrad.wilk@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=xen-devel@lists.xensource.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
all inboxes | Powered by JetHome®