[RFC PATCH v3 00/10] PCID server

Dmytro Semenets posted 10 patches 1 year, 2 months ago
Test gitlab-ci failed
Patches applied successfully (tree, apply log)
git fetch https://gitlab.com/xen-project/patchew/xen tags/patchew/20230115113111.1207605-1-dmitry.semenets@gmail.com
There is a newer version of this series
tools/configure                               |    8 +-
tools/configure.ac                            |    1 +
tools/helpers/Makefile                        |    4 +-
tools/hotplug/FreeBSD/rc.d/xlpcid.in          |   75 ++
tools/hotplug/Linux/init.d/xlpcid.in          |   76 ++
tools/hotplug/Linux/systemd/Makefile          |    1 +
.../hotplug/Linux/systemd/xenpcid.service.in  |   10 +
tools/hotplug/NetBSD/rc.d/xlpcid.in           |   75 ++
tools/include/pcid.h                          |  228 ++++
tools/libs/light/Makefile                     |    8 +-
tools/libs/light/libxl_pci.c                  |  673 +++++-----
tools/libs/light/libxl_pcid.c                 | 1110 +++++++++++++++++
tools/libs/light/libxl_vchan.c                |  496 ++++++++
tools/libs/light/libxl_vchan.h                |   94 ++
tools/libs/vchan/init.c                       |   28 +-
tools/xl/Makefile                             |    5 +-
tools/xl/xl.h                                 |    1 +
tools/xl/xl_cmdtable.c                        |    7 +
tools/xl/xl_pcid.c                            |   81 ++
19 files changed, 2613 insertions(+), 368 deletions(-)
create mode 100644 tools/hotplug/FreeBSD/rc.d/xlpcid.in
create mode 100644 tools/hotplug/Linux/init.d/xlpcid.in
create mode 100644 tools/hotplug/Linux/systemd/xenpcid.service.in
create mode 100644 tools/hotplug/NetBSD/rc.d/xlpcid.in
create mode 100644 tools/include/pcid.h
create mode 100644 tools/libs/light/libxl_pcid.c
create mode 100644 tools/libs/light/libxl_vchan.c
create mode 100644 tools/libs/light/libxl_vchan.h
create mode 100644 tools/xl/xl_pcid.c
[RFC PATCH v3 00/10] PCID server
Posted by Dmytro Semenets 1 year, 2 months ago
From: Dmytro Semenets <dmytro_semenets@epam.com>

PCID server used if domain has passthrough PCI controller and we wants
assign some device to other domain.
pcid server should be launched in domain owns the PCI controller and process
request from other domains.
pcid server needs if domain which owns the PCI controller is not Domain-0.
Changes:
patch with subject "remove xenstore entries on vchan server closure" removed
from patchset because it already merged.
patch with subject "Add pcid daemon to xl" divided on several patches because
it was very large.
Fixed crash in some cases
Fixed memory leak
Fixed false client detection.

Dmytro Semenets (6):
  tools/libs/light: Add vchan support to libxl
  tools/xl: Add pcid daemon to xl
  tools/libs/light: pcid: implement is_device_assigned command
  tools/libs/light: pcid: implement reset_device command
  tools/libs/light: pcid: implement resource_list command
  tools/libs/light: pcid: implement write_bdf command

Oleksandr Andrushchenko (2):
  tools: allow vchan XenStore paths more then 64 bytes long
  tools/libs/light: pcid: implement list_assignable command

Volodymyr Babchuk (2):
  tools/light: pci: describe [MAKE|REVERT]_ASSIGNABLE commands
  tools/light: pci: move assign/revert logic to pcid

 tools/configure                               |    8 +-
 tools/configure.ac                            |    1 +
 tools/helpers/Makefile                        |    4 +-
 tools/hotplug/FreeBSD/rc.d/xlpcid.in          |   75 ++
 tools/hotplug/Linux/init.d/xlpcid.in          |   76 ++
 tools/hotplug/Linux/systemd/Makefile          |    1 +
 .../hotplug/Linux/systemd/xenpcid.service.in  |   10 +
 tools/hotplug/NetBSD/rc.d/xlpcid.in           |   75 ++
 tools/include/pcid.h                          |  228 ++++
 tools/libs/light/Makefile                     |    8 +-
 tools/libs/light/libxl_pci.c                  |  673 +++++-----
 tools/libs/light/libxl_pcid.c                 | 1110 +++++++++++++++++
 tools/libs/light/libxl_vchan.c                |  496 ++++++++
 tools/libs/light/libxl_vchan.h                |   94 ++
 tools/libs/vchan/init.c                       |   28 +-
 tools/xl/Makefile                             |    5 +-
 tools/xl/xl.h                                 |    1 +
 tools/xl/xl_cmdtable.c                        |    7 +
 tools/xl/xl_pcid.c                            |   81 ++
 19 files changed, 2613 insertions(+), 368 deletions(-)
 create mode 100644 tools/hotplug/FreeBSD/rc.d/xlpcid.in
 create mode 100644 tools/hotplug/Linux/init.d/xlpcid.in
 create mode 100644 tools/hotplug/Linux/systemd/xenpcid.service.in
 create mode 100644 tools/hotplug/NetBSD/rc.d/xlpcid.in
 create mode 100644 tools/include/pcid.h
 create mode 100644 tools/libs/light/libxl_pcid.c
 create mode 100644 tools/libs/light/libxl_vchan.c
 create mode 100644 tools/libs/light/libxl_vchan.h
 create mode 100644 tools/xl/xl_pcid.c

-- 
2.34.1
Re: [RFC PATCH v3 00/10] PCID server
Posted by Anthony PERARD 1 year, 1 month ago
On Sun, Jan 15, 2023 at 01:31:01PM +0200, Dmytro Semenets wrote:
> PCID server used if domain has passthrough PCI controller and we wants
> assign some device to other domain.
> pcid server should be launched in domain owns the PCI controller and process
> request from other domains.
> pcid server needs if domain which owns the PCI controller is not Domain-0.

Hi Dmytro,

Thanks for the patch.

I did already ask in the previous version[1], but could you write a new
binary for pcid? I still don't think libxl is appropriate for this kind
of tool. libxl is supposed to be used to manage a VM. Or could you
explain why it is implemented in xl/libxl?

[1] https://lore.kernel.org/xen-devel/YzMw8i7w7HyINjEp@perard.uk.xensource.com/

Thanks,

-- 
Anthony PERARD