Re: [PATCH] ns16550: ensure polling timer is disarmed

2025-07-30 Thread Jan Beulich
On 30.07.2025 20:31, [email protected] wrote: > On Wed, Jul 30, 2025 at 10:12:54AM +0200, Jan Beulich wrote: >> On 30.07.2025 05:13, [email protected] wrote: >>> From: Denis Mukhin >>> >>> As it stands, polling timer is kept in the list of timers even after the >>> interrupts have been enabled / polli

Re: [PATCH v9 4/8] vpci: Hide extended capability when it fails to initialize

2025-07-30 Thread Chen, Jiqian
On 2025/7/30 18:46, Nicola Vetrini wrote: > On 2025-07-30 12:42, Nicola Vetrini wrote: >> On 2025-07-30 11:50, Jan Beulich wrote: >>> On 28.07.2025 07:03, Jiqian Chen wrote: +static int vpci_ext_capability_hide( +    const struct pci_dev *pdev, unsigned int cap) +{ +    const un

Re: [PATCH v9 5/8] vpci: Refactor vpci_remove_register to remove matched registers

2025-07-30 Thread Chen, Jiqian
On 2025/7/30 19:23, Andrew Cooper wrote: > On 28/07/2025 6:03 am, Jiqian Chen wrote: >> vpci_remove_register() only supports removing a register in a time, >> but the follow-on changes need to remove all registers within a range. >> So, refactor it to support removing all registers in a given regio

Re: [PATCH v1] xen/console: remove __printk_ratelimit()

2025-07-30 Thread Jan Beulich
On 30.07.2025 20:06, [email protected] wrote: > On Wed, Jul 30, 2025 at 07:35:04AM +0200, Jan Beulich wrote: >> On 30.07.2025 00:18, [email protected] wrote: >>> On Mon, Jul 28, 2025 at 11:32:43AM +0200, Jan Beulich wrote: On 26.07.2025 11:20, Julien Grall wrote: > On 25/07/2025 22:24, dm...@p

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

2025-07-30 Thread pr-tracker-bot
The pull request you sent on Mon, 28 Jul 2025 08:06:14 +0200: > git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip.git > for-linus-6.17-rc1-tag has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/7d767a9528f6d203bca5e83faf1b8f2f6af3fc07 Thank you! -- Deet-doot-dot, I

[PATCH v3] misra: allow discarding 'noreturn' during function pointer conversions

2025-07-30 Thread Dmytro Prokopchuk1
The conversion from a function pointer with the 'noreturn' attribute ('void noreturn (*)(void *)') to a function pointer type ('void (*)(void *)' causes type incompatibility according to MISRA C Rule 11.1, which forbids conversions between incompatible function pointer types. The violation occurs

[PATCH v3] misra: add deviations of MISRA C Rule 5.5

2025-07-30 Thread Dmytro Prokopchuk1
MISRA C Rule 5.5 states that: "Identifiers shall be distinct from macro names". Update ECLAIR configuration to deviate clashes: specify the macros that should be ignored. Update deviations.rst and rules.rst accordingly. Signed-off-by: Dmytro Prokopchuk --- Changes in v3: - removed deviation for

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

2025-07-30 Thread Jason Andryuk
On 2025-07-30 11:19, Jan Beulich wrote: On 16.07.2025 23:14, Jason Andryuk wrote: 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 ch

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

2025-07-30 Thread Jason Andryuk
On 2025-07-30 11:06, Jan Beulich wrote: On 16.07.2025 23: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 checks. I think terminology needs clarifying here:

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

2025-07-30 Thread Jason Andryuk
On 2025-07-30 11:21, Jan Beulich wrote: On 16.07.2025 23:14, Jason Andryuk wrote: The Control domain is denied access to an untargetable domain. However init-dom0less wants to read the xenstore event channel HVM param to determine if xenstore should be set up. This is a read operation, so it i

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

2025-07-30 Thread Jason Andryuk
On 2025-07-30 06:17, Jan Beulich wrote: On 16.07.2025 23:14, Jason Andryuk wrote: In a disaggregated environment, dom0 is split into Control, Hardware, and Xenstore domains, along with domUs. Here we are with terminology again. In a truly disaggregated env, yet more (service) domains would com

[PATCH v2] automation/eclair: deviate intentionally unreachable code

2025-07-30 Thread Dmytro Prokopchuk1
From: Nicola Vetrini MISRA C Rule 2.1 states: "A project shall not contain unreachable code". Functions that are non-returning and are not explicitly annotated with the `noreturn' attribute are considered a violation of this rule. In certain cases, some functions might be non-returning in specif

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

2025-07-30 Thread Jason Andryuk
On 2025-07-30 05:28, Jan Beulich wrote: On 16.07.2025 23:14, Jason Andryuk wrote: Xen includes disctinct concepts of a control domain (privileged) and a hardware domain, but there is only a single XSM_PRIV check. For dom0 this is not an issue as they are one and the same. With hyperlaunch and

Re: [PATCH] ns16550: ensure polling timer is disarmed

2025-07-30 Thread dmkhn
On Wed, Jul 30, 2025 at 10:12:54AM +0200, Jan Beulich wrote: > On 30.07.2025 05:13, [email protected] wrote: > > From: Denis Mukhin > > > > As it stands, polling timer is kept in the list of timers even after the > > interrupts have been enabled / polling disabled on ns16550-compatible UART. > > > >

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

2025-07-30 Thread Jürgen Groß
On 30.07.25 18:21, Anthony PERARD wrote: On Fri, Jul 25, 2025 at 03:19:28PM +0200, Juergen Gross wrote: diff --git a/tools/libs/light/libxl_dom.c b/tools/libs/light/libxl_dom.c index a61085ca3b..2a7923533f 100644 --- a/tools/libs/light/libxl_dom.c +++ b/tools/libs/light/libxl_dom.c @@ -494,6 +49

Re: [PATCH v1] xen/console: remove __printk_ratelimit()

2025-07-30 Thread dmkhn
On Wed, Jul 30, 2025 at 07:35:04AM +0200, Jan Beulich wrote: > On 30.07.2025 00:18, [email protected] wrote: > > On Mon, Jul 28, 2025 at 11:32:43AM +0200, Jan Beulich wrote: > >> On 26.07.2025 11:20, Julien Grall wrote: > >>> On 25/07/2025 22:24, [email protected] wrote: > From: Denis Mukhin > >>

[PATCH v13 0/3] xen/domain: domain ID allocation

2025-07-30 Thread dmkhn
Patch 1 introduces new domid_{alloc,free} calls. Patch 2 introduces some basic testing for domain ID allocator. Patch 3 adjusts create_dom0() messages (use %pd). Link to v12: https://lore.kernel.org/xen-devel/[email protected]/ Link to CI: https://gitlab.com/xen-project/p

[PATCH v13 2/3] tools/tests: introduce unit tests for domain ID allocator

2025-07-30 Thread dmkhn
From: Denis Mukhin Introduce some basic infrastructure for doing domain ID allocation unit tests, and add a few tests that ensure correctness of the domain ID allocator. Signed-off-by: Denis Mukhin --- Changes since v12: - fixed Makefile - dropped unused symbols/includes from the test harness

[PATCH v13 3/3] xen/domain: update create_dom0() messages

2025-07-30 Thread dmkhn
From: Denis Mukhin Use %pd for domain identification in error/panic messages in create_dom0(). No functional change. Signed-off-by: Denis Mukhin Reviewed-by: Alejandro Vallejo Acked-by: Jan Beulich --- Changes since v12: - n/a --- xen/arch/arm/domain_build.c | 6 +++--- xen/arch/x86/setup.

[PATCH v13 1/3] xen/domain: unify domain ID allocation

2025-07-30 Thread dmkhn
From: Denis Mukhin Currently, there are two different domain ID allocation implementations: 1) Sequential IDs allocation in dom0less Arm code based on max_init_domid; 2) Sequential IDs allocation in XEN_DOMCTL_createdomain; does not use max_init_domid (both Arm and x86). The domain I

Re: [PATCH] x86/vmx: Avoid pausing on HVM_PARAM_IDENT_PT in additional cases

2025-07-30 Thread Andrew Cooper
On 30/07/2025 5:40 pm, Teddy Astie wrote: > When settings HVM_PARAM_IDENT_PT, skip domain pausing when : > - there is no vcpu > - unrestricted guest capability is used > > Signed-off-by: Teddy Astie > --- > xen/arch/x86/hvm/hvm.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff

Re: [PATCH] x86/vmx: Avoid pausing on HVM_PARAM_IDENT_PT in additional cases

2025-07-30 Thread Teddy Astie
Le 30/07/2025 à 18:40, Teddy Astie a écrit : > When settings HVM_PARAM_IDENT_PT, skip domain pausing when : > - there is no vcpu > - unrestricted guest capability is used > > Signed-off-by: Teddy Astie > --- > xen/arch/x86/hvm/hvm.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > >

[PATCH] x86/vmx: Avoid pausing on HVM_PARAM_IDENT_PT in additional cases

2025-07-30 Thread Teddy Astie
When settings HVM_PARAM_IDENT_PT, skip domain pausing when : - there is no vcpu - unrestricted guest capability is used Signed-off-by: Teddy Astie --- xen/arch/x86/hvm/hvm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c ind

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

2025-07-30 Thread Anthony PERARD
On Fri, Jul 25, 2025 at 03:19:28PM +0200, Juergen Gross wrote: > diff --git a/tools/libs/light/libxl_dom.c b/tools/libs/light/libxl_dom.c > index a61085ca3b..2a7923533f 100644 > --- a/tools/libs/light/libxl_dom.c > +++ b/tools/libs/light/libxl_dom.c > @@ -494,6 +494,18 @@ retry_transaction: >

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

2025-07-30 Thread Anthony PERARD
On Fri, Jul 25, 2025 at 03:19:27PM +0200, 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 Acked-by: Antho

[XEN PATCH v2 3/3] CI: Workaround extra content in junit

2025-07-30 Thread Anthony PERARD
From: Anthony PERARD Signed-off-by: Anthony PERARD --- automation/scripts/qubes-x86-64.sh | 6 ++ 1 file changed, 6 insertions(+) diff --git a/automation/scripts/qubes-x86-64.sh b/automation/scripts/qubes-x86-64.sh index 21dcd9b063..f1b7e02e63 100755 --- a/automation/scripts/qubes-x86-64.

[XEN PATCH v2 1/3] CI: Rework run-tools-test exit path

2025-07-30 Thread Anthony PERARD
From: Anthony PERARD The main script expect to find the string "$passed" or it just timeout and doesn't try to download the junit file in this case. So we ignore the return value of run-tools-test to always print "$passed" and instead look for failure in the generated junit file. If the junit rep

[XEN PATCH v2 2/3] CI: Upload junit result as artefact

2025-07-30 Thread Anthony PERARD
From: Anthony PERARD This allows to investigate the junit file in cases of parse error. Signed-off-by: Anthony PERARD --- Notes: Changes in v2: - more concise patch description. automation/gitlab-ci/test.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/automation/gitlab-ci/te

[XEN PATCH v2 0/3] CI: Fixes for tools/tests and junit and other

2025-07-30 Thread Anthony PERARD
From: Anthony PERARD Patch series available in this git branch: https://xenbits.xenproject.org/git-http/people/aperard/xen-unstable.git br.ci-tools-tests-junit-fixes-v2 All the *-tools-tests-* are currently only checking automatically if the machine as booted. The only way to find out if one of

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

2025-07-30 Thread Jan Beulich
On 16.07.2025 23:14, Jason Andryuk wrote: > The Control domain is denied access to an untargetable domain. However > init-dom0less wants to read the xenstore event channel HVM param to > determine if xenstore should be set up. > > This is a read operation, so it is not modifying the domain. Spec

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

2025-07-30 Thread Jan Beulich
On 16.07.2025 23:14, Jason Andryuk wrote: > 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. This feels lik

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

2025-07-30 Thread Jan Beulich
On 16.07.2025 23: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 checks. I think terminology needs clarifying here: What exactly does "targeted" mean? Is

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

2025-07-30 Thread Jürgen Groß
On 30.07.25 16:38, Jan Beulich wrote: On 30.07.2025 14:22, 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(). While adding the offset member to lu_state, change

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

2025-07-30 Thread Anthony PERARD
On Fri, Jul 25, 2025 at 07:58:49PM -0400, 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. > > Signed-off-by: Jason Andryuk > Reviewed-by

Re: [PATCH] automation/eclair: deviate intentionally unreachable code

2025-07-30 Thread Jan Beulich
On 30.07.2025 16:06, Dmytro Prokopchuk1 wrote: > From: Nicola Vetrini > > MISRA C Rule 2.1 states: "A project shall not contain unreachable code". > Functions that are non-returning and are not explicitly annotated with > the `noreturn' attribute are considered a violation of this rule. > > In c

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

2025-07-30 Thread Jan Beulich
On 30.07.2025 14:22, 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(). > > While adding the offset member to lu_state, change the type of "size" > to size_t

Re: [PATCH] automation/eclair: deviate intentionally unreachable code

2025-07-30 Thread Nicola Vetrini
On 2025-07-30 16:15, Andrew Cooper wrote: On 30/07/2025 3:06 pm, Dmytro Prokopchuk1 wrote: diff --git a/docs/misra/deviations.rst b/docs/misra/deviations.rst index e78179fcb8..fba75be2ee 100644 --- a/docs/misra/deviations.rst +++ b/docs/misra/deviations.rst @@ -86,6 +86,14 @@ Deviations related

Re: [PATCH v12 2/3] tools/tests: introduce unit tests for domain ID allocator

2025-07-30 Thread Alejandro Vallejo
On Wed Jul 30, 2025 at 5:34 AM CEST, dmkhn wrote: > From: Denis Mukhin > > Introduce some basic infrastructure for doing domain ID allocation unit tests, > and add a few tests that ensure correctness of the domain ID allocator. > > Signed-off-by: Denis Mukhin > --- > Changes since v11: > - simpl

Re: [PATCH] automation/eclair: deviate intentionally unreachable code

2025-07-30 Thread Andrew Cooper
On 30/07/2025 3:06 pm, Dmytro Prokopchuk1 wrote: > diff --git a/docs/misra/deviations.rst b/docs/misra/deviations.rst > index e78179fcb8..fba75be2ee 100644 > --- a/docs/misra/deviations.rst > +++ b/docs/misra/deviations.rst > @@ -86,6 +86,14 @@ Deviations related to MISRA C:2012 Rules: > ge

[PATCH] automation/eclair: deviate intentionally unreachable code

2025-07-30 Thread Dmytro Prokopchuk1
From: Nicola Vetrini MISRA C Rule 2.1 states: "A project shall not contain unreachable code". Functions that are non-returning and are not explicitly annotated with the `noreturn' attribute are considered a violation of this rule. In certain cases, some functions might be non-returning in debug

Re: [PATCH v12 1/3] xen/domain: unify domain ID allocation

2025-07-30 Thread Alejandro Vallejo
On Wed Jul 30, 2025 at 5:34 AM CEST, dmkhn wrote: > From: Denis Mukhin > > Currently, there are two different domain ID allocation implementations: > > 1) Sequential IDs allocation in dom0less Arm code based on max_init_domid; > > 2) Sequential IDs allocation in XEN_DOMCTL_createdomain; does

Re: [PATCH] x86: Conditionalise init_dom0_cpu_policy()

2025-07-30 Thread Alejandro Vallejo
On Wed Jul 30, 2025 at 11:58 AM CEST, Jan Beulich wrote: > On 30.07.2025 11:48, Alejandro Vallejo wrote: >> On Wed Jul 30, 2025 at 9:48 AM CEST, Jan Beulich wrote: >>> On 29.07.2025 23:29, Daniel P. Smith wrote: On 7/25/25 06:56, Roger Pau Monné wrote: > On Fri, Jul 25, 2025 at 12:02:18PM

Re: [RFC PATCH v5 09/10] xen/arm: scmi: introduce SCI SCMI SMC multi-agent driver

2025-07-30 Thread Anthony PERARD
On Tue, Jul 22, 2025 at 11:41:41AM +, Oleksii Moisieiev wrote: > This patch introduces SCI driver to support for ARM EL3 Trusted Firmware-A > (TF-A) which provides SCMI interface with multi-agnet support, as shown > below. [...] > Signed-off-by: Oleksii Moisieiev > Signed-off-by: Grygorii St

Re: [PATCH v2 7/9] mm/memory: factor out common code from vm_normal_page_*()

2025-07-30 Thread Lorenzo Stoakes
On Wed, Jul 30, 2025 at 02:54:46PM +0200, David Hildenbrand wrote: > On 18.07.25 14:43, Lorenzo Stoakes wrote: > > On Thu, Jul 17, 2025 at 10:03:44PM +0200, David Hildenbrand wrote: > > > On 17.07.25 21:55, Lorenzo Stoakes wrote: > > > > On Thu, Jul 17, 2025 at 08:51:51PM +0100, Lorenzo Stoakes wro

Re: [RFC PATCH v5 03/10] xen/arm: scmi-smc: passthrough SCMI SMC to domain, single agent

2025-07-30 Thread Anthony PERARD
On Tue, Jul 22, 2025 at 11:41:39AM +, Oleksii Moisieiev wrote: > diff --git a/tools/xl/xl_parse.c b/tools/xl/xl_parse.c > index 4ffcbf624b..68d2ebeb9f 100644 > --- a/tools/xl/xl_parse.c > +++ b/tools/xl/xl_parse.c > @@ -1284,6 +1284,36 @@ out: > if (rc) exit(EXIT_FAILURE); > } > > +stat

Re: [PATCH v2 7/9] mm/memory: factor out common code from vm_normal_page_*()

2025-07-30 Thread David Hildenbrand
On 18.07.25 14:43, Lorenzo Stoakes wrote: On Thu, Jul 17, 2025 at 10:03:44PM +0200, David Hildenbrand wrote: On 17.07.25 21:55, Lorenzo Stoakes wrote: On Thu, Jul 17, 2025 at 08:51:51PM +0100, Lorenzo Stoakes wrote: @@ -721,37 +772,21 @@ struct page *vm_normal_page_pmd(struct vm_area_struct *

[PATCH v3 8/9] SUPPORT.md: add xenstorepvh-stubdom live update

2025-07-30 Thread Juergen Gross
Live update is now working with the PVH variant of xenstore-stubdom. Signed-off-by: Juergen Gross --- V2: - new patch --- SUPPORT.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SUPPORT.md b/SUPPORT.md index 6a82a92189..eb44ee85fd 100644 --- a/SUPPORT.md +++ b/SUPPORT.md @

[PATCH v3 9/9] CHANGELOG.md: add xenstorepvh-stubdom live update

2025-07-30 Thread Juergen Gross
Signed-off-by: Juergen Gross --- V2: - new patch --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5f31ca08fe..d118bb1c8c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,7 @@ The format is based on [Keep a Changelog](https://keepacha

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

2025-07-30 Thread Juergen Gross
In order to reactivate an event channel after kexec() of Mini-OS, libxenevtchn needs to allocate the port data for the event channel and set the handler again. Add a new interface xenevtchn_bind() for that purpose, available under Mini-OS only. Signed-off-by: Juergen Gross Reviewed-by: Jason Andr

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

2025-07-30 Thread Juergen Gross
Pass the live_update bool to stubdom_init() in order to be able to handle it properly under Mini-OS. As stubdom_init() will (re-)create the 9pfs device needed for reading the saved state, call stubdom_init() before lu_read_state(). Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk --- to

[PATCH v3 6/9] xenstored: rebind event channels after live update in stubdom

2025-07-30 Thread Juergen Gross
After performing a live update in stubdom environment some information about inter-domain event channels is lost. In order to set this information again, call xenevtchn_bind() from new_domain() in the restore case. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk --- tools/xenstored/core

[PATCH v3 3/9] libxengnttab: set the cloexec flag on Mini-OS

2025-07-30 Thread Juergen Gross
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 Acked-by: Anthony PERARD --- tools/libs/gnttab/minios.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/libs/gnttab/min

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

2025-07-30 Thread Juergen Gross
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(). While adding the offset member to lu_state, change the type of "size" to size_t in order to avoid problems with state exceeding 4GB.

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

2025-07-30 Thread Juergen Gross
When running in a stubdom environment xenevtchn_fdopen() won't work, as any file descriptor state is lost across kexec(). Use a wrapper to replace the call of xenevtchn_fdopen() with the really needed xenevtchn_open() when running on top of Mini-OS. Signed-off-by: Juergen Gross Reviewed-by: Jaso

[PATCH v3 2/9] libevtchn: add O_CLOEXEC support for Mini-OS

2025-07-30 Thread Juergen Gross
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 Acked-by: Anthony PERARD --- tools/libs/evtchn/minios.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) dif

[PATCH v3 0/9] Enable Xenstore-stubdom Live Update

2025-07-30 Thread Juergen Gross
With this series applied I was able to perform Live Update of Xenstore running in a PVH stubdom. One relevant change in this series is how the Xenstore state is being read after activating the new binary. Instead of using mmap() the state records are read one by one via fread(). This might have a

Re: [PATCH] CI: list failed tests at the end of tools job

2025-07-30 Thread Andrew Cooper
On 30/07/2025 12:46 pm, Marek Marczykowski-Górecki wrote: > Currently, if any unit test fails, the final line says only result of > the last test - one need to scroll through the whole log to find which > test failed (or whether was it some infra issue). > Do the simple thing for now and repeate th

[PATCH] CI: list failed tests at the end of tools job

2025-07-30 Thread Marek Marczykowski-Górecki
Currently, if any unit test fails, the final line says only result of the last test - one need to scroll through the whole log to find which test failed (or whether was it some infra issue). Do the simple thing for now and repeate the failed tests list and the end. Signed-off-by: Marek Marczykowsk

Re: [PATCH v9 5/8] vpci: Refactor vpci_remove_register to remove matched registers

2025-07-30 Thread Andrew Cooper
On 28/07/2025 6:03 am, Jiqian Chen wrote: > vpci_remove_register() only supports removing a register in a time, > but the follow-on changes need to remove all registers within a range. > So, refactor it to support removing all registers in a given region. > > And it is no issue to remove a non exis

Re: [PATCH v9 4/8] vpci: Hide extended capability when it fails to initialize

2025-07-30 Thread Nicola Vetrini
On 2025-07-30 12:42, Nicola Vetrini wrote: On 2025-07-30 11:50, Jan Beulich wrote: On 28.07.2025 07:03, Jiqian Chen wrote: +static int vpci_ext_capability_hide( +const struct pci_dev *pdev, unsigned int cap) +{ +const unsigned int offset = pci_find_ext_capability(pdev->sbdf, cap); +

Re: [PATCH v9 4/8] vpci: Hide extended capability when it fails to initialize

2025-07-30 Thread Nicola Vetrini
On 2025-07-30 11:50, Jan Beulich wrote: On 28.07.2025 07:03, Jiqian Chen wrote: +static int vpci_ext_capability_hide( +const struct pci_dev *pdev, unsigned int cap) +{ +const unsigned int offset = pci_find_ext_capability(pdev->sbdf, cap); +struct vpci_register *r, *prev_r; +str

[PATCH v11 5/6] xen/x86: Disallow creating domains with altp2m enabled and altp2m.nr == 0

2025-07-30 Thread Petr Beneš
From: Petr Beneš Since libxl finally sends the altp2m.nr value, we can remove the previously introduced temporary workaround. Creating domain with enabled altp2m while setting altp2m.nr == 0 doesn't make sense and it's probably not what user wants. Signed-off-by: Petr Beneš Acked-by: Jan Beuli

[PATCH v11 3/6] xen: Make the maximum number of altp2m views configurable for x86

2025-07-30 Thread Petr Beneš
From: Petr Beneš This commit introduces the ability to configure the maximum number of altp2m views for the domain during its creation. Previously, the limits were hardcoded to a maximum of 10. This change allows for greater flexibility in environments that require more or fewer altp2m views. Th

[PATCH v11 1/6] altp2m: Drop p2m_altp2m_check() stubs on non-x86, move prototype, and guard uses

2025-07-30 Thread Petr Beneš
From: Petr Beneš Remove the no‑op stubs from the ARM, PPC, and RISC‑V p2m headers and stop providing a stub in arch/x86/include/asm/p2m.h. Declare p2m_altp2m_check() in xen/include/xen/p2m-common.h and gate all call sites with CONFIG_ALTP2M: - wrap the fast_single_step block in hvm/monitor.c wi

[PATCH v11 6/6] tools/ocaml: Add altp2m_count parameter

2025-07-30 Thread Petr Beneš
From: Petr Beneš Allow developers using the OCaml bindings to set the altp2m_count parameter. Signed-off-by: Petr Beneš Acked-by: Christian Lindig --- tools/ocaml/libs/xc/xenctrl.ml | 1 + tools/ocaml/libs/xc/xenctrl.mli | 1 + tools/ocaml/libs/xc/xenctrl_stubs.c | 19 +

[PATCH v11 4/6] tools/libxl: Activate the altp2m_count feature

2025-07-30 Thread Petr Beneš
From: Petr Beneš This commit activates the previously introduced altp2m_count parameter, establishing the connection between libxl and Xen. Signed-off-by: Petr Beneš Acked-by: Anthony PERARD --- tools/libs/light/libxl_create.c | 4 1 file changed, 4 insertions(+) diff --git a/tools/libs

[PATCH v11 2/6] x86/altp2m: Wrap altp2m-specific code in #ifdef CONFIG_ALTP2M

2025-07-30 Thread Petr Beneš
From: Petr Beneš This change consistently guards all altp2m-related functionality behind #ifdef CONFIG_ALTP2M, so that code and data structures related to alternate p2m views are only included when the feature is enabled. Apart from that: - hvmemul_vmfunc() returns X86EMUL_UNHANDLEABLE when altp

[PATCH v11 0/6] x86: Make MAX_ALTP2M configurable

2025-07-30 Thread Petr Beneš
From: Petr Beneš This series introduces the ability to configure the maximum number of altp2m tables during domain creation. Previously, the limits were hardcoded to a maximum of 10. This change allows for greater flexibility in environments that require more or fewer altp2m views. This enhancem

Re: [PATCH v9 4/8] vpci: Hide extended capability when it fails to initialize

2025-07-30 Thread Jan Beulich
On 30.07.2025 12:19, Andrew Cooper wrote: > On 30/07/2025 10:50 am, Jan Beulich wrote: >> On 28.07.2025 07:03, Jiqian Chen wrote: >>> +static int vpci_ext_capability_hide( >>> +const struct pci_dev *pdev, unsigned int cap) >>> +{ >>> +const unsigned int offset = pci_find_ext_capability(pdev

Re: [PATCH v9 4/8] vpci: Hide extended capability when it fails to initialize

2025-07-30 Thread Andrew Cooper
On 30/07/2025 10:50 am, Jan Beulich wrote: > On 28.07.2025 07:03, Jiqian Chen wrote: >> +static int vpci_ext_capability_hide( >> +const struct pci_dev *pdev, unsigned int cap) >> +{ >> +const unsigned int offset = pci_find_ext_capability(pdev->sbdf, cap); >> +struct vpci_register *r, *p

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

2025-07-30 Thread Jan Beulich
On 16.07.2025 23:14, Jason Andryuk wrote: > In a disaggregated environment, dom0 is split into Control, Hardware, > and Xenstore domains, along with domUs. Here we are with terminology again. In a truly disaggregated env, yet more (service) domains would come into play. What you mean here is only

Re: [PATCH] x86: Conditionalise init_dom0_cpu_policy()

2025-07-30 Thread Jan Beulich
On 30.07.2025 11:48, Alejandro Vallejo wrote: > On Wed Jul 30, 2025 at 9:48 AM CEST, Jan Beulich wrote: >> On 29.07.2025 23:29, Daniel P. Smith wrote: >>> 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:

[PATCH v4 2/3] hvmloader: fix SMBIOS table length checks

2025-07-30 Thread Petr Beneš
From: Petr Beneš SMBIOS specification dictates that tables should have a minimal length. This commit introduces further validation for user-input SMBIOS tables. As per SMBIOS Reference Specification: * Type 0: For version 2.3 and later implementations, the length is at least 14h * Type 1: 1Bh fo

[PATCH v4 1/3] tools: add sizeof_field and offsetof_end macros

2025-07-30 Thread Petr Beneš
From: Petr Beneš * `sizeof_field` returns the size of a specific struct member * `offsetof_end` returns the offset to the end of the member within the struct It will be useful in upcoming layout checks of SMBIOS structs. Signed-off-by: Petr Beneš --- tools/include/xen-tools/common-macros.h |

[PATCH v4 0/3] hvmloader: add new SMBIOS tables (7,8,9,26,27,28)

2025-07-30 Thread Petr Beneš
From: Petr Beneš Changes since v3: - Renamed offsetofend macro to offsetof_end. Changes since v2: - Added sizeof_field and offsetofend macros to common-macros.h. - Used offsetofend macro everywhere to make semantically sense. - Added BUILD_BUG_ON to ensure offsets are correct based on the SMBIOS

[PATCH v4 3/3] hvmloader: add new SMBIOS tables (7, 8, 9, 26, 27, 28)

2025-07-30 Thread Petr Beneš
From: Petr Beneš Some SMBIOS tables are used by certain malware families to detect virtualized environments via WMI queries. To improve stealth for sandboxing purposes, this patch adds support for populating these SMBIOS tables from an external binary specified via the "smbios_firmware" domain c

Re: [PATCH v9 4/8] vpci: Hide extended capability when it fails to initialize

2025-07-30 Thread Jan Beulich
On 28.07.2025 07:03, Jiqian Chen wrote: > +static int vpci_ext_capability_hide( > +const struct pci_dev *pdev, unsigned int cap) > +{ > +const unsigned int offset = pci_find_ext_capability(pdev->sbdf, cap); > +struct vpci_register *r, *prev_r; > +struct vpci *vpci = pdev->vpci; > +

Re: [PATCH] x86: Conditionalise init_dom0_cpu_policy()

2025-07-30 Thread Alejandro Vallejo
On Wed Jul 30, 2025 at 9:48 AM CEST, Jan Beulich wrote: > On 29.07.2025 23:29, Daniel P. Smith wrote: >> 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

Re: [PATCH] lib: drop size parameter from sort()'s swap callback

2025-07-30 Thread Jan Beulich
On 30.07.2025 11:29, Andrew Cooper wrote: > On 29/07/2025 3:44 pm, Jan Beulich wrote: >> On 29.07.2025 16:29, Andrew Cooper wrote: >>> On 29/07/2025 3:26 pm, Jan Beulich wrote: This was needed only for generic_swap(), which disappeared in 8cb0341a61fa ("xen/sort: Switch to an extern inlin

Re: [PATCH] lib: drop size parameter from sort()'s swap callback

2025-07-30 Thread Andrew Cooper
On 29/07/2025 3:44 pm, Jan Beulich wrote: > On 29.07.2025 16:29, Andrew Cooper wrote: >> On 29/07/2025 3:26 pm, Jan Beulich wrote: >>> This was needed only for generic_swap(), which disappeared in >>> 8cb0341a61fa ("xen/sort: Switch to an extern inline implementation"). >>> >>> Signed-off-by: Jan B

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

2025-07-30 Thread Jan Beulich
On 16.07.2025 23:14, Jason Andryuk wrote: > Xen includes disctinct concepts of a control domain (privileged) and a > hardware domain, but there is only a single XSM_PRIV check. For dom0 > this is not an issue as they are one and the same. > > With hyperlaunch and its build capabilities, a non-pri

Re: [PATCH 00/11] Introduce CONFIG_PLATFORM_OP to disable platform_op hypercalls

2025-07-30 Thread Jan Beulich
On 25.07.2025 08:15, Jiqian Chen wrote: > Hi all, > This is a continuation of the disabling some hypercalls handling code series. > https://lore.kernel.org/xen-devel/[email protected]/ > > It can be beneficial for some dom0less systems to further reduce Xen footprint > vi

Re: [PATCH] xen/irq: Delete the pirq_cleanup_check() macro

2025-07-30 Thread Jan Beulich
On 30.07.2025 00:31, Andrew Cooper wrote: > MISRA Rule 5.5 objects to a macro aliasing a function, which is what > pirq_cleanup_check() does. The macro is an overly-complicated way of writing: > > if ( !pirq->evtchn ) > pirq_cleanup_check(pirq, d); The way you word this does not in a

[PATCH 5/5] xen/arm: map static memory on demand

2025-07-30 Thread Hari Limaye
From: Penny Zheng In the function `init_staticmem_pages` we need to have mapped static memory banks for initialization. Unlike on an MMU system, we cannot map the entire RAM on an MPU system as we have a limited number of MPU memory regions. To solve this, transiently map the static memory banks

[PATCH 0/5] Third series for R82 MPU support

2025-07-30 Thread Hari Limaye
Hi all, This series is the third set of patches in the ongoing work to introduce support for MPU systems and Cortex R82 in Xen. The patches in this series implement the necessary logic to transiently map and unmap the static memory banks for initialization. Cheers, Hari Luca Fancellu (4): arm

[PATCH 4/5] arm/mpu: Implement ioremap_attr for MPU

2025-07-30 Thread Hari Limaye
From: Luca Fancellu Introduce helpers (un)map_mm_range() in order to allow the temporary mapping of a range of memory, and use these to implement the function `ioremap_attr` for MPU systems. Signed-off-by: Luca Fancellu Signed-off-by: Hari Limaye --- xen/arch/arm/include/asm/mpu/mm.h | 22 ++

[PATCH 3/5] arm/mpu: Implement transient mapping

2025-07-30 Thread Hari Limaye
From: Luca Fancellu Add a scheme to distinguish transient MPU regions, to identify MPU regions which will be mapped for a short period of time. Signed-off-by: Luca Fancellu Signed-off-by: Hari Limaye --- xen/arch/arm/include/asm/arm32/mpu.h | 2 ++ xen/arch/arm/include/asm/arm64/mpu.h

[PATCH 2/5] arm/mpu: Implement setup_mm for MPU systems

2025-07-30 Thread Hari Limaye
From: Luca Fancellu Implement `setup_mm` for MPU systems. This variant doesn't need to set up the direct map. Signed-off-by: Luca Fancellu Signed-off-by: Hari Limaye --- xen/arch/arm/mpu/mm.c | 64 ++- 1 file changed, 63 insertions(+), 1 deletion(-) di

Re: [PATCH] xen/irq: Delete the pirq_cleanup_check() macro

2025-07-30 Thread Dmytro Prokopchuk1
On 7/30/25 01:31, Andrew Cooper wrote: > MISRA Rule 5.5 objects to a macro aliasing a function, which is what > pirq_cleanup_check() does. The macro is an overly-complicated way of writing: > > if ( !pirq->evtchn ) > pirq_cleanup_check(pirq, d); > > There are only a handful of us

[PATCH 1/5] arm/mpu: Implement setup_frametable_mappings for MPU systems

2025-07-30 Thread Hari Limaye
From: Luca Fancellu Implement the MPU variant of `setup_frametable_mappings`. This function will be called by `setup_mm` when an implementation for MPU systems is added in a follow up commit. Signed-off-by: Luca Fancellu Signed-off-by: Hari Limaye --- xen/arch/arm/mpu/mm.c | 19 ++

Re: [PATCH] ns16550: ensure polling timer is disarmed

2025-07-30 Thread Jan Beulich
On 30.07.2025 05:13, [email protected] wrote: > From: Denis Mukhin > > As it stands, polling timer is kept in the list of timers even after the > interrupts have been enabled / polling disabled on ns16550-compatible UART. > > Ensure polling timer is removed from the timer list once UART interrupt

Re: [PATCH] ns16550: remove trailing whitespaces

2025-07-30 Thread Jan Beulich
On 30.07.2025 05:12, [email protected] wrote: > From: Denis Mukhin > > Remove trailing whitespaces in NS16550-compatible UART driver. > > Signed-off-by: Denis Mukhin Acked-by: Jan Beulich

Re: [PATCH v3 1/3] tools: add sizeof_field and offsetofend macros

2025-07-30 Thread Jan Beulich
On 29.07.2025 23:25, Petr Beneš wrote: > --- a/tools/include/xen-tools/common-macros.h > +++ b/tools/include/xen-tools/common-macros.h > @@ -83,6 +83,11 @@ > #define __packed __attribute__((__packed__)) > #endif > > +#define sizeof_field(type, member) sizeof(((type *)NULL)->member) > + > +#defi

Re: [PATCH] x86: Conditionalise init_dom0_cpu_policy()

2025-07-30 Thread Jan Beulich
On 29.07.2025 23:29, Daniel P. Smith wrote: > 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: >

Re: [PATCH] lib: drop size parameter from sort()'s swap callback

2025-07-30 Thread Bertrand Marquis
Hi, > On 29 Jul 2025, at 16:26, Jan Beulich wrote: > > This was needed only for generic_swap(), which disappeared in > 8cb0341a61fa ("xen/sort: Switch to an extern inline implementation"). > > Signed-off-by: Jan Beulich For arm part: Acked-by: Bertrand Marquis Cheers Bertrand > > --- a/x