[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v6 00/11] vpci: PCI config space emulation
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 modifies a function to decode a PCI IO port access into pci_sbdf_t 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 most noticeable functional difference from previous versions is that this version supports preemptive BAR mapping and unmapping. The branch containing the patches can be found at: git://xenbits.xen.org/people/royger/xen.git vpci_v6 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. Thanks, Roger. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |