Re: [PATCH] tools/xl: don't crash on NULL command line

2025-07-28 Thread Jason Andryuk
On 2025-07-28 06:45, Andrew Cooper wrote: On 28/07/2025 11:24 am, Marek Marczykowski-Górecki wrote: When running xl in a domU, it doesn't have access to the Xen command line. Before the non-truncating xc_xenver_cmdline(), it was always set with strdup, possibly of an empty string. Now it's NULL.

[PATCH v5 11/11] tools/xenstored: Remove hardcoded implicit path

2025-07-25 Thread Jason Andryuk
Update get_implicit_path to return the correct value for a non-dom0 xenstored domain. Signed-off-by: Jason Andryuk Reviewed-by: Juergen Gross --- v5: R-b: Juergen --- tools/xenstored/domain.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/xenstored/domain.c b

[PATCH v5 09/11] tools/xenstored: Rename dom0_domid to store_domid

2025-07-25 Thread Jason Andryuk
ability to call XS_RESUME. xenbus_master_domid() is removed with store_domid being used instead. Add a description of the -m/--master-domid options while doing this. Signed-off-by: Jason Andryuk --- v5: Remove xenbus_master_domid() domain_is_unprivileged() drop dom0/store_domid. XS_RESUME

[PATCH v5 02/11] tools/manage: Expose domain capabilities

2025-07-25 Thread Jason Andryuk
Add an additional "caps" argument to the libxenmanage functions to obtain a domains capabilities - control, hardware, and xenstore. Update the xenstored callers at the same time. Signed-off-by: Jason Andryuk Reviewed-by: Juergen Gross --- v2: Add Juergen's R-b --- tools/incl

[PATCH v5 05/11] tools/xenstored: Read event channel from xenstored page

2025-07-25 Thread Jason Andryuk
Make introduce_domain() use an event channel from the the xenstore page. It is only used if non-zero. Otherwise the passed in event channel port is used. The is useful for a xenstored stubdom to configure domains autonomously. Signed-off-by: Jason Andryuk Reviewed-by: Juergen Gross --- v4: R

[PATCH v5 10/11] tools/xenstored: Remove stubdom special casing

2025-07-25 Thread Jason Andryuk
rface. The default grant table mapping is performed otherwise. Signed-off-by: Jason Andryuk --- v5: Re-order later --- tools/xenstored/domain.c | 5 - tools/xenstored/minios.c | 4 +--- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/tools/xenstored/domain.c b/tools/xenstored/dom

[PATCH v5 04/11] xen/dom0less: store xenstore event channel in page

2025-07-25 Thread Jason Andryuk
: Jason Andryuk --- This is ARM-only for the time being. A common function to write to guest physical address will be needed. --- xen/common/device-tree/dom0less-build.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/xen/common/device-tree/dom0less-build.c b/xen/common/device-tree

[PATCH v5 07/11] tools/xenstored: Auto-introduce domains

2025-07-25 Thread Jason Andryuk
sed to identify . priv_domid from the command line is used, or the first control domain is used. dom0_domid will set to the last xenstore found. This will handle dom0 or dom0less, where only 1 xenstore domain can exist, or stubdom, where dom0 and dom1 exist, and we want to take the stubdom. Signe

[PATCH v5 08/11] tools/xenstored: Use priv_domid for manual nodes and permission

2025-07-25 Thread Jason Andryuk
dom0_domid to have a functional xenstored. Signed-off-by: Jason Andryuk --- Held off R-b Juergen because of priv_domid setting v5: Add unset priv_domid setting Additional change for continue check inside the loop --- tools/xenstored/core.c | 4 ++-- tools/xenstored/domain.c | 16

[PATCH v5 00/11] xenstored patches from split hardware control

2025-07-25 Thread Jason Andryuk
s and permission" is an interesting result of looking to rename some internal variables to better align their purpose. Any review or guidance on the approach is appreciated. Jason Andryuk (11): xen: Add capabilities to get_domain_state tools/manage: Expose domain capabilities public/i

[PATCH v5 06/11] tools/xenstored: Add get_domain_evtchn() to find evtchn

2025-07-25 Thread Jason Andryuk
igned-off-by: Jason Andryuk --- v5: Split get_domain_evtchn() in minios.c and posix.c versions s/dom0/stubdom/ --- tools/xenstored/core.h | 2 +- tools/xenstored/domain.c | 9 +++-- tools/xenstored/minios.c | 17 +++-- tools/xenstored/posix.c | 16 +++- 4 files ch

[PATCH v5 03/11] public/io: xs_wire: Include event channel in interface page

2025-07-25 Thread Jason Andryuk
needed. Suggested-by: Juergen Gross Signed-off-by: Jason Andryuk Reviewed-by: Juergen Gross --- v2: s/domU/domain/ in comment Add Juergen's R-b --- xen/include/public/io/xs_wire.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/xen/include/public/io/xs_wire.h b/xen/include/publ

[PATCH v5 01/11] xen: Add capabilities to get_domain_state

2025-07-25 Thread Jason Andryuk
Expose a domain's capabilities - control, hardware or xenstore - through stable get domain state hypercall. The xenstore domain can use this information to assign appropriate permissions on connections. Repurpose the 16bit pad field for this purpose. Signed-off-by: Jason Andryuk Review

Re: [PATCH v4 09/12] tools/xenstored: Use priv_domid for manual nodes and permission

2025-07-25 Thread Jason Andryuk
On 2025-07-25 03:24, Jürgen Groß wrote: On 25.07.25 04:28, Jason Andryuk wrote: Usually, priv_domid == dom0_domid == 0, and that is what is expected. If we rename s/dom0_domid/store_domid/, it seems more likely we want to actually have the priv_domid as the owner. Yes, I agree. That leads

Re: [PATCH v4 07/12] tools/xenstored: Auto-introduce domains

2025-07-25 Thread Jason Andryuk
On 2025-07-25 03:04, Jürgen Groß wrote: On 25.07.25 04:28, Jason Andryuk wrote: Replace dom0_init() with init_domains() which uses libxenmanage to iterate through all existing domains, storing them in a list.  The xenstore domain is introduced first, and then all the other domains are

Re: [PATCH v4 06/12] tools/xenstored: Add get_domain_evtchn() to find evtchn

2025-07-25 Thread Jason Andryuk
On 2025-07-25 02:41, Jürgen Groß wrote: On 25.07.25 04:28, Jason Andryuk wrote: Add a helper to lookup the event channel for a domid.  This hides some of the differences between dom0 and stubdom xenstored. It highlights the different meanings between get_xenbus_evtchn() in a stubdom, where it

Re: [PATCH v2 4/7] tools/xenstored: add server feature support

2025-07-25 Thread Jason Andryuk
feature word. Advertise the Xenstore features to guests by setting the appropriate bits in the ring page. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk Thanks, Jason

Re: [PATCH 4/7] tools/xenstored: add server feature support

2025-07-25 Thread Jason Andryuk
On 2025-07-25 01:18, Jürgen Groß wrote: On 25.07.25 00:48, Jason Andryuk wrote: On 2025-07-22 10:06, Juergen Gross wrote: Add per domain server features, which are initialized by the supported features at domain introduction, or by live update from the migration stream. This requires to add

[PATCH v4 11/12] tools/xenstored: Rename xenbus_master_domid -> xenbus_store_domain

2025-07-24 Thread Jason Andryuk
Rename the helper that access store_domid accordingly. While doing this, rename the is_store_domain variable. No functional change. Signed-off-by: Jason Andryuk --- tools/xenstored/core.h | 2 +- tools/xenstored/domain.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git

[PATCH v4 07/12] tools/xenstored: Auto-introduce domains

2025-07-24 Thread Jason Andryuk
sed to identify . Signed-off-by: Jason Andryuk --- I noticed domain_conn_reset() isn't called for the stubdom, so I added the ifdef to special case it. I haven't tested with a stubdom yet, and I wanted to be conservative. Ideally it would be dropped - the issue would be if the stubd

[PATCH v4 08/12] tools/xenstored: Remove stubdom special casing

2025-07-24 Thread Jason Andryuk
rface. The default grant table mapping is performed otherwise. Signed-off-by: Jason Andryuk --- tools/xenstored/domain.c | 5 - tools/xenstored/minios.c | 4 +--- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/tools/xenstored/domain.c b/tools/xenstored/domain.c index e9e45

[PATCH v4 12/12] tools/xenstored: Remove hardcoded implicit path

2025-07-24 Thread Jason Andryuk
Update get_implicit_path to return the correct value for a non-dom0 xenstored domain. Signed-off-by: Jason Andryuk --- tools/xenstored/domain.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/xenstored/domain.c b/tools/xenstored/domain.c index f1527a6db7

[PATCH v4 10/12] tools/xenstored: Rename dom0_domid to store_domid

2025-07-24 Thread Jason Andryuk
considering store_domid as privileged. Rename to store_domid to better show its purpose. No functional change. Add a description of the -m/--master-domid options while doing this. Signed-off-by: Jason Andryuk --- tools/xenstored/core.c | 9 ++--- tools/xenstored/core.h | 6 +++--- tools

[PATCH v4 09/12] tools/xenstored: Use priv_domid for manual nodes and permission

