All of lore.kernel.org
 help / color / mirror / Atom feed
From: Keir Fraser <keir@xensource.com>
To: "Xu, Anthony" <anthony.xu@intel.com>, Keir Fraser <keir@xensource.com>
Cc: xen-devel@lists.xensource.com,
	xen-ia64-devel <xen-ia64-devel@lists.xensource.com>
Subject: Re: Question about qemu interrupt deliver.
Date: Wed, 29 Nov 2006 10:20:40 +0000	[thread overview]
Message-ID: <C1930F78.5347%keir@xensource.com> (raw)
In-Reply-To: <51CFAB8CB6883745AE7B93B3E084EBE207DD72@pdsmsx412.ccr.corp.intel.com>

On 29/11/06 08:21, "Xu, Anthony" <anthony.xu@intel.com> wrote:

> How about the second one?
> #define hvm_pci_intx_gsi(dev, intx)  \
>     (((((dev)<<2) + ((dev)>>3) + (intx)) & 31) + 16)
> 
> Why this logic is implemented inside hypervisor?

Since the hypervisor exposes a device-level interface for interrupt
assertion, the mapping from device INTx line to GSI naturally ends up in the
hypervisor. This makes sense IMO -- GSIs can be shared and to correctly
implement wire-OR semantics the guest needs to disambiguate which devices
are (or are not) asserting a particular GSI at any time. Obviously all
interrupt-capable PCI devices are currently implemented in qemu-dm so this
could be worked around and a GSI-level interface exposed by Xen. But I think
putting it in Xen is cleaner and more flexible long term. There is always
the option of allowing the mapping to be dynamically specified to Xen in
future (e.g., hvmloader could make a choice, install the appropriate ACPI
DSDT and use a new hypercall to dynamically modify PCI->link and PCI->GSI
information). It's not clear that level of flexibility will be warranted
though -- 32 non-legacy GSIs should be plenty to avoid sharing even with a
static barber-pole INTx->GSI mapping.

 -- Keir

  reply	other threads:[~2006-11-29 10:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-29  8:21 Question about qemu interrupt deliver Xu, Anthony
2006-11-29 10:20 ` Keir Fraser [this message]
2006-11-29 10:28   ` Keir Fraser
  -- strict thread matches above, loose matches on Subject: below --
2006-11-30  2:52 [Xen-devel]Question " Xu, Anthony
2006-11-30  9:15 ` Question " Keir Fraser
2006-11-29  7:57 [Xen-devel]Question " Xu, Anthony
2006-11-29  8:10 ` Question " Keir Fraser

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=C1930F78.5347%keir@xensource.com \
    --to=keir@xensource.com \
    --cc=anthony.xu@intel.com \
    --cc=xen-devel@lists.xensource.com \
    --cc=xen-ia64-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 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.