xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v5 00/11] vpci: PCI config space emulation
@ 2017-08-14 14:28 Roger Pau Monne
  2017-08-14 14:28 ` [PATCH v5 01/11] x86/pci: introduce hvm_pci_decode_addr Roger Pau Monne
                   ` (10 more replies)
  0 siblings, 11 replies; 60+ messages in thread
From: Roger Pau Monne @ 2017-08-14 14:28 UTC (permalink / raw)
  To: xen-devel; +Cc: boris.ostrovsky

Hello,

The following series contain an implementation of handlers for the PCI
configuration space inside of Xen. This allows Xen to detect accesses
to the PCI configuration space and react accordingly.

Why is this needed? IMHO, there are two main points of doing all this
emulation inside of Xen, the first one is to prevent adding a bunch of
duplicated Xen PV specific code to each OS we want to support in PVH
mode. This just promotes Xen code duplication amongst OSes, which
leads to a higher maintainership burden.

The second reason would be that this code (or it's functionality to be
more precise) already exists in QEMU (and pciback to a degree), and
it's code that we already support and maintain. By moving it into the
hypervisor itself every guest type can make use of it, and should be
shared between them all. I know that the code in this series is not
yet suitable for DomU HVM guests in it's current state, but it should
be in due time.

As usual, each patch contains a changeset summary between versions,
I'm not going to copy the list of changes here.

Patch 1 introduces a function to decode a PCI IO port access into bdf
and register (which is shared with the ioreq code). Patch 2 implements
the generic handlers for accesses to the PCI configuration space
together with a minimal user-space test harness that I've used during
development. Currently a per-device linked list is used in order to
store the list of handlers, and they are sorted based on their offset
inside of the configuration space. Patch 2 also adds the x86 port IO
traps and wires them into the newly introduced vPCI dispatchers. Patch
3 and 4 adds handlers for the MMCFG areas (as found on the MMCFG ACPI
table). Patches 5, 6 and 7 are mostly code moment/refactoring in order
to implement support for BAR mapping in patch 8. Finally patches 9 and
11 add support for trapping accesses to the MSI and MSI-X capabilities
respectively, so that interrupts are properly setup on behalf of
Dom0.

The branch containing the patches can be found at:

git://xenbits.xen.org/people/royger/xen.git vpci_v5

Note that this is only safe to use for the hardware domain (that's
trusted), any non-trusted domain will need a lot more of traps before
it can freely access the PCI configuration space.

This series is based on top of my "x86/pvh: implement
iommu_inclusive_mapping for PVH Dom0" series.

Thanks, Roger.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

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

end of thread, other threads:[~2017-09-15 12:45 UTC | newest]

Thread overview: 60+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-14 14:28 [PATCH v5 00/11] vpci: PCI config space emulation Roger Pau Monne
2017-08-14 14:28 ` [PATCH v5 01/11] x86/pci: introduce hvm_pci_decode_addr Roger Pau Monne
2017-08-22 11:24   ` Paul Durrant
2017-08-24 15:46   ` Jan Beulich
2017-08-25  8:29     ` Roger Pau Monne
2017-08-14 14:28 ` [PATCH v5 02/11] vpci: introduce basic handlers to trap accesses to the PCI config space Roger Pau Monne
2017-08-22 12:05   ` Paul Durrant
2017-09-04 15:38   ` Jan Beulich
2017-09-06 15:40     ` Roger Pau Monné
2017-09-07  9:06       ` Jan Beulich
2017-09-07 11:30         ` Roger Pau Monné
2017-09-07 11:38           ` Jan Beulich
2017-09-08 14:41     ` Roger Pau Monné
2017-09-08 15:56       ` Jan Beulich
2017-09-12 10:42   ` Julien Grall
2017-09-12 10:58     ` Roger Pau Monné
2017-09-12 11:00       ` Julien Grall
2017-08-14 14:28 ` [PATCH v5 03/11] x86/mmcfg: add handlers for the PVH Dom0 MMCFG areas Roger Pau Monne
2017-08-22 12:11   ` Paul Durrant
2017-09-04 15:58   ` Jan Beulich
2017-08-14 14:28 ` [PATCH v5 04/11] x86/physdev: enable PHYSDEVOP_pci_mmcfg_reserved for PVH Dom0 Roger Pau Monne
2017-09-05 14:57   ` Jan Beulich
2017-09-13 15:55     ` Roger Pau Monné
2017-09-14  9:53       ` Jan Beulich
2017-08-14 14:28 ` [PATCH v5 05/11] mm: move modify_identity_mmio to global file and drop __init Roger Pau Monne
2017-09-05 15:01   ` Jan Beulich
2017-09-12  7:49     ` Roger Pau Monné
2017-09-12  9:04       ` Jan Beulich
2017-09-12 11:27         ` Roger Pau Monné
2017-09-12 12:53           ` Jan Beulich
2017-09-12 10:53   ` Julien Grall
2017-09-12 11:38     ` Roger Pau Monné
2017-09-12 13:02       ` Julien Grall
2017-08-14 14:28 ` [PATCH v5 06/11] pci: split code to size BARs from pci_add_device Roger Pau Monne
2017-09-05 15:05   ` Jan Beulich
2017-08-14 14:28 ` [PATCH v5 07/11] pci: add support to size ROM BARs to pci_size_mem_bar Roger Pau Monne
2017-09-05 15:12   ` Jan Beulich
2017-08-14 14:28 ` [PATCH v5 08/11] vpci/bars: add handlers to map the BARs Roger Pau Monne
2017-09-07  9:53   ` Jan Beulich
2017-09-12  9:54     ` Roger Pau Monné
2017-09-12 10:06       ` Jan Beulich
2017-09-12 11:48         ` Roger Pau Monné
2017-09-12 12:56           ` Jan Beulich
2017-08-14 14:28 ` [PATCH v5 09/11] vpci/msi: add MSI handlers Roger Pau Monne
2017-08-22 12:20   ` Paul Durrant
2017-09-07 15:29   ` Jan Beulich
2017-09-14 10:08     ` Roger Pau Monné
2017-09-14 10:19       ` Jan Beulich
2017-09-14 10:42         ` Roger Pau Monné
2017-09-14 10:50           ` Jan Beulich
2017-09-14 11:35             ` Roger Pau Monné
2017-09-14 12:09               ` Jan Beulich
2017-08-14 14:28 ` [PATCH v5 10/11] vpci: add a priority parameter to the vPCI register initializer Roger Pau Monne
2017-09-07 15:32   ` Jan Beulich
2017-08-14 14:28 ` [PATCH v5 11/11] vpci/msix: add MSI-X handlers Roger Pau Monne
2017-09-07 16:11   ` Roger Pau Monné
2017-09-07 16:12   ` Jan Beulich
2017-09-15 10:44     ` Roger Pau Monné
2017-09-15 11:43       ` Jan Beulich
2017-09-15 12:44         ` Roger Pau Monné

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).