2025-07-24 Thread Jason Andryuk
Usually, priv_domid == dom0_domid == 0, and that is what is expected. If we rename s/dom0_domid/store_domid/, it seems more likely we want to actually have the priv_domid as the owner. That leads to follow on changes to ensure that the priv_domid is created first. Signed-off-by: Jason Andryuk

[PATCH v4 05/12] tools/xenstored: Read event channel from xenstored page

2025-07-24 Thread Jason Andryuk
Make introduce_domain() use an event channel from the the xenstore page. It is only used if non-zero. Otherwise the passed in event channel port is used. The is useful for a xenstored stubdom to configure domains autonomously. Signed-off-by: Jason Andryuk --- v2: Remove iface_port variable

[PATCH v4 01/12] xen: Add capabilities to get_domain_state

2025-07-24 Thread Jason Andryuk
Expose a domain's capabilities - control, hardware or xenstore - through stable get domain state hypercall. The xenstore domain can use this information to assign appropriate permissions on connections. Repurpose the 16bit pad field for this purpose. Signed-off-by: Jason Andryuk Review

[PATCH v4 03/12] public/io: xs_wire: Include event channel in interface page

2025-07-24 Thread Jason Andryuk
needed. Suggested-by: Juergen Gross Signed-off-by: Jason Andryuk Reviewed-by: Juergen Gross --- v2: s/domU/domain/ in comment Add Juergen's R-b --- xen/include/public/io/xs_wire.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/xen/include/public/io/xs_wire.h b/xen/include/publ

[PATCH v4 06/12] tools/xenstored: Add get_domain_evtchn() to find evtchn

2025-07-24 Thread Jason Andryuk
annel. The default return 0 will be fine as any other auto-introduced domain will needs the event channel populated in the grant. Signed-off-by: Jason Andryuk --- tools/xenstored/domain.c | 38 -- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/

[PATCH v4 04/12] xen/dom0less: store xenstore event channel in page

2025-07-24 Thread Jason Andryuk
: Jason Andryuk --- This is ARM-only for the time being. A common function to write to guest physical address will be needed. --- xen/common/device-tree/dom0less-build.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/xen/common/device-tree/dom0less-build.c b/xen/common/device-tree

[PATCH v4 02/12] tools/manage: Expose domain capabilities

2025-07-24 Thread Jason Andryuk
Add an additional "caps" argument to the libxenmanage functions to obtain a domains capabilities - control, hardware, and xenstore. Update the xenstored callers at the same time. Signed-off-by: Jason Andryuk Reviewed-by: Juergen Gross --- v2: Add Juergen's R-b --- tools/incl

[PATCH v4 00/12] xenstored patches from split hardware control

2025-07-24 Thread Jason Andryuk
/xenstored: Use priv_domid for manual nodes and permission" is an interesting result of looking to rename some internal variables to better align their purpose. Any review or guidance on the approach is appreciated. Jason Andryuk (12): xen: Add capabilities to get_domain_state tools/m

Re: [PATCH 7/7] tools: allow to limit xenstore features via guest config

2025-07-24 Thread Jason Andryuk
ved "retrieved" With that: Reviewed-by: Jason Andryuk

Re: [PATCH 6/7] tools/xl: add available Xenstore features to xl info output

2025-07-24 Thread Jason Andryuk
On 2025-07-22 10:06, Juergen Gross wrote: Add the Xenstore feature value to the output of "xl info" in order to prepare for a future capability to limit Xenstore features visible by a guest. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk

Re: [PATCH 5/7] tools/xenstored: support SET/GET_FEATURE commands

2025-07-24 Thread Jason Andryuk
On 2025-07-22 10:06, Juergen Gross wrote: Add support for XS_SET_FEATURE and XS_GET_FEATURE to xenstored. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk

Re: [PATCH 4/7] tools/xenstored: add server feature support

2025-07-24 Thread Jason Andryuk
On 2025-07-22 10:06, Juergen Gross wrote: Add per domain server features, which are initialized by the supported features at domain introduction, or by live update from the migration stream. This requires to add the DOMAIN_DATA record to the migration stream, but for now it will only contain t

Re: [PATCH v6 18/19] xen/cpufreq: bypass governor-related para for amd-cppc-epp

2025-07-24 Thread Jason Andryuk
On 2025-07-10 23:51, Penny Zheng wrote: HWP and amd-cppc-epp are both governor-less driver, so we introduce "hw_auto" flag to together bypass governor-related print in print_cpufreq_para(). In set_cpufreq_para(), a new helper is introduced to help error out when cpufreq core intialized in govern

Re: [PATCH 3/7] tools/xenstored: add missing migration record definitions

