[PATCH v6] tools/xenstore: move xenstored sources into dedicated directory

2023-08-21 Thread Juergen Gross
make it clearer that xenstore clients and xenstored are independent from each other. In order to avoid two very similar named directories below tools, rename tools/xenstore to tools/xs-clients. Signed-off-by: Juergen Gross Reviewed-by: Julien Grall --- After the large overhaul of xenstored I thin

Re: [PATCH v5] tools/xenstore: move xenstored sources into dedicated directory

2023-08-21 Thread Juergen Gross
On 21.08.23 09:59, Julien Grall wrote: Hi, On 18/08/2023 15:20, Andrew Cooper wrote: On 18/08/2023 3:08 pm, Juergen Gross wrote: diff --git a/.gitignore b/.gitignore index c1b73b0968..c6489c4e70 100644 --- a/.gitignore +++ b/.gitignore @@ -237,22 +237,22 @@ tools/xenmon/xentrace_setmask

[PATCH v5] tools/xenstore: move xenstored sources into dedicated directory

2023-08-18 Thread Juergen Gross
make it clearer that xenstore clients and xenstored are independent from each other. In order to avoid two very similar named directories below tools, rename tools/xenstore to tools/xs-clients. Signed-off-by: Juergen Gross --- After the large overhaul of xenstored I think such a reorg would make

Re: [PATCH v4 19/19] tools/xenstore: move xenstored sources into dedicated directory

2023-08-18 Thread Juergen Gross
On 18.08.23 14:42, Julien Grall wrote: Hi Juergen, On 18/08/2023 13:14, Juergen Gross wrote: On 18.08.23 13:22, Julien Grall wrote: Hi Juergen, On 14/08/2023 08:47, Juergen Gross wrote: In tools/xenstore there are living xenstored and xenstore clients. They are no longer sharing anything

Re: [PATCH v4 19/19] tools/xenstore: move xenstored sources into dedicated directory

2023-08-18 Thread Juergen Gross
On 18.08.23 13:22, Julien Grall wrote: Hi Juergen, On 14/08/2023 08:47, Juergen Gross wrote: In tools/xenstore there are living xenstored and xenstore clients. They are no longer sharing anything apart from the "xenstore" in their names. Move the xenstored sources into a new direc

Re: [PATCH 3/3] xen/public: arch-arm: All PSR_* defines should be unsigned

2023-08-18 Thread Juergen Gross
On 18.08.23 10:05, Julien Grall wrote: Hi, On 18/08/2023 09:00, Juergen Gross wrote: On 18.08.23 09:39, Julien Grall wrote: Hi Jan, On 18/08/2023 07:33, Jan Beulich wrote: On 17.08.2023 23:43, Julien Grall wrote: --- a/xen/include/public/arch-arm.h +++ b/xen/include/public/arch-arm.h

Re: [PATCH 3/3] xen/public: arch-arm: All PSR_* defines should be unsigned

2023-08-18 Thread Juergen Gross
On 18.08.23 09:39, Julien Grall wrote: Hi Jan, On 18/08/2023 07:33, Jan Beulich wrote: On 17.08.2023 23:43, Julien Grall wrote: --- a/xen/include/public/arch-arm.h +++ b/xen/include/public/arch-arm.h @@ -339,36 +339,36 @@ typedef uint64_t xen_callback_t;   /* PSR bits (CPSR, SPSR) */ -#define

Re: [PATCH -next] xen: xenbus: Use helper function IS_ERR_OR_NULL()

2023-08-17 Thread Juergen Gross
On 17.08.23 03:47, Li Zetao wrote: Use IS_ERR_OR_NULL() to detect an error pointer or a null pointer open-coding to simplify the code. Signed-off-by: Li Zetao Reviewed-by: Juergen Gross Juergen OpenPGP_0xB0DE9DD628BF132F.asc Description: OpenPGP public key OpenPGP_signature.asc

Re: [PATCH -next] xen: Switch to use kmemdup() helper

2023-08-15 Thread Juergen Gross
On 15.08.23 11:24, Ruan Jinjie wrote: Use kmemdup() helper instead of open-coding to simplify the code. Signed-off-by: Ruan Jinjie Reviewed-by: Juergen Gross with one nit ... --- drivers/xen/xen-acpi-processor.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git

Re: [PATCH 3/3] xen: Illustrate the transition to sync_try_cmpxchg

2023-08-15 Thread Juergen Gross
On 10.07.23 21:21, Uros Bizjak wrote: This patch illustrates the transition to sync_try_cmpxchg. It is not intended to be merged as-is. Cc: Peter Zijlstra Cc: Juergen Gross Cc: Stefano Stabellini Cc: Oleksandr Tyshchenko Signed-off-by: Uros Bizjak Acked-by: Juergen Gross Juergen

[PATCH v4.1 18/19] tools/config: add XEN_RUN_STORED to config.h

2023-08-14 Thread Juergen Gross
Instead of adding the definition of XEN_RUN_STORED to CFLAGS in multiple Makefiles, let configure add it to tools/config.h instead. Signed-off-by: Juergen Gross Reviewed-by: Anthony PERARD --- V4: - new patch V4.1: - drop XEN_RUN_STORED from config/Paths.mk.in (Anthony PERARD) --- config

Re: [PATCH v4 18/19] tools/config: add XEN_RUN_STORED to config.h

2023-08-14 Thread Juergen Gross
On 14.08.23 12:34, Anthony PERARD wrote: On Mon, Aug 14, 2023 at 09:47:06AM +0200, Juergen Gross wrote: Instead of adding the definition of XEN_RUN_STORED to CFLAGS in multiple Makefiles, let configure add it to tools/config.h instead. Signed-off-by: Juergen Gross I think with this change

[PATCH v4 16/19] tools/xenstore: rework get_node()

2023-08-14 Thread Juergen Gross
get_node_chk_perm() - rename get_node_canonicalized() to get_node() Signed-off-by: Juergen Gross --- V3: - new patch V4: - change initial value of err in get_node_chk_perm() (Julien Grall) - rename err to success in get_node_chk_perm() (Julien Grall) --- tools/xenstore/xenstored_core.c | 57

[PATCH v4 11/19] tools/xenstore: use struct node_hdr in struct node

2023-08-14 Thread Juergen Gross
Replace some individual fields in struct node with struct node_hdr. This allows to add a helper for calculating the accounted memory size of a node. Signed-off-by: Juergen Gross --- V2: - new patch V4: - add const to parameter of calc_node_acc_size() - modify comment (Julien Grall) --- tools

[PATCH v4 14/19] tools/xenstore: merge get_spec_node() into get_node_canonicalized()

2023-08-14 Thread Juergen Gross
ther than the ones allowed for normal nodes - the length of the node name is restricted by the max path length quota For defined special node names this isn't any real restriction, though. Signed-off-by: Juergen Gross --- V3: - new patch V4: - expand commit message (Julien

[PATCH v4 17/19] tools/xenstore: introduce get_node_const()

2023-08-14 Thread Juergen Gross
e two variants. Signed-off-by: Juergen Gross --- V3: - new approach (Julien Grall) --- tools/xenstore/xenstored_core.c | 35 ++--- 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/tools/xenstore/xenstored_core.c b/tools/xenstore/xenstored_core.c index 9098b

[PATCH v4 13/19] tools/xenstore: introduce read_node_const()

2023-08-14 Thread Juergen Gross
Introduce a read_node() variant returning a pointer to const struct node, which doesn't do a copy of the node data after retrieval from the data base. Call this variant where appropriate. Signed-off-by: Juergen Gross --- V3: - new approach (Julien Grall) V4: - fix patch subject (Julien

[PATCH v4 18/19] tools/config: add XEN_RUN_STORED to config.h

2023-08-14 Thread Juergen Gross
Instead of adding the definition of XEN_RUN_STORED to CFLAGS in multiple Makefiles, let configure add it to tools/config.h instead. Signed-off-by: Juergen Gross --- V4: - new patch --- configure | 5 + m4/paths.m4| 1 + tools/config.h.in

[PATCH v4 10/19] tools/xenstore: don't use struct node_perms in struct node

2023-08-14 Thread Juergen Gross
as parameter and rename it to node_perms_to_strings(). Signed-off-by: Juergen Gross --- V2: - new patch V4: - add perm_for_conn_from_node() helper (Julien Grall) - let perms_to_strings() take the node as parameter (Julien Grall) - rename perms_to_strings() --- tools/xenstore/xenstored_core.c

[PATCH v4 19/19] tools/xenstore: move xenstored sources into dedicated directory

2023-08-14 Thread Juergen Gross
make it clearer that xenstore clients and xenstored are independent from each other. Signed-off-by: Juergen Gross --- After the large overhaul of xenstored I think such a reorg would make sense to go into the same Xen version. Delaying it until the next version would make potential backports for 4.

[PATCH v4 12/19] tools/xenstore: alloc new memory in domain_adjust_node_perms()

2023-08-14 Thread Juergen Gross
already. Signed-off-by: Juergen Gross --- V3: - new patch V4: - add comments (Julien Grall) --- tools/xenstore/xenstored_core.c | 10 +- tools/xenstore/xenstored_domain.c | 24 tools/xenstore/xenstored_domain.h | 8 +++- 3 files changed, 32 insertions(+), 10

[PATCH v4 15/19] tools/xenstore: merge is_valid_nodename() into canonicalize()

2023-08-14 Thread Juergen Gross
valid_chars() into it, too. Signed-off-by: Juergen Gross --- V3: - new patch V4: - make name const in canonicalize() - don't merge valid_chars() (Julien Grall) - free full path string in case of error (Julien Grall) --- tools/xenstore/xenstored_core.c | 85 +---

[PATCH v4 09/19] tools/xenstore: rework struct xs_tdb_record_hdr

2023-08-14 Thread Juergen Gross
ned-off-by: Juergen Gross --- V2: - new patch V4: - add BUILD_BUG_ON() for verifying datalen can hold large enough value for XENSTORE_PAYLOAD_MAX (Julien Grall) - let perms_from_node_hdr() return const (Julien Grall) - open code perms_from_node_hdr() for the non-const case (Julien Grall) --- tool

[PATCH v4 08/19] tools/xenstore: move copying of node data out of db_fetch()

2023-08-14 Thread Juergen Gross
() can't return any error other than ENOENT now, error handling for the callers can be simplified. Signed-off-by: Juergen Gross --- V2: - new patch V3: - modify return type of db_fetch() to return a pointer to const (Julien Grall) - drop stale comment (Julien Grall) - fix transaction handl

[PATCH v4 07/19] tools/xenstore: change talloc_free() to take a const pointer

2023-08-14 Thread Juergen Gross
With talloc_free() and related functions not taking a pointer to const it is tedious to use the const attribute for talloc()-ed memory in many cases. Change the related prototypes to use "const void *" instead of "void *". Signed-off-by: Juergen Gross --- V3: - new pat

[PATCH v4 06/19] tools/xenstore: let db_delete() return void

2023-08-14 Thread Juergen Gross
db_delete() only ever is returning 0. Switch it to return void and remove all the error handling dealing wit a non-zero return value. Suggested-by: Julien Grall Signed-off-by: Juergen Gross Reviewed-by: Julien Grall --- V2: - new patch --- tools/xenstore/xenstored_core.c| 11

[PATCH v4 05/19] tools/xenstore: remove tdb code

2023-08-14 Thread Juergen Gross
Now that TDB isn't used anymore, remove it. Signed-off-by: Juergen Gross Reviewed-by: Julien Grall --- tools/xenstore/Makefile.common |2 +- tools/xenstore/tdb.c | 1748 tools/xenstore/tdb.h | 132 --- 3 files changed, 1 inse

[PATCH v4 04/19] tools/xenstore: drop use of tdb

2023-08-14 Thread Juergen Gross
. Signed-off-by: Juergen Gross Reviewed-by: Julien Grall --- V2: - add const (Julien Grall) - use specific pointer type instead of void * (Julien Grall) - add comment to db_fetch() (Julien Grall) V3: - use talloc_memdup() (Julien Grall) --- tools/xenstore/xenstored_core.c| 156

[PATCH v4 03/19] tools/xenstore: add hashtable_replace() function

2023-08-14 Thread Juergen Gross
For an effective way to replace a hashtable entry add a new function hashtable_replace(). This is in preparation to replace TDB with a more simple data storage. Signed-off-by: Juergen Gross Acked-by: Julien Grall --- V3: - fix commit message (Julien Grall) - move unrelated change to previous

[PATCH v4 02/19] tools/xenstore: let hashtable_add() fail in case of existing entry

2023-08-14 Thread Juergen Gross
Silently adding another entry with the same key to a hashtable is a perfect receipt for later failure with hard to diagnose symptoms. Let hashtable_add() fail in case another entry with the same key is already existing. Signed-off-by: Juergen Gross Reviewed-by: Julien Grall --- V2: - split off

[PATCH v4 01/19] tools/xenstore: make hashtable key parameter const

2023-08-14 Thread Juergen Gross
The key is never modified by hashtable code, so it should be marked as const. Signed-off-by: Juergen Gross --- V3: - make value const, too. V4: - undo V3 change again (Julien Grall) --- tools/xenstore/hashtable.c | 5 +++-- tools/xenstore/hashtable.h | 4 ++-- 2 files changed, 5 insertions

[PATCH v4 00/19] tools/xenstore: drop TDB

2023-08-14 Thread Juergen Gross
: - addressed comments - patches 1-7 already applied - dropped patch 15 of v3 - add patches 18+19 Changes in V3: - addressed comments - add patches 14+15 - replace patch 18 of v2 with patches 20-25 Changes in V2: - addressed comments - split former patch 9 into 2 patches - added patches 13-18 Juergen Gross

Re: [PATCH RESEND] libxl: Make domain build xc_domain_setmaxmem() call use max_memkb

2023-08-13 Thread Juergen Gross
On 12.08.23 04:32, Kevin Alarcon Negy wrote: Apologies if I misused the "RESEND" subject line. The xen patch guide [1] seemed to suggest using it as a way to ping. Thanks for the feedback. I realize now that my misunderstanding in how the original code should work is because of my confusion betw

Re: [PATCH v3 25/25] tools/xenstore: introduce get_node_const()

2023-08-13 Thread Juergen Gross
On 12.08.23 14:05, Julien Grall wrote: Hi, On 24/07/2023 12:02, Juergen Gross wrote: Add a variant of get_node() returning a const struct node pointer. Note that all callers of this new variant don't supply a pointer where to store the canonical node name, while all callers needing

Re: [PATCH v3 24/25] tools/xenstore: rework get_node()

2023-08-13 Thread Juergen Gross
On 12.08.23 14:03, Julien Grall wrote: Hi Juergen, One more remark. On 24/07/2023 12:02, Juergen Gross wrote: Today get_node_canonicalized() is the only caller of get_node(). In order to prepare introducing a get_node() variant returning a pointer to const struct node, do the following

Re: [PATCH v3 24/25] tools/xenstore: rework get_node()

2023-08-13 Thread Juergen Gross
On 12.08.23 13:56, Julien Grall wrote: Hi Juergen, On 24/07/2023 12:02, Juergen Gross wrote: Today get_node_canonicalized() is the only caller of get_node(). In order to prepare introducing a get_node() variant returning a pointer to const struct node, do the following restructuring: - move

Re: [PATCH -next] xen-pciback: Remove unused function declarations

2023-08-11 Thread Juergen Gross
On 08.08.23 17:09, Yue Haibing wrote: Commit a92336a1176b ("xen/pciback: Drop two backends, squash and cleanup some code.") declared but never implemented these functions. Signed-off-by: Yue Haibing Reviewed-by: Juergen Gross Juergen OpenPGP_0xB0DE9DD628BF132F.asc Descriptio

Re: [PATCH] x86/xen: Make virt_to_pfn() a static inline

2023-08-11 Thread Juergen Gross
: Linus Walleij Acked-by: Juergen Gross Juergen OpenPGP_0xB0DE9DD628BF132F.asc Description: OpenPGP public key OpenPGP_signature.asc Description: OpenPGP digital signature

Re: [PATCH] x86: adjust comparison for earlier signedness change

