Re: Proposal to Extend Feature Freeze Deadline

2024-05-14 Thread Henry Wang
Hi Oleksii, On 5/14/2024 11:43 PM, Andrew Cooper wrote: On 14/05/2024 4:40 pm, Oleksii K. wrote: Hello everyone, We're observing fewer merged patches/series across several architectures for the current 4.19 release in comparison to previous release. For example: 1. For Arm, significant

[PATCH] drivers/xen: Improve the late XenStore init protocol

2024-05-14 Thread Henry Wang
, and return error early if the memremap() fails. Signed-off-by: Henry Wang Signed-off-by: Michal Orzel --- drivers/xen/xenbus/xenbus_probe.c | 21 - 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/drivers/xen/xenbus/xenbus_probe.c b/drivers/xen/xenbus

Re: [PATCH v2 1/4] xen/arm: Alloc hypervisor reserved pages as magic pages for Dom0less DomUs

2024-05-12 Thread Henry Wang
Hi Julien, On 5/11/2024 7:03 PM, Julien Grall wrote: Hi Henry, On 11/05/2024 01:56, Henry Wang wrote:   +static int __init alloc_magic_pages(struct domain *d) +{ +    struct page_info *magic_pg; +    mfn_t mfn; +    gfn_t gfn; +    int rc; + +    d->max_pages += NR_MAGIC_PAGES; +    magic

Re: [PATCH v2 1/4] xen/arm: Alloc hypervisor reserved pages as magic pages for Dom0less DomUs

2024-05-11 Thread Henry Wang
Hi Julien, On 5/11/2024 4:46 PM, Julien Grall wrote: Hi Henry, On 11/05/2024 01:56, Henry Wang wrote: There are use cases (for example using the PV driver) in Dom0less setup that require Dom0less DomUs start immediately with Dom0, but initialize XenStore later after Dom0's successful boot

Re: [PATCH 02/15] xen/arm/gic: Enable interrupt assignment to running VM

2024-05-11 Thread Henry Wang
Hi Julien, On 5/11/2024 4:22 PM, Julien Grall wrote: Hi Henry, On 11/05/2024 08:29, Henry Wang wrote: +    /* + * Handle the LR where the physical interrupt is de-assigned from the + * guest before it was EOIed + */ +    struct vcpu *v_target

Re: [PATCH 02/15] xen/arm/gic: Enable interrupt assignment to running VM

2024-05-11 Thread Henry Wang
Hi Julien, On 5/10/2024 4:54 PM, Julien Grall wrote: Hi, On 09/05/2024 16:31, Henry Wang wrote: On 5/9/2024 4:46 AM, Julien Grall wrote: Hi Henry, [...] ``` diff --git a/xen/arch/arm/gic.c b/xen/arch/arm/gic.c index a775f886ed..d3f9cd2299 100644 --- a/xen/arch/arm/gic.c +++ b/xen/arch/arm

[PATCH v2 0/4] Guest magic region allocation for 11 Dom0less domUs - Take two

2024-05-10 Thread Henry Wang
ct/people/henryw/xen/-/pipelines/1285727622 Henry Wang (4): xen/arm: Alloc hypervisor reserved pages as magic pages for Dom0less DomUs xen/arm: Add new HVM_PARAM_HV_RSRV_{BASE_PFN,SIZE} keys in HVMOP tools/init-dom0less: Avoid hardcoding GUEST_MAGIC_BASE docs/features/dom0less: Update th

[PATCH v2 4/4] docs/features/dom0less: Update the late XenStore init protocol

2024-05-10 Thread Henry Wang
With the new allocation strategy of Dom0less DomUs magic page region, update the documentation of the late XenStore init protocol accordingly. Signed-off-by: Henry Wang --- v2: - New patch. --- docs/features/dom0less.pandoc | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff

[PATCH v2 2/4] xen/arm: Add new HVM_PARAM_HV_RSRV_{BASE_PFN,SIZE} keys in HVMOP

2024-05-10 Thread Henry Wang
h64__)". The values will be set at Dom0less DomU construction time after Dom0less DomU's magic pages region has been allocated. Reported-by: Alec Kwapis Signed-off-by: Henry Wang --- v2: - Rename the HVMOP keys to HVM_PARAM_HV_RSRV_{BASE_PFN,SIZE}. (Daniel) - Add comment on top of HVM_PARA

[PATCH v2 3/4] tools/init-dom0less: Avoid hardcoding GUEST_MAGIC_BASE

2024-05-10 Thread Henry Wang
possible. Reported-by: Alec Kwapis Signed-off-by: Henry Wang --- v2: - Update HVMOP keys name. --- tools/helpers/init-dom0less.c | 40 +++ 1 file changed, 17 insertions(+), 23 deletions(-) diff --git a/tools/helpers/init-dom0less.c b/tools/helpers/init

[PATCH v2 1/4] xen/arm: Alloc hypervisor reserved pages as magic pages for Dom0less DomUs

2024-05-10 Thread Henry Wang
es) for Arm Dom0less DomUs at the domain construction time. The base address/PFN of the region will be noted and communicated to the init-dom0less application in Dom0. Reported-by: Alec Kwapis Suggested-by: Daniel P. Smith Signed-off-by: Henry Wang --- v2: - Reword the commit msg to explain what is

Re: [PATCH 1/3] xen/arm/dom0less-build: Alloc magic pages for Dom0less DomUs from hypervisor

2024-05-10 Thread Henry Wang
Hi Michal, Thanks very much for taking a look! On 5/10/2024 3:37 PM, Michal Orzel wrote: Hi Henry, On 26/04/2024 05:14, Henry Wang wrote: There are use cases (for example using the PV driver) in Dom0less setup that require Dom0less DomUs start immediately with Dom0, but initialize XenStore

Re: [PATCH 02/15] xen/arm/gic: Enable interrupt assignment to running VM

2024-05-09 Thread Henry Wang
Hi Julien, On 5/9/2024 4:46 AM, Julien Grall wrote: Hi Henry, [...] we have 3 possible states which can be read from LR for this case : active, pending, pending and active. - I don't think we can do anything about the active state, so we should return -EBUSY and reject the whole operation of

Re: [PATCH 02/15] xen/arm/gic: Enable interrupt assignment to running VM

2024-05-08 Thread Henry Wang
Hi Julien, On 5/8/2024 5:54 AM, Julien Grall wrote: Hi Henry, What if the DT overlay is unloaded and then reloaded? Wouldn't the same interrupt be re-used? As a more generic case, this could also be a new bitstream for the FPGA. But even if the interrupt is brand new every time for the DT

Re: [PATCH 05/15] tools/libs/light: Increase nr_spi to 160

2024-05-07 Thread Henry Wang
Hi Julien, On 5/7/2024 10:35 PM, Julien Grall wrote: Hi, On 06/05/2024 06:17, Henry Wang wrote: On 5/1/2024 9:58 PM, Anthony PERARD wrote: On Wed, Apr 24, 2024 at 11:34:39AM +0800, Henry Wang wrote: Increase number of spi to 160 i.e. gic_number_lines() for Xilinx ZynqMP - 32. This was done

[PATCH v2 0/2] Some fixes for the existing dynamic dtbo code

2024-05-07 Thread Henry Wang
these fixes for now. [1] https://lore.kernel.org/xen-devel/835099c8-6cf0-4f6d-899b-07388df89...@xen.org/ [2] https://lore.kernel.org/xen-devel/eaea1986-a27e-4d6c-932f-1d0a9918861f@perard/ Henry Wang (2): xen/common/dt-overlay: Fix missing lock when remove the device tools/xl: Correct

[PATCH v2 2/2] tools/xl: Correct the help information and exit code of the dt-overlay command

2024-05-07 Thread Henry Wang
ice tree overlay support") Suggested-by: Anthony PERARD Signed-off-by: Henry Wang --- v2: - New patch --- tools/xl/xl_vmcontrol.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/xl/xl_vmcontrol.c b/tools/xl/xl_vmcontrol.c index 98f6bd2e76..02575d5d36 100644

[PATCH v2 1/2] xen/common/dt-overlay: Fix missing lock when remove the device

2024-05-07 Thread Henry Wang
the DT node will not disappear behind back. So fix the issue by taking the lock as soon as getting hold of overlay_node. Fixes: 7e5c4a8b86f1 ("xen/arm: Implement device tree node removal functionalities") Signed-off-by: Henry Wang --- v2: - Take the lock as soon as getting hold of

Re: [PATCH 02/15] xen/arm/gic: Enable interrupt assignment to running VM

2024-05-06 Thread Henry Wang
Hi Julien, On 5/1/2024 4:13 AM, Julien Grall wrote: Hi Henry, On 30/04/2024 04:50, Henry Wang wrote: On 4/25/2024 10:28 PM, Julien Grall wrote: Thanks for your feeedback. After checking the b8577547236f commit message I think I now understand your point. Do you have any suggestion about how

Re: [PATCH 08/15] tools: Add domain_id and expert mode for overlay operations

2024-05-05 Thread Henry Wang
Hi Anthony, On 5/1/2024 10:46 PM, Anthony PERARD wrote: On Wed, Apr 24, 2024 at 11:34:42AM +0800, Henry Wang wrote: From: Vikram Garhwal Add domain_id and expert mode for overlay assignment. This enables dynamic programming of nodes during runtime. Take the opportunity to fix the name

Re: [PATCH 09/15] tools/libs/light: Modify dtbo to domU linux dtbo format

2024-05-05 Thread Henry Wang
Hi Anthony, On 5/1/2024 11:09 PM, Anthony PERARD wrote: On Wed, Apr 24, 2024 at 11:34:43AM +0800, Henry Wang wrote: diff --git a/tools/libs/light/libxl_dt_overlay.c b/tools/libs/light/libxl_dt_overlay.c index cdb62b28cf..eaf11a0f9c 100644 --- a/tools/libs/light/libxl_dt_overlay.c +++ b/tools

Re: [PATCH 07/15] xen/overlay: Enable device tree overlay assignment to running domains

2024-05-05 Thread Henry Wang
Hi Julien, On 4/30/2024 5:47 PM, Julien Grall wrote: On 30/04/2024 05:00, Henry Wang wrote: Hi Julien, Hi Henry, On 4/30/2024 1:34 AM, Julien Grall wrote: On 29/04/2024 04:36, Henry Wang wrote: Hi Jan, Julien, Stefano, Hi Henry, On 4/24/2024 2:05 PM, Jan Beulich wrote: On 24.04.2024

Re: [PATCH 05/15] tools/libs/light: Increase nr_spi to 160

2024-05-05 Thread Henry Wang
Hi Anthony, (+Arm maintainers) On 5/1/2024 9:58 PM, Anthony PERARD wrote: On Wed, Apr 24, 2024 at 11:34:39AM +0800, Henry Wang wrote: Increase number of spi to 160 i.e. gic_number_lines() for Xilinx ZynqMP - 32. This was done to allocate and assign IRQs to a running domain. Signed-off

Re: [PATCH 04/15] tools/libs/light: Always enable IOMMU

2024-05-05 Thread Henry Wang
Hi Anthony, On 5/1/2024 9:47 PM, Anthony PERARD wrote: On Wed, Apr 24, 2024 at 11:34:38AM +0800, Henry Wang wrote: For overlay with iommu functionality to work with running VMs, we need to enable IOMMU when iomem presents for the domains. Signed-off-by: Vikram Garhwal Signed-off-by: Henry

Re: [PATCH 07/15] xen/overlay: Enable device tree overlay assignment to running domains

2024-05-05 Thread Henry Wang
Hi Stefano, Julien, On 5/3/2024 2:02 AM, Stefano Stabellini wrote: On Tue, 30 Apr 2024, Henry Wang wrote: Hi Julien, On 4/30/2024 1:34 AM, Julien Grall wrote: On 29/04/2024 04:36, Henry Wang wrote: Hi Jan, Julien, Stefano, Hi Henry, On 4/24/2024 2:05 PM, Jan Beulich wrote: On 24.04.2024

Re: [PATCH 1/3] xen/arm/dom0less-build: Alloc magic pages for Dom0less DomUs from hypervisor

2024-05-05 Thread Henry Wang
Hi Daniel, On 4/30/2024 6:22 PM, Daniel P. Smith wrote: On 4/29/24 22:55, Henry Wang wrote: Hi Daniel, On 4/30/2024 8:27 AM, Daniel P. Smith wrote: On 4/25/24 23:14, Henry Wang wrote: There are use cases (for example using the PV driver) in Dom0less setup that require Dom0less DomUs start

Re: [PATCH v1.1] xen/commom/dt-overlay: Fix missing lock when remove the device

2024-05-05 Thread Henry Wang
Hi Julien, On 5/3/2024 9:04 PM, Julien Grall wrote: Hi Henry, On 26/04/2024 02:55, Henry Wang wrote: If CONFIG_DEBUG=y, below assertion will be triggered: (XEN) Assertion 'rw_is_locked(_host_lock)' failed at drivers/passthrough/device_tree.c:146 (XEN) [ Xen-4.19-unstable  arm64  debug=y

Re: [PATCH 2/3] xen/arm, tools: Add a new HVM_PARAM_MAGIC_BASE_PFN key in HVMOP

2024-05-05 Thread Henry Wang
Hi Stefano, On 5/3/2024 2:08 AM, Stefano Stabellini wrote: On Fri, 26 Apr 2024, Henry Wang wrote: For use cases such as Dom0less PV drivers, a mechanism to communicate Dom0less DomU's static data with the runtime control plane (Dom0) is needed. Since on Arm HVMOP is already the existing

Re: [PATCH 2/3] xen/arm, tools: Add a new HVM_PARAM_MAGIC_BASE_PFN key in HVMOP

2024-04-30 Thread Henry Wang
Hi Jan, On 4/30/2024 2:11 PM, Jan Beulich wrote: On 30.04.2024 04:51, Henry Wang wrote: On 4/30/2024 8:31 AM, Daniel P. Smith wrote: On 4/26/24 02:21, Jan Beulich wrote: On 26.04.2024 05:14, Henry Wang wrote: --- a/xen/include/public/hvm/params.h +++ b/xen/include/public/hvm/params.h

Re: [PATCH 07/15] xen/overlay: Enable device tree overlay assignment to running domains

2024-04-29 Thread Henry Wang
Hi Julien, On 4/30/2024 1:34 AM, Julien Grall wrote: On 29/04/2024 04:36, Henry Wang wrote: Hi Jan, Julien, Stefano, Hi Henry, On 4/24/2024 2:05 PM, Jan Beulich wrote: On 24.04.2024 05:34, Henry Wang wrote: --- a/xen/include/public/sysctl.h +++ b/xen/include/public/sysctl.h @@ -1197,7

Re: [PATCH 02/15] xen/arm/gic: Enable interrupt assignment to running VM

2024-04-29 Thread Henry Wang
Hi Julien, Sorry for the late reply, On 4/25/2024 10:28 PM, Julien Grall wrote: Hi, On 25/04/2024 08:06, Henry Wang wrote: Hi Julien, On 4/24/2024 8:58 PM, Julien Grall wrote: Hi Henry, On 24/04/2024 04:34, Henry Wang wrote: From: Vikram Garhwal Enable interrupt assign/remove

Re: [PATCH 1/3] xen/arm/dom0less-build: Alloc magic pages for Dom0less DomUs from hypervisor

2024-04-29 Thread Henry Wang
Hi Daniel, On 4/30/2024 8:27 AM, Daniel P. Smith wrote: On 4/25/24 23:14, Henry Wang wrote: There are use cases (for example using the PV driver) in Dom0less setup that require Dom0less DomUs start immediately with Dom0, but initialize XenStore later after Dom0's successful boot and call

Re: [PATCH 2/3] xen/arm, tools: Add a new HVM_PARAM_MAGIC_BASE_PFN key in HVMOP

2024-04-29 Thread Henry Wang
Hi Daniel, On 4/30/2024 8:31 AM, Daniel P. Smith wrote: On 4/26/24 02:21, Jan Beulich wrote: On 26.04.2024 05:14, Henry Wang wrote: --- a/xen/include/public/hvm/params.h +++ b/xen/include/public/hvm/params.h @@ -76,6 +76,7 @@    */   #define HVM_PARAM_STORE_PFN    1   #define

Re: [PATCH 07/15] xen/overlay: Enable device tree overlay assignment to running domains

2024-04-28 Thread Henry Wang
Hi Jan, Julien, Stefano, On 4/24/2024 2:05 PM, Jan Beulich wrote: On 24.04.2024 05:34, Henry Wang wrote: --- a/xen/include/public/sysctl.h +++ b/xen/include/public/sysctl.h @@ -1197,7 +1197,9 @@ struct xen_sysctl_dt_overlay { #define XEN_SYSCTL_DT_OVERLAY_ADD 1 #define

Re: [PATCH 2/3] xen/arm, tools: Add a new HVM_PARAM_MAGIC_BASE_PFN key in HVMOP

2024-04-26 Thread Henry Wang
Hi Jan, On 4/26/2024 2:50 PM, Jan Beulich wrote: On 26.04.2024 08:30, Henry Wang wrote: On 4/26/2024 2:21 PM, Jan Beulich wrote: On 26.04.2024 05:14, Henry Wang wrote: --- a/xen/include/public/hvm/params.h +++ b/xen/include/public/hvm/params.h @@ -76,6 +76,7 @@ */ #define

Re: [PATCH 2/3] xen/arm, tools: Add a new HVM_PARAM_MAGIC_BASE_PFN key in HVMOP

2024-04-26 Thread Henry Wang
Hi Jan, On 4/26/2024 2:21 PM, Jan Beulich wrote: On 26.04.2024 05:14, Henry Wang wrote: --- a/xen/include/public/hvm/params.h +++ b/xen/include/public/hvm/params.h @@ -76,6 +76,7 @@ */ #define HVM_PARAM_STORE_PFN1 #define HVM_PARAM_STORE_EVTCHN 2 +#define HVM_PARAM_MAGIC_BASE_PFN

Re: [PATCH v4 0/5] DOMCTL-based guest magic region allocation for 11 domUs

2024-04-25 Thread Henry Wang
Hi Stefano, Daniel, On 4/26/2024 6:18 AM, Stefano Stabellini wrote: On Thu, 18 Apr 2024, Daniel P. Smith wrote: On 4/9/24 00:53, Henry Wang wrote: An error message can seen from the init-dom0less application on direct-mapped 1:1 domains: ``` Allocating magic pages memory.c:238:d0v0 mfn

[PATCH 2/3] xen/arm, tools: Add a new HVM_PARAM_MAGIC_BASE_PFN key in HVMOP

2024-04-25 Thread Henry Wang
(). Reported-by: Alec Kwapis Signed-off-by: Henry Wang --- tools/libs/guest/xg_dom_arm.c | 2 ++ xen/arch/arm/dom0less-build.c | 2 ++ xen/arch/arm/hvm.c | 1 + xen/include/public/hvm/params.h | 1 + 4 files changed, 6 insertions(+) diff --git a/tools/libs/guest/xg_dom_arm.c b/tools

[PATCH 0/3] Guest magic region allocation for 11 Dom0less domUs - Take two

2024-04-25 Thread Henry Wang
in.wa...@amd.com/ [2] https://lore.kernel.org/xen-devel/c7857223-eab8-409a-b618-6ec70f616...@apertussolutions.com/ [3] https://lore.kernel.org/xen-devel/alpine.DEB.2.22.394.2404251508470.3940@ubuntu-linux-20-04-desktop/ [4] https://gitlab.com/xen-project/people/henryw/xen/-/pipelines/1268643360 H

[PATCH 3/3] tools/init-dom0less: Avoid hardcoding GUEST_MAGIC_BASE

2024-04-25 Thread Henry Wang
possible. Reported-by: Alec Kwapis Signed-off-by: Henry Wang --- tools/helpers/init-dom0less.c | 38 +++ 1 file changed, 16 insertions(+), 22 deletions(-) diff --git a/tools/helpers/init-dom0less.c b/tools/helpers/init-dom0less.c index fee93459c4..7f6953a818

[PATCH 1/3] xen/arm/dom0less-build: Alloc magic pages for Dom0less DomUs from hypervisor

2024-04-25 Thread Henry Wang
Reported-by: Alec Kwapis Suggested-by: Daniel P. Smith Signed-off-by: Henry Wang --- tools/libs/guest/xg_dom_arm.c | 1 - xen/arch/arm/dom0less-build.c | 22 ++ xen/include/public/arch-arm.h | 1 + 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/tools/

[PATCH v1.1] xen/commom/dt-overlay: Fix missing lock when remove the device

2024-04-25 Thread Henry Wang
the lock properly. Fixes: 7e5c4a8b86f1 ("xen/arm: Implement device tree node removal functionalities") Signed-off-by: Henry Wang --- v1.1: - Move the unlock position before the check of rc. --- xen/common/dt-overlay.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xen/comm

Re: [PATCH 11/15] tools/helpers: Add get_overlay

2024-04-25 Thread Henry Wang
Hi Stewart, On 4/26/2024 9:45 AM, Stewart Hildebrand wrote: On 4/24/24 20:43, Henry Wang wrote: Hi Jan, On 4/24/2024 2:08 PM, Jan Beulich wrote: On 24.04.2024 05:34, Henry Wang wrote: From: Vikram Garhwal This user level application copies the overlay dtbo shared by dom0 while doing

Re: [PATCH 02/15] xen/arm/gic: Enable interrupt assignment to running VM

2024-04-25 Thread Henry Wang
Hi Julien, On 4/24/2024 8:58 PM, Julien Grall wrote: Hi Henry, On 24/04/2024 04:34, Henry Wang wrote: From: Vikram Garhwal Enable interrupt assign/remove for running VMs in CONFIG_OVERLAY_DTB. Currently, irq_route and mapping is only allowed at the domain creation. Adding exception

Re: [PATCH 14/15] add a domU script to fetch overlays and applying them to linux

2024-04-25 Thread Henry Wang
Hi Jan, On 4/25/2024 2:46 PM, Jan Beulich wrote: On 25.04.2024 02:54, Henry Wang wrote: On 4/24/2024 2:16 PM, Jan Beulich wrote: On 24.04.2024 05:34, Henry Wang wrote: From: Vikram Garhwal Introduce a shell script that runs in the background and calls get_overlay to retrive overlays

Re: [PATCH 03/15] xen/arm: Always enable IOMMU

2024-04-24 Thread Henry Wang
Hi Julien, On 4/24/2024 9:03 PM, Julien Grall wrote: Hi Henry, On 24/04/2024 04:34, Henry Wang wrote: From: Vikram Garhwal For overlay with iommu functionality to work with running VMs, we need to enable IOMMU by default for the domains. Signed-off-by: Vikram Garhwal Signed-off

Re: [PATCH 14/15] add a domU script to fetch overlays and applying them to linux

2024-04-24 Thread Henry Wang
Hi Jan, On 4/24/2024 2:16 PM, Jan Beulich wrote: On 24.04.2024 05:34, Henry Wang wrote: From: Vikram Garhwal Introduce a shell script that runs in the background and calls get_overlay to retrive overlays and add them (or remove them) to Linux device tree (running as a domU). Signed-off

Re: [PATCH 06/15] rangeset: Move struct range and struct rangeset to headerfile

2024-04-24 Thread Henry Wang
Hi Jan, On 4/24/2024 2:22 PM, Jan Beulich wrote: On 24.04.2024 05:34, Henry Wang wrote: From: Vikram Garhwal Move struct range, rangeset and removed static from first_range and next_range(). NAK, for going against what we do elsewhere (limiting exposure of internals). At least as long

Re: [PATCH 11/15] tools/helpers: Add get_overlay

2024-04-24 Thread Henry Wang
Hi Jan, On 4/24/2024 2:08 PM, Jan Beulich wrote: On 24.04.2024 05:34, Henry Wang wrote: From: Vikram Garhwal This user level application copies the overlay dtbo shared by dom0 while doing overlay node assignment operation. It uses xenstore to communicate with dom0. More information

Re: [PATCH 01/15] xen/commom/dt-overlay: Fix missing lock when remove the device

2024-04-24 Thread Henry Wang
Hi Jan, On 4/24/2024 1:58 PM, Jan Beulich wrote: On 24.04.2024 05:34, Henry Wang wrote: --- a/xen/common/dt-overlay.c +++ b/xen/common/dt-overlay.c @@ -381,9 +381,14 @@ static int remove_node_resources(struct dt_device_node *device_node) { if ( dt_device_is_protected

[PATCH 13/15] xl/overlay: add remove operation to xenstore

2024-04-23 Thread Henry Wang
move", the overlay is to be removed from the domU device tree. Signed-off-by: Vikram Garhwal Signed-off-by: Stefano Stabellini Signed-off-by: Henry Wang --- tools/xl/xl_vmcontrol.c | 184 +--- 1 file changed, 173 insertions(+), 11 deletions(-) diff --

[PATCH 12/15] get_overlay: remove domU overlay

2024-04-23 Thread Henry Wang
a domU. Signed-off-by: Vikram Garhwal Signed-off-by: Stewart Hildebrand Signed-off-by: Stefano Stabellini Signed-off-by: Henry Wang --- tools/helpers/get_overlay.c | 132 +--- 1 file changed, 123 insertions(+), 9 deletions(-) diff --git a/tools/helpers/get_overl

[PATCH 11/15] tools/helpers: Add get_overlay

2024-04-23 Thread Henry Wang
-by: Stefano Stabellini Signed-off-by: Henry Wang --- tools/helpers/Makefile | 8 + tools/helpers/get_overlay.c | 393 2 files changed, 401 insertions(+) create mode 100644 tools/helpers/get_overlay.c diff --git a/tools/helpers/Makefile b/tools

[PATCH 14/15] add a domU script to fetch overlays and applying them to linux

2024-04-23 Thread Henry Wang
From: Vikram Garhwal Introduce a shell script that runs in the background and calls get_overlay to retrive overlays and add them (or remove them) to Linux device tree (running as a domU). Signed-off-by: Vikram Garhwal Signed-off-by: Stefano Stabellini Signed-off-by: Henry Wang --- tools

[PATCH 07/15] xen/overlay: Enable device tree overlay assignment to running domains

2024-04-23 Thread Henry Wang
am Garhwal Signed-off-by: Michal Orzel Signed-off-by: Henry Wang --- xen/arch/arm/device.c| 8 +- xen/arch/arm/domain_build.c | 2 +- xen/arch/arm/include/asm/setup.h | 3 +- xen/common/dt-overlay.c | 218 ++- xen/include/public/sysctl.h

[PATCH 15/15] docs: add device tree overlay documentation

2024-04-23 Thread Henry Wang
From: Vikram Garhwal Signed-off-by: Vikram Garhwal Signed-off-by: Stefano Stabellini Signed-off-by: Henry Wang --- docs/misc/arm/overlay.txt | 172 ++ 1 file changed, 172 insertions(+) create mode 100644 docs/misc/arm/overlay.txt diff --git a/docs/misc

[PATCH 06/15] rangeset: Move struct range and struct rangeset to headerfile

2024-04-23 Thread Henry Wang
. Signed-off-by: Vikram Garhwal Signed-off-by: Henry Wang --- xen/common/rangeset.c | 31 ++- xen/include/xen/rangeset.h | 32 +++- 2 files changed, 33 insertions(+), 30 deletions(-) diff --git a/xen/common/rangeset.c b/xen/common

[PATCH 09/15] tools/libs/light: Modify dtbo to domU linux dtbo format

2024-04-23 Thread Henry Wang
From: Vikram Garhwal Add support for modifying dtbo to make it suitable for DomU Linux. This is done for '-e expert' mode. Signed-off-by: Vikram Garhwal Signed-off-by: Stefano Stabellini Signed-off-by: Henry Wang --- tools/libs/light/libxl_dt_overlay.c | 73 + 1

[PATCH 10/15] tools/xl: Share overlay with domU

2024-04-23 Thread Henry Wang
Hildebrand Signed-off-by: Stefano Stabellini Signed-off-by: Henry Wang --- tools/xl/Makefile | 2 +- tools/xl/xl_cmdtable.c | 2 +- tools/xl/xl_vmcontrol.c | 343 +++- 3 files changed, 342 insertions(+), 5 deletions(-) diff --git a/tools/xl

[PATCH 08/15] tools: Add domain_id and expert mode for overlay operations

2024-04-23 Thread Henry Wang
f-by: Vikram Garhwal Signed-off-by: Stefano Stabellini Signed-off-by: Henry Wang --- tools/include/libxl.h | 8 +-- tools/include/xenctrl.h | 5 +++-- tools/libs/ctrl/xc_dt_overlay.c | 7 -- tools/libs/light/libxl_dt_overlay.c | 17 +++ too

[PATCH 05/15] tools/libs/light: Increase nr_spi to 160

2024-04-23 Thread Henry Wang
From: Vikram Garhwal Increase number of spi to 160 i.e. gic_number_lines() for Xilinx ZynqMP - 32. This was done to allocate and assign IRQs to a running domain. Signed-off-by: Vikram Garhwal Signed-off-by: Stefano Stabellini Signed-off-by: Henry Wang --- tools/libs/light/libxl_arm.c | 3

[PATCH 04/15] tools/libs/light: Always enable IOMMU

2024-04-23 Thread Henry Wang
From: Vikram Garhwal For overlay with iommu functionality to work with running VMs, we need to enable IOMMU when iomem presents for the domains. Signed-off-by: Vikram Garhwal Signed-off-by: Henry Wang --- tools/libs/light/libxl_arm.c | 6 ++ 1 file changed, 6 insertions(+) diff --git

[PATCH 03/15] xen/arm: Always enable IOMMU

2024-04-23 Thread Henry Wang
From: Vikram Garhwal For overlay with iommu functionality to work with running VMs, we need to enable IOMMU by default for the domains. Signed-off-by: Vikram Garhwal Signed-off-by: Stefano Stabellini Signed-off-by: Henry Wang --- xen/arch/arm/dom0less-build.c | 3 ++- 1 file changed, 2

[PATCH 01/15] xen/commom/dt-overlay: Fix missing lock when remove the device

2024-04-23 Thread Henry Wang
the lock properly. Fixes: 7e5c4a8b86f1 ("xen/arm: Implement device tree node removal functionalities") Signed-off-by: Henry Wang --- xen/common/dt-overlay.c | 5 + 1 file changed, 5 insertions(+) diff --git a/xen/common/dt-overlay.c b/xen/common/dt-overlay.c index 1b197381f

[PATCH 00/15] Remaining patches for dynamic node programming using overlay dtbo

2024-04-23 Thread Henry Wang
m/xen-project/people/henryw/xen/-/pipelines/1265297506 Henry Wang (1): xen/commom/dt-overlay: Fix missing lock when remove the device Vikram Garhwal (14): xen/arm/gic: Enable interrupt assignment to running VM xen/arm: Always enable IOMMU tools/libs/light: Always enable IOMMU tools/libs/li

[PATCH 02/15] xen/arm/gic: Enable interrupt assignment to running VM

2024-04-23 Thread Henry Wang
From: Vikram Garhwal Enable interrupt assign/remove for running VMs in CONFIG_OVERLAY_DTB. Currently, irq_route and mapping is only allowed at the domain creation. Adding exception for CONFIG_OVERLAY_DTB. Signed-off-by: Vikram Garhwal Signed-off-by: Stefano Stabellini Signed-off-by: Henry

Re: [PATCH v4 4/5] xen/memory, tools: Avoid hardcoding GUEST_MAGIC_BASE in init-dom0less

2024-04-19 Thread Henry Wang
Hi Jan, On 4/19/2024 2:18 PM, Jan Beulich wrote: On 19.04.2024 04:31, Henry Wang wrote: On 4/18/2024 8:54 PM, Jan Beulich wrote: On 09.04.2024 06:53, Henry Wang wrote: --- a/xen/include/public/memory.h +++ b/xen/include/public/memory.h @@ -21,6 +21,7 @@ #define XENMEM_increase_reservation

Re: [PATCH v4 4/5] xen/memory, tools: Avoid hardcoding GUEST_MAGIC_BASE in init-dom0less

2024-04-18 Thread Henry Wang
Hi Jan, On 4/18/2024 8:54 PM, Jan Beulich wrote: On 09.04.2024 06:53, Henry Wang wrote: --- a/xen/common/memory.c +++ b/xen/common/memory.c @@ -155,6 +155,14 @@ static void increase_reservation(struct memop_args *a) a->nr_done = i; } +/* + * Alias of _MEMF_no_refcount to av

Re: [PATCH v4 1/5] xen/domctl, tools: Introduce a new domctl to get guest memory map

2024-04-18 Thread Henry Wang
Hi Jan, On 4/18/2024 8:37 PM, Jan Beulich wrote: On 09.04.2024 06:53, Henry Wang wrote: --- a/tools/libs/ctrl/xc_domain.c +++ b/tools/libs/ctrl/xc_domain.c @@ -697,6 +697,43 @@ int xc_domain_setmaxmem(xc_interface *xch, return do_domctl(xch, ); } +int xc_get_domain_mem_map

Re: [PATCH v4 0/5] DOMCTL-based guest magic region allocation for 11 domUs

2024-04-18 Thread Henry Wang
Hi Daniel, On 4/18/2024 10:16 PM, Daniel P. Smith wrote: On 4/9/24 00:53, Henry Wang wrote: An error message can seen from the init-dom0less application on direct-mapped 1:1 domains: ``` Allocating magic pages memory.c:238:d0v0 mfn 0x39000 doesn't belong to d1 Error on alloc magic pages

Re: [PATCH] xen/acpi: Allow xen/acpi.h to be included on non-ACPI archs

2024-04-11 Thread Henry Wang
Hi Andrew, On 4/11/2024 9:15 PM, Andrew Cooper wrote: On 05/04/2024 7:20 pm, Shawn Anastasio wrote: Conditionalize xen/acpi.h's inclusion of acpi/acpi.h and asm/acpi.h on CONFIG_ACPI and import ARM's !CONFIG_ACPI stub for acpi_disabled() so that the header can be included on architectures

[PATCH v4 5/5] tools/libs/ctrl: Simplify xc helpers related to populate_physmap()

2024-04-08 Thread Henry Wang
the same and duplicated logic. Extract the duplicated code of these xc helpers to local helper functions to simplify the code. No functional change intended. Suggested-by: Jan Beulich Signed-off-by: Henry Wang --- v4: - New patch. --- tools/libs/ctrl/xc_domain.c | 178

[PATCH v4 3/5] xen/arm: Find unallocated spaces for magic pages of direct-mapped domU

2024-04-08 Thread Henry Wang
the first 16MB from the first extended region bank for magic pages of direct-mapped domU. If the extended region is disabled, call the newly introduced helper find_11_domU_magic_region() to find a GUEST_MAGIC_SIZE sized unused region. Reported-by: Alec Kwapis Signed-off-by: Henry Wang --- v4

[PATCH v4 1/5] xen/domctl, tools: Introduce a new domctl to get guest memory map

2024-04-08 Thread Henry Wang
ation time as the layout in the public header, and it is updated for 1:1 dom0less DomUs (see the following commit) to avoid conflict with RAM. Take the opportunity to drop an unnecessary empty line to keep the coding style consistent in the file. Reported-by: Alec Kwapis Signed-off-by: Henry Wang

[PATCH v4 4/5] xen/memory, tools: Avoid hardcoding GUEST_MAGIC_BASE in init-dom0less

2024-04-08 Thread Henry Wang
a new sub-op XENMEM_populate_physmap_heap_alloc and the MEMF_force_heap_alloc flag to force populate_physmap() to allocate page from domheap instead of using 1:1 or static allocated pages to map the magic pages. Reported-by: Alec Kwapis Signed-off-by: Henry Wang --- v4: - Use the new subop. - Add

[PATCH v4 2/5] xen/arm: Generalize the extended region finding logic

2024-04-08 Thread Henry Wang
of for extended region only. Take the opportunity to update the stale in-code comment of find_unallocated_memory() and find_memory_holes(). Signed-off-by: Henry Wang --- v4: - No change v3: - New patch --- xen/arch/arm/domain_build.c | 107 ++-- xen/arch/arm/include/asm

[PATCH v4 0/5] DOMCTL-based guest magic region allocation for 11 domUs

2024-04-08 Thread Henry Wang
gitlab.com/xen-project/people/henryw/xen/-/pipelines/1245192195 Henry Wang (5): xen/domctl, tools: Introduce a new domctl to get guest memory map xen/arm: Generalize the extended region finding logic xen/arm: Find unallocated spaces for magic pages of direct-mapped domU xen/memory, to

Re: [PATCH v3 1/4] xen/domctl, tools: Introduce a new domctl to get guest memory map

2024-04-08 Thread Henry Wang
Hi Jan, On 4/8/2024 2:19 PM, Jan Beulich wrote: On 08.04.2024 05:08, Henry Wang wrote: On 4/4/2024 5:28 PM, Jan Beulich wrote: On 03.04.2024 10:16, Henry Wang wrote: --- a/xen/arch/arm/domain.c +++ b/xen/arch/arm/domain.c @@ -696,6 +696,7 @@ int arch_domain_create(struct domain *d

Re: [PATCH v3 4/4] xen/memory, tools: Avoid hardcoding GUEST_MAGIC_BASE in init-dom0less

2024-04-08 Thread Henry Wang
Hi Jan, On 4/8/2024 3:03 PM, Jan Beulich wrote: On 08.04.2024 08:59, Henry Wang wrote: Hi Jan, On 4/8/2024 2:22 PM, Jan Beulich wrote: On 08.04.2024 05:19, Henry Wang wrote: On 4/4/2024 5:38 PM, Jan Beulich wrote: On 03.04.2024 10:16, Henry Wang wrote: --- a/xen/include/public/memory.h

Re: [PATCH v3 4/4] xen/memory, tools: Avoid hardcoding GUEST_MAGIC_BASE in init-dom0less

2024-04-08 Thread Henry Wang
Hi Jan, On 4/8/2024 4:26 PM, Jan Beulich wrote: On 08.04.2024 10:12, Henry Wang wrote: Hi Jan, On 4/8/2024 3:03 PM, Jan Beulich wrote: On 08.04.2024 08:59, Henry Wang wrote: Hi Jan, On 4/8/2024 2:22 PM, Jan Beulich wrote: On 08.04.2024 05:19, Henry Wang wrote: On 4/4/2024 5:38 PM, Jan

Re: [PATCH v3 4/4] xen/memory, tools: Avoid hardcoding GUEST_MAGIC_BASE in init-dom0less

2024-04-08 Thread Henry Wang
Hi Jan, On 4/8/2024 2:22 PM, Jan Beulich wrote: On 08.04.2024 05:19, Henry Wang wrote: On 4/4/2024 5:38 PM, Jan Beulich wrote: On 03.04.2024 10:16, Henry Wang wrote: --- a/xen/include/public/memory.h +++ b/xen/include/public/memory.h @@ -41,6 +41,11 @@ #define XENMEMF_exact_node(n

Re: [PATCH v3 4/4] xen/memory, tools: Avoid hardcoding GUEST_MAGIC_BASE in init-dom0less

2024-04-07 Thread Henry Wang
Hi Jan, On 4/4/2024 5:38 PM, Jan Beulich wrote: On 03.04.2024 10:16, Henry Wang wrote: --- a/xen/common/memory.c +++ b/xen/common/memory.c @@ -219,7 +219,8 @@ static void populate_physmap(struct memop_args *a) } else { -if ( is_domain_direct_mapped(d

Re: [PATCH v3 1/4] xen/domctl, tools: Introduce a new domctl to get guest memory map

2024-04-07 Thread Henry Wang
Hi Jan, On 4/4/2024 5:28 PM, Jan Beulich wrote: On 03.04.2024 10:16, Henry Wang wrote: --- a/tools/libs/ctrl/xc_domain.c +++ b/tools/libs/ctrl/xc_domain.c @@ -697,6 +697,39 @@ int xc_domain_setmaxmem(xc_interface *xch, return do_domctl(xch, ); } +int xc_get_domain_mem_map

[PATCH v3 2/4] xen/arm: Generalize the extended region finding logic

2024-04-03 Thread Henry Wang
of for extended region only. Take the opportunity to update the stale in-code comment of find_unallocated_memory() and find_memory_holes(). Signed-off-by: Henry Wang --- v3: - New patch --- xen/arch/arm/domain_build.c | 107 ++-- xen/arch/arm/include/asm/domain_build.h

[PATCH v3 0/4] DOMCTL-based guest magic region allocation for 11 domUs

2024-04-03 Thread Henry Wang
magic page regions for direct-mapped DomUs. Patch 4 avoids hardcoding all base addresses of guest magic region in the init-dom0less application by consuming the newly introduced DOMCTL. Gitlab pipeline for this series: https://gitlab.com/xen-project/people/henryw/xen/-/pipelines/1238005196 Hen

[PATCH v3 4/4] xen/memory, tools: Avoid hardcoding GUEST_MAGIC_BASE in init-dom0less

2024-04-03 Thread Henry Wang
the (XEN)MEMF_force_heap_alloc memory flags to force populate_physmap() to allocate page from domheap instead of using 1:1 or static allocated pages to map the magic pages. Reported-by: Alec Kwapis Signed-off-by: Henry Wang --- v3: - Don't ignore the error from xc_get_domain_mem_map(). - Re

[PATCH v3 3/4] xen/arm: Find unallocated spaces for magic pages of direct-mapped domU

2024-04-03 Thread Henry Wang
the first 16MB from the first extended region bank for magic pages of direct-mapped domU. If the extended region is disabled, call the newly introduced helper find_11_domU_magic_region() to find a GUEST_MAGIC_SIZE sized unused region. Reported-by: Alec Kwapis Signed-off-by: Henry Wang --- v3

[PATCH v3 1/4] xen/domctl, tools: Introduce a new domctl to get guest memory map

2024-04-03 Thread Henry Wang
ation time as the layout in the public header, and it is updated for 1:1 dom0less DomUs (see the following commit) to avoid conflict with RAM. Take the opportunity to drop an unnecessary empty line to keep the coding style consistent in the file. Reported-by: Alec Kwapis Signed-off-by: Henry Wang

Re: [PATCH v2 5/5] xen/memory, tools: Make init-dom0less consume XEN_DOMCTL_get_mem_map

2024-04-02 Thread Henry Wang
Hi Jan, On 4/2/2024 4:51 PM, Jan Beulich wrote: On 02.04.2024 10:43, Henry Wang wrote: On 4/2/2024 3:05 PM, Jan Beulich wrote: On 29.03.2024 06:11, Henry Wang wrote: On 3/12/2024 1:07 AM, Jan Beulich wrote: +/* + * Flag to force populate physmap to use pages from domheap instead of 1:1

Re: [PATCH v2 5/5] xen/memory, tools: Make init-dom0less consume XEN_DOMCTL_get_mem_map

2024-04-02 Thread Henry Wang
Hi Jan, On 4/2/2024 3:05 PM, Jan Beulich wrote: On 29.03.2024 06:11, Henry Wang wrote: On 3/12/2024 1:07 AM, Jan Beulich wrote: +/* + * Flag to force populate physmap to use pages from domheap instead of 1:1 + * or static allocation. + */ +#define XENMEMF_force_heap_alloc (1<<19)

Re: [PATCH v2 5/5] xen/memory, tools: Make init-dom0less consume XEN_DOMCTL_get_mem_map

2024-03-28 Thread Henry Wang
Hi Jan, On 3/12/2024 1:07 AM, Jan Beulich wrote: +/* + * Flag to force populate physmap to use pages from domheap instead of 1:1 + * or static allocation. + */ +#define XENMEMF_force_heap_alloc (1<<19) #endif If this is for populate_physmap only, then other sub-ops need to reject its use.

Re: [PATCH v2 5/5] xen/memory, tools: Make init-dom0less consume XEN_DOMCTL_get_mem_map

2024-03-25 Thread Henry Wang
Hi Anthony, On 3/25/2024 11:35 PM, Anthony PERARD wrote: On Fri, Mar 08, 2024 at 09:54:35AM +0800, Henry Wang wrote: diff --git a/tools/helpers/init-dom0less.c b/tools/helpers/init-dom0less.c index fee93459c4..92c612f6da 100644 --- a/tools/helpers/init-dom0less.c +++ b/tools/helpers/init

[PATCH v3] xen/arm: Set correct per-cpu cpu_core_mask

2024-03-20 Thread Henry Wang
possible CPUs detected from the device tree. Setting the per-cpu cpu_core_mask in setup_cpu_sibling_map() accordingly. Modify the in-code comment which seems to be outdated. Add a warning to users if Xen is running on processors with multithread support. Signed-off-by: Henry Wang Signed-off

Re: [PATCH v2] xen/arm: Set correct per-cpu cpu_core_mask

2024-03-17 Thread Henry Wang
Hi Julien, On 3/15/2024 6:58 PM, Julien Grall wrote: On 14/03/2024 14:22, Henry Wang wrote: Hi Julien, Hi,   /* representing HT siblings of each logical CPU */   DEFINE_PER_CPU_READ_MOSTLY(cpumask_var_t, cpu_sibling_mask);   /* representing HT and core siblings of each logical CPU

Re: [PATCH v2] xen/arm: Set correct per-cpu cpu_core_mask

2024-03-14 Thread Henry Wang
Hi Julien, On 3/14/2024 9:27 PM, Julien Grall wrote: Hi Henry, On 28/02/2024 01:58, Henry Wang wrote: diff --git a/xen/arch/arm/smpboot.c b/xen/arch/arm/smpboot.c index a84e706d77..d9ebd55d4a 100644 --- a/xen/arch/arm/smpboot.c +++ b/xen/arch/arm/smpboot.c @@ -66,7 +66,6 @@ static bool

Re: [PATCH v2 5/5] xen/memory, tools: Make init-dom0less consume XEN_DOMCTL_get_mem_map

2024-03-12 Thread Henry Wang
Hi Jan, On 3/12/2024 3:34 PM, Jan Beulich wrote: On 12.03.2024 04:44, Henry Wang wrote: On 3/12/2024 1:07 AM, Jan Beulich wrote: On 08.03.2024 02:54, Henry Wang wrote: --- a/xen/include/public/memory.h +++ b/xen/include/public/memory.h @@ -41,6 +41,11 @@ #define XENMEMF_exact_node(n

Re: [PATCH v2 5/5] xen/memory, tools: Make init-dom0less consume XEN_DOMCTL_get_mem_map

2024-03-11 Thread Henry Wang
Hi Jan, On 3/12/2024 1:07 AM, Jan Beulich wrote: I'm afraid the title doesn't really say what the patch actually means to achieve. On 08.03.2024 02:54, Henry Wang wrote: Previous commits enable the toolstack to get the domain memory map, therefore instead of hardcoding the guest magic pages

Re: [PATCH v2 4/5] xen/arm: Find unallocated spaces for magic pages of direct-mapped domU

2024-03-11 Thread Henry Wang
Hi Michal, On 3/11/2024 9:46 PM, Michal Orzel wrote: Hi Henry, diff --git a/xen/arch/arm/dom0less-build.c b/xen/arch/arm/dom0less-build.c index 1e1c8d83ae..99447bfb0c 100644 --- a/xen/arch/arm/dom0less-build.c +++ b/xen/arch/arm/dom0less-build.c @@ -682,6 +682,49 @@ static int __init

Re: [PATCH v2 3/5] xen/domctl, tools: Introduce a new domctl to get guest memory map

2024-03-11 Thread Henry Wang
Hi Jan, On 3/12/2024 12:58 AM, Jan Beulich wrote: On 08.03.2024 02:54, Henry Wang wrote: --- a/xen/include/public/domctl.h +++ b/xen/include/public/domctl.h @@ -946,6 +946,25 @@ struct xen_domctl_paging_mempool { uint64_aligned_t size; /* Size in bytes. */ }; +#define

Re: [PATCH v2 3/5] xen/domctl, tools: Introduce a new domctl to get guest memory map

2024-03-11 Thread Henry Wang
Hi Michal, On 3/11/2024 5:10 PM, Michal Orzel wrote: Hi Henry, diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c index 5e7a7f3e7e..54f3601ab0 100644 --- a/xen/arch/arm/domain.c +++ b/xen/arch/arm/domain.c @@ -696,6 +696,7 @@ int arch_domain_create(struct domain *d, { unsigned

  1   2   3   4   5   6   7   8   9   10   >