2025-07-24 Thread Jason Andryuk
eject only streams with a version higher than the current known one. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk

Re: [PATCH 2/7] tools/xenstored: support specification of migration stream version

2025-07-24 Thread Jason Andryuk
a xenstored only accepting version 1. For now only version 1 is supported. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk

Re: [PATCH 1/7] tools/libs/store: add get- and set-feature related functions

2025-07-24 Thread Jason Andryuk
. xs_get_features_domain(): return the features offered for a specific domain. xs_set_features_domain(): set the features available for a specific domain. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk

Re: [PATCH v6 16/19] xen/cpufreq: introduce GET_CPUFREQ_CPPC sub-op

2025-07-24 Thread Jason Andryuk
On 2025-07-24 09:31, Jan Beulich wrote: On 11.07.2025 05:51, Penny Zheng wrote: In amd-cppc passive mode, it's Xen governor which is responsible for performance tuning, so governor and CPPC could co-exist. That is, both governor-info and CPPC-info need to be printed together via xenpm tool. If

Re: [PATCH v2 04/17] xen: Introduce XEN_DOMCTL_CDF_not_hypercall_target

2025-07-23 Thread Jason Andryuk
On 2025-07-23 05:29, Julien Grall wrote: Hi Jason, On 21/07/2025 23:00, Jason Andryuk wrote: diff --git a/xen/include/public/domctl.h b/xen/include/public/domctl.h index 88a294c5be..f1f6f96bc2 100644 --- a/xen/include/public/domctl.h +++ b/xen/include/public/domctl.h @@ -70,9 +70,11 @@ struct

Re: [PATCH v3 1/2] xen: Add capabilities to get_domain_state

2025-07-22 Thread Jason Andryuk
On 2025-07-21 20:19, Jason Andryuk wrote: Expose a domain's capabilities - control, hardware or xenstore - through stable get domain state hypercall. The xenstore domain can use this information to assign appropriate permissions on connections. Repurpose the 16bit pad field for this pu

Re: [PATCH] x86/hvm: Replace do_sched_op calls with their underlying logic

2025-07-22 Thread Jason Andryuk
On 2025-07-22 14:07, Teddy Astie wrote: do_sched_op(SCHEDOP_yield) just calls vcpu_yield(). Remove the indirection through the hypercall handler and use the function directly. Perform the same for SCHEDOP_block. Not a functional change. Signed-off-by: Teddy Astie --- xen/arch/x86/hvm/hvm.c

Re: [PATCH] device-tree/kernel: Use memcpy in output_length()

2025-07-22 Thread Jason Andryuk
On 2025-07-22 03:46, Michal Orzel wrote: Trying to boot a compressed kernel with UBSAN enabled, results in the following warning: (XEN) UBSAN: Undefined behaviour in common/device-tree/kernel.c:21:12 (XEN) load of misaligned address 0a0040f89867 for type 'uint32_t' (XEN) which requires 4 byte

[PATCH v3 2/2] tools/manage: Expose domain capabilities

2025-07-21 Thread Jason Andryuk
Add an additional "caps" argument to the libxenmanage functions to obtain a domains capabilities - control, hardware, and xenstore. Update the xenstored callers at the same time. Signed-off-by: Jason Andryuk Reviewed-by: Juergen Gross --- v2: Add Juergen's R-b --- tools/incl

[PATCH v3 1/2] xen: Add capabilities to get_domain_state

2025-07-21 Thread Jason Andryuk
Expose a domain's capabilities - control, hardware or xenstore - through stable get domain state hypercall. The xenstore domain can use this information to assign appropriate permissions on connections. Repurpose the 16bit pad field for this purpose. Signed-off-by: Jason Andryuk Review

[PATCH v3 0/2] Expose capabilities in get_domain_state

2025-07-21 Thread Jason Andryuk
This is the capabilities patches split out from the larger series. get_domain_state is new in 4.21. If they go in before the release, the library won't need to be changed in the future. v3 is used since they are iterations from the other series. Jason Andryuk (2): xen: Add capabiliti

Re: [PATCH v2 04/17] xen: Introduce XEN_DOMCTL_CDF_not_hypercall_target

2025-07-21 Thread Jason Andryuk
Hi Julien, Thanks for taking a look. On 2025-07-21 13:58, Julien Grall wrote: Hi Jason, On 16/07/2025 22:14, Jason Andryuk wrote: Add a new create domain flag  to indicate if a domain can be the target of hypercalls.  By default all domains can be targetted - subject to any other permission

Re: [PATCH v2 15/17] tools/init-dom0less: Factor out xenstore setup

