Re: [PATCH] x86: Conditionalise init_dom0_cpu_policy()

2025-07-29 Thread Daniel P. Smith
On 7/25/25 06:56, Roger Pau Monné wrote: On Fri, Jul 25, 2025 at 12:02:18PM +0200, Alejandro Vallejo wrote: On Wed Jul 23, 2025 at 9:18 AM CEST, Roger Pau Monné wrote: On Thu, Jul 17, 2025 at 07:58:24PM +0200, Alejandro Vallejo wrote: Later patches will keep refactoring create_dom0() until it

Re: [PATCH v8 01/11] x86: Replace arch-specific boot_module with common one

2025-07-21 Thread Daniel P. Smith
--git a/xen/xsm/xsm_policy.c b/xen/xsm/xsm_policy.c index 1f88b4fc5a..27bfc3b995 100644 --- a/xen/xsm/xsm_policy.c +++ b/xen/xsm/xsm_policy.c @@ -53,7 +53,7 @@ int __init xsm_multiboot_policy_init( printk("Policy len %#lx, start at %p.\n", _policy_len,_policy_start); -bm->type = BOOTMOD_XSM_POLICY; +bm->kind = BOOTMOD_XSM_POLICY; break; } @@ -68,7 +68,7 @@ int __init xsm_multiboot_policy_init( #ifdef CONFIG_HAS_DEVICE_TREE int __init xsm_dt_policy_init(void **policy_buffer, size_t *policy_size) { -struct boot_module *mod = boot_module_find_by_kind(BOOTMOD_XSM); +struct boot_module *mod = boot_module_find_by_kind(BOOTMOD_XSM_POLICY); paddr_t paddr, len; if ( !mod || !mod->size ) Acked-by: Daniel P. Smith

Re: [PATCH v7 01/11] x86: Replace arch-specific boot_module with common one

2025-07-21 Thread Daniel P. Smith
On 7/15/25 12:10, Alejandro Vallejo wrote: These types resemble each other very closely in layout and intent, and with "struct boot_module" already in common code it makes perfect sense to merge them. In order to do so, rename identical fields with conflicting names. No functional change intende

Re: [PATCH v7 09/11] xen: Split HAS_DEVICE_TREE in two

2025-07-21 Thread Daniel P. Smith
S_DEVICE_TREE_DISCOVERY # include # include #endif @@ -65,7 +65,7 @@ int __init xsm_multiboot_policy_init( } #endif -#ifdef CONFIG_HAS_DEVICE_TREE +#ifdef CONFIG_HAS_DEVICE_TREE_DISCOVERY int __init xsm_dt_policy_init(void **policy_buffer, size_t *policy_size) { struct boot_module *mod = boot_module_find_by_kind(BOOTMOD_XSM); Acked-by: Daniel P. Smith

Re: [PATCH v8 4/7] xen/sysctl: wrap around XEN_SYSCTL_scheduler_op

2025-07-16 Thread Daniel P. Smith
v2: - no need to wrap declarations - add transient #ifdef in sysctl.c for correct compilation --- v2 -> v3: - move #endif up ahead of the blank line --- v3 -> v4: - remove transient "#ifdef CONFIG_SYSCTL" --- Acked-by: Daniel P. Smith

Re: [PATCH v8 3/7] xen/sysctl: wrap around XEN_SYSCTL_page_offline_op

2025-07-16 Thread Daniel P. Smith
in sysctl.c for correct compilation - no need to wrap declarations - place the #ifdef inside the function body to have less redundancy --- v3 -> v4: - remove transient "#ifdef CONFIG_SYSCTL" --- Acked-by: Daniel P. Smith

Re: [PATCH v8 2/7] xen/sysctl: wrap around XEN_SYSCTL_readconsole

2025-07-16 Thread Daniel P. Smith
v3 -> v4: - remove transient "#ifdef CONFIG_SYSCTL" --- Acked-by: Daniel P. Smith

Re: [PATCH v8 1/7] xen/xsm: wrap around xsm_sysctl with CONFIG_SYSCTL

2025-07-16 Thread Daniel P. Smith
On 7/11/25 00:31, Penny Zheng wrote: As function xsm_sysctl() is solely invoked in sysctl.c, we need to wrap around it with CONFIG_SYSCTL Signed-off-by: Penny Zheng Reviewed-by: Stefano Stabellini --- Acked-by: Daniel P. Smith

Re: [RFC PATCH] xen/flask: estimate max sidtable size

2025-07-07 Thread Daniel P. Smith
On 7/4/25 06:48, Jan Beulich wrote: On 04.07.2025 12:10, Sergiy Kibrik wrote: 01.07.25 13:42, Jan Beulich: On 30.06.2025 10:55, Sergiy Kibrik wrote: @@ -54,4 +54,7 @@ $(obj)/policy.bin: FORCE FLASK_BUILD_DIR=$(FLASK_BUILD_DIR) POLICY_FILENAME=$(POLICY_SRC) cmp -s $(POLI

Re: [PATCH 12/19] xen/dt: Move bootfdt functions to xen/bootfdt.h

2025-06-16 Thread Daniel P. Smith
On 6/5/25 14:03, Alejandro Vallejo wrote: On Mon Jun 2, 2025 at 10:25 PM CEST, Daniel P. Smith wrote: +/* Helper to read a big number; size is in cells (not bytes) */ +static inline u64 dt_read_number(const __be32 *cell, int size) +{ +u64 r = 0; + +while ( size-- ) +r = (r <&

Re: [PATCH v3 06/14] xen: Refactor kernel_info to have a header like boot_domain

2025-06-16 Thread Daniel P. Smith
On 6/13/25 11:13, Alejandro Vallejo wrote: Create a struct header within kernel_info with the contents common to kernel_info and boot_domain, and define that header in common code. This enables x86 to use that header as-is and drop x86's boot_domain IMHO kernel_info is an extremely poor name

Re: [PATCH v3 04/14] xen: Rename bootmodule{,s} to boot_module{,s}

2025-06-16 Thread Daniel P. Smith
V/r, Daniel P. Smith Apertus Solutions, LLC On 6/13/25 11:13, Alejandro Vallejo wrote: ... in alignment with the new coding style on word splitting for type names. This aligns its name with the largely duplicate boot_module struct in x86. While there's no equivalent to "struct b

Re: [PATCH 12/19] xen/dt: Move bootfdt functions to xen/bootfdt.h

2025-06-02 Thread Daniel P. Smith
On 5/30/25 08:02, Alejandro Vallejo wrote: Part of an unpicking process to extract bootfdt contents independent of bootinfo to a separate file for x86 to take. Move functions required for early FDT parsing from device_tree.h and arm's setup.h onto bootfdt.h Declaration motion only. Not a functi

Re: [PATCH v3 3/3] MAINTAINERS: add a reviewer for Argo

2025-05-29 Thread Daniel P. Smith
On 5/28/25 17:10, Christopher Clark wrote: Adding Daniel P. Smith as reviewer for the Argo subsystem. Signed-off-by: Christopher Clark Acked-by: Stefano Stabellini --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 697f383505..6b129704fc

Re: Hyperlaunch/dom0less code sharing

2025-05-21 Thread Daniel P. Smith
On 5/21/25 11:31, Daniel P. Smith wrote: As for 3, I can repost my original analysis that went to the working group on why using this is not the best idea. Doing 3 would require doing at least two, if not three passes on the DTB for x86 with zero benefit/need since, unlike Arm, we never have

Hyperlaunch Device Tree Discussion

2025-05-21 Thread Daniel P. Smith
ns. It will also allow removing arch specific code from the initialization of common infrastructure such as XSM. V/r, Daniel P. Smith

Re: Hyperlaunch/dom0less code sharing

2025-05-21 Thread Daniel P. Smith
On 5/21/25 10:35, Alejandro Vallejo wrote: Hi, (There's a TL;DR at the end) While working on preparing and reworking the hyperlaunch series for upstreaming it's slowly becoming apparent the degree of duplication with dom0less. Yes, this was by design so that when we got to the point of conver

Re: [PATCH] xen/argo: Command line handling improvements

2025-05-20 Thread Daniel P. Smith
d thereafter. Signed-off-by: Andrew Cooper --- CC: Christopher Clark CC: Daniel P. Smith CC: Denis Mukhin Found while --- xen/common/argo.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/xen/common/argo.c b/xen/common/argo.c index cbe8911a4364..027b37b18a6

[RFCv2 29/38] x86/hyperlaunch: allocate console for domu

2025-05-15 Thread Daniel P. Smith
they may be published in Xenstore once it is online. Signed-off-by: Daniel P. Smith --- Changes in RFCv2: - rewrote inline with xenstore changes for event chan --- xen/arch/x86/domain-builder/domain.c | 24 +++- xen/arch/x86/hvm/dom_build.c | 24

[RFCv2 20/38] x86/hyperlaunch: move remaining pvh dom0 construction

2025-05-15 Thread Daniel P. Smith
Move pvh_load_kernel() and its helper functions to the domain builder. With this move, it is now possible to move the remaining logic of dom0_construct_pvh() to the domain builder. With all the logic moved, the function can be dropped. Signed-off-by: Daniel P. Smith --- xen/arch/x86/hvm

[RFCv2 27/38] x86/hyperlaunch: introduce arch builder finalize

2025-05-15 Thread Daniel P. Smith
discarded until after all domains have been constructed. Signed-off-by: Daniel P. Smith --- Changes since RFC v1: - reworked the commit to introduce builder finalize - renamed the commit to refelect builder finalize --- xen/arch/x86/domain-builder/core.c | 2 ++ xen/arch/x86/domain-builder

[RFCv2 24/38] x86/hyperlaunch: convert create_dom0 to arch_create_dom

2025-05-15 Thread Daniel P. Smith
create_dom0(), rename it to arch_create_dom() as the function is now generalized. Signed-off-by: Daniel P. Smith --- xen/arch/x86/domain-builder/Makefile | 2 +- xen/arch/x86/domain-builder/domain.c | 180 +++ xen/arch/x86/setup.c | 174

[RFCv2 25/38] x86/hyperlaunch: remove dom0-isms from arch_create_dom

2025-05-15 Thread Daniel P. Smith
Removes the dom0 naming from variables and isolates control/hardware domain specific logic behind capabilities check. Signed-off-by: Daniel P. Smith --- xen/arch/x86/domain-builder/domain.c | 47 +++- 1 file changed, 26 insertions(+), 21 deletions(-) diff --git a/xen

[RFCv2 26/38] x86/hyperlaunch: introduce domain builder general dom creation

2025-05-15 Thread Daniel P. Smith
Introduce the builder_create_domains() function that provides the general domain construction abstraction that selects between classic dom0 construction and the hyperlaunch domain builder. Signed-off-by: Daniel P. Smith --- xen/arch/x86/domain-builder/Makefile | 1 + xen/arch/x86/domain

[RFCv2 33/38] x86/hyperlaunch: move kernel extraction under domain builder

2025-05-15 Thread Daniel P. Smith
moves the generalized kernel preparation for the three kernel types to the domain builder. It descopes bziamge_parse to only handling bzImages. Signed-off-by: Daniel P. Smith --- xen/arch/x86/bzimage.c| 34 ++- xen/arch/x86/domain-builder/domain.c | 30

[RFCv2 36/38] x86/hyperlaunch: enable unpausing mulitple domains

2025-05-15 Thread Daniel P. Smith
This commit enables the domain builder to unpause all domains that have been flagged to start on boot. Signed-off-by: Daniel P. Smith --- xen/arch/x86/domain-builder/core.c | 20 xen/arch/x86/include/asm/boot-domain.h | 8 +--- xen/arch/x86/setup.c

[RFCv2 28/38] x86/hyperlaunch: allocate xenstore for domu

2025-05-15 Thread Daniel P. Smith
the domain can be announced to Xenstore. Signed-off-by: Daniel P. Smith --- Changes for RFCv2: - rewrote to setup event chan after construction has finished - merged the setting of xenstore boot capabilities flag commit --- xen/arch/x86/domain-builder/domain.c | 56

[RFCv2 37/38] x86/hyperlaunch: generalize domid assignment

2025-05-15 Thread Daniel P. Smith
Signed-off-by: Daniel P. Smith --- xen/common/domain-builder/fdt.c | 32 +++- 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/xen/common/domain-builder/fdt.c b/xen/common/domain-builder/fdt.c index 1b3492571b15..414bbf5d9fb1 100644 --- a/xen/common

[RFCv2 35/38] x86/hyperlaunch: add multidomain construction logic

2025-05-15 Thread Daniel P. Smith
Introduce the logic to loop over boot_info->domains and construct each valid entry in the array. Signed-off-by: Daniel P. Smith --- xen/arch/x86/domain-builder/core.c | 30 xen/arch/x86/domain-builder/domain.c | 7 +-- xen/arch/x86/hvm/dom_buil

[RFCv2 34/38] x86/hyperlaunch: introduce multidomain kconfig option

2025-05-15 Thread Daniel P. Smith
This adds the MULTIDOMAIN_BUILDER kconfig option that will be used to enable the domain construction path to be called multiple times. With the idea of being able to construct multiple domains now introduced, rename construct_dom0() to construct_dom(). Signed-off-by: Daniel P. Smith --- xen

[RFCv2 22/38] x86/hyperlaunch: add domu acpi construction

2025-05-15 Thread Daniel P. Smith
Introduce hvm_setup_acpi() that will construct an APCI table for a general HVM domU guest. Signed-off-by: Daniel P. Smith --- xen/arch/x86/hvm/dom_build.c | 213 ++- 1 file changed, 212 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/hvm/dom_build.c b/xen

[RFCv2 18/38] x86/hyperlaunch: add domu memory map construction

2025-05-15 Thread Daniel P. Smith
dom0 or a domU. Signed-off-by: Daniel P. Smith --- xen/arch/x86/hvm/dom_build.c | 149 ++- 1 file changed, 148 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/hvm/dom_build.c b/xen/arch/x86/hvm/dom_build.c index c182847147b0..e724d578c5d4 100644 --- a/xen

[RFCv2 30/38] x86/hyperlaunch: introduce concept of core domains

2025-05-15 Thread Daniel P. Smith
encapsulate the construction of the core domains. Signed-off-by: Daniel P. Smith --- Changes in RFCv2: - rewrote build_core_domains due address the reordering event channel creation --- xen/arch/x86/domain-builder/core.c | 66 +++--- xen/arch/x86/include/asm/boot-domain.h | 2

[RFCv2 21/38] x86/hyperlaunch: relocate pvh_steal_ram to domain builder

2025-05-15 Thread Daniel P. Smith
The function pvh_steal_ram() is not pvh specific and can be used on any HVM domain. Move to the domain builder and rename to hvm_steal_ram. Signed-off-by: Daniel P. Smith --- xen/arch/x86/hvm/dom0_build.c | 106 +++--- xen/arch/x86/hvm/dom_build.c | 84

[RFCv2 17/38] x86/boot: rename pvh acpi setup function

2025-05-15 Thread Daniel P. Smith
The function pvh_setup_acpi() is dom0 specific, renaming it to dom0_pvh_setup_acpi(). Now export the function so that it may be called by the domain builder. Signed-off-by: Daniel P. Smith --- xen/arch/x86/hvm/dom0_build.c | 4 ++-- xen/arch/x86/include/asm/dom0_build.h | 2 ++ 2 files

[RFCv2 32/38] x86/hyperlaunch: move headroom under domain builder

2025-05-15 Thread Daniel P. Smith
generalized headroom determination for the three kernel types to the domain builder and scopes bziamge_headroom to only doing headroom calculations for bzimage payload types. Signed-off-by: Daniel P. Smith --- xen/arch/x86/bzimage.c| 43 +++ xen/arch/x86/domain

[RFCv2 23/38] x86/boot: export command line processing

2025-05-15 Thread Daniel P. Smith
Export the function cmdline_cook() so that it can be called outside of setup.c. Signed-off-by: Daniel P. Smith --- xen/arch/x86/include/asm/setup.h | 2 ++ xen/arch/x86/setup.c | 4 +--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/xen/arch/x86/include/asm/setup.h

[RFCv2 38/38] tools: introduce hyperlaunch domain late init

2025-05-15 Thread Daniel P. Smith
The late domain init helper is a helper tool for late setup of Xenstore for a domain that was created by the hypervisor using hyperlaunch. Signed-off-by: Daniel P. Smith --- .gitignore| 1 + tools/helpers/Makefile| 12 + tools/helpers/late-init-domains.c

[RFCv2 02/38] x86/hyperlaunch: correct the naming of domain ramdisk field

2025-05-15 Thread Daniel P. Smith
renaming the field to something other than ramdisk. Signed-off-by: Daniel P. Smith --- xen/arch/x86/hvm/dom0_build.c | 2 +- xen/arch/x86/include/asm/boot-domain.h | 2 +- xen/arch/x86/pv/dom0_build.c | 2 +- xen/arch/x86/setup.c | 2 +- xen/common/domain

[RFCv2 31/38] common/gzip: add function to read isize field

2025-05-15 Thread Daniel P. Smith
The gzip specification dictates that the last four bytes of a gzip file will contain the modulo 2^32 of the original image size. Since this is a function of gzip, relocate the logic under a gzip function. Signed-off-by: Daniel P. Smith --- xen/arch/x86/bzimage.c | 10 +++--- xen/common

[RFCv2 04/38] x86/hyperlaunch: convert vcpu0 creation to domain builder

2025-05-15 Thread Daniel P. Smith
the control domain, otherwise set the affinity to auto. Signed-off-by: Daniel P. Smith --- Changes in v2: - name vcpu0 allocation function domain_vcpu0_create() --- xen/arch/x86/dom0_build.c | 4 +--- xen/arch/x86/domain-builder/domain.c | 11 +++ xen/arch/x86/include/asm

[RFCv2 15/38] x86/boot: move and rename sched_setup_dom0_vcpus

2025-05-15 Thread Daniel P. Smith
Relocated the function sched_setup_dom0_vcpus(), which was protected by an ifdef CONFIG_X86, from common/sched to the hyperlaunch domain builder. Rename it to alloc_dom_vcpus() to better reflect the purpose of the function. Signed-off-by: Daniel P. Smith --- xen/arch/x86/domain-builder/domain.c

[RFCv2 16/38] x86/hyperlaunch: move pvh_setup_cpus to domain builder

2025-05-15 Thread Daniel P. Smith
The function pvh_setup_cpus() is a very general function that is usable by all HVM domains, not just PVH. As such, renaming to hvm_setup_cpus during move. Signed-off-by: Daniel P. Smith --- xen/arch/x86/hvm/dom0_build.c | 45 +- xen/arch/x86/hvm/dom_build.c

[RFCv2 09/38] x86/boot: refactor dom0 page calculation

2025-05-15 Thread Daniel P. Smith
. To prepare for generalizing domain page allocation, isolate this logic to a separate handling function. Signed-off-by: Daniel P. Smith --- xen/arch/x86/dom0_build.c | 76 +-- 1 file changed, 41 insertions(+), 35 deletions(-) diff --git a/xen/arch/x86

[RFCv2 10/38] x86/boot: generalize paging pages calculation

2025-05-15 Thread Daniel P. Smith
-off-by: Daniel P. Smith --- xen/arch/x86/dom0_build.c | 17 + xen/arch/x86/domain-builder/domain.c | 20 xen/arch/x86/hvm/dom0_build.c | 3 ++- xen/arch/x86/include/asm/dom0_build.h | 3 --- xen/arch/x86/include/asm/domain

[RFCv2 07/38] x86/hyperlaunch: move initial hwdom setup to dom_construct_pvh

2025-05-15 Thread Daniel P. Smith
Relocate the initial block of hwdom setup code from dom0_construct_pvh() over to dom_construct_pvh(). No functional change. Signed-off-by: Daniel P. Smith --- xen/arch/x86/hvm/dom0_build.c | 44 -- xen/arch/x86/hvm/dom_build.c | 50

[RFCv2 19/38] x86/hyperlaunch: move populating p2m under domain builder

2025-05-15 Thread Daniel P. Smith
Introduce hvm_populate_p2m() for populating domU p2m maps. Rename pvh_populate_p2m() to dom0_pvh_populate_p2m() and export it. With these adjustments, move the calls to populate the p2m maps under domain builder. Signed-off-by: Daniel P. Smith --- xen/arch/x86/hvm/dom0_build.c | 14

[RFCv2 12/38] x86/hyperlaunch: move page computation to domain builder

2025-05-15 Thread Daniel P. Smith
The function dom_compute_nr_pages() is being moved to the domain builder. For this to happen, the variable dom0_nodes, and the functions calculate_dom0_pages() and dom0_pv_restrict_pages() must be exported. Signed-off-by: Daniel P. Smith --- xen/arch/x86/dom0_build.c | 75

[RFCv2 14/38] x86/hyperlaunch: move iommu init to domain builder

2025-05-15 Thread Daniel P. Smith
Move invocation of iommu_hwdom_init() to dom_construct_pvh() and guard it with a hardware domain check. Signed-off-by: Daniel P. Smith --- xen/arch/x86/hvm/dom0_build.c | 2 -- xen/arch/x86/hvm/dom_build.c | 4 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86

[RFCv2 08/38] x86/boot: convert dom0 page calculation to use boot domain

2025-05-15 Thread Daniel P. Smith
clamping of memory pages to the min/max pages value. Signed-off-by: Daniel P. Smith --- xen/arch/x86/dom0_build.c | 62 --- xen/arch/x86/hvm/dom0_build.c | 12 +++--- xen/arch/x86/include/asm/dom0_build.h | 10 ++--- xen/arch/x86/pv/dom0_build.c

[RFCv2 11/38] x86/boot: generalize compute number of domain pages

2025-05-15 Thread Daniel P. Smith
the domain has the control domain or hardware domain capability flag set. In doing so, also rename the function to dom_compute_nr_pages(). Signed-off-by: Daniel P. Smith --- xen/arch/x86/dom0_build.c | 16 +--- xen/arch/x86/hvm/dom0_build.c | 2 +- xen/arch/x86

[RFCv2 06/38] x86/hyperlaunch: introduce pvh domain builder

2025-05-15 Thread Daniel P. Smith
Introduce dom_construct_pvh() as a wrapper around dom0_construct_pvh(). This function will be expanded as dom0 specific construction functions are generalized. Signed-off-by: Daniel P. Smith --- xen/arch/x86/dom0_build.c | 5 ++-- xen/arch/x86/hvm/Makefile | 1

[RFCv2 13/38] x86/hyperlaunch: move pvh p2m init to domain builder

2025-05-15 Thread Daniel P. Smith
Generalize pvh_init_p2m() for use on domU and relocate under the domain builder. To support moving the function, dom0_pvh_setup_e820() was exported. Signed-off-by: Daniel P. Smith --- xen/arch/x86/hvm/dom0_build.c | 23 +-- xen/arch/x86/hvm/dom_build.c | 25

[RFCv2 05/38] x86/hyperlaunch: move dom0 cpuid policy behind capability check

2025-05-15 Thread Daniel P. Smith
To incrementally convert create_dom0() into being a generalized domain construction function, move the dom0 specific cpuid policy behind the control domain capability. Signed-off-by: Daniel P. Smith --- xen/arch/x86/setup.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a

[RFCv2 03/38] x86/hyperlaunch: convert max vcpu determination to domain builder

2025-05-15 Thread Daniel P. Smith
lesser of the requested max and the available vcpus. Signed-off-by: Daniel P. Smith --- xen/arch/x86/Makefile| 1 + xen/arch/x86/domain-builder/Makefile | 1 + xen/arch/x86/domain-builder/domain.c | 40 xen/arch/x86/setup.c | 4

[RFCv2 00/38] Hyperlaunch domain builder

2025-05-15 Thread Daniel P. Smith
Hyperlaunch: https://wiki.xenproject.org/wiki/Hyperlaunch Original Hyperlaunch v1 patch series: https://lists.xenproject.org/archives/html/xen-devel/2022-07/msg00345.html V/r, Daniel P. Smith Daniel P. Smith (38): maintainers: add new section for hyperlaunch x86/hyperlaunch: correct the naming of

[RFCv2 01/38] maintainers: add new section for hyperlaunch

2025-05-15 Thread Daniel P. Smith
Add new section to MAINTAINERS for hyperlaunch, including the files specifically added to this point under the hyperlaunch work. Signed-off-by: Daniel P. Smith --- MAINTAINERS | 11 +++ 1 file changed, 11 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index c11b82eca98f

Re: [PATCH v6 02/12] common/hyperlaunch: introduce the domain builder

2025-05-15 Thread Daniel P. Smith
On 5/2/25 03:21, Jan Beulich wrote: On 30.04.2025 20:56, Daniel P. Smith wrote: On 4/29/25 08:36, Alejandro Vallejo wrote: --- a/xen/common/Makefile +++ b/xen/common/Makefile @@ -11,6 +11,7 @@ obj-$(filter-out $(CONFIG_X86),$(CONFIG_ACPI)) += device.o obj-$(CONFIG_HAS_DEVICE_TREE) += device

Re: [PATCH v6 02/12] common/hyperlaunch: introduce the domain builder

2025-05-13 Thread Daniel P. Smith
On 5/13/25 04:05, Jan Beulich wrote: On 06.05.2025 21:29, Daniel P. Smith wrote: On 5/2/25 03:21, Jan Beulich wrote: On 30.04.2025 20:56, Daniel P. Smith wrote: On 4/29/25 08:36, Alejandro Vallejo wrote: --- a/xen/common/Makefile +++ b/xen/common/Makefile @@ -11,6 +11,7 @@ obj-$(filter-out

Re: [PATCH v6 02/12] common/hyperlaunch: introduce the domain builder

2025-05-06 Thread Daniel P. Smith
On 5/2/25 03:21, Jan Beulich wrote: On 30.04.2025 20:56, Daniel P. Smith wrote: On 4/29/25 08:36, Alejandro Vallejo wrote: --- a/xen/common/Makefile +++ b/xen/common/Makefile @@ -11,6 +11,7 @@ obj-$(filter-out $(CONFIG_X86),$(CONFIG_ACPI)) += device.o obj-$(CONFIG_HAS_DEVICE_TREE) += device

Re: [PATCH v6 02/12] common/hyperlaunch: introduce the domain builder

2025-04-30 Thread Daniel P. Smith
On 4/29/25 08:36, Alejandro Vallejo wrote: From: "Daniel P. Smith" Introduce the domain builder which is capable of consuming a device tree as the first boot module. If it finds a device tree as the first boot module, it will set its type to BOOTMOD_FDT. This change only detect

Re: [RFC 33/38] x86/boot: refactor bzimage parser to be re-enterant

2025-04-25 Thread Daniel P. Smith
On 4/23/25 15:27, Jason Andryuk wrote: On 2025-04-19 18:08, Daniel P. Smith wrote: The bzimage logic uses the unit global orig_image_len to hold the original module length for the kernel when the headroom is calculated. It then uses orig_image_len to locate the start of the bzimage when the

Re: [PATCH v5 05/12] x86/hyperlaunch: locate dom0 kernel with hyperlaunch

2025-04-25 Thread Daniel P. Smith
On 4/24/25 12:10, Alejandro Vallejo wrote: From: "Daniel P. Smith" Look for a subnode of type `multiboot,kernel` within a domain node. If found, locate it using the multiboot module helper to generically ensure it lives in the module list. If the bootargs property is present and the

Re: [RFC 33/38] x86/boot: refactor bzimage parser to be re-enterant

2025-04-25 Thread Daniel P. Smith
On 4/23/25 15:27, Jason Andryuk wrote: On 2025-04-19 18:08, Daniel P. Smith wrote: The bzimage logic uses the unit global orig_image_len to hold the original module length for the kernel when the headroom is calculated. It then uses orig_image_len to locate the start of the bzimage when the

Re: [RFC 32/38] x86/hyperlaunch: introduce concept of core domains

2025-04-25 Thread Daniel P. Smith
On 4/23/25 15:50, Jason Andryuk wrote: On 2025-04-19 18:08, Daniel P. Smith wrote: When constructing domU, and specifically the event channels for their console and xenstore event channels, the domid for the backing domain must be known. Therefore, the control, hardware, and xenstore domains

Re: [RFC 16/38] x86/boot: move and rename sched_setup_dom0_vcpus

2025-04-25 Thread Daniel P. Smith
On 4/20/25 05:36, Jürgen Groß wrote: On 20.04.25 00:07, Daniel P. Smith wrote: Relocated the function sched_setup_dom0_vcpus(), which was protected by an ifdef CONFIG_X86, from common/sched to the hyperlaunch domain builder. Rename it to alloc_dom_vcpus() to better reflect the purpose of the

Re: [RFC 04/38] x86/hyperlaunch: convert vcpu0 creation to domain builder

2025-04-25 Thread Daniel P. Smith
On 4/25/25 11:22, Alejandro Vallejo wrote: On Sat Apr 19, 2025 at 11:07 PM BST, Daniel P. Smith wrote: Convert alloc_dom0_vcpu0() to dom0_set_affinity(), making it only set up the node affinity based on command line parameters passed. At the same time, introduce alloc_dom_vcpu0() as the

Re: [RFC 03/38] x86/hyperlaunch: convert max vcpu determination to domain builder

2025-04-25 Thread Daniel P. Smith
On 4/22/25 16:36, Jason Andryuk wrote: On 2025-04-19 18:07, Daniel P. Smith wrote: The domain configuration may request more vcpus than are present in the system. For dom0, the function dom0_max_vcpus() was used to clamp down to physically available vcpus. Here we are introducing a

Re: [PATCH 00/21] x86: Trenchboot Secure Launch DRTM (Xen)

2025-04-23 Thread Daniel P. Smith
Ross Phillipson as a reviewer. V/r, Daniel P. Smith

Re: [PATCH RESEND] x86/EFI: correct mkreloc header (field) reading

2025-04-22 Thread Daniel P. Smith
Pau Monné Signed-off-by: Jan Beulich --- Acked-by: Daniel P. Smith

Re: [RFC 16/38] x86/boot: move and rename sched_setup_dom0_vcpus

2025-04-22 Thread Daniel P. Smith
On 4/20/25 05:36, Jürgen Groß wrote: On 20.04.25 00:07, Daniel P. Smith wrote: Relocated the function sched_setup_dom0_vcpus(), which was protected by an ifdef CONFIG_X86, from common/sched to the hyperlaunch domain builder. Rename it to alloc_dom_vcpus() to better reflect the purpose of

[RFC 33/38] x86/boot: refactor bzimage parser to be re-enterant

2025-04-19 Thread Daniel P. Smith
the bzimage after the allocated headroom. The bzimage functions are reworked as such, allowing the removal of orig_image_len and enabling them to be reused by multiple kernel boot modules. Signed-off-by: Daniel P. Smith --- xen/arch/x86/bzimage.c | 38

[RFC 05/38] x86/hyperlaunch: move dom0 cpuid policy behind capability check

2025-04-19 Thread Daniel P. Smith
To incrementally convert create_dom0() into being a generalized domain construction function, move the dom0 specific cpuid policy behind the control domain capability. Signed-off-by: Daniel P. Smith --- xen/arch/x86/setup.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a

[RFC 27/38] x86/hyperlaunch: introduce domain builder general dom creation

2025-04-19 Thread Daniel P. Smith
Introduce the builder_create_domains() function that provides the domain construciton abstraction for the hyperlaunch domain builder. Signed-off-by: Daniel P. Smith --- xen/arch/x86/domain-builder/core.c| 17 +++ xen/arch/x86/include/asm/bootinfo.h | 26

[RFC 21/38] x86/hyperlaunch: move remaining pvh dom0 construction

2025-04-19 Thread Daniel P. Smith
Move pvh_load_kernel() and its helper functions to the domain builder. With this move, it is now possible to move the remaining logic of dom0_construct_pvh() to the domain builder. With all the logic moved, the function can be dropped. Signed-off-by: Daniel P. Smith --- xen/arch/x86/hvm

[RFC 32/38] x86/hyperlaunch: introduce concept of core domains

2025-04-19 Thread Daniel P. Smith
. This commit introduces the build_core_domains() function that will ensure the core domains are constructed first. Signed-off-by: Daniel P. Smith --- xen/arch/x86/domain-builder/core.c | 68 -- xen/arch/x86/include/asm/boot-domain.h | 2 + 2 files changed, 66 insertions

[RFC 19/38] x86/hyperlaunch: add domu memory map construction

2025-04-19 Thread Daniel P. Smith
dom0 or a domU. Signed-off-by: Daniel P. Smith --- xen/arch/x86/hvm/dom_build.c | 149 ++- 1 file changed, 148 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/hvm/dom_build.c b/xen/arch/x86/hvm/dom_build.c index 078e42447b0a..658d3d170e64 100644 --- a/xen

[RFC 37/38] x86/hyperlaunch: generalize domid assignment

2025-04-19 Thread Daniel P. Smith
Signed-off-by: Daniel P. Smith --- xen/arch/x86/domain-builder/fdt.c | 29 +++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/domain-builder/fdt.c b/xen/arch/x86/domain-builder/fdt.c index 9c6c0ae09a24..543a0c92adb4 100644 --- a/xen/arch

[RFC 15/38] x86/hyperlaunch: move iommu init to domain builder

2025-04-19 Thread Daniel P. Smith
Move invocation of iommu_hwdom_init() to dom_construct_pvh() and guard it with a hardware domain check. Signed-off-by: Daniel P. Smith --- xen/arch/x86/hvm/dom0_build.c | 2 -- xen/arch/x86/hvm/dom_build.c | 4 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86

[RFC 14/38] x86/hyperlaunch: move pvh p2m init to domain builder

2025-04-19 Thread Daniel P. Smith
Generalize pvh_init_p2m() for use on domU and relocate under the domain builder. To support moving the function, dom0_pvh_setup_e820() was exported. Signed-off-by: Daniel P. Smith --- xen/arch/x86/hvm/dom0_build.c | 23 +-- xen/arch/x86/hvm/dom_build.c | 25

[RFC 35/38] x86/hyperlaunch: add multidomain construction logic

2025-04-19 Thread Daniel P. Smith
Introduce the logic to loop over boot_info->domains and construct each valid entry in the array. Signed-off-by: Daniel P. Smith --- xen/arch/x86/domain-builder/core.c | 32 xen/arch/x86/domain-builder/domain.c | 7 -- xen/arch/x86/hvm/dom_build.c |

[RFC 20/38] x86/hyperlaunch: move populating p2m under domain builder

2025-04-19 Thread Daniel P. Smith
Introduce hvm_populate_p2m() for populating domU p2m maps. Rename pvh_populate_p2m() to dom0_pvh_populate_p2m() and export it. With these adjustments, move the calls to populate the p2m maps under domain builder. Signed-off-by: Daniel P. Smith --- xen/arch/x86/hvm/dom0_build.c | 14

[RFC 16/38] x86/boot: move and rename sched_setup_dom0_vcpus

2025-04-19 Thread Daniel P. Smith
Relocated the function sched_setup_dom0_vcpus(), which was protected by an ifdef CONFIG_X86, from common/sched to the hyperlaunch domain builder. Rename it to alloc_dom_vcpus() to better reflect the purpose of the function. Signed-off-by: Daniel P. Smith --- xen/arch/x86/domain-builder/domain.c

[RFC 18/38] x86/boot: rename pvh acpi setup function

2025-04-19 Thread Daniel P. Smith
The function pvh_setup_acpi() is dom0 specific, renaming it to dom0_pvh_setup_acpi(). Now export the function so that it may be called by the domain builder. Signed-off-by: Daniel P. Smith --- xen/arch/x86/hvm/dom0_build.c | 4 ++-- xen/arch/x86/include/asm/dom0_build.h | 2 ++ 2 files

[RFC 36/38] x86/hyperlaunch: enable unpausing mulitple domains

2025-04-19 Thread Daniel P. Smith
This commit enables the domain builder to unpause all domains that have been flagged to start on boot. Signed-off-by: Daniel P. Smith --- xen/arch/x86/domain-builder/core.c| 20 xen/arch/x86/include/asm/boot-domain.h| 8 +--- xen/arch/x86/include/asm/domain

[RFC 17/38] x86/hyperlaunch: move pvh_setup_cpus to domain builder

2025-04-19 Thread Daniel P. Smith
The function pvh_setup_cpus() is a very general function that is usable by all HVM domains, not just PVH. As such, renaming to hvm_setup_cpus during move. Signed-off-by: Daniel P. Smith --- xen/arch/x86/hvm/dom0_build.c | 45 +-- xen/arch/x86/hvm/dom_build.c

[RFC 30/38] x86/hyperlaunch: allocate xenstore for domu

2025-04-19 Thread Daniel P. Smith
the domain can be announced to Xenstore. Signed-off-by: Daniel P. Smith --- xen/arch/x86/domain-builder/domain.c | 38 -- xen/arch/x86/hvm/dom_build.c | 32 ++ xen/arch/x86/include/asm/boot-domain.h | 2 +- 3 files changed, 69 insertions

[RFC 23/38] x86/hyperlaunch: add domu acpi construction

2025-04-19 Thread Daniel P. Smith
Introduce hvm_setup_acpi() that will construct an APCI table for a general HVM domU guest. Signed-off-by: Daniel P. Smith --- xen/arch/x86/hvm/dom_build.c | 213 ++- 1 file changed, 212 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/hvm/dom_build.c b/xen

[RFC 22/38] x86/hyperlaunch: relocate pvh_steal_ram to domain builder

2025-04-19 Thread Daniel P. Smith
The function pvh_steal_ram() is not pvh specific and can be used on any HVM domain. Move to the domain builder and rename to hvm_steal_ram. Signed-off-by: Daniel P. Smith --- xen/arch/x86/hvm/dom0_build.c | 106 +++--- xen/arch/x86/hvm/dom_build.c | 84

[RFC 26/38] x86/hyperlaunch: remove dom0-isms from arch_create_dom

2025-04-19 Thread Daniel P. Smith
Removes the dom0 naming from variables and isolates control/hardware domain specific logic behind capabilities check. Signed-off-by: Daniel P. Smith --- xen/arch/x86/domain-builder/domain.c | 47 +++- 1 file changed, 26 insertions(+), 21 deletions(-) diff --git a/xen

[RFC 25/38] x86/hyperlaunch: convert create_dom0 to arch_create_dom

2025-04-19 Thread Daniel P. Smith
create_dom0(), rename it to arch_create_dom() as the function is now generalized. Signed-off-by: Daniel P. Smith --- xen/arch/x86/domain-builder/Makefile | 2 +- xen/arch/x86/domain-builder/domain.c | 172 ++ xen/arch/x86/include/asm/domain-builder.h | 3 + xen

[RFC 38/38] tools: introduce hyperlaunch domain late init

2025-04-19 Thread Daniel P. Smith
The late domain init helper is a helper tool for late setup of Xenstore for a domain that was created by the hypervisor using hyperlaunch. Signed-off-by: Daniel P. Smith --- .gitignore| 1 + tools/helpers/Makefile| 12 + tools/helpers/late-init-domains.c

[RFC 29/38] x86/hyperlaunch: allocate console for domu

2025-04-19 Thread Daniel P. Smith
they may be published in Xenstore once it is online. Signed-off-by: Daniel P. Smith --- xen/arch/x86/domain-builder/domain.c | 56 ++ xen/arch/x86/hvm/dom_build.c | 34 xen/arch/x86/include/asm/boot-domain.h | 7 3 files changed, 97

[RFC 24/38] x86/boot: export command line processing

2025-04-19 Thread Daniel P. Smith
Export the function cmdline_cook() so that it can be called outside of setup.c. Signed-off-by: Daniel P. Smith --- xen/arch/x86/include/asm/setup.h | 2 ++ xen/arch/x86/setup.c | 4 +--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/xen/arch/x86/include/asm/setup.h

[RFC 10/38] x86/boot: refactor dom0 page calculation

2025-04-19 Thread Daniel P. Smith
. To prepare for generalizing domain page allocation, isolate this logic to a separate handling function. Signed-off-by: Daniel P. Smith --- xen/arch/x86/dom0_build.c | 76 +-- 1 file changed, 41 insertions(+), 35 deletions(-) diff --git a/xen/arch/x86

[RFC 28/38] x86/hyperlaunch: add xenstore boot capabilities flag

2025-04-19 Thread Daniel P. Smith
Add the ability to designate a domain as the Xenstore domain via the hyperlaunch configuration. Signed-off-by: Daniel P. Smith --- xen/arch/x86/domain-builder/core.c | 2 +- xen/arch/x86/domain-builder/domain.c | 2 ++ xen/arch/x86/domain-builder/fdt.c | 2 ++ xen/arch/x86/include

[RFC 31/38] x86/hyperlaunch: move boot module discard to domain builder

2025-04-19 Thread Daniel P. Smith
Relocate the call to discard boot modules from inside the domain construction logic to the top level domain builder. This will ensure modules are not discarded until after all domains have been constructed. Signed-off-by: Daniel P. Smith --- xen/arch/x86/domain-builder/core.c | 5 - xen

[RFC 34/38] x86/hyperlaunch: introduce multidomain kconfig option

2025-04-19 Thread Daniel P. Smith
This adds the MULTIDOMAIN_BUILDER kconfig option that will be used to enable the domain construction path to be called multiple times. With the idea of being able to construct multiple domains now introduced, rename construct_dom0() to construct_dom(). Signed-off-by: Daniel P. Smith --- xen

[RFC 12/38] x86/boot: generalize compute number of domain pages

2025-04-19 Thread Daniel P. Smith
the domain has the control domain or hardware domain capability flag set. In doing so, also rename the function to dom_compute_nr_pages(). Signed-off-by: Daniel P. Smith --- xen/arch/x86/dom0_build.c | 16 +--- xen/arch/x86/hvm/dom0_build.c | 2 +- xen/arch/x86

[RFC 13/38] x86/hyperlaunch: move page computation to domain builder

2025-04-19 Thread Daniel P. Smith
The function dom_compute_nr_pages() is being moved to the domain builder. For this to happen, the variable dom0_nodes, and the functions calculate_dom0_pages() and dom0_pv_restrict_pages() must be exported. Signed-off-by: Daniel P. Smith --- xen/arch/x86/dom0_build.c | 75

  1   2   3   4   5   6   7   8   9   10   >