xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v7] Xen PCI + Xen PCI frontend driver.
@ 2010-10-04 18:13 Konrad Rzeszutek Wilk
  2010-10-04 18:13 ` [PATCH 01/22] xen: Don't disable the I/O space Konrad Rzeszutek Wilk
                   ` (17 more replies)
  0 siblings, 18 replies; 29+ messages in thread
From: Konrad Rzeszutek Wilk @ 2010-10-04 18:13 UTC (permalink / raw)
  To: linux-kernel, xen-devel; +Cc: Jeremy Fitzhardinge

This patch set contains the supporting patches and the driver itself for
Xen Paravirtualized (PV) domains to use PCI pass-through devices (the git tree
is git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen.git devel/xen-pcifront-0.7).
This patch-set is also utilized in Stefano's PV on HVM MSI/MSI-X patchset [1].

The Xen PCI frontend driver can be used by PV guests on IOMMU hardware
(or IOMMU-less). Without the hardware IOMMU you have a potential security
hole wherein a guest domain can use the hardware to map pages outside its
memory range and slurp pages up. As such, this is more restricted to a
Privileged PV domain, aka - device driver domain (similar to Qubes but a
poor-man mechanism [2]).

The first set of patches are specific to the Xen subsystem, where
we introduce an IRQ chip for Physical IRQs, along with the supporting
harness code:
 xen: Don't disable the I/O space
 xen: define BIOVEC_PHYS_MERGEABLE()
 xen: implement pirq type event channels
 xen: identity map gsi->irqs
 xen: dynamically allocate irq & event structures
 xen: set pirq name to something useful.
 xen: statically initialize cpu_evtchn_mask_p
 xen: Find an unbound irq number in reverse order (high to low).
 xen: Provide a variant of xen_poll_irq with timeout.
 xen: fix shared irq device passthrough

The next set of patches expose functionality for module drivers to be able to
enumerate and iomap (using the _PAGE_IOMAP flag) PCI devices.

 x86/io_apic: add get_nr_irqs_gsi()
 x86/PCI: Clean up pci_cache_line_size
 x86/PCI: make sure _PAGE_IOMAP it set on pci mappings
 x86/PCI: Export pci_walk_bus function.

The next two patches abstract the MSI/MSI-X architecture calls so that the
default native one (used on bare-metal) can be overwritten when running
in virtualized mode (right now on Xen). The implementation is a simple
function pointer structure.

 x86: Copy-n-paste arch_teardown_msi_irqs from msi.c to io_apic.c.
 x86: Introduce x86_msi_ops

Next, the Xen PCI stub driver. I've put it in the same location
where other sub-platform PCI drivers are. It hooks up to the
PCI legacy IRQ setup ('pcibios_enable_irq'), and MSI/MSI-X
allocation/de-allocation (via the x86_msi_ops introduced in earlier patches).

 xen/x86/PCI: Add support for the Xen PCI subsystem

Lastly, the Xen PCI front-end driver which is responsible for hooking up
to the PCI configuration read/write methods via the 'pci_scan_bus_parented' call.
In essence all pci_conf_read/write in the guest will be tunneled via
pcifront_bus_[read|write] methods. The MSI/MSI-X calls will be handled
by the Xen-PCI front-end driver as well.

 xen-pcifront: Xen PCI frontend driver.

The next two are a bug fix and updating the MAINTAINER file:

 MAINTAINERS: Add myself for Xen PCI and Xen SWIOTLB maintainer.
 xen/pci: Request ACS when Xen-SWIOTLB is activated.


The shortlog and the diffstat:

Alex Nixon (3):
      xen: Don't disable the I/O space
      x86/PCI: Clean up pci_cache_line_size
      xen/x86/PCI: Add support for the Xen PCI subsystem

Gerd Hoffmann (1):
      xen: set pirq name to something useful.

Jeremy Fitzhardinge (5):
      xen: define BIOVEC_PHYS_MERGEABLE()
      xen: implement pirq type event channels
      x86/io_apic: add get_nr_irqs_gsi()
      xen: statically initialize cpu_evtchn_mask_p
      x86/PCI: make sure _PAGE_IOMAP it set on pci mappings

Konrad Rzeszutek Wilk (8):
      xen: identity map gsi->irqs
      xen: dynamically allocate irq & event structures
      xen: Find an unbound irq number in reverse order (high to low).
      xen: Provide a variant of xen_poll_irq with timeout.
      x86/PCI: Export pci_walk_bus function.
      x86: Copy-n-paste arch_teardown_msi_irqs from msi.c to io_apic.c.
      xen/pci: Request ACS when Xen-SWIOTLB is activated.
      MAINTAINERS: Add myself for Xen PCI and Xen SWIOTLB maintainer.

Noboru Iwamatsu (1):
      xenbus: prevent warnings on unhandled enumeration values

Ryan Wilson (1):
      xen-pcifront: Xen PCI frontend driver.

Stefano Stabellini (1):
      x86: Introduce x86_msi_ops

Weidong Han (1):
      xen: fix shared irq device passthrough