2025-07-18 Thread Jason Andryuk
On 2025-07-17 06:33, Juergen Gross wrote: On 16.07.25 23:15, Jason Andryuk wrote: Factor out the xenstore setup code into configure_xenstore().  This is in preparation for handling already-introduced domains. Signed-off-by: Jason Andryuk ---   tools/helpers/init-dom0less.c | 51

Re: [PATCH 2/2] x86: generalise vcpu0 creation for a domain

2025-07-17 Thread Jason Andryuk
On 2025-07-17 13:51, Alejandro Vallejo wrote: Make alloc_dom0_vcpu0() viable as a general vcpu0 allocator. Keep behaviour on any hwdom/ctldom identical to that dom0 used to have, and make non-dom0 have auto node affinity. Rename the function to alloc_dom_vcpu0() to reflect this change in scope,

Re: [PATCH 1/2] arm: Remove alloc_dom0_vcpu0()

2025-07-17 Thread Jason Andryuk
On 2025-07-17 13:51, Alejandro Vallejo wrote: It's a straight vcpu_create(), so the alloc_dom0_vcpu0() call is irrelevant. Not a functional change. Signed-off-by: Alejandro Vallejo Reviewed-by: Jason Andryuk

Re: [PATCH v2 14/17] tools/xenstored: Auto-introduce domains

2025-07-17 Thread Jason Andryuk
On 2025-07-17 04:50, Juergen Gross wrote: On 16.07.25 23:15, Jason Andryuk wrote: Replace dom0_init() with init_domains() which uses libxenmanage to iterate through all existing domains and introduce them. dom0_domid is updated with the xenstore domain, since it really indicates the local

Re: [PATCH v2 12/17] tools/manage: Expose domain capabilities

2025-07-17 Thread Jason Andryuk
On 2025-07-17 02:28, Juergen Gross wrote: On 16.07.25 23:14, Jason Andryuk wrote: Add an additional "caps" argument to the libxenmanage functions to obtain a domains capabilities - control, hardware, and xenstore. Update the xenstored callers at the same time. Luckily the interfac

Re: [PATCH v2 11/17] xen: Add capabilities to get_domain_state

2025-07-17 Thread Jason Andryuk
On 2025-07-17 02:24, Juergen Gross wrote: On 16.07.25 23:14, Jason Andryuk wrote: Expose a domain's capabilities - control, hardware or xenstore - through stable get domain state hypercall. The xenstore domain can use this information to assign appropriate permissions on connec

Re: [PATCH v2 10/17] tools/xenstored: Read event channel from xenstored page

2025-07-17 Thread Jason Andryuk
On 2025-07-17 02:22, Juergen Gross wrote: On 16.07.25 23:14, Jason Andryuk wrote: Make introduce_domain() use an event channel from the the xenstore page. It is only used if non-zero.  Otherwise the passed in event channel port is used. The is useful for a xenstored stubdom to configure

Re: [PATCH v2 09/17] xen/dom0less: store xenstore event channel in page

2025-07-17 Thread Jason Andryuk
On 2025-07-17 02:43, Jürgen Groß wrote: On 17.07.25 08:25, Jan Beulich wrote: On 17.07.2025 08:19, Juergen Gross wrote: On 16.07.25 23:14, Jason Andryuk wrote: Write the associated event channel into the xenstore page so xenstored can read it.  xenstored can map the grant by the reserved

Re: [PATCH] dom0less: Move single-xenstore check from bindings to set_xs_domain()

2025-07-17 Thread Jason Andryuk
On 2025-07-17 10:28, Alejandro Vallejo wrote: Later patches extract the bindings to a separate file, where that global won't be available. Make the check when calling the function instead so the bindings remain agnostic. Signed-off-by: Alejandro Vallejo Reviewed-by: Jason Andryuk

[PATCH v2 09/17] xen/dom0less: store xenstore event channel in page

2025-07-16 Thread Jason Andryuk
: Jason Andryuk --- xen/common/device-tree/dom0less-build.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/xen/common/device-tree/dom0less-build.c b/xen/common/device-tree/dom0less-build.c index a2789e3bdf..284139bf14 100644 --- a/xen/common/device-tree/dom0less-build.c +++ b/xen/common

[PATCH v2 10/17] tools/xenstored: Read event channel from xenstored page

2025-07-16 Thread Jason Andryuk
Make introduce_domain() use an event channel from the the xenstore page. It is only used if non-zero. Otherwise the passed in event channel port is used. The is useful for a xenstored stubdom to configure domains autonomously. Signed-off-by: Jason Andryuk --- tools/xenstored/domain.c | 6

[PATCH v2 17/17] tools/init-dom0less: Continue on error

