[RFC PATCH v4 5/9] tools/light: pci: move assign/revert logic to pcid

2023-02-09 Thread dmitry . semenets
From: Volodymyr Babchuk Implement commands MAKE_ASSIGNABLE and REVERT_ASSIGNABLE in pcid in the same way as they were implemented in libxl_pci.c Replace original logic in libxl_pci.c by calling appropriate functions from pcid. This is quite huge patch, as lots of code were moved from lixbl_pci.

[RFC PATCH v4 9/9] tools/libs/light: pcid: implement write_bdf command

2023-02-09 Thread dmitry . semenets
From: Dmytro Semenets Signed-off-by: Dmytro Semenets --- tools/include/xen-pcid.h | 17 + tools/libs/light/libxl_pci.c | 67 ++- tools/libs/light/libxl_pcid.c | 38 3 files changed, 90 insertions(+), 32 deletions(-) diff --git

[RFC PATCH v4 7/9] tools/libs/light: pcid: implement reset_device command

2023-02-09 Thread dmitry . semenets
From: Dmytro Semenets Signed-off-by: Dmytro Semenets --- tools/include/xen-pcid.h | 15 tools/libs/light/libxl_pci.c | 52 +++ tools/libs/light/libxl_pcid.c | 66 +++ 3 files changed, 102 insertions(+), 31 deletions(-) diff

[RFC PATCH v4 8/9] tools/libs/light: pcid: implement resource_list command

2023-02-09 Thread dmitry . semenets
From: Dmytro Semenets Signed-off-by: Dmytro Semenets --- tools/include/xen-pcid.h | 26 tools/libs/light/libxl_pci.c | 63 ++- tools/libs/light/libxl_pcid.c | 110 + tools/libs/light/libxl_vchan.c | 8 +++ tools/libs/light/li

[RFC PATCH v4 2/9] tools/libs/light: Add vchan support to libxl

2023-02-09 Thread dmitry . semenets
From: Dmytro Semenets Add possibility to send commands from libxl and execute them on server side. Libxl vchan adds support for JSON messages processing. The using of libxl vchan is preventing the client from libxl from reading and writing from / to the local sysfs directly.To do this, the libxl

[RFC PATCH v4 6/9] tools/libs/light: pcid: implement is_device_assigned command

2023-02-09 Thread dmitry . semenets
From: Dmytro Semenets Signed-off-by: Dmytro Semenets --- tools/include/xen-pcid.h | 19 tools/libs/light/libxl_pci.c | 43 +++ tools/libs/light/libxl_pcid.c | 34 ++- 3 files changed, 75 insertions(+), 21 deletions(-

[RFC PATCH v4 3/9] tools/xlpcid: Add xlpcid daemon

2023-02-09 Thread dmitry . semenets
From: Dmytro Semenets Add draft version of pcid server (based on vchan-node2), which can receive messages from the client. Add essential functionality to handle pcid protocol: - define required constants - prepare for handling remote requests - prepare and send an error packet Signed-off-by: Dm

[RFC PATCH v4 4/9] tools/libs/light: pcid: implement list_assignable command

2023-02-09 Thread dmitry . semenets
From: Dmytro Semenets Signed-off-by: Oleksandr Andrushchenko Signed-off-by: Dmytro Semenets --- tools/include/xen-pcid.h | 19 tools/libs/light/libxl_pci.c | 54 ++--- tools/libs/light/libxl_pcid.c | 56 ++- 3 files

[RFC PATCH v4 1/9] tools: allow vchan XenStore paths more then 64 bytes long

2023-02-09 Thread dmitry . semenets
From: Oleksandr Andrushchenko Current vchan implementation, while dealing with XenStore paths, allocates 64 bytes buffer on the stack which may not be enough for some use-cases. Make the buffer longer to respect maximum allowed XenStore path of XENSTORE_ABS_PATH_MAX. Signed-off-by: Oleksandr And

[RFC PATCH v4 0/9] PCID server

2023-02-09 Thread dmitry . semenets
From: Dmytro Semenets Moved pcid server from xl command to standalone application Dmytro Semenets (7): tools/libs/light: Add vchan support to libxl tools/xlpcid: Add xlpcid daemon tools/libs/light: pcid: implement list_assignable command tools/libs/light: pcid: implement is_device_assign

[PATCH v2 4/4] tools/xl: Add pcid daemon to xl

2022-07-13 Thread dmitry . semenets
From: Oleksandr Andrushchenko Add pcid daemon (based on vchan-node2) implements pcid protocol. Protocol is OS independed and should work on ane supported OS. Add essential functionality to handle pcid protocol: - define required constants - prepare for handling remote requests - prepare and send

[PATCH v2 3/4] tools/libs/light: Add vchan support to libxl

2022-07-13 Thread dmitry . semenets
From: Oleksandr Andrushchenko Add possibility to send commands from libxl and execute them on server side. Libxl vchan adds support for JSON messages processing. The using of libxl vchan is preventing the client from libxl from reading and writing from / to the local sysfs directly.To do this, t

[PATCH v2 2/4] tools: allow vchan XenStore paths more then 64 bytes long

2022-07-13 Thread dmitry . semenets
From: Oleksandr Andrushchenko Current vchan implementation, while dealing with XenStore paths, allocates 64 bytes buffer on the stack which may not be enough for some use-cases. Make the buffer longer to respect maximum allowed XenStore path of XENSTORE_ABS_PATH_MAX. Signed-off-by: Oleksandr And

[PATCH v2 1/4] tools: remove xenstore entries on vchan server closure

2022-07-13 Thread dmitry . semenets
From: Oleksandr Andrushchenko vchan server creates XenStore entries to advertise its event channel and ring, but those are not removed after the server quits. Add additional cleanup step, so those are removed, so clients do not try to connect to a non-existing server. Signed-off-by: Oleksandr An

[PATCH 4/4] tools/xl: Add pcid daemon to xl

2022-07-09 Thread dmitry . semenets
From: Oleksandr Andrushchenko Add pcid daemon (based on vchan-node2) implements pcid protocol. Protocol is OS independed and should work on ane supported OS. Add essential functionality to handle pcid protocol: - define required constants - prepare for handling remote requests - prepare and send

[PATCH 3/4] tools/libs/light: Add vchan support to libxl

2022-07-09 Thread dmitry . semenets
From: Oleksandr Andrushchenko Add possibility to send commands from libxl and execute them on server side. Libxl vchan adds support for JSON messages processing. The using of libxl vchan is preventing the client from libxl from reading and writing from / to the local sysfs directly.To do this, t

[PATCH 1/4] tools: remove xenstore entries on vchan server closure

2022-07-09 Thread dmitry . semenets
From: Oleksandr Andrushchenko vchan server creates XenStore entries to advertise its event channel and ring, but those are not removed after the server quits. Add additional cleanup step, so those are removed, so clients do not try to connect to a non-existing server. Signed-off-by: Oleksandr An

[PATCH 2/4] tools: allow vchan XenStore paths more then 64 bytes long

2022-07-09 Thread dmitry . semenets
From: Oleksandr Andrushchenko Current vchan implementation, while dealing with XenStore paths, allocates 64 bytes buffer on the stack which may not be enough for some use-cases. Make the buffer longer to respect maximum allowed XenStore path of XENSTORE_ABS_PATH_MAX. Signed-off-by: Oleksandr And

[PATCH] xen: arm: Don't use stop_cpu() in halt_this_cpu()

2022-06-23 Thread dmitry . semenets
From: Dmytro Semenets When shutting down (or rebooting) the platform, Xen will call stop_cpu() on all the CPUs but one. The last CPU will then request the system to shutdown/restart. On platform using PSCI, stop_cpu() will call PSCI CPU off. Per the spec (section 5.5.2 DEN0022D.b), the call coul

[PATCH] xen: arm: Spin-up cpu instead PSCI CPU OFF

2022-06-22 Thread dmitry . semenets
From: Dmytro Semenets Use spin-up cpu with disabled interrupts instead PSCI CPU OFF halt and reboot procedures. Some platforms can't stop CPU via PSCI because Thrusted OS can't migrate execution to other CPU. Signed-off-by: Dmytro Semenets --- xen/arch/arm/shutdown.c | 7 ++- 1 file change

[PATCH] xen: Don't call panic if ARM TF cpu off returns DENIED

2022-06-16 Thread dmitry . semenets
From: Dmytro Semenets According to PSCI specification ARM TF can return DENIED on CPU OFF. This patch brings the hypervisor into compliance with the PSCI specification. Refer to "Arm Power State Coordination Interface (DEN0022D.b)" section 5.5.2 Signed-off-by: Dmytro Semenets Reviewed-by: Volod