2023-08-10 Thread Juergen Gross
by: Jan Beulich Reviewed-by: Juergen Gross Juergen OpenPGP_0xB0DE9DD628BF132F.asc Description: OpenPGP public key OpenPGP_signature.asc Description: OpenPGP digital signature

Re: [PATCH] xen/public: fix flexible array definitions

2023-08-09 Thread Juergen Gross
On 26.07.23 07:52, Jan Beulich wrote: On 25.07.2023 18:59, Andrew Cooper wrote: On 25/07/2023 5:16 pm, Jan Beulich wrote: On 25.07.2023 15:55, Juergen Gross wrote: Flexible arrays in public headers can be problematic with some compilers. Replace them with arr[XEN_FLEX_ARRAY_DIM] in order to

Re: [PATCH v2 3/3] tools/xl: reject bootloader=pygrub in case pygrub is disabled

2023-08-08 Thread Juergen Gross
On 08.08.23 15:32, Jan Beulich wrote: On 08.08.2023 15:22, Juergen Gross wrote: --- a/tools/xl/xl_parse.c +++ b/tools/xl/xl_parse.c @@ -1692,6 +1692,15 @@ void parse_config_data(const char *config_source, xlu_cfg_get_defbool(config, "acpi", &b

[PATCH v2 2/3] tools: add configure option for libfsimage

2023-08-08 Thread Juergen Gross
ld of libfsimage can be enabled via --enable-libfsimage. Signed-off-by: Juergen Gross --- V2: - add check for pygrub enabled and libfsimage disabled (Andrew Cooper) --- config/Tools.mk.in | 1 + tools/Makefile | 2 +- tools/configure| 40

[PATCH v2 3/3] tools/xl: reject bootloader=pygrub in case pygrub is disabled

2023-08-08 Thread Juergen Gross
In case Xen has been configured with "--disable-pygrub", don't accept the domain config option "bootloader=pygrub". Suggested-by: Andrew Cooper Signed-off-by: Juergen Gross --- V2: - new patch --- tools/xl/xl_parse.c | 9 + 1 file changed, 9 insertions(

[PATCH v2 0/3] tools: add some more configure options

2023-08-08 Thread Juergen Gross
Add two additional configure options for controlling the build of pygrub and libfsimage. Changes in V2: - add check for --enable-pygrub --disable-libfsimage - new patch 3 Juergen Gross (3): tools: add configure option for disabling pygrub tools: add configure option for libfsimage tools/xl

[PATCH v2 1/3] tools: add configure option for disabling pygrub

2023-08-08 Thread Juergen Gross
. As it is operating on guest controlled data (the boot image) and taking decisions based on this data, there is a higher security risk. Not being possible to use pygrub is thus a step towards a reduction of attack surface. Default is still to build and install pygrub. Signed-off-by: Juergen Gro

Re: [PATCH 1/2] tools: add configure option for disabling pygrub

2023-08-08 Thread Juergen Gross
On 08.08.23 12:56, Andrew Cooper wrote: On 04/08/2023 6:59 am, Juergen Gross wrote: Add a "--disable-pygrub" option for being able to disable the build and installation of pygrub. There are two main reasons to do so: - A main reason to use pygrub is to allow a PV guest to

Re: [PATCH 2/2] tools: add configure option for libfsimage

2023-08-08 Thread Juergen Gross
On 08.08.23 12:40, Andrew Cooper wrote: On 08/08/2023 11:35 am, Anthony PERARD wrote: On Fri, Aug 04, 2023 at 08:00:00AM +0200, Juergen Gross wrote: The only in-tree user of libfsimage is pygrub. Now that it is possible to disable the build of pygrub, the same should be possible for libfsimage

Re: [PATCH RESEND] libxl: Make domain build xc_domain_setmaxmem() call use max_memkb

2023-08-08 Thread Juergen Gross
On 08.08.23 00:16, Kevin Alarcon Negy wrote: When building a domain, xc_domain_setmaxmem() is called with target_memkb (memory in domain config file). If a config specifies maxmem > memory, any attempts to increase the domain memory size to its max, outside of xl mem-set or xl mem-max, which al

Re: [PATCH v3 23/25] tools/xenstore: merge is_valid_nodename() into canonicalize()

2023-08-04 Thread Juergen Gross
On 04.08.23 14:27, Julien Grall wrote: Hi Juergen, On 04/08/2023 13:05, Juergen Gross wrote: On 04.08.23 12:33, Julien Grall wrote: const char *canonicalize(struct connection *conn, const void *ctx,   const char *node, bool allow_special) { const char *name

Re: [PATCH v3 23/25] tools/xenstore: merge is_valid_nodename() into canonicalize()

2023-08-04 Thread Juergen Gross
On 04.08.23 12:33, Julien Grall wrote: Hi Juergen, On 04/08/2023 11:17, Juergen Gross wrote: On 04.08.23 12:00, Julien Grall wrote: Hi, On 04/08/2023 10:35, Juergen Gross wrote: On 03.08.23 23:46, Julien Grall wrote: Hi, On 24/07/2023 12:02, Juergen Gross wrote: Today is_valid_nodename

Re: [RFC PATCH 1/1] x86/traps: Get rid of exception handlers' second argument error code

2023-08-04 Thread Juergen Gross
On 04.08.23 12:25, Andrew Cooper wrote: On 04/08/2023 8:57 am, Xin Li wrote: I haven't checked Xen implications with this change, i.e., does Xen hypervisor need to adjust how it passes arguments to PV guests? This is an internal detail of how Linux handles data on it's stacks, isn't it? The X

Re: [PATCH v3 23/25] tools/xenstore: merge is_valid_nodename() into canonicalize()

2023-08-04 Thread Juergen Gross
On 04.08.23 12:00, Julien Grall wrote: Hi, On 04/08/2023 10:35, Juergen Gross wrote: On 03.08.23 23:46, Julien Grall wrote: Hi, On 24/07/2023 12:02, Juergen Gross wrote: Today is_valid_nodename() is always called directly after calling canonicalize(), with the exception of do_unwatch

Re: [PATCH v3 22/25] tools/xenstore: merge get_spec_node() into get_node_canonicalized()

2023-08-04 Thread Juergen Gross
On 04.08.23 11:44, Julien Grall wrote: On 04/08/2023 10:34, Juergen Gross wrote: On 04.08.23 11:21, Julien Grall wrote: Hi, On 04/08/2023 10:17, Juergen Gross wrote: On 03.08.23 23:36, Julien Grall wrote: Hi, On 24/07/2023 12:02, Juergen Gross wrote: diff --git a/tools/xenstore

Re: [PATCH v3 23/25] tools/xenstore: merge is_valid_nodename() into canonicalize()

2023-08-04 Thread Juergen Gross
On 03.08.23 23:46, Julien Grall wrote: Hi, On 24/07/2023 12:02, Juergen Gross wrote: Today is_valid_nodename() is always called directly after calling canonicalize(), with the exception of do_unwatch(), where the call is missing (which is not correct, but results just in a wrong error reason

Re: [PATCH v3 22/25] tools/xenstore: merge get_spec_node() into get_node_canonicalized()

2023-08-04 Thread Juergen Gross
On 04.08.23 11:21, Julien Grall wrote: Hi, On 04/08/2023 10:17, Juergen Gross wrote: On 03.08.23 23:36, Julien Grall wrote: Hi, On 24/07/2023 12:02, Juergen Gross wrote: diff --git a/tools/xenstore/xenstored_watch.c b/tools/xenstore/xenstored_watch.c index 86cf8322b4..2662a3fa49 100644

Re: [PATCH v3 22/25] tools/xenstore: merge get_spec_node() into get_node_canonicalized()

2023-08-04 Thread Juergen Gross
On 03.08.23 23:36, Julien Grall wrote: Hi, On 24/07/2023 12:02, Juergen Gross wrote: diff --git a/tools/xenstore/xenstored_watch.c b/tools/xenstore/xenstored_watch.c index 86cf8322b4..2662a3fa49 100644 --- a/tools/xenstore/xenstored_watch.c +++ b/tools/xenstore/xenstored_watch.c @@ -166,19

[PATCH 2/2] tools: add configure option for libfsimage

2023-08-03 Thread Juergen Gross
ld of libfsimage can be enabled via --enable-libfsimage. Signed-off-by: Juergen Gross --- config/Tools.mk.in | 1 + tools/Makefile | 2 +- tools/configure| 28 tools/configure.ac | 13 + 4 files changed, 43 insertions(+), 1 deletion(-) diff --

[PATCH 1/2] tools: add configure option for disabling pygrub

2023-08-03 Thread Juergen Gross
. As it is operating on guest controlled data (the boot image) and taking decisions based on this data, there is a possible security issue. Not being possible to use pygrub is thus a step towards more security. Default is still to build and install pygrub. Signed-off-by: Juergen Gross -

[PATCH 0/2] tools: add some more configure options

2023-08-03 Thread Juergen Gross
Add two additional configure options for controlling the build of pygrub and libfsimage. Juergen Gross (2): tools: add configure option for disabling pygrub tools: add configure option for libfsimage config/Tools.mk.in | 2 ++ tools/Makefile | 4 ++-- tools/configure| 54

Re: [PATCH 0/2] libxl: build fixes for recent CPUID work

2023-08-03 Thread Juergen Gross
On 03.08.23 16:13, Jan Beulich wrote: 1: avoid shadowing of index() 2: allow building with old gcc again Jan For the series: Reviewed-by: Juergen Gross Juergen OpenPGP_0xB0DE9DD628BF132F.asc Description: OpenPGP public key OpenPGP_signature Description: OpenPGP digital signature

Re: [PATCH] libxenstat/Linux: pass nul-terminated string to strpbrk()

2023-08-03 Thread Juergen Gross
string at population time instead, removing the late clearing. While there also eliminate a confusing (because of being wrong) comment: A regex parsing error would be handled one further scope outwards. Here we're dealing with field 1 vs any of the later fields. Signed-off-by: Jan Beulich R

Re: [PATCH v3 2/2] tools/xenstore: fix get_spec_node()

2023-08-03 Thread Juergen Gross
On 03.08.23 11:53, Jan Beulich wrote: On 27.07.2023 09:55, Juergen Gross wrote: On 27.07.23 09:53, Jan Beulich wrote: On 24.07.2023 12:33, Juergen Gross wrote: In case get_spec_node() is being called for a special node starting with '@' it won't set *canonical_name. This can re

Re: [PATCH -next] xen/evtchn: Remove unused function declaration xen_set_affinity_evtchn()

2023-08-02 Thread Juergen Gross
On 01.08.23 16:54, Yue Haibing wrote: Commit 67473b8194bc ("xen/events: Remove disfunct affinity spreading") leave this unused declaration. Signed-off-by: Yue Haibing Reviewed-by: Juergen Gross Juergen OpenPGP_0xB0DE9DD628BF132F.asc Description: OpenPGP public key OpenPGP

Re: [PATCH v3 21/25] tools/xenstore: introduce read_node_nocopy()

2023-08-01 Thread Juergen Gross
On 02.08.23 00:00, Julien Grall wrote: Hi Juergen, Title: I can't find read_node_nocopy(). I found a read_node_const(). Which name did you intend to use? Oh, sorry for that. I think read_node_const() is the better choice. On 24/07/2023 12:02, Juergen Gross wrote: +stati

Re: [PATCH v3 20/25] tools/xenstore: alloc new memory in domain_adjust_node_perms()

2023-08-01 Thread Juergen Gross
On 01.08.23 23:46, Julien Grall wrote: Hi Juergen, On 24/07/2023 12:02, Juergen Gross wrote: In order to avoid modifying the node data in the data base in case a domain is gone, let domain_adjust_node_perms() allocate new memory for the permissions in case they need to be modified. As this

Re: [PATCH v3 19/25] tools/xenstore: use struct node_hdr in struct node

2023-08-01 Thread Juergen Gross
On 01.08.23 23:34, Julien Grall wrote: Hi Juergen, On 24/07/2023 12:02, Juergen Gross wrote: diff --git a/tools/xenstore/xenstored_core.c b/tools/xenstore/xenstored_core.c index c72fc0c725..404ecd0c62 100644 --- a/tools/xenstore/xenstored_core.c +++ b/tools/xenstore/xenstored_core.c @@ -555,6

Re: [PATCH v3 18/25] tools/xenstore: don't use struct node_perms in struct node

2023-08-01 Thread Juergen Gross
On 01.08.23 23:29, Julien Grall wrote: Hi Juergen, On 24/07/2023 12:02, Juergen Gross wrote: Open code struct node_perms in struct node in order to prepare using struct node_hdr in struct node. Add two helpers to transfer permissions between struct node and struct node_perms. Signed-off-by

Re: [PATCH] xen/events: Add wakeup support to xen-pirq

2023-07-31 Thread Juergen Gross
On 24.07.23 12:29, Simon Gaiser wrote: Simon Gaiser: This allows entering and exiting s2idle. Actual S0ix residency is another topic [1]. Without this the ACPI code currently ignores the error enable_irq_wake() returns when being used on a xen-pirq and the system goes to idle for ever since the

Re: [PATCH v3 17/25] tools/xenstore: rework struct xs_tdb_record_hdr

2023-07-28 Thread Juergen Gross
On 28.07.23 16:59, Julien Grall wrote: Hi Juergen, On 28/07/2023 15:32, Juergen Gross wrote: On 28.07.23 16:08, Julien Grall wrote: >>>> Using multiple commands has also its downside. The first that comes to my mind if that you need to keep around the data. But, with your prop

Re: [PATCH v3 17/25] tools/xenstore: rework struct xs_tdb_record_hdr

2023-07-28 Thread Juergen Gross
On 28.07.23 16:08, Julien Grall wrote: Hi Juergen, On 28/07/2023 14:24, Juergen Gross wrote: On 28.07.23 14:48, Julien Grall wrote: Hi, On 28/07/2023 13:06, Juergen Gross wrote: On 28.07.23 13:19, Julien Grall wrote: In case of a runtime check I agree that a more central place would be

Re: [PATCH v3 17/25] tools/xenstore: rework struct xs_tdb_record_hdr

2023-07-28 Thread Juergen Gross
On 28.07.23 14:48, Julien Grall wrote: Hi, On 28/07/2023 13:06, Juergen Gross wrote: On 28.07.23 13:19, Julien Grall wrote: In case of a runtime check I agree that a more central place would be preferred. In the end I don't mind that much, but  BUILD_BUG_ON(XENSTORE_PAYLOA

[GIT PULL] xen: branch for v6.5-rc4

2023-07-28 Thread Juergen Gross
Linus, Please git pull the following tag: git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip.git for-linus-6.5a-rc4-tag xen: branch for v6.5-rc4 It contains the following patches: - A fix for a performance problem in QubesOS, adding a way to drain the queue of grants experiencing delaye

Re: [PATCH v3 17/25] tools/xenstore: rework struct xs_tdb_record_hdr

2023-07-28 Thread Juergen Gross
On 28.07.23 13:19, Julien Grall wrote: On 28/07/2023 11:47, Juergen Gross wrote: On 28.07.23 12:34, Julien Grall wrote: Because one may want dom0 to send payload bigger than XENSTORE_PAYLOAD_MAX. Something like: if ( conn->id != 0 && len < XENSTORE_PAYLOAD_MAX ) Such chang

Re: [PATCH v3 17/25] tools/xenstore: rework struct xs_tdb_record_hdr

2023-07-28 Thread Juergen Gross
On 28.07.23 12:34, Julien Grall wrote: Hi, On 28/07/2023 10:45, Juergen Gross wrote: On 28.07.23 11:38, Julien Grall wrote: Hi Juergen, On 28/07/2023 10:14, Juergen Gross wrote: On 28.07.23 10:59, Julien Grall wrote: Hi Juergen, On 28/07/2023 07:23, Juergen Gross wrote: On 27.07.23 23:53

Re: [PATCH v3 17/25] tools/xenstore: rework struct xs_tdb_record_hdr

2023-07-28 Thread Juergen Gross
On 28.07.23 11:38, Julien Grall wrote: Hi Juergen, On 28/07/2023 10:14, Juergen Gross wrote: On 28.07.23 10:59, Julien Grall wrote: Hi Juergen, On 28/07/2023 07:23, Juergen Gross wrote: On 27.07.23 23:53, Julien Grall wrote: Hi Juergen, On 24/07/2023 12:02, Juergen Gross wrote: Struct

Re: [PATCH v3 17/25] tools/xenstore: rework struct xs_tdb_record_hdr

2023-07-28 Thread Juergen Gross
On 28.07.23 10:59, Julien Grall wrote: Hi Juergen, On 28/07/2023 07:23, Juergen Gross wrote: On 27.07.23 23:53, Julien Grall wrote: Hi Juergen, On 24/07/2023 12:02, Juergen Gross wrote: Struct xs_tdb_record_hdr is used for nodes stored in the data base. When working on a node, struct node

Re: [PATCH v3 17/25] tools/xenstore: rework struct xs_tdb_record_hdr

2023-07-27 Thread Juergen Gross
On 27.07.23 23:53, Julien Grall wrote: Hi Juergen, On 24/07/2023 12:02, Juergen Gross wrote: Struct xs_tdb_record_hdr is used for nodes stored in the data base. When working on a node, struct node is being used, which is including the same information as struct xs_tdb_record_hdr, but in a

Re: [PATCH v3 16/25] tools/xenstore: move copying of node data out of db_fetch()

2023-07-27 Thread Juergen Gross
On 27.07.23 23:33, Julien Grall wrote: Hi Juergen, On 24/07/2023 12:02, Juergen Gross wrote: Today the node data is copied in db_fetch() on each data base read in order to avoid accidental data base modifications when working on a node. read_node() is the only caller of db_fetch() which isn&#

Re: [PATCH v3 14/25] tools/xenstore: change talloc_free() to take a const pointer

2023-07-27 Thread Juergen Gross
On 27.07.23 23:21, Julien Grall wrote: Hi Juergen, On 24/07/2023 12:02, Juergen Gross wrote: With talloc_free() and related functions not taking a ponter to const typo: s/ponter/pointer/ it is tedious to use the const attribute for talloc()-ed memory in many cases. Change the related

Re: [PATCH v3 2/2] tools/xenstore: fix get_spec_node()

2023-07-27 Thread Juergen Gross
On 27.07.23 09:53, Jan Beulich wrote: On 24.07.2023 12:33, Juergen Gross wrote: In case get_spec_node() is being called for a special node starting with '@' it won't set *canonical_name. This can result in a crash of xenstored due to dereferencing the uninitialized name in fire_w

Re: [PATCH v3] xen/evtchn: Introduce new IOCTL to bind static evtchn

2023-07-26 Thread Juergen Gross
On 18.07.23 13:31, Rahul Singh wrote: Xen 4.17 supports the creation of static evtchns. To allow user space application to bind static evtchns introduce new ioctl "IOCTL_EVTCHN_BIND_STATIC". Existing IOCTL doing more than binding that’s why we need to introduce the new IOCTL to only bind the stat

Re: [PATCH] xenbus: check xen_domain in xenbus_probe_initcall

2023-07-26 Thread Juergen Gross
On 22.07.23 01:13, Stefano Stabellini wrote: The same way we already do in xenbus_init. Fixes the following warning: [ 352.175563] Trying to free already-free IRQ 0 [ 352.177355] WARNING: CPU: 1 PID: 88 at kernel/irq/manage.c:1893 free_irq+0xbf/0x350 [...] [ 352.213951] Call Trace: [ 352.21

Re: [PATCH v4] xen: speed up grant-table reclaim

2023-07-26 Thread Juergen Gross
l.org Signed-off-by: Demi Marie Obenour Reviewed-by: Juergen Gross Juergen OpenPGP_0xB0DE9DD628BF132F.asc Description: OpenPGP public key OpenPGP_signature Description: OpenPGP digital signature

Re: [PATCH v3 08/25] tools/xenstore: make hashtable key and value parameters const

2023-07-26 Thread Juergen Gross
On 26.07.23 11:29, Julien Grall wrote: Hi, On 26/07/2023 09:44, Juergen Gross wrote: On 26.07.23 10:20, Julien Grall wrote: To give a concrete example, with the current interface we are telling the user that what they store in the hashtable can be modified at some point. By adding '

Re: [PATCH v3 08/25] tools/xenstore: make hashtable key and value parameters const

2023-07-26 Thread Juergen Gross
On 26.07.23 10:20, Julien Grall wrote: Hi Juergen, On 26/07/2023 07:19, Juergen Gross wrote: On 25.07.23 18:08, Julien Grall wrote: Hi, On 24/07/2023 12:02, Juergen Gross wrote: The key and value are never modified by hashtable code, so they should be marked as const. You wrote this but

Re: [PATCH v3 08/25] tools/xenstore: make hashtable key and value parameters const

2023-07-25 Thread Juergen Gross
On 25.07.23 18:08, Julien Grall wrote: Hi, On 24/07/2023 12:02, Juergen Gross wrote: The key and value are never modified by hashtable code, so they should be marked as const. You wrote this but... Signed-off-by: Juergen Gross --- V3: - make value const, too. ---   tools/xenstore

[PATCH] xen/public: fix flexible array definitions

2023-07-25 Thread Juergen Gross
?id=217693 Signed-off-by: Juergen Gross --- xen/include/public/io/cameraif.h | 2 +- xen/include/public/io/displif.h | 2 +- xen/include/public/io/fsif.h | 4 ++-- xen/include/public/io/pvcalls.h | 2 +- xen/include/public/io/ring.h | 4 ++-- xen/include/public/io/sndif.h| 2 +- 6 fil

Re: Fwd: UBSAN: index 1 is out of range for type 'xen_netif_rx_sring_entry [1]'

2023-07-25 Thread Juergen Gross
On 25.07.23 15:24, Juergen Gross wrote: On 23.07.23 02:06, Nathan Chancellor wrote: On Sat, Jul 22, 2023 at 07:21:05AM +0700, Bagas Sanjaya wrote: Hi, I notice a regression report on Bugzilla [1]. Quoting from it: Hi Kernel Team, I rebuild today latest version from mainline repo. And i

Re: Fwd: UBSAN: index 1 is out of range for type 'xen_netif_rx_sring_entry [1]'

2023-07-25 Thread Juergen Gross
On 23.07.23 02:06, Nathan Chancellor wrote: On Sat, Jul 22, 2023 at 07:21:05AM +0700, Bagas Sanjaya wrote: Hi, I notice a regression report on Bugzilla [1]. Quoting from it: Hi Kernel Team, I rebuild today latest version from mainline repo. And i notice issue regarding xen-netfront.c. Error

Re: [PATCH V3 2/2] xen: privcmd: Add support for irqfd

2023-07-25 Thread Juergen Gross
On 25.07.23 08:47, Viresh Kumar wrote: Xen provides support for injecting interrupts to the guests via the HYPERVISOR_dm_op() hypercall. The same is used by the Virtio based device backend implementations, in an inefficient manner currently. Generally, the Virtio backends are implemented to work

Re: [PATCH V3 1/2] xen: Update dm_op.h from Xen public header

2023-07-25 Thread Juergen Gross
On 25.07.23 09:49, Jan Beulich wrote: On 25.07.2023 09:42, Viresh Kumar wrote: On 25-07-23, 09:18, Jan Beulich wrote: I question that use, btw, but it is not up to me to decide whether to accept such a layering violation in Linux. dm-op is, as its name says, for device models to use. Your inten

[PATCH v3 19/25] tools/xenstore: use struct node_hdr in struct node

2023-07-24 Thread Juergen Gross
Replace some individual fields in struct node with struct node_hdr. This allows to add a helper for calculating the accounted memory size of a node. Signed-off-by: Juergen Gross --- V2: - new patch --- tools/xenstore/xenstored_core.c| 108 - tools/xenstore

[PATCH v3 22/25] tools/xenstore: merge get_spec_node() into get_node_canonicalized()

2023-07-24 Thread Juergen Gross
eturning a pointer to const struct node. Signed-off-by: Juergen Gross --- V3: - new patch --- tools/xenstore/xenstored_core.c | 45 +--- tools/xenstore/xenstored_core.h | 3 ++- tools/xenstore/xenstored_watch.c | 19 +- 3 files changed, 26 insertions(+), 41

[PATCH v3 12/25] tools/xenstore: remove tdb code

2023-07-24 Thread Juergen Gross
Now that TDB isn't used anymore, remove it. Signed-off-by: Juergen Gross Reviewed-by: Julien Grall --- tools/xenstore/Makefile.common |2 +- tools/xenstore/tdb.c | 1748 tools/xenstore/tdb.h | 132 --- 3 files changed, 1 inse

[PATCH v3 24/25] tools/xenstore: rework get_node()

2023-07-24 Thread Juergen Gross
get_node_chk_perm() - rename get_node_canonicalized() to get_node() Signed-off-by: Juergen Gross --- V3: - new patch --- tools/xenstore/xenstored_core.c | 57 +++-- 1 file changed, 25 insertions(+), 32 deletions(-) diff --git a/tools/xenstore/xenstored_core.c b/tools

[PATCH v3 16/25] tools/xenstore: move copying of node data out of db_fetch()

2023-07-24 Thread Juergen Gross
() can't return any error other than ENOENT now, error handling for the callers can be simplified. Signed-off-by: Juergen Gross --- V2: - new patch V3: - modify return type of db_fetch() to return a pointer to const (Julien Grall) - drop stale comment (Julien Grall) - fix transaction handling

[PATCH v3 25/25] tools/xenstore: introduce get_node_const()

2023-07-24 Thread Juergen Gross
e two variants. Signed-off-by: Juergen Gross --- V3: - new approach (Julien Grall) --- tools/xenstore/xenstored_core.c | 35 ++--- 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/tools/xenstore/xenstored_core.c b/tools/xenstore/xenstored_core.c index fa07b

[PATCH v3 13/25] tools/xenstore: let db_delete() return void

2023-07-24 Thread Juergen Gross
db_delete() only ever is returning 0. Switch it to return void and remove all the error handling dealing wit a non-zero return value. Suggested-by: Julien Grall Signed-off-by: Juergen Gross Reviewed-by: Julien Grall --- V2: - new patch --- tools/xenstore/xenstored_core.c| 11

[PATCH v3 21/25] tools/xenstore: introduce read_node_nocopy()

2023-07-24 Thread Juergen Gross
Introduce a read_node() variant returning a pointer to const struct node, which doesn't do a copy of the node data after retrieval from the data base. Call this variant where appropriate. Signed-off-by: Juergen Gross --- V3: - new approach (Julien Grall) --- tools/xenstore/xenstored_c

[PATCH v3 20/25] tools/xenstore: alloc new memory in domain_adjust_node_perms()

2023-07-24 Thread Juergen Gross
already. Signed-off-by: Juergen Gross --- V3: - new patch --- tools/xenstore/xenstored_core.c | 10 +- tools/xenstore/xenstored_domain.c | 19 +++ 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/tools/xenstore/xenstored_core.c b/tools/xenstore

<    4   5   6   7   8   9   10   11   12   13   >