This patch series is a follow up for the dicsussion at [1]. It adds ability for toolstack to chose Device part of SBDF for a PCI device when passing it to DomU. First and last patches are quite straightforward, but the second one ("tools: libxc: add virtual_sbdf parameter to xc_assign_device") changes API of libxc, which is big no-no, so it is just a starting point for a discussion. What is the best way to do this?
Another topic for discussion is the first patch ("domctl/pci: add ability to provide/request a virtual SBDF"). It extends existing domctl for assigning devices, which is fine for this use case. But we also discussed use case of virtio-pci devices, for which we want to allocate/request vSBDFs as well. Problem is that we cant't use assign_device call for this because there is no physical device which can be assigned. Probably we will need another domctl - specifically for allocating vSBDFs. But then there would be two domctls that are capable of allocating vSBDFs: assign_device and this new call... So yeah, I am open for suggestions. [1] https://lore.kernel.org/all/d6a58e73-da51-40f1-a2f7-576274945...@xen.org/ Volodymyr Babchuk (3): domctl/pci: add ability to provide/request a virtual SBDF tools: libxc: add virtual_sbdf parameter to xc_assign_device tools: libxl: use "vslot" parameter when assigning a PCI device tools/include/xenctrl.h | 1 + tools/libs/ctrl/xc_domain.c | 13 +++++++++- tools/libs/light/libxl_pci.c | 9 +++++-- tools/ocaml/libs/xc/xenctrl_stubs.c | 2 +- tools/python/xen/lowlevel/xc/xc.c | 2 +- xen/drivers/passthrough/pci.c | 17 ++++++++----- xen/drivers/vpci/vpci.c | 38 +++++++++++++++++++++++------ xen/include/public/domctl.h | 9 ++++++- xen/include/xen/vpci.h | 4 +-- 9 files changed, 73 insertions(+), 22 deletions(-) -- 2.43.0