[PATCH v2 0/2] vPCI capabilities filtering

Stewart Hildebrand posted 2 patches 8 months, 2 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://gitlab.com/xen-project/patchew/xen tags/patchew/20230816185035.82994-1-stewart.hildebrand@amd.com
There is a newer version of this series
xen/drivers/pci/pci.c     | 18 +++++-----
xen/drivers/vpci/header.c | 73 +++++++++++++++++++++++++++++++++++++++
xen/drivers/vpci/vpci.c   | 18 ++++++++++
xen/include/xen/pci.h     |  3 +-
xen/include/xen/vpci.h    |  8 +++++
5 files changed, 110 insertions(+), 10 deletions(-)
[PATCH v2 0/2] vPCI capabilities filtering
Posted by Stewart Hildebrand 8 months, 2 weeks ago
This small series enables vPCI to filter which PCI capabilities we expose to a
domU. This series adds vPCI register handlers within
xen/drivers/vpci/header.c:init_bars(), along with some supporting functions.

Note there are minor rebase conflicts with the in-progress vPCI series [1].
These conflicts fall into the category of functions and code being added
adjacent to one another, so are easily resolved. I did not identify any
dependency on the vPCI locking work, and the two series deal with different
aspects of emulating the PCI header.

Future work may involve adding handlers for more registers in the vPCI header,
such as STATUS, VID/DID, etc. Future work may also involve exposing additional
capabilities to the guest for broader device/driver support.

v1->v2:
* squash helper functions into the patch where they are used to avoid transient
  dead code situation
* add new RFC patch, possibly throwaway, to get an idea of what it would look
  like to get rid of the (void *)(uintptr_t) cast by introducing a new memory
  allocation

[1] https://lists.xenproject.org/archives/html/xen-devel/2023-07/msg01281.html

Stewart Hildebrand (2):
  xen/vpci: header: filter PCI capabilities
  [RFC] xen/vpci: header: avoid cast for value passed to vpci_read_val

 xen/drivers/pci/pci.c     | 18 +++++-----
 xen/drivers/vpci/header.c | 73 +++++++++++++++++++++++++++++++++++++++
 xen/drivers/vpci/vpci.c   | 18 ++++++++++
 xen/include/xen/pci.h     |  3 +-
 xen/include/xen/vpci.h    |  8 +++++
 5 files changed, 110 insertions(+), 10 deletions(-)


base-commit: d0eabe3eaf0db5b78843095a2918d50961e99e96
-- 
2.41.0