2025-07-16 Thread Jason Andryuk
An error on one domain doesn't apply to others. Continue the loop over all domains if init_domain() fails. Signed-off-by: Jason Andryuk --- tools/helpers/init-dom0less.c | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/helpers/init-dom0less.c b/tools/helpers/init-dom0less.c

[PATCH v2 03/17] xen: Add DOMAIN_CAPS_DEVICE_MODEL & XEN_DOMCTL_CDF_device_model

2025-07-16 Thread Jason Andryuk
domains. This permission is also enough to run xenconsoled in the hardware domain. This is a byproduct of getdomaininfo being available. The grant permissions are also configured for the console page. The OCaml code needs the flag added in as well. Signed-off-by: Jason Andryuk Acked-by: Christian

[PATCH v2 12/17] tools/manage: Expose domain capabilities

2025-07-16 Thread Jason Andryuk
Add an additional "caps" argument to the libxenmanage functions to obtain a domains capabilities - control, hardware, and xenstore. Update the xenstored callers at the same time. Signed-off-by: Jason Andryuk --- tools/include/xenmanage.h | 14 -- tools/libs/manage/co

[PATCH v2 14/17] tools/xenstored: Auto-introduce domains

2025-07-16 Thread Jason Andryuk
ly to control domain (which default to 0 normally). Always signal the event channel for initial domains. This gets dom0 (a local xenstored domain) to connect. Also always write XENSTORE_CONNECTED since we know we are connected at this point. Signed-off-by: Jason Andryuk --- tools/xenstored/c

[PATCH v2 13/17] tools/xenstored: Delay firing special watches

2025-07-16 Thread Jason Andryuk
we iterate xenmanage_poll_changed_domain() to discover domains, there is no guarantee the local domain running xenstored will be created first. Suppress firing special watches until the hashtable has been allocated. Signed-off-by: Jason Andryuk --- With a known domid, xenstored could construct

[PATCH v2 05/17] xen/dom0less: Workaround XSM for evtchn_alloc_unbound

2025-07-16 Thread Jason Andryuk
When used with an untargetable domain, xsm_evtchn_unbound fails even though the idle domain has is_privileged = true. Switch current to the domain under construction so that event channel creation is allowed as XSM_TARGET. Signed-off-by: Jason Andryuk --- v2: New This was Jan's suggestion

[PATCH v2 08/17] public/io: xs_wire: Include event channel in interface page

2025-07-16 Thread Jason Andryuk
needed. Suggested-by: Juergen Gross Signed-off-by: Jason Andryuk --- xen/include/public/io/xs_wire.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/xen/include/public/io/xs_wire.h b/xen/include/public/io/xs_wire.h index e92a87a07b..f2c0afd107 100644 --- a/xen/include/public/io/xs_wire.h

[PATCH v2 15/17] tools/init-dom0less: Factor out xenstore setup

2025-07-16 Thread Jason Andryuk
Factor out the xenstore setup code into configure_xenstore(). This is in preparation for handling already-introduced domains. Signed-off-by: Jason Andryuk --- tools/helpers/init-dom0less.c | 51 --- 1 file changed, 36 insertions(+), 15 deletions(-) diff --git a

[PATCH v2 11/17] xen: Add capabilities to get_domain_state

2025-07-16 Thread Jason Andryuk
Expose a domain's capabilities - control, hardware or xenstore - through stable get domain state hypercall. The xenstore domain can use this information to assign appropriate permissions on connections. Repurpose the 16bit pad field for this purpose. Signed-off-by: Jason Andryuk ---

[PATCH v2 06/17] xen/xsm: Expand XSM_XS_PRIV for untargetable domains

2025-07-16 Thread Jason Andryuk
Untargetable domains are currently hidden from the control domain - e.g. xl list will not show them. getdomaininfo fails on the !is_hypercall_target() check in XSM_TARGET. Add control domain to the XSM_XS_PRIV check so it can pass. Signed-off-by: Jason Andryuk --- xen/include/xsm/dummy.h | 3

[PATCH v2 00/17] XSM changes for split hardware / control domain

2025-07-16 Thread Jason Andryuk
" is needed for init-dom0less to know if it should or should not configure xenstore for dom0less xen.enhanced = "no-xenstore". There are some cosmetic errors from xl related to SYSCTL_physinfo. libxl: error: libxl_utils.c:818:libxl_cpu_bitmap_alloc: failed to retrieve the maximum num

[PATCH v2 16/17] tools/init-dom0less: Configure already-introduced domains