Yosuke Iwamatsu (1):
      xenbus: Xen paravirtualised PCI hotplug support.


 MAINTAINERS                        |   14 +
 arch/x86/Kconfig                   |    5 +
 arch/x86/include/asm/io.h          |   13 +
 arch/x86/include/asm/io_apic.h     |    1 +
 arch/x86/include/asm/pci.h         |   25 +-
 arch/x86/include/asm/pci_x86.h     |    1 +
 arch/x86/include/asm/x86_init.h    |    9 +
 arch/x86/include/asm/xen/pci.h     |   53 ++
 arch/x86/kernel/apic/io_apic.c     |   23 +-
 arch/x86/kernel/x86_init.c         |    6 +
 arch/x86/pci/Makefile              |    1 +
 arch/x86/pci/common.c              |   17 +-
 arch/x86/pci/i386.c                |    2 +
 arch/x86/pci/xen.c                 |  147 +++++
 arch/x86/xen/enlighten.c           |    3 +
 arch/x86/xen/pci-swiotlb-xen.c     |    4 +
 arch/x86/xen/setup.c               |    2 -
 drivers/block/xen-blkfront.c       |    2 +
 drivers/input/xen-kbdfront.c       |    2 +
 drivers/net/xen-netfront.c         |    2 +
 drivers/pci/Kconfig                |   16 +
 drivers/pci/Makefile               |    2 +
 drivers/pci/bus.c                  |    1 +
 drivers/pci/xen-pcifront.c         | 1157 ++++++++++++++++++++++++++++++++++++
 drivers/video/xen-fbfront.c        |    2 +
 drivers/xen/Makefile               |    2 +-
 drivers/xen/biomerge.c             |   13 +
 drivers/xen/events.c               |  338 ++++++++++-
 drivers/xen/xenbus/xenbus_client.c |    2 +
 include/xen/events.h               |   18 +
 include/xen/interface/io/pciif.h   |  122 ++++
 include/xen/interface/io/xenbus.h  |    8 +-
 32 files changed, 1982 insertions(+), 31 deletions(-)

P.S.
[1]. git://xenbits.xen.org/people/sstabellini/linux-pvhvm.git 2.6.36-rc1-pvhvm-pirq-v3

[2]: http://qubes-os.org/ which utilizes hardware IOMMU to run seperate domains wherein
each has specific access to hardware.

[3] Some of the authors of the patches have moved on, so their e-mails
are bouncing. Any thoughts of what to do about that? Just leave it as is?  

^ permalink raw reply	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2010-10-07 19:44 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-04 18:13 [PATCH v7] Xen PCI + Xen PCI frontend driver Konrad Rzeszutek Wilk
2010-10-04 18:13 ` [PATCH 01/22] xen: Don't disable the I/O space Konrad Rzeszutek Wilk
2010-10-04 18:13 ` [PATCH 02/22] xen: define BIOVEC_PHYS_MERGEABLE() Konrad Rzeszutek Wilk
2010-10-04 18:13 ` [PATCH 03/22] xen: implement pirq type event channels Konrad Rzeszutek Wilk
2010-10-04 18:13 ` [PATCH 04/22] x86/io_apic: add get_nr_irqs_gsi() Konrad Rzeszutek Wilk
2010-10-05  9:13   ` Thomas Gleixner
2010-10-04 18:13 ` [PATCH 05/22] xen: identity map gsi->irqs Konrad Rzeszutek Wilk
2010-10-04 18:13 ` [PATCH 07/22] xen: set pirq name to something useful Konrad Rzeszutek Wilk
2010-10-04 18:13 ` [PATCH 08/22] xen: statically initialize cpu_evtchn_mask_p Konrad Rzeszutek Wilk
2010-10-04 18:13 ` [PATCH 09/22] xen: Find an unbound irq number in reverse order (high to low) Konrad Rzeszutek Wilk
2010-10-05 16:46   ` Stefano Stabellini
2010-10-06 22:59     ` Konrad Rzeszutek Wilk
2010-10-07 10:38       ` Stefano Stabellini
2010-10-07 14:05         ` [Xen-devel] " Konrad Rzeszutek Wilk
2010-10-04 18:13 ` [PATCH 10/22] xen: Provide a variant of xen_poll_irq with timeout Konrad Rzeszutek Wilk
2010-10-04 18:13 ` [PATCH 12/22] x86/PCI: Clean up pci_cache_line_size Konrad Rzeszutek Wilk
2010-10-04 18:13 ` [PATCH 13/22] x86/PCI: make sure _PAGE_IOMAP it set on pci mappings Konrad Rzeszutek Wilk
2010-10-04 18:13 ` [PATCH 14/22] x86/PCI: Export pci_walk_bus function Konrad Rzeszutek Wilk
2010-10-04 18:13 ` [PATCH 15/22] x86: Copy-n-paste arch_teardown_msi_irqs from msi.c to io_apic.c Konrad Rzeszutek Wilk
2010-10-05  9:07   ` Thomas Gleixner
2010-10-07  1:09     ` Konrad Rzeszutek Wilk
2010-10-07  2:57       ` Konrad Rzeszutek Wilk
2010-10-04 18:13 ` [PATCH 16/22] x86: Introduce x86_msi_ops Konrad Rzeszutek Wilk
2010-10-04 18:13 ` [PATCH 17/22] xen/x86/PCI: Add support for the Xen PCI subsystem Konrad Rzeszutek Wilk
2010-10-04 18:13 ` [PATCH 21/22] xen/pci: Request ACS when Xen-SWIOTLB is activated Konrad Rzeszutek Wilk
2010-10-04 18:13 ` [PATCH 22/22] MAINTAINERS: Add myself for Xen PCI and Xen SWIOTLB maintainer Konrad Rzeszutek Wilk
2010-10-05  7:47 ` [Xen-devel] [PATCH v7] Xen PCI + Xen PCI frontend driver Jan Beulich
2010-10-06 22:50   ` Konrad Rzeszutek Wilk
2010-10-07 19:44     ` Konrad Rzeszutek Wilk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).