Re: [PATCH v6 15/21] tools/xl: support new 9pfs backend xen_9pfsd

2024-02-15 Thread Juergen Gross
On 15.02.24 07:55, Juergen Gross wrote: Add support for the new 9pfs backend "xen_9pfsd". For this backend type the tag defaults to "Xen" and the host side path to "/var/log/xen/guests/". Do most of the default settings in libxl. Unfortunately the default path ca

[PATCH v6 11/21] tools/xen-9pfsd: add 9pfs stat request support

2024-02-14 Thread Juergen Gross
Add the stat request of the 9pfs protocol. Signed-off-by: Juergen Gross Acked-by: Anthony PERARD Reviewed-by: Jason Andryuk --- V3: - use fstatat() (Jason Andryuk) V4: - add "s" format to fill_buffer() as a preparation for reading dirs --- tools/9pfsd/

[PATCH v6 21/21] tools/xenstored: have a single do_control_memreport()

2024-02-14 Thread Juergen Gross
With 9pfs now available in Xenstore-stubdom, there is no reason to have distinct do_control_memreport() variants for the daemon and the stubdom implementations. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk --- tools/xenstored/control.c | 27 +++ 1 file

[PATCH v6 18/21] tools/xenstored: mount 9pfs device in stubdom

2024-02-14 Thread Juergen Gross
Mount the 9pfs device in stubdom enabling it to use files. This has to happen in a worker thread in order to allow the main thread handling the required Xenstore accesses in parallel. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk Reviewed-by: Julien Grall --- V3: - add logging in

[PATCH v6 17/21] tools: add 9pfs device to xenstore-stubdom

2024-02-14 Thread Juergen Gross
't limit allowed file space or number of files. Add a new libxl function for adding it similar to the function for adding the console device. Signed-off-by: Juergen Gross --- V2: - add security_model parameter to new libxl function (Jason Andryuk) V4: - rename function to libxl_device_9pfs_a

[PATCH v6 14/21] tools/libs/light: add backend type for 9pfs PV devices

2024-02-14 Thread Juergen Gross
r convenience "auto-delete" is available to let the backend delete the oldest file of the guest in case otherwise "max-space" or "max-files" would be violated. The xen-9pfsd daemon will be started by libxenlight automatically when the first "xen_9pfs" device

[PATCH v6 13/21] tools/xen-9pfsd: add 9pfs read request support