2025-07-16 Thread Jason Andryuk
useful with an already-introduced domain. Non-xenstore domains are still skipped. While at it, remove domain_exists() which is just a simple wrapper. Signed-off-by: Jason Andryuk --- tools/helpers/init-dom0less.c | 28 +++- 1 file changed, 11 insertions(+), 17 deletions

[PATCH v2 01/17] xen/xsm: Add XSM_HW_PRIV

2025-07-16 Thread Jason Andryuk
, they should be usable by the default XSM policy. Signed-off-by: Jason Andryuk --- v2: Make XSM_HW_PRIV exclusive to hardware_domain --- xen/arch/arm/platform_hypercall.c | 2 +- xen/arch/x86/msi.c| 2 +- xen/arch/x86/physdev.c| 12 ++-- xen/arch/x86

[PATCH v2 04/17] xen: Introduce XEN_DOMCTL_CDF_not_hypercall_target

2025-07-16 Thread Jason Andryuk
Add a new create domain flag to indicate if a domain can be the target of hypercalls. By default all domains can be targetted - subject to any other permission checks. This property is useful in a safety environment to isolate domains for freedom from interference. Signed-off-by: Jason Andryuk

[PATCH v2 07/17] xsm/dummy: Allow HVMOP_get_param for control domain

2025-07-16 Thread Jason Andryuk
n't have sufficient information to identify the particular operation, so put it in xsm_hvm_param(). Signed-off-by: Jason Andryuk --- It's messy, but I couldn't think of a better way. --- xen/include/xsm/dummy.h | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git

[PATCH v2 02/17] xsm/silo: Support hardware & xenstore domains

2025-07-16 Thread Jason Andryuk
ented from foreign mapping Control's memory with that. Signed-off-by: Jason Andryuk --- v2: Use single evaluate_nospec() for checks. Remove Control Add xenstore domain Expand commit message Remove always_inline --- xen/xsm/silo.c | 15 +-- 1 file changed, 13 insertions(+), 2 deletions

Re: [PATCH 9/9] tools/xenstored: make stubdom_init() live update aware

2025-07-16 Thread Jason Andryuk
: Juergen Gross Reviewed-by: Jason Andryuk

Re: [PATCH 8/9] xenstored: rebind event channels after live update in stubdom

2025-07-16 Thread Jason Andryuk
Reviewed-by: Jason Andryuk

Re: [PATCH 7/9] tools/libxenevtchn: add xenevtchn_bind() under Mini-OS

2025-07-16 Thread Jason Andryuk
-off-by: Juergen Gross Reviewed-by: Jason Andryuk

Re: [PATCH 6/9] xenstored: don't use xenevtchn_fdopen() in stubdom

2025-07-16 Thread Jason Andryuk
ni-OS. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk

Re: [PATCH 5/9] xenstored: use fread() instead of mmap() for reading live update state

2025-07-16 Thread Jason Andryuk
On 2025-07-02 04:13, Juergen Gross wrote: Mini-OS doesn't support using mmap() for accessing a file. In order to support reading the live update state from a 9pfs based file, use fread() instead of mmap(). Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk

Re: [PATCH 4/9] libxengnttab: set the cloexec flag on Mini-OS

2025-07-16 Thread Jason Andryuk
On 2025-07-02 04:13, Juergen Gross wrote: With Mini-OS now supporting the O_CLOEXEC flag for the kexec case, set the related cloexec flag in minios.c. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk

Re: [PATCH 1/9] stubdom: configure kexec for PVH Xenstore stubdom

2025-07-16 Thread Jason Andryuk
9pfs granted pages. In Xenstore code test the CONFIG_KEXEC setting in order to determine whether stubdom live update is supported (PV xenstore-stubdom doesn't have live update support, as it lacks kexec). Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk

Re: [PATCH v7 1/7] x86: suppress ERMS for internal use when MISC_ENABLE.FAST_STRING is clear

2025-07-16 Thread Jason Andryuk
an Beulich Reviewed-by: Jason Andryuk

Re: [PATCH 3/9] libevtchn: add O_CLOEXEC support for Mini-OS

2025-07-16 Thread Jason Andryuk
On 2025-07-02 04:12, Juergen Gross wrote: With Mini-OS now supporting O_CLOEXEC for the kexec case, no longer ignore the XENEVTCHN_NO_CLOEXEC flag in minios.c. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk

Re: [PATCH 2/9] tools/xenstore: perform kexec for stubdom live update

2025-07-16 Thread Jason Andryuk
On 2025-07-02 04:12, Juergen Gross wrote: For the final step of live-update in stubdom, call kexec(). Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk

Re: [PATCH] x86: Prefer d->max_vcpus to dom0_max_vcpus()

2025-07-16 Thread Jason Andryuk
On 2025-07-16 10:18, Alejandro Vallejo wrote: These days d->max_vcpus is populated on domain_create(), so use that instead and avoid a function call. Signed-off-by: Alejandro Vallejo Reviewed-by: Jason Andryuk

Re: [MINI-OS PATCH v2 07/14] mini-os: kexec: add support for handing over some memory across kexec

2025-07-15 Thread Jason Andryuk
ll be handed over to the new kernel via specifying it as a module in struct hvm_start_info. The contents of the memory area are described via a generic table of contents in the last page of the memory. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk Thanks for the expanded comment. Re

Re: [MINI-OS PATCH v2 01/14] mm: don't add module pages to free memory

2025-07-15 Thread Jason Andryuk
free memory, and the module and start_info pages are below the page tables. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk

Re: [MINI-OS PATCH 19/19] events: export bind_evtchn()

2025-07-14 Thread Jason Andryuk
On 2025-07-02 04:12, Juergen Gross wrote: Export the bind_evtchn() function, as it will be needed for reactivating events after kexec(). Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk

Re: [MINI-OS PATCH 13/19] kexec: add support for allocating pages from kexec module memory

2025-07-14 Thread Jason Andryuk
-by: Juergen Gross Reviewed-by: Jason Andryuk

Re: [MINI-OS PATCH 18/19] 9pfs: add support to keep device opened across kexec

2025-07-14 Thread Jason Andryuk
Gross Reviewed-by: Jason Andryuk

Re: [MINI-OS PATCH 17/19] gnttab: add function to obtain memory address from grantref

2025-07-14 Thread Jason Andryuk
: Jason Andryuk

Re: [MINI-OS PATCH 15/19] 9pfs: refactor init_9pfront()

2025-07-14 Thread Jason Andryuk
() which should at least be mentioned in the commit message. With that: Reviewed-by: Jason Andryuk

Re: [MINI-OS PATCH 12/19] mini-os: kexec: add support for handing over some memory across kexec

2025-07-14 Thread Jason Andryuk
On 2025-07-11 03:49, Jürgen Groß wrote: On 11.07.25 01:21, Jason Andryuk wrote: On 2025-07-02 04:12, Juergen Gross wrote: Especially for support of Xenstore-stubdom live update some memory must be handed over to the new kernel without moving it around: as the 9pfs device used for storing and

Re: [MINI-OS PATCH 16/19] gnttab: remove gnttab_alloc_and_grant() function

2025-07-14 Thread Jason Andryuk
add a domid parameter, but given its now 0 users, there doesn't seem to be a real demand for that function. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk

Re: [MINI-OS PATCH 14/19] 9pfs: store bepath in struct struct dev_9pfs

2025-07-14 Thread Jason Andryuk
On 2025-07-02 04:12, Juergen Gross wrote: Use struct dev_9pfs for storing the backend path of the device state in order to avoid code duplication in init_9pfront() and shutdown_9pfront(). Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk

Re: [PATCH v2] xen/arm: fix arm_iommu_map_page after f9f6b22ab

2025-07-14 Thread Jason Andryuk
On 2025-07-12 06:08, Julien Grall wrote: Hi Stefano, On 11/07/2025 01:25, Stefano Stabellini wrote: Up until f9f6b22ab "xen/arm: Map ITS doorbell register to IOMMU page Everywhere in this commit message, we are using 12 characters commit ID. tables" the only caller of iommu_map on ARM was g

Re: [MINI-OS PATCH 12/19] mini-os: kexec: add support for handing over some memory across kexec

2025-07-10 Thread Jason Andryuk
On 2025-07-02 04:12, Juergen Gross wrote: Especially for support of Xenstore-stubdom live update some memory must be handed over to the new kernel without moving it around: as the 9pfs device used for storing and retrieving the state of Xenstore needs to be kept operational across kexec (it can't

BUG during vgic3 ITS mapping

2025-07-09 Thread Jason Andryuk
Hi, I'm running Xen in QEMU with vgic3 and started hitting: (XEN) Xen BUG at drivers/passthrough/arm/iommu_helpers.c:49 BUG_ON(!is_domain_direct_mapped(d)); I'm using dmo0less to create a split hardware and control domains. That means hwdom is not direct mapped, but is_iommu_enabled() is

Re: [MINI-OS PATCH 10/19] e820: use special type for software reserved memory

2025-07-08 Thread Jason Andryuk
es as well, just use a new type. Areas with that new type can easily be filtered out when building the memory map for the new kernel. Introduce the type E820_TYPE_SOFT_RESERVED with the same value as the Linux kernel is using for the same purpose. Signed-off-by: Juergen Gross Reviewed-by:

  1   2   3   4   5   6   7   8   9   10   >