2024-02-14 Thread Juergen Gross
Add the read request of the 9pfs protocol. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk Acked-by: Anthony PERARD --- V2: - make error check more readable (Jason Andryuk) V4: - add directory read support V5: - rewinddir() if reading a directory and offset is 0 (Jason Andryuk

[PATCH v6 19/21] tools/xenstored: add helpers for filename handling

2024-02-14 Thread Juergen Gross
() (used e.g. for saving the state file in case of live update - needs to be unchanged in the daemon case, but should result in /var/lib/xen/xenstore for stubdom) Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk Reviewed-by: Julien Grall --- V3: - make absolute_filename() return a pointer

[PATCH v6 16/21] stubdom: extend xenstore stubdom configs

2024-02-14 Thread Juergen Gross
Extend the config files of the Xenstore stubdoms to include XENBUS and 9PFRONT items in order to support file based logging. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk --- stubdom/xenstore-minios.cfg| 2 +- stubdom/xenstorepvh-minios.cfg | 2 +- 2 files changed, 2 insertions

[PATCH v6 15/21] tools/xl: support new 9pfs backend xen_9pfsd

2024-02-14 Thread Juergen Gross
domain name isn't available in the related 9pfs specific function. Settings the defaults in libxl requires to move the sanity checking of 9pfs parameters from xl to libxl, too. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk --- V2: - test max_files and max_open_files, too (Jaso

[PATCH v6 12/21] tools/xen-9pfsd: add 9pfs write request support

2024-02-14 Thread Juergen Gross
Add the write request of the 9pfs protocol. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk Acked-by: Anthony PERARD --- tools/9pfsd/io.c | 54 1 file changed, 54 insertions(+) diff --git a/tools/9pfsd/io.c b/tools/9pfsd/io.c index

[PATCH v6 20/21] tools/xenstored: support complete log capabilities in stubdom

2024-02-14 Thread Juergen Gross
With 9pfs being fully available in Xenstore-stubdom now, there is no reason to not fully support all logging capabilities in stubdom. Open the logfile on stubdom only after the 9pfs file system has been mounted. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk Reviewed-by: Julien Grall

[PATCH v6 09/21] tools/xen-9pfsd: add 9pfs clunk request support

2024-02-14 Thread Juergen Gross
Add the clunk request of the 9pfs protocol. Signed-off-by: Juergen Gross Acked-by: Anthony PERARD Reviewed-by: Jason Andryuk --- V3: - use unlinkat() (Jason Andryuk) --- tools/9pfsd/io.c | 43 +++ 1 file changed, 43 insertions(+) diff --git a/tools

[PATCH v6 10/21] tools/xen-9pfsd: add 9pfs create request support

2024-02-14 Thread Juergen Gross
Add the create request of the 9pfs protocol. Signed-off-by: Juergen Gross Acked-by: Anthony PERARD Reviewed-by: Jason Andryuk --- V2: - set permissions correctly (Jason Andryuk) V3: - use opendirat() etc. (Jason Andryuk) - rework error handling a little bit --- tools/9pfsd/io.c | 151

[PATCH v6 07/21] tools/xen-9pfsd: add 9pfs walk request support

2024-02-14 Thread Juergen Gross
Add the walk request of the 9pfs protocol. Signed-off-by: Juergen Gross Acked-by: Anthony PERARD Reviewed-by: Jason Andryuk --- V2: - don't allow walking across symbolic links V6: - use EBADF instead of EBADFD (Andrew Cooper) - use strncpy() with strlen() + 1 (Andrew Cooper) --- tools/

[PATCH v6 08/21] tools/xen-9pfsd: add 9pfs open request support

2024-02-14 Thread Juergen Gross
Add the open request of the 9pfs protocol. Signed-off-by: Juergen Gross Acked-by: Anthony PERARD Reviewed-by: Jason Andryuk --- V2: - don't allow to open symbolic link V3: - use openat() (Jason Andryuk) - use common error handling in p9_open() --- tools/9pfsd/io.c

[PATCH v6 05/21] tools/xen-9pfsd: add 9pfs version request support

2024-02-14 Thread Juergen Gross
Add the version request of the 9pfs protocol. For the version use the "9P2000.u" variant, as it is supported by Mini-OS and Linux. For the request parsing add all format items needed even in future in order to avoid code churn for those additions later. Signed-off-by: Juergen Gross

[PATCH v6 06/21] tools/xen-9pfsd: add 9pfs attach request support

2024-02-14 Thread Juergen Gross
fs backend implementation. Signed-off-by: Juergen Gross Acked-by: Anthony PERARD Reviewed-by: Jason Andryuk --- V2: - make fill_qid() parameter stbuf const (Jason Andryuk) - free fids after disconnecting guest (Jason Andryuk) V3: - only store relative path in fid (Jason Andryuk) V4: - store a pat

[PATCH v6 03/21] tools/xen-9pfsd: add transport layer

2024-02-14 Thread Juergen Gross
Add the transport layer of 9pfs. This is basically the infrastructure to receive requests from the frontend and to send the related answers via the rings. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk Acked-by: Anthony PERARD --- V2: - rename put_request_bytes() (Jason Andryuk

[PATCH v6 04/21] tools/xen-9pfsd: add 9pfs response generation support

2024-02-14 Thread Juergen Gross
r 'D'): in order to avoid adding another buffer for read data support doing the read I/O directly into the response buffer. Signed-off-by: Juergen Gross Acked-by: Anthony PERARD Reviewed-by: Jason Andryuk --- V2: - check parameter size limits (Jason Andryuk) V3: - use new unaligned

[PATCH v6 01/21] tools: add a new xen 9pfs daemon

2024-02-14 Thread Juergen Gross
ing" state to it. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk Acked-by: Andrew Cooper Acked-by: Anthony PERARD --- V2: - rename from xenlogd to xen-9pfsd (Andrew Cooper) - use a backend domain local Xenstore node (Jason Andryuk) - use "volatile" for stop_me (Andrew C

[PATCH v6 02/21] tools/xen-9pfsd: connect to frontend

2024-02-14 Thread Juergen Gross
Add the code for connecting to frontends to xenlogd. Signed-off-by: Juergen Gross Acked-by: Anthony PERARD Reviewed-by: Jason Andryuk --- V2: - support multiple rings per device (Jason Andryuk) - don't set .revents initially (Jason Andryuk) - call poll() with infinite timeout (Jason An

[PATCH v6 00/21] tools: enable xenstore-stubdom to use 9pfs

2024-02-14 Thread Juergen Gross
t of multiple rings per device - xenlogd->xen-9pfsd rename - addressed review comments - fixed some bugs Juergen Gross (21): tools: add a new xen 9pfs daemon tools/xen-9pfsd: connect to frontend tools/xen-9pfsd: add transport layer tools/xen-9pfsd: add 9pfs response generation support

Re: [PATCH] xen/privcmd: Use memdup_array_user() in alloc_ioreq()

2024-02-12 Thread Juergen Gross
ccordingly. This issue was detected by using the Coccinelle software. * Delete a label which became unnecessary with this refactoring. Signed-off-by: Markus Elfring Reviewed-by: Juergen Gross Juergen OpenPGP_0xB0DE9DD628BF132F.asc Description: OpenPGP public key OpenPGP_signature.asc D

Re: [PATCH v3] x86/xen: Add some null pointer checking to smp.c

2024-02-12 Thread Juergen Gross
/oe-kbuild-all/202401161119.iof6bqsf-...@intel.com/ Suggested-by: Markus Elfring Reviewed-by: Juergen Gross Juergen OpenPGP_0xB0DE9DD628BF132F.asc Description: OpenPGP public key OpenPGP_signature.asc Description: OpenPGP digital signature

Re: [PATCH] xen/xenbus: document will_handle argument for xenbus_watch_path()

2024-02-12 Thread Juergen Gross
ernel.org/oe-kbuild-all/202401121154.fi8jdgun-...@intel.com/ Signed-off-by: SeongJae Park Reviewed-by: Juergen Gross Juergen OpenPGP_0xB0DE9DD628BF132F.asc Description: OpenPGP public key OpenPGP_signature.asc Description: OpenPGP digital signature

[PATCH v5 20/22] tools/xenstored: add helpers for filename handling

2024-02-08 Thread Juergen Gross
() (used e.g. for saving the state file in case of live update - needs to be unchanged in the daemon case, but should result in /var/lib/xen/xenstore for stubdom) Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk Reviewed-by: Julien Grall --- V3: - make absolute_filename() return a pointer

[PATCH v5 22/22] tools/xenstored: have a single do_control_memreport()

2024-02-08 Thread Juergen Gross
With 9pfs now available in Xenstore-stubdom, there is no reason to have distinct do_control_memreport() variants for the daemon and the stubdom implementations. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk --- tools/xenstored/control.c | 27 +++ 1 file

[PATCH v5 19/22] tools/xenstored: mount 9pfs device in stubdom

2024-02-08 Thread Juergen Gross
Mount the 9pfs device in stubdom enabling it to use files. This has to happen in a worker thread in order to allow the main thread handling the required Xenstore accesses in parallel. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk Reviewed-by: Julien Grall --- V3: - add logging in

[PATCH v5 18/22] tools: add 9pfs device to xenstore-stubdom

2024-02-08 Thread Juergen Gross
't limit allowed file space or number of files. Add a new libxl function for adding it similar to the function for adding the console device. Signed-off-by: Juergen Gross --- V2: - add security_model parameter to new libxl function (Jason Andryuk) V4: - rename function to libxl_device_9pfs_a

[PATCH v5 17/22] stubdom: extend xenstore stubdom configs

2024-02-08 Thread Juergen Gross
Extend the config files of the Xenstore stubdoms to include XENBUS and 9PFRONT items in order to support file based logging. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk --- stubdom/xenstore-minios.cfg| 2 +- stubdom/xenstorepvh-minios.cfg | 2 +- 2 files changed, 2 insertions

[PATCH v5 21/22] tools/xenstored: support complete log capabilities in stubdom

2024-02-08 Thread Juergen Gross
With 9pfs being fully available in Xenstore-stubdom now, there is no reason to not fully support all logging capabilities in stubdom. Open the logfile on stubdom only after the 9pfs file system has been mounted. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk Reviewed-by: Julien Grall

[PATCH v5 12/22] tools/9pfsd: add 9pfs stat request support

2024-02-08 Thread Juergen Gross
Add the stat request of the 9pfs protocol. Signed-off-by: Juergen Gross Acked-by: Anthony PERARD Reviewed-by: Jason Andryuk --- V3: - use fstatat() (Jason Andryuk) V4: - add "s" format to fill_buffer() as a preparation for reading dirs --- tools/9pfsd/

[PATCH v5 10/22] tools/9pfsd: add 9pfs clunk request support

2024-02-08 Thread Juergen Gross
Add the clunk request of the 9pfs protocol. Signed-off-by: Juergen Gross Acked-by: Anthony PERARD Reviewed-by: Jason Andryuk --- V3: - use unlinkat() (Jason Andryuk) --- tools/9pfsd/io.c | 43 +++ 1 file changed, 43 insertions(+) diff --git a/tools

[PATCH v5 13/22] tools/9pfsd: add 9pfs write request support

2024-02-08 Thread Juergen Gross
Add the write request of the 9pfs protocol. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk Acked-by: Anthony PERARD --- tools/9pfsd/io.c | 54 1 file changed, 54 insertions(+) diff --git a/tools/9pfsd/io.c b/tools/9pfsd/io.c index

[PATCH v5 09/22] tools/9pfsd: add 9pfs open request support

2024-02-08 Thread Juergen Gross
Add the open request of the 9pfs protocol. Signed-off-by: Juergen Gross Acked-by: Anthony PERARD Reviewed-by: Jason Andryuk --- V2: - don't allow to open symbolic link V3: - use openat() (Jason Andryuk) - use common error handling in p9_open() --- tools/9pfsd/io.c

[PATCH v5 11/22] tools/9pfsd: add 9pfs create request support

2024-02-08 Thread Juergen Gross
Add the create request of the 9pfs protocol. Signed-off-by: Juergen Gross Acked-by: Anthony PERARD Reviewed-by: Jason Andryuk --- V2: - set permissions correctly (Jason Andryuk) V3: - use opendirat() etc. (Jason Andryuk) - rework error handling a little bit --- tools/9pfsd/io.c | 151

[PATCH v5 15/22] tools/libs/light: add backend type for 9pfs PV devices

2024-02-08 Thread Juergen Gross
r convenience "auto-delete" is available to let the backend delete the oldest file of the guest in case otherwise "max-space" or "max-files" would be violated. The xen-9pfsd daemon will be started by libxenlight automatically when the first "xen_9pfs" device

[PATCH v5 16/22] tools/xl: support new 9pfs backend xen_9pfsd

2024-02-08 Thread Juergen Gross
domain name isn't available in the related 9pfs specific function. Settings the defaults in libxl requires to move the sanity checking of 9pfs parameters from xl to libxl, too. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk --- V2: - test max_files and max_open_files, too (Jaso

[PATCH v5 14/22] tools/9pfsd: add 9pfs read request support

2024-02-08 Thread Juergen Gross
Add the read request of the 9pfs protocol. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk Acked-by: Anthony PERARD --- V2: - make error check more readable (Jason Andryuk) V4: - add directory read support V5: - rewinddir() if reading a directory and offset is 0 (Jason Andryuk

[PATCH v5 08/22] tools/9pfsd: add 9pfs walk request support

2024-02-08 Thread Juergen Gross
Add the walk request of the 9pfs protocol. Signed-off-by: Juergen Gross Acked-by: Anthony PERARD Reviewed-by: Jason Andryuk --- V2: - don't allow walking across symbolic links --- tools/9pfsd/io.c| 171 tools/9pfsd/xen-9pfsd.h | 1 + 2

[PATCH v5 06/22] tools/9pfsd: add 9pfs version request support

2024-02-08 Thread Juergen Gross
Add the version request of the 9pfs protocol. For the version use the "9P2000.u" variant, as it is supported by Mini-OS and Linux. For the request parsing add all format items needed even in future in order to avoid code churn for those additions later. Signed-off-by: Juergen Gross

[PATCH v5 07/22] tools/9pfsd: add 9pfs attach request support

2024-02-08 Thread Juergen Gross
fs backend implementation. Signed-off-by: Juergen Gross Acked-by: Anthony PERARD Reviewed-by: Jason Andryuk --- V2: - make fill_qid() parameter stbuf const (Jason Andryuk) - free fids after disconnecting guest (Jason Andryuk) V3: - only store relative path in fid (Jason Andryuk) V4: - store a pat

[PATCH v5 04/22] tools/9pfsd: add transport layer

2024-02-08 Thread Juergen Gross
Add the transport layer of 9pfs. This is basically the infrastructure to receive requests from the frontend and to send the related answers via the rings. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk Acked-by: Anthony PERARD --- V2: - rename put_request_bytes() (Jason Andryuk

[PATCH v5 05/22] tools/9pfsd: add 9pfs response generation support

2024-02-08 Thread Juergen Gross
r 'D'): in order to avoid adding another buffer for read data support doing the read I/O directly into the response buffer. Signed-off-by: Juergen Gross Acked-by: Anthony PERARD Reviewed-by: Jason Andryuk --- V2: - check parameter size limits (Jason Andryuk) V3: - use new unaligned

[PATCH v5 00/22] tools: enable xenstore-stubdom to use 9pfs

2024-02-08 Thread Juergen Gross
essed comments Changes in V4: - patch 2 of V3 was applied - added support of reading directories - addressed review comments Changes in V3: - new patches 1, 23-25 - addressed review comments Changes in V2: - support of multiple rings per device - xenlogd->xen-9pfsd rename - addressed review co

[PATCH v5 03/22] tools/9pfsd: connect to frontend

2024-02-08 Thread Juergen Gross
Add the code for connecting to frontends to xenlogd. Signed-off-by: Juergen Gross Acked-by: Anthony PERARD Reviewed-by: Jason Andryuk --- V2: - support multiple rings per device (Jason Andryuk) - don't set .revents initially (Jason Andryuk) - call poll() with infinite timeout (Jason An

[PATCH v5 02/22] tools: add a new xen 9pfs daemon

2024-02-08 Thread Juergen Gross
ing" state to it. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk Acked-by: Andrew Cooper Acked-by: Anthony PERARD --- V2: - rename from xenlogd to xen-9pfsd (Andrew Cooper) - use a backend domain local Xenstore node (Jason Andryuk) - use "volatile" for stop_me (Andrew C

[PATCH v5 01/22] tools: add access macros for unaligned data

2024-02-08 Thread Juergen Gross
Add the basic access macros for unaligned data to common-macros.h. Signed-off-by: Juergen Gross Acked-by: Andrew Cooper --- V3: - new patch --- tools/include/xen-tools/common-macros.h | 17 + 1 file changed, 17 insertions(+) diff --git a/tools/include/xen-tools/common-macros.h

[PATCH] docs: add a best practices coding guide

2024-02-08 Thread Juergen Gross
.pandoc and move the mentioned section from CODING_STYLE to the new file, while converting the format to pandoc. Signed-off-by: Juergen Gross --- CODING_STYLE | 102 -- docs/process/coding-best-practices.pandoc | 92 +++ 2 files ch

[PATCH v2] config: update Mini-OS commit

2024-02-08 Thread Juergen Gross
Update the Mini-OS upstream revision. Signed-off-by: Juergen Gross --- V2: - newer commit fixing a bug --- Config.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Config.mk b/Config.mk index f7d6d84847..6f6e0425ba 100644 --- a/Config.mk +++ b/Config.mk @@ -224,7 +224,7

[PATCH] Mini-OS: fix 9pfront fix

2024-02-07 Thread Juergen Gross
There was a typo in the recent 9pfront fix. Fixes: b119f0178fd8 ("Mini-OS: fix 9pfs frontend error path") Reported-by: Julien Grall Signed-off-by: Juergen Gross --- 9pfront.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/9pfront.c b/9pfront.c index 042879a7

[PATCH] config: update Mini-OS commit

2024-02-07 Thread Juergen Gross
Update the Mini-OS upstream revision. Signed-off-by: Juergen Gross --- Config.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Config.mk b/Config.mk index f7d6d84847..077d841bb7 100644 --- a/Config.mk +++ b/Config.mk @@ -224,7 +224,7 @@ QEMU_UPSTREAM_URL ?= https

Re: [PATCH] Mini-OS: x86: zero out .bss segment at boot

2024-02-07 Thread Juergen Gross
On 07.02.24 11:39, Jan Beulich wrote: On 07.02.2024 11:31, Juergen Gross wrote: --- a/arch/x86/setup.c +++ b/arch/x86/setup.c @@ -184,6 +184,8 @@ arch_init(void *par) { static char hello[] = "Bootstrapping...\n"; + memset(&__bss_start, 0, &_end - &_

[PATCH] Mini-OS: x86: zero out .bss segment at boot

2024-02-07 Thread Juergen Gross
The .bss segment should be zeroed at very early boot. While adding the extern declaration of __bss_start for x86, make it together with the other linker table defined section boundaries common for all architectures. Signed-off-by: Juergen Gross --- arch/x86/setup.c | 2 ++ include/arm

[PATCH v2] Mini-OS: fix 9pfs frontend error path

2024-02-06 Thread Juergen Gross
: 2d1dfccd3aa3 ("Mini-OS: add read and write support to 9pfsfront") Signed-off-by: Juergen Gross --- V2: - call free_stat() in p9_stat() in case of returning an error (Samuel Thibault) --- 9pfront.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/9pfront.c b/9pfro

[PATCH] tools/libs/light: don't allow to stop Xenstore stubdom

2024-02-06 Thread Juergen Gross
A Xenstore stubdom should never be stoppable. Reject attempts to do so. Signed-off-by: Juergen Gross --- tools/libs/light/libxl_domain.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/libs/light/libxl_domain.c b/tools/libs/light/libxl_domain.c index 5ee1544d9c

[PATCH] Mini-OS: fix 9pfs frontend error path

2024-02-05 Thread Juergen Gross
ned-off-by: Juergen Gross --- 9pfront.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/9pfront.c b/9pfront.c index 315089bc..33eaadce 100644 --- a/9pfront.c +++ b/9pfront.c @@ -716,10 +716,11 @@ static int p9_stat(struct dev_9pfs *dev, uint32_t fid, struct p9_stat *stat)

[PATCH v4 22/32] tools/xenstored: move systemd handling to posix.c

2024-02-05 Thread Juergen Gross
Move systemd handling to a new late_init() function in posix.c. This prepares a future removal of the NO_SOCKETS macro. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk Reviewed-by: Julien Grall --- V3: - new patch --- tools/xenstored/core.c | 17 + tools/xenstored

[PATCH v4 16/32] tools/xl: support new 9pfs backend xen_9pfsd

2024-02-05 Thread Juergen Gross
domain name isn't available in the related 9pfs specific function. Settings the defaults in libxl requires to move the sanity checking of 9pfs parameters from xl to libxl, too. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk --- V2: - test max_files and max_open_files, too (Jaso

[PATCH v4 08/32] tools/xen-9pfsd: add 9pfs walk request support

2024-02-05 Thread Juergen Gross
Add the walk request of the 9pfs protocol. Signed-off-by: Juergen Gross Acked-by: Anthony PERARD --- V2: - don't allow walking across symbolic links --- tools/xen-9pfsd/io.c| 171 tools/xen-9pfsd/xen-9pfsd.h | 1 + 2 files changed, 172 inser

[PATCH v4 30/32] tools/xenstored: add helpers for filename handling

2024-02-05 Thread Juergen Gross
() (used e.g. for saving the state file in case of live update - needs to be unchanged in the daemon case, but should result in /var/lib/xen/xenstore for stubdom) Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk Reviewed-by: Julien Grall --- V3: - make absolute_filename() return a pointer

[PATCH v4 20/32] tools: add 9pfs device to xenstore-stubdom

2024-02-05 Thread Juergen Gross
't limit allowed file space or number of files. Add a new libxl function for adding it similar to the function for adding the console device. Signed-off-by: Juergen Gross --- V2: - add security_model parameter to new libxl function (Jason Andryuk) V4: - rename function to libxl_device_9pfs_a

[PATCH v4 09/32] tools/xen-9pfsd: add 9pfs open request support

2024-02-05 Thread Juergen Gross
Add the open request of the 9pfs protocol. Signed-off-by: Juergen Gross Acked-by: Anthony PERARD --- V2: - don't allow to open symbolic link V3: - use openat() (Jason Andryuk) - use common error handling in p9_open() --- tools/xen-9pfsd/io.c

[PATCH v4 11/32] tools/xen-9pfsd: add 9pfs create request support

2024-02-05 Thread Juergen Gross
Add the create request of the 9pfs protocol. Signed-off-by: Juergen Gross Acked-by: Anthony PERARD --- V2: - set permissions correctly (Jason Andryuk) V3: - use opendirat() etc. (Jason Andryuk) - rework error handling a little bit --- tools/xen-9pfsd/io.c | 151

[PATCH v4 17/32] tools/helpers: allocate xenstore event channel for xenstore stubdom

2024-02-05 Thread Juergen Gross
In order to prepare support of PV frontends in xenstore-stubdom, add allocation of a Xenstore event channel to init-xenstore-domain.c. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk --- tools/helpers/init-xenstore-domain.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a

[PATCH v4 19/32] stubdom: extend xenstore stubdom configs

2024-02-05 Thread Juergen Gross
Extend the config files of the Xenstore stubdoms to include XENBUS and 9PFRONT items in order to support file based logging. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk --- stubdom/xenstore-minios.cfg| 2 +- stubdom/xenstorepvh-minios.cfg | 2 +- 2 files changed, 2 insertions

[PATCH v4 24/32] tools/xenstored: move all socket handling into posix.c

2024-02-05 Thread Juergen Gross
All of the socket handling is needed only when running as daemon. Move it into posix.c, allowing to remove the NO_SOCKETS macro. Signed-off-by: Juergen Gross --- V3: - new patch V4: - make sock local to posix.c (Julien Grall) --- tools/xenstored/Makefile.common | 4 - tools/xenstored/core.c

[PATCH v4 10/32] tools/xen-9pfsd: add 9pfs clunk request support

2024-02-05 Thread Juergen Gross
Add the clunk request of the 9pfs protocol. Signed-off-by: Juergen Gross Acked-by: Anthony PERARD --- V3: - use unlinkat() (Jason Andryuk) --- tools/xen-9pfsd/io.c | 43 +++ 1 file changed, 43 insertions(+) diff --git a/tools/xen-9pfsd/io.c b/tools/xen

[PATCH v4 15/32] tools/libs/light: add backend type for 9pfs PV devices

2024-02-05 Thread Juergen Gross
r convenience "auto-delete" is available to let the backend delete the oldest file of the guest in case otherwise "max-space" or "max-files" would be violated. The xen-9pfsd daemon will be started by libxenlight automatically when the first "xen_9pfs" device

[PATCH v4 14/32] tools/xen-9pfsd: add 9pfs read request support

2024-02-05 Thread Juergen Gross
Add the read request of the 9pfs protocol. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk Acked-by: Anthony PERARD --- V2: - make error check more readable (Jason Andryuk) V4: - add directory read support --- tools/xen-9pfsd/io.c | 90 1

[PATCH v4 07/32] tools/xen-9pfsd: add 9pfs attach request support

2024-02-05 Thread Juergen Gross
fs backend implementation. Signed-off-by: Juergen Gross Acked-by: Anthony PERARD --- V2: - make fill_qid() parameter stbuf const (Jason Andryuk) - free fids after disconnecting guest (Jason Andryuk) V3: - only store relative path in fid (Jason Andryuk) V4: - store a path directly usable by *at() fu

[PATCH v4 18/32] tools/xenstored: rename xenbus_evtchn()

2024-02-05 Thread Juergen Gross
Rename the xenbus_evtchn() function to get_xenbus_evtchn() in order to avoid two externally visible symbols with the same name when Xenstore- stubdom is being built with a Mini-OS with CONFIG_XENBUS set. Signed-off-by: Juergen Gross Reviewed-by: Julien Grall Reviewed-by: Jason Andryuk

[PATCH v4 21/32] tools/xenstored: add early_init() function

2024-02-05 Thread Juergen Gross
log of talloc()ed memory hardly has any value. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk Reviewed-by: Julien Grall --- V2: - rename function - move patch earlier in the series V3: - add more init code for the daemon to early_init() - move mkdir(XENSTORE_LIB_DIR) into a later patch

[PATCH v4 12/32] tools/xen-9pfsd: add 9pfs stat request support

2024-02-05 Thread Juergen Gross
Add the stat request of the 9pfs protocol. Signed-off-by: Juergen Gross Acked-by: Anthony PERARD --- V3: - use fstatat() (Jason Andryuk) V4: - add "s" format to fill_buffer() as a preparation for reading dirs --- tools/xen-9pfsd/io.c | 102 +

[PATCH v4 13/32] tools/xen-9pfsd: add 9pfs write request support

2024-02-05 Thread Juergen Gross
Add the write request of the 9pfs protocol. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk Acked-by: Anthony PERARD --- tools/xen-9pfsd/io.c | 54 1 file changed, 54 insertions(+) diff --git a/tools/xen-9pfsd/io.c b/tools/xen-9pfsd/io.c

[PATCH v4 25/32] tools/xenstored: get own domid in stubdom case

2024-02-05 Thread Juergen Gross
Obtain own domid when running as stubdom. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk Reviewed-by: Julien Grall --- V2: - replacement of V1 patch (Andrew Cooper) V3: - rename called function to get_domid() (Julien Grall) - change stub_domid type to domid_t (Julien Grall) --- tools

[PATCH v4 23/32] tools/xenstored: move all log-pipe handling into posix.c

2024-02-05 Thread Juergen Gross
to them later, too. Signed-off-by: Juergen Gross --- V3: - new patch V4: - rename fds to poll_fds (Julien Grall) --- tools/xenstored/core.c | 69 +++- tools/xenstored/core.h | 11 --- tools/xenstored/minios.c | 14 tools/xenstored/posix.c | 47

[PATCH v4 32/32] tools/xenstored: have a single do_control_memreport()

2024-02-05 Thread Juergen Gross
With 9pfs now available in Xenstore-stubdom, there is no reason to have distinct do_control_memreport() variants for the daemon and the stubdom implementations. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk --- tools/xenstored/control.c | 27 +++ 1 file

[PATCH v4 31/32] tools/xenstored: support complete log capabilities in stubdom

2024-02-05 Thread Juergen Gross
With 9pfs being fully available in Xenstore-stubdom now, there is no reason to not fully support all logging capabilities in stubdom. Open the logfile on stubdom only after the 9pfs file system has been mounted. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk Reviewed-by: Julien Grall

[PATCH v4 29/32] tools/xenstored: mount 9pfs device in stubdom

2024-02-05 Thread Juergen Gross
Mount the 9pfs device in stubdom enabling it to use files. This has to happen in a worker thread in order to allow the main thread handling the required Xenstore accesses in parallel. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk Reviewed-by: Julien Grall --- V3: - add logging in

[PATCH v4 27/32] tools/xenstored: split domain_init()

2024-02-05 Thread Juergen Gross
unconditionally, and in a part setting up the event channel handle. Note that there is no chance that chk_domain_generation() can be called now before xc_handle has been setup, so there is no need for the related special case anymore. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk Reviewed-by

[PATCH v4 28/32] tools/xenstored: map stubdom interface

2024-02-05 Thread Juergen Gross
igned-off-by: Juergen Gross Reviewed-by: Jason Andryuk Reviewed-by: Julien Grall --- tools/xenstored/core.c | 2 ++ tools/xenstored/domain.c | 27 ++- tools/xenstored/domain.h | 1 + 3 files changed, 29 insertions(+), 1 deletion(-) diff --git a/tools/xenstored/core.c b/

[PATCH v4 26/32] tools/xenstored: rework ring page (un)map functions

2024-02-05 Thread Juergen Gross
g the stub domain's ring page. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk Reviewed-by: Julien Grall --- tools/xenstored/domain.c | 31 +-- 1 file changed, 13 insertions(+), 18 deletions(-) diff --git a/tools/xenstored/domain.c b/tools/xenstored

[PATCH v4 06/32] tools/xen-9pfsd: add 9pfs version request support

2024-02-05 Thread Juergen Gross
Add the version request of the 9pfs protocol. For the version use the "9P2000.u" variant, as it is supported by Mini-OS and Linux. For the request parsing add all format items needed even in future in order to avoid code churn for those additions later. Signed-off-by: Juergen Gross

[PATCH v4 05/32] tools/xen-9pfsd: add 9pfs response generation support

2024-02-05 Thread Juergen Gross
r 'D'): in order to avoid adding another buffer for read data support doing the read I/O directly into the response buffer. Signed-off-by: Juergen Gross Acked-by: Anthony PERARD --- V2: - check parameter size limits (Jason Andryuk) V3: - use new unaligned access macros (Jason Andryuk)

[PATCH v4 04/32] tools/xen-9pfsd: add transport layer

2024-02-05 Thread Juergen Gross
Add the transport layer of 9pfs. This is basically the infrastructure to receive requests from the frontend and to send the related answers via the rings. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk Acked-by: Anthony PERARD --- V2: - rename put_request_bytes() (Jason Andryuk

[PATCH v4 02/32] tools: add a new xen logging daemon

2024-02-05 Thread Juergen Gross
quot;running" state to it. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk Acked-by: Andrew Cooper Acked-by: Anthony PERARD --- V2: - rename from xenlogd to xen-9pfsd (Andrew Cooper) - use a backend domain local Xenstore node (Jason Andryuk) - use "volatile" for stop_me (

[PATCH v4 03/32] tools/xen-9pfsd: connect to frontend

2024-02-05 Thread Juergen Gross
Add the code for connecting to frontends to xenlogd. Signed-off-by: Juergen Gross Acked-by: Anthony PERARD Reviewed-by: Jason Andryuk --- V2: - support multiple rings per device (Jason Andryuk) - don't set .revents initially (Jason Andryuk) - call poll() with infinite timeout (Jason An

[PATCH v4 00/32] tools: enable xenstore-stubdom to use 9pfs

2024-02-05 Thread Juergen Gross
being rejected. Changes in V4: - patch 2 of V3 was applied - added support of reading directories - addressed review comments Changes in V3: - new patches 1, 23-25 - addressed review comments Changes in V2: - support of multiple rings per device - xenlogd->xen-9pfsd rename - addressed review co

[PATCH v4 01/32] tools: add access macros for unaligned data

2024-02-05 Thread Juergen Gross
Add the basic access macros for unaligned data to common-macros.h. Signed-off-by: Juergen Gross Acked-by: Andrew Cooper --- V3: - new patch --- tools/include/xen-tools/common-macros.h | 17 + 1 file changed, 17 insertions(+) diff --git a/tools/include/xen-tools/common-macros.h

Re: [PATCH v3 25/33] tools/xenstored: move all socket handling into posix.c

2024-02-05 Thread Juergen Gross
On 26.01.24 17:22, Julien Grall wrote: Hi Juergen, On 04/01/2024 09:00, Juergen Gross wrote: All of the socket handling is needed only when running as daemon. Move it into posix.c, allowing to remove the NO_SOCKETS macro. Signed-off-by: Juergen Gross --- V3: - new patch ---   tools

Re: [PATCH v3 25/33] tools/xenstored: move all socket handling into posix.c

2024-02-05 Thread Juergen Gross
On 26.01.24 17:22, Julien Grall wrote: Hi Juergen, On 04/01/2024 09:00, Juergen Gross wrote: All of the socket handling is needed only when running as daemon. Move it into posix.c, allowing to remove the NO_SOCKETS macro. Signed-off-by: Juergen Gross --- V3: - new patch ---   tools

Re: [PATCH v3 24/33] tools/xenstored: move all log-pipe handling into posix.c

2024-02-05 Thread Juergen Gross
On 25.01.24 19:54, Julien Grall wrote: Hi Juergen, On 04/01/2024 09:00, Juergen Gross wrote: All of the log-pipe handling is needed only when running as daemon. Move it into posix.c. This requires to have a service function in the main event loop for handling the related requests and one for

Re: [PATCH v3 21/33] tools: add 9pfs device to xenstore-stubdom

2024-02-02 Thread Juergen Gross
On 15.01.24 16:31, Anthony PERARD wrote: On Thu, Jan 04, 2024 at 10:00:43AM +0100, Juergen Gross wrote: Add a 9pfs device to Xenstore stubdom in order to allow it to do e.g. logging into a dom0 file. Use the following parameters for the new device: - tag = "xen" Is it ok to hav

Re: [PATCH v3 17/33] tools/xl: support new 9pfs backend xen-9pfsd

2024-02-02 Thread Juergen Gross
On 02.02.24 16:28, Juergen Gross wrote: On 31.01.24 16:20, Jürgen Groß wrote: On 15.01.24 16:14, Anthony PERARD wrote: On Thu, Jan 04, 2024 at 10:00:39AM +0100, Juergen Gross wrote: @@ -2242,6 +2256,28 @@ void parse_config_data(const char *config_source

Re: [PATCH v3 17/33] tools/xl: support new 9pfs backend xen-9pfsd

2024-02-02 Thread Juergen Gross
On 31.01.24 16:20, Jürgen Groß wrote: On 15.01.24 16:14, Anthony PERARD wrote: On Thu, Jan 04, 2024 at 10:00:39AM +0100, Juergen Gross wrote: @@ -2242,6 +2256,28 @@ void parse_config_data(const char *config_source,   libxl_string_list_dispose(&pairs); +    if (p9-&

[GIT PULL] xen: branch for v6.8-rc1

2024-01-11 Thread Juergen Gross
/displif.h | 2 +- include/xen/interface/io/ring.h| 2 +- include/xen/interface/io/sndif.h | 2 +- 5 files changed, 62 insertions(+), 53 deletions(-) Juergen Gross (1): xen: update PV-device interface headers Oleksandr Tyshchenko (1): xen/gntdev: Fix the abuse of underlying struct page

Re: E820 memory allocation issue on Threadripper platforms

2024-01-11 Thread Juergen Gross
On 11.01.24 09:37, Jan Beulich wrote: On 11.01.2024 03:29, Patrick Plenefisch wrote: Hi, I ran into a memory allocation issue, I think. It is the same as https://github.com/QubesOS/qubes-issues/issues/8791 and I saw at the end it was recommended (by marmarek) that the issue reporter forward the

[PATCH v3 15/33] tools/xenlogd: add 9pfs read request support

2024-01-04 Thread Juergen Gross
Add the read request of the 9pfs protocol. For now support only reading plain files (no directories). Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk --- V2: - make error check more readable (Jason Andryuk) --- tools/xen-9pfsd/io.c | 64 1

<    1   2   3   4   5   6   7   8   9   10   >