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

2025-05-20 Thread Jan Beulich
On 20.05.2025 20:45, Daniel P. Smith wrote: > On 5/20/25 10:10, Andrew Cooper wrote: >> Treat "argo" on the command line as a positive boolean, rather than requiring >> the user to pass "argo=1/on/enable/true". >> >> Move both opt_argo* variables into __ro_after_init. They're set during >> command

Re: [PATCH v2 2/2] xen/domain: rewrite emulation_flags_ok()

2025-05-20 Thread Jan Beulich
On 21.05.2025 01:00, Stefano Stabellini wrote: > On Tue, 20 May 2025, dm...@proton.me wrote: >> On Tue, May 20, 2025 at 05:24:33PM +0200, Jan Beulich wrote: >>> On 16.05.2025 04:29, dm...@proton.me wrote: --- a/xen/arch/x86/include/asm/domain.h +++ b/xen/arch/x86/include/asm/domain.h

Re: [PATCH v4 03/10] vpci/header: Emulate extended capability list for dom0

2025-05-20 Thread Chen, Jiqian
On 2025/5/21 14:25, Jan Beulich wrote: > On 21.05.2025 08:08, Chen, Jiqian wrote: >> On 2025/5/19 21:21, Roger Pau Monné wrote: >>> On Mon, May 19, 2025 at 03:10:17PM +0200, Jan Beulich wrote: On 19.05.2025 09:13, Chen, Jiqian wrote: > On 2025/5/19 14:56, Jan Beulich wrote: >> On 19.05

Re: [PATCH v4 03/10] vpci/header: Emulate extended capability list for dom0

2025-05-20 Thread Jan Beulich
On 21.05.2025 08:08, Chen, Jiqian wrote: > On 2025/5/19 21:21, Roger Pau Monné wrote: >> On Mon, May 19, 2025 at 03:10:17PM +0200, Jan Beulich wrote: >>> On 19.05.2025 09:13, Chen, Jiqian wrote: On 2025/5/19 14:56, Jan Beulich wrote: > On 19.05.2025 08:43, Chen, Jiqian wrote: >> On 202

Re: [PATCH v2 1/2] xen/domain: introduce non-x86 hardware emulation flags

2025-05-20 Thread Jan Beulich
On 20.05.2025 23:39, dm...@proton.me wrote: > On Tue, May 20, 2025 at 05:21:06PM +0200, Jan Beulich wrote: >> On 16.05.2025 04:29, dm...@proton.me wrote: >>> From: Denis Mukhin >>> >>> Define per-architecture emulation_flags for configuring domain emulation >>> features. >>> >>> Print d->arch.emul

Re: [PATCH v4 03/10] vpci/header: Emulate extended capability list for dom0

2025-05-20 Thread Chen, Jiqian
On 2025/5/19 21:21, Roger Pau Monné wrote: > On Mon, May 19, 2025 at 03:10:17PM +0200, Jan Beulich wrote: >> On 19.05.2025 09:13, Chen, Jiqian wrote: >>> On 2025/5/19 14:56, Jan Beulich wrote: On 19.05.2025 08:43, Chen, Jiqian wrote: > On 2025/5/18 22:20, Jan Beulich wrote: >> On 09.05

Re: [PATCH v2 2/2] xen/domain: rewrite emulation_flags_ok()

2025-05-20 Thread Jan Beulich
On 21.05.2025 00:38, dm...@proton.me wrote: > On Tue, May 20, 2025 at 05:24:33PM +0200, Jan Beulich wrote: >> On 16.05.2025 04:29, dm...@proton.me wrote: >>> --- a/xen/arch/x86/include/asm/domain.h >>> +++ b/xen/arch/x86/include/asm/domain.h >>> @@ -494,6 +494,12 @@ struct arch_domain >>>

[PATCH 2/2] SUPPORT.md: mark xenstore live update as supported

2025-05-20 Thread Juergen Gross
Live update of xenstored is available since Xen 4.15 and it is tested on a regular basis since then. Switch the live update support from "Tech Preview" to "Supported". Signed-off-by: Juergen Gross --- SUPPORT.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SUPPORT.md b/SU

[PATCH 0/2] SUPPORT.md: update the xenstore support state

2025-05-20 Thread Juergen Gross
Two updates regarding C Xenstore support. Juergen Gross (2): SUPPORT.md: add xenstore stubdom as supported SUPPORT.md: mark xenstore live update as supported SUPPORT.md | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) -- 2.43.0

[PATCH 1/2] SUPPORT.md: add xenstore stubdom as supported

2025-05-20 Thread Juergen Gross
SUPPORT.md is missing a suupport statement for Xenstore stubdom. As SUSE is using it in production since several years now, it should be added as "supported". This covers the PV and the PVH variant. Signed-off-by: Juergen Gross --- SUPPORT.md | 10 ++ 1 file changed, 10 insertions(+) d

RE: [PATCH v3 01/20] xen/x86: remove "depends on !PV_SHIM_EXCLUSIVE"

2025-05-20 Thread Penny, Zheng
[Public] > -Original Message- > From: Jan Beulich > Sent: Wednesday, April 30, 2025 11:17 PM > To: Penny, Zheng > Cc: Huang, Ray ; Andrew Cooper > ; Roger Pau Monné ; > Anthony PERARD ; Orzel, Michal > ; Julien Grall ; Stefano Stabellini > ; xen-devel@lists.xenproject.org > Subject: Re:

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

2025-05-20 Thread Christopher Clark
On Tue, May 20, 2025 at 3:10 PM Andrew Cooper wrote: > Treat "argo" on the command line as a positive boolean, rather than > requiring > the user to pass "argo=1/on/enable/true". > > Move both opt_argo* variables into __ro_after_init. They're set during > command line parsing and never modified

Re: pin_user_pages and foreign mappings error

2025-05-20 Thread Demi Marie Obenour
On 5/20/25 20:24, Stefano Stabellini wrote: > Hi Juergen and all, > > We have an issue where QEMU is mapping foreign pages as usual and > passing them to a driver in Linux (amdxdna). The driver in Linux calls > pin_user_pages_fast() on these pages, and it returns -EFAULT. Stack > trace appended be

pin_user_pages and foreign mappings error

2025-05-20 Thread Stefano Stabellini
Hi Juergen and all, We have an issue where QEMU is mapping foreign pages as usual and passing them to a driver in Linux (amdxdna). The driver in Linux calls pin_user_pages_fast() on these pages, and it returns -EFAULT. Stack trace appended below. This is Dom0 PVH. We disabled CONFIG_XEN_UNPOPULAT

Re: [PATCH 0/3] CI: Improvements to *-tools-test-* jobs

2025-05-20 Thread dmkhn
On Tue, May 20, 2025 at 09:52:36PM +0100, Andrew Cooper wrote: > Rearrange tools/tests to be more ameanable to running in CI, and drop the > special casing holding it together. > > > > Andrew Cooper (3): > tools/tests: Drop depriv-fd-checker > tools/tests: Install tests into $(LIBEXEC)/tests

[PATCH v8 3/3] xen/domain: introduce CONFIG_MAX_DOMID

2025-05-20 Thread dmkhn
From: Denis Mukhin Embedded deployments of Xen do not need to have support for more than dozen of domains. Introduce build-time configuration option to limit the number of domains during run-time. Also, move DOMID_FIRST_RESERVED compile-time check from Arm to common code. Suggested-by: Julien

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

2025-05-20 Thread dmkhn
From: Denis Mukhin Currently, hypervisor code has two different non-system domain ID allocation implementations: (a) Sequential IDs allocation in dom0less Arm code based on max_init_domid; (b) Sequential IDs allocation in XEN_DOMCTL_createdomain; does not use max_init_domid (both Arm

[PATCH v8 2/3] xen/domain: adjust domain ID allocation for Arm

2025-05-20 Thread dmkhn
From: Denis Mukhin Remove the hardcoded domain ID 0 allocation for hardware domain and replace it with a call to get_initial_domain_id() (returns the value of hardware_domid on Arm). Update domid_alloc(DOMID_INVALID) case to ensure that get_initial_domain_id() ID is skipped during domain ID allo

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

2025-05-20 Thread dmkhn
The patch series adds new library calls for allocating domain IDs. Patch 1 introduces new domid_{alloc,free} calls. Patch 2 adjusts hardware domain ID treatment on Arm. Patch 3 is an RFC: introduces new CONFIG_MAX_DOMID parameter to limit the number of user domains during run-time. Link to v7: h

Re: [PATCH 2/2] MAINTAINERS: add Daniel P. Smith as an Argo maintainer

2025-05-20 Thread Stefano Stabellini
On Wed, 21 May 2025, Christopher Clark wrote: > Daniel is a longstanding contributor to the OpenXT Project where Argo > was developed and is in active use with Xen, and to Argo itself, > involved with the design and development of Argo software. > > Signed-off-by: Christopher Clark Acked-by: Ste

Re: [PATCH 1/2] MAINTAINERS: include Argo documentation in the ARGO section

2025-05-20 Thread Stefano Stabellini
On Wed, 21 May 2025, Christopher Clark wrote: > Signed-off-by: Christopher Clark Acked-by: Stefano Stabellini > --- > MAINTAINERS | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/MAINTAINERS b/MAINTAINERS > index c11b82eca9..e7198363c5 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS >

[PATCH 2/2] MAINTAINERS: add Daniel P. Smith as an Argo maintainer

2025-05-20 Thread Christopher Clark
Daniel is a longstanding contributor to the OpenXT Project where Argo was developed and is in active use with Xen, and to Argo itself, involved with the design and development of Argo software. Signed-off-by: Christopher Clark --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/M

[PATCH 1/2] MAINTAINERS: include Argo documentation in the ARGO section

2025-05-20 Thread Christopher Clark
Signed-off-by: Christopher Clark --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index c11b82eca9..e7198363c5 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -226,6 +226,7 @@ S: Maintained F: xen/include/public/argo.h F: xen/include/xen/argo.

Re: [PATCH v2 2/2] xen/domain: rewrite emulation_flags_ok()

2025-05-20 Thread Stefano Stabellini
On Tue, 20 May 2025, dm...@proton.me wrote: > On Tue, May 20, 2025 at 05:24:33PM +0200, Jan Beulich wrote: > > On 16.05.2025 04:29, dm...@proton.me wrote: > > > --- a/xen/arch/x86/include/asm/domain.h > > > +++ b/xen/arch/x86/include/asm/domain.h > > > @@ -494,6 +494,12 @@ struct arch_domain > > >

Re: [PATCH] tools: Add install/uninstall targets to tests/x86_emulator

2025-05-20 Thread Stefano Stabellini
On Tue, 20 May 2025, Andrew Cooper wrote: > On 16/05/2024 12:07 pm, Alejandro Vallejo wrote: > > Bring test_x86_emulator in line with other tests by adding > > install/uninstall rules. > > > > Signed-off-by: Alejandro Vallejo > > --- > > tools/tests/x86_emulator/Makefile | 11 +-- > > 1 f

Re: [PATCH v2 2/2] xen/domain: rewrite emulation_flags_ok()

2025-05-20 Thread dmkhn
On Tue, May 20, 2025 at 05:24:33PM +0200, Jan Beulich wrote: > On 16.05.2025 04:29, dm...@proton.me wrote: > > --- a/xen/arch/x86/include/asm/domain.h > > +++ b/xen/arch/x86/include/asm/domain.h > > @@ -494,6 +494,12 @@ struct arch_domain > > X86_EMU_PIT | X86_EMU_

Re: [PATCH v2 1/2] xen/domain: introduce non-x86 hardware emulation flags

2025-05-20 Thread dmkhn
On Tue, May 20, 2025 at 05:21:06PM +0200, Jan Beulich wrote: > On 16.05.2025 04:29, dm...@proton.me wrote: > > From: Denis Mukhin > > > > Define per-architecture emulation_flags for configuring domain emulation > > features. > > > > Print d->arch.emulation_flags from 'q' keyhandler for better trac

Re: [PATCH] tools: Add install/uninstall targets to tests/x86_emulator

2025-05-20 Thread Andrew Cooper
On 16/05/2024 12:07 pm, Alejandro Vallejo wrote: > Bring test_x86_emulator in line with other tests by adding > install/uninstall rules. > > Signed-off-by: Alejandro Vallejo > --- > tools/tests/x86_emulator/Makefile | 11 +-- > 1 file changed, 9 insertions(+), 2 deletions(-) > > diff --gi

[PATCH 2/3] tools/tests: Install tests into $(LIBEXEC)/tests

2025-05-20 Thread Andrew Cooper
$(LIBEXEC_BIN) is a dumping ground of many things. Separate the "clearly tests" from everything else so we can clean up how they're run in CI. Signed-off-by: Andrew Cooper --- CC: Anthony PERARD CC: Stefano Stabellini CC: Marek Marczykowski-Górecki --- tools/tests/cpu-policy/Makefile | 6

[PATCH 0/3] CI: Improvements to *-tools-test-* jobs

2025-05-20 Thread Andrew Cooper
Rearrange tools/tests to be more ameanable to running in CI, and drop the special casing holding it together. Andrew Cooper (3): tools/tests: Drop depriv-fd-checker tools/tests: Install tests into $(LIBEXEC)/tests CI: Drop custom handling of tools/tests .gitignore

[PATCH 1/3] tools/tests: Drop depriv-fd-checker

2025-05-20 Thread Andrew Cooper
Unlike the other tests, this is not standalone. It requires poking at a live system, making it unweildly to use. It hasn't been touched in 7 years, despite changes in libraries and kernel devices using the deprivilege infrastructure. Signed-off-by: Andrew Cooper --- CC: Anthony PERARD CC: Stef

[PATCH 3/3] CI: Drop custom handling of tools/tests

2025-05-20 Thread Andrew Cooper
... and use them from their installed location. The full recusive copy of tools/tests brings in all build and intermediate artefacts. e.g. for test-tsx alone: ./tests/tsx ./tests/tsx/.test-tsx.o.d ./tests/tsx/test-tsx.o ./tests/tsx/.gitignore ./tests/tsx/test-tsx ./tests/tsx/Makefile

Re: [PATCH] CI: Rename qubes-x86-64 parameter "" to "dom0pv"

2025-05-20 Thread Marek Marczykowski-Górecki
On Tue, May 20, 2025 at 06:37:19PM +0100, Andrew Cooper wrote: > This really is a legacy of not having parameters to start with. Give PV dom0 > with a PVH domU a real name. > > Reformat the table to fix alignment. > > Signed-off-by: Andrew Cooper Reviewed-by: Marek Marczykowski-Górecki > ---

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

2025-05-20 Thread dmkhn
On Tue, May 20, 2025 at 03:10:27PM +0100, Andrew Cooper wrote: > Treat "argo" on the command line as a positive boolean, rather than requiring > the user to pass "argo=1/on/enable/true". > > Move both opt_argo* variables into __ro_after_init. They're set during > command line parsing and never mo

Re: [PATCH TEST-ARTEFACTS] (Re)add python3 to alpine rootfs

2025-05-20 Thread Stefano Stabellini
On Tue, 20 May 2025, Andrew Cooper wrote: > XTF uses python, and we're looking to reintroduce XTF testing to Xen. > > Signed-off-by: Andrew Cooper Acked-by: Stefano Stabellini > --- > CC: Anthony PERARD > CC: Stefano Stabellini > CC: Marek Marczykowski-Górecki > --- > scripts/alpine-rootf

[PATCH TEST-ARTEFACTS] (Re)add python3 to alpine rootfs

2025-05-20 Thread Andrew Cooper
XTF uses python, and we're looking to reintroduce XTF testing to Xen. Signed-off-by: Andrew Cooper --- CC: Anthony PERARD CC: Stefano Stabellini CC: Marek Marczykowski-Górecki --- scripts/alpine-rootfs.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/alpine-rootfs.sh b/script

Re: [PATCH] xen: Give compile.h header guards

2025-05-20 Thread Stefano Stabellini
On Tue, 20 May 2025, Jan Beulich wrote: > On 19.05.2025 23:34, Stefano Stabellini wrote: > > On Mon, 19 May 2025, Jan Beulich wrote: > >> On 19.05.2025 15:52, Andrew Cooper wrote: > >>> Signed-off-by: Andrew Cooper > >> > >> Is this to please Misra in some way? > >> > >>> --- a/xen/include/xen/com

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

2025-05-20 Thread Daniel P. Smith
On 5/20/25 10:10, Andrew Cooper wrote: Treat "argo" on the command line as a positive boolean, rather than requiring the user to pass "argo=1/on/enable/true". Move both opt_argo* variables into __ro_after_init. They're set during command line parsing and never modified thereafter. Signed-off-b

Re: [PATCH v7 3/3] xen/domain: introduce CONFIG_MAX_DOMID

2025-05-20 Thread dmkhn
On Tue, May 20, 2025 at 08:04:14AM +0200, Jan Beulich wrote: > On 19.05.2025 21:23, dm...@proton.me wrote: > > From: Denis Mukhin > > > > Embedded deployments of Xen do not need to have support for more than dozen > > of > > domains. > > > > Introduce build-time configuration option to limit the

[PATCH] CI: Rename qubes-x86-64 parameter "" to "dom0pv"

2025-05-20 Thread Andrew Cooper
This really is a legacy of not having parameters to start with. Give PV dom0 with a PVH domU a real name. Reformat the table to fix alignment. Signed-off-by: Andrew Cooper --- CC: Marek Marczykowski-Górecki --- automation/gitlab-ci/test.yaml | 8 automation/scripts/qubes-x86-64.

[PATCH V2] arm/vgic-v3: Fix write_ignore_64's check in __vgic_v3_rdistr_rd_mmio_write()

2025-05-20 Thread Oleksandr Tyshchenko
An attempt to write access the register (i.e. GICR_PROPBASER, GICR_PENDBASER) which should be ignored (i.e. no virtual ITS present) causes the guest data abort due to incorrect check at the write_ignore_64 label. The check should be inverted. While at it, move goto to the next line. Fixes: c4d6b

Re: [PATCH v2 2/2] xen/domain: rewrite emulation_flags_ok()

2025-05-20 Thread Jan Beulich
On 16.05.2025 04:29, dm...@proton.me wrote: > --- a/xen/arch/x86/include/asm/domain.h > +++ b/xen/arch/x86/include/asm/domain.h > @@ -494,6 +494,12 @@ struct arch_domain > X86_EMU_PIT | X86_EMU_USE_PIRQ | \ > X86_EMU_VPCI) >

Re: [PATCH] arm/vgic-v3: Fix write_ignore_64's check in __vgic_v3_rdistr_rd_mmio_write()

2025-05-20 Thread Oleksandr Tyshchenko
On 20.05.25 18:02, Julien Grall wrote: > Hi Oleksandr, Hello Julien > > On 20/05/2025 14:47, Oleksandr Tyshchenko wrote: >> An attempt to write access the register (i.e. GICR_PROPBASER, >> GICR_PENDBASER) >> which should be ignored (i.e. no virtual ITS present) causes the data >> about > >

Re: [PATCH v2 1/2] xen/domain: introduce non-x86 hardware emulation flags

2025-05-20 Thread Jan Beulich
On 16.05.2025 04:29, dm...@proton.me wrote: > From: Denis Mukhin > > Define per-architecture emulation_flags for configuring domain emulation > features. > > Print d->arch.emulation_flags from 'q' keyhandler for better traceability > while debugging. > > Signed-off-by: Denis Mukhin > --- > Cha

Re: [PATCH] arm/vgic-v3: Fix write_ignore_64's check in __vgic_v3_rdistr_rd_mmio_write()

2025-05-20 Thread Oleksandr Tyshchenko
On 20.05.25 17:24, Andrew Cooper wrote: Hello Andrew > On 20/05/2025 2:47 pm, Oleksandr Tyshchenko wrote: >> An attempt to write access the register (i.e. GICR_PROPBASER, GICR_PENDBASER) >> which should be ignored (i.e. no virtual ITS present) causes the data about > > Do you mean "data abort"

Re: [PATCH v1 6/6] xen/riscv: implement p2m mapping functionality

2025-05-20 Thread Jan Beulich
On 09.05.2025 17:57, Oleksii Kurochko wrote: > These utilities are needed for building and managing RISC-V guest page > tables and MMIO mappings by using functions map_regions_p2mt() and > guest_physmap_add_entry(). > > To implement p2m mapping functionality the following is introduced: > - Define

Re: [PATCH v1 5/6] xen/riscv: add new p2m types and helper macros for type classification

2025-05-20 Thread Jan Beulich
On 09.05.2025 17:57, Oleksii Kurochko wrote: > --- a/xen/arch/riscv/include/asm/p2m.h > +++ b/xen/arch/riscv/include/asm/p2m.h > @@ -80,8 +80,36 @@ struct p2m_domain { > typedef enum { > p2m_invalid = 0,/* Nothing mapped here */ > p2m_ram_rw, /* Normal read/write domain RAM *

Re: [PATCH v1 4/6] xen/riscv: define pt_t and pt_walk_t structures

2025-05-20 Thread Jan Beulich
On 09.05.2025 17:57, Oleksii Kurochko wrote: > Refactor pte_t to be a union which hold page table entry plus > pt_t and pt_walk_t structures to simpilfy p2m functions. Is this really simplifying things? I really view ... > Also, introduce some helpers which are using pt_walk_t. ... these helpers

Re: [PATCH] arm/vgic-v3: Fix write_ignore_64's check in __vgic_v3_rdistr_rd_mmio_write()

2025-05-20 Thread Julien Grall
Hi Oleksandr, On 20/05/2025 14:47, Oleksandr Tyshchenko wrote: An attempt to write access the register (i.e. GICR_PROPBASER, GICR_PENDBASER) which should be ignored (i.e. no virtual ITS present) causes the data about I assume, this is a guest data abort, rather than Xen crash? due to incorrec

Re: [PATCH v2 2/5] public/sysctl: Clarify usage of pm_{px,cx}_stat

2025-05-20 Thread Jan Beulich
On 20.05.2025 16:25, Ross Lagerwall wrote: > On Tue, May 13, 2025 at 3:43 PM Jan Beulich wrote: >> >> On 12.05.2025 16:46, Ross Lagerwall wrote: >>> --- a/xen/include/public/sysctl.h >>> +++ b/xen/include/public/sysctl.h >>> @@ -215,23 +215,51 @@ typedef struct pm_px_val pm_px_val_t; >>> DEFINE_X

Re: [PATCH v2 10/16] xen/riscv: imsic_init() implementation

2025-05-20 Thread Oleksii Kurochko
On 5/19/25 8:32 PM, Jan Beulich wrote: On 19.05.2025 17:19, Oleksii Kurochko wrote: On 5/15/25 10:42 AM, Jan Beulich wrote: On 06.05.2025 18:51, Oleksii Kurochko wrote: --- /dev/null +++ b/xen/arch/riscv/include/asm/imsic.h @@ -0,0 +1,65 @@ +/* SPDX-License-Identifier: MIT */ + +/* + * xen/ar

Re: [PATCH v1 3/6] xen/riscv: construct the P2M pages pool for guests

2025-05-20 Thread Jan Beulich
On 09.05.2025 17:57, Oleksii Kurochko wrote: > Implement p2m_set_allocation() to construct p2m pages pool for guests > based on required number of pages. > > This is implemented by: > - Adding a `struct paging_domain` which contains a freelist, a > counter variable and a spinlock to `struct arch

Re: [PATCH v2 2/5] public/sysctl: Clarify usage of pm_{px,cx}_stat

2025-05-20 Thread Ross Lagerwall
On Tue, May 13, 2025 at 3:43 PM Jan Beulich wrote: > > On 12.05.2025 16:46, Ross Lagerwall wrote: > > --- a/xen/include/public/sysctl.h > > +++ b/xen/include/public/sysctl.h > > @@ -215,23 +215,51 @@ typedef struct pm_px_val pm_px_val_t; > > DEFINE_XEN_GUEST_HANDLE(pm_px_val_t); > > > > struct p

Re: [PATCH v2 2/3] Add lockdown mode

2025-05-20 Thread Kevin Lampis
On Tue, May 20, 2025 at 3:23 PM Jan Beulich wrote: > > No comments on the patch itself (yet), just a formal remark: I was puzzled > by having only v2 2/3 and 3/3 in my inbox. Looks like you sent each as > reply on the v1 sub-threads. Very occasionally for a larger series it may > be okay to send j

Re: [PATCH] arm/vgic-v3: Fix write_ignore_64's check in __vgic_v3_rdistr_rd_mmio_write()

2025-05-20 Thread Andrew Cooper
On 20/05/2025 2:47 pm, Oleksandr Tyshchenko wrote: > An attempt to write access the register (i.e. GICR_PROPBASER, GICR_PENDBASER) > which should be ignored (i.e. no virtual ITS present) causes the data about Do you mean "data abort" here?  If not, I can't parse the sentence. > due to incorrect c

Re: [PATCH v2 6/6] x86/hvm: reduce the need to flush caches in memory_type_changed()

2025-05-20 Thread Oleksii Kurochko
On 5/19/25 4:33 PM, Roger Pau Monné wrote: On Mon, May 19, 2025 at 03:22:32PM +0200, Jan Beulich wrote: On 19.05.2025 13:08, Roger Pau Monné wrote: On Sun, May 18, 2025 at 01:44:49PM +0200, Jan Beulich wrote: On 16.05.2025 11:45, Roger Pau Monne wrote: Not sure whether this attempt to reduc

Re: [PATCH v2 2/3] Add lockdown mode

2025-05-20 Thread Jan Beulich
On 20.05.2025 13:57, Kevin Lampis wrote: > From: Ross Lagerwall > > The intention of lockdown mode is to prevent attacks from a rogue dom0 > userspace from compromising the system. Lockdown mode can be controlled by a > Kconfig option and a command-line parameter. It is also enabled automatically

Re: [PATCH v2 09/16] xen/riscv: introduce register_intc_ops() and intc_hw_ops.

2025-05-20 Thread Jan Beulich
On 20.05.2025 16:04, Oleksii Kurochko wrote: > On 5/19/25 3:16 PM, Jan Beulich wrote: >> On 19.05.2025 11:16, Oleksii Kurochko wrote: >>> On 5/15/25 10:06 AM, Jan Beulich wrote: On 06.05.2025 18:51, Oleksii Kurochko wrote: > --- a/xen/arch/riscv/include/asm/intc.h > +++ b/xen/arch/risc

[PATCH] xen/argo: Command line handling improvements

2025-05-20 Thread Andrew Cooper
Treat "argo" on the command line as a positive boolean, rather than requiring the user to pass "argo=1/on/enable/true". Move both opt_argo* variables into __ro_after_init. They're set during command line parsing and never modified thereafter. Signed-off-by: Andrew Cooper --- CC: Christopher Cla

[PATCH] arm/vgic-v3: Fix write_ignore_64's check in __vgic_v3_rdistr_rd_mmio_write()

2025-05-20 Thread Oleksandr Tyshchenko
An attempt to write access the register (i.e. GICR_PROPBASER, GICR_PENDBASER) which should be ignored (i.e. no virtual ITS present) causes the data about due to incorrect check at the write_ignore_64 label. The check should be inverted. Fixes: c4d6bbdc12e5 ("xen/arm: vgic-v3: Support 32-bit access

Re: [PATCH v1 2/6] xen/riscv: introduce things necessary for p2m initialization

2025-05-20 Thread Jan Beulich
On 12.05.2025 11:24, Oleksii Kurochko wrote: > On 5/9/25 6:14 PM, Andrew Cooper wrote: >> On 09/05/2025 4:57 pm, Oleksii Kurochko wrote: >>> --- /dev/null >>> +++ b/xen/arch/riscv/p2m.c >>> @@ -0,0 +1,168 @@ >>> +#include >>> +#include >>> +#include >>> +#include >>> +#include >>> +#include >

Re: [PATCH v1 2/6] xen/riscv: introduce things necessary for p2m initialization

2025-05-20 Thread Jan Beulich
On 09.05.2025 17:57, Oleksii Kurochko wrote: > --- a/xen/arch/riscv/include/asm/domain.h > +++ b/xen/arch/riscv/include/asm/domain.h > @@ -5,6 +5,8 @@ > #include > #include > > +#include > + > struct hvm_domain > { > uint64_t params[HVM_NR_PARAMS]; > @@ -16,8 +18,12 @@ st

Re: [PATCH v2 1/5] x86/pmstat: Check size of PMSTAT_get_pxstat buffers

2025-05-20 Thread Jan Beulich
On 20.05.2025 12:53, Ross Lagerwall wrote: > On Tue, May 13, 2025 at 3:27 PM Jan Beulich wrote: >> >> On 12.05.2025 16:46, Ross Lagerwall wrote: >>> Check that the total number of states passed in and hence the size of >>> buffers is sufficient to avoid writing more than the caller has >>> allocat

[PATCH v2 3/3] Disallow most command-line options when lockdown mode is enabled

2025-05-20 Thread Kevin Lampis
A subset of command-line parameters that are specifically safe to use when lockdown mode is enabled are annotated as such. These are commonly used parameters which have been audited to ensure they cannot be used to undermine the integrity of the system when booted in Secure Boot mode. Signed-off-

Re: [PATCH v2 16/16] xen/riscv: add basic UART support

2025-05-20 Thread Oleksii Kurochko
On 5/15/25 11:59 AM, Jan Beulich wrote: On 06.05.2025 18:51, Oleksii Kurochko wrote: --- a/xen/arch/riscv/setup.c +++ b/xen/arch/riscv/setup.c @@ -4,12 +4,16 @@ #include #include #include +#include #include #include #include #include +#include Why's this needed? I can't

[PATCH v2 2/3] Add lockdown mode

2025-05-20 Thread Kevin Lampis
From: Ross Lagerwall The intention of lockdown mode is to prevent attacks from a rogue dom0 userspace from compromising the system. Lockdown mode can be controlled by a Kconfig option and a command-line parameter. It is also enabled automatically when Secure Boot is enabled and it cannot be disab

Re: [PATCH v2 15/16] xen/riscv: implement setup_irq()

2025-05-20 Thread Oleksii Kurochko
On 5/15/25 11:57 AM, Jan Beulich wrote: On 06.05.2025 18:51, Oleksii Kurochko wrote: @@ -58,6 +59,89 @@ int platform_get_irq(const struct dt_device_node *device, int index) return dt_irq.irq; } +static int _setup_irq(struct irq_desc *desc, unsigned int irqflags, +

Re: [PATCH v2 14/16] xen/riscv: add external interrupt handling for hypervisor mode

2025-05-20 Thread Oleksii Kurochko
On 5/15/25 11:54 AM, Jan Beulich wrote: On 06.05.2025 18:51, Oleksii Kurochko wrote: +static void cf_check aplic_set_irq_type(struct irq_desc *desc, unsigned int type) +{ +/* +* Interrupt 0 isn't possible based on the spec: +* Each of an APLIC’s interrupt sources has a fixed uniq

Re: [PATCH v2 13/16] xen/riscv: implementation of aplic and imsic operations

2025-05-20 Thread Oleksii Kurochko
On 5/15/25 11:44 AM, Jan Beulich wrote: @@ -159,6 +270,8 @@ static int __init aplic_preinit(struct dt_device_node *node, const void *dat) dt_irq_xlate = aplic_irq_xlate; +spin_lock_init(&aplic.lock); Can't you have the struct field have a suitable initializer? Sure, I will us

Re: [PATCH] xen: Give compile.h header guards

2025-05-20 Thread Frediano Ziglio
On Mon, May 19, 2025 at 2:52 PM Andrew Cooper wrote: > > Signed-off-by: Andrew Cooper > --- > CC: Anthony PERARD > CC: Michal Orzel > CC: Jan Beulich > CC: Julien Grall > CC: Roger Pau Monné > CC: Stefano Stabellini > --- > xen/include/xen/compile.h.in | 3 +++ > xen/tools/process-banner.s

Re: [PATCH v2 1/5] x86/pmstat: Check size of PMSTAT_get_pxstat buffers

2025-05-20 Thread Ross Lagerwall
On Tue, May 13, 2025 at 3:27 PM Jan Beulich wrote: > > On 12.05.2025 16:46, Ross Lagerwall wrote: > > Check that the total number of states passed in and hence the size of > > buffers is sufficient to avoid writing more than the caller has > > allocated. > > > > The interface is not explicit about

Re: [PATCH v4 09/10] vpci/msi: Free MSI resources when init_msi() fails

2025-05-20 Thread Roger Pau Monné
On Tue, May 20, 2025 at 11:14:27AM +0200, Jan Beulich wrote: > On 20.05.2025 11:09, Roger Pau Monné wrote: > > On Tue, May 20, 2025 at 08:40:28AM +0200, Jan Beulich wrote: > >> On 09.05.2025 11:05, Jiqian Chen wrote: > >>> When init_msi() fails, the previous new changes will hide MSI > >>> capabili

RE: [PATCH v4 12/15] tools/xenpm: Print CPPC parameters for amd-cppc driver

2025-05-20 Thread Penny, Zheng
[Public] > -Original Message- > From: Jan Beulich > Sent: Tuesday, May 20, 2025 5:18 PM > To: Penny, Zheng > Cc: Huang, Ray ; Anthony PERARD > ; xen-devel@lists.xenproject.org > Subject: Re: [PATCH v4 12/15] tools/xenpm: Print CPPC parameters for amd-cppc > driver > > On 20.05.2025 10:22

RE: [PATCH v4 05/15] xen/x86: introduce "cpufreq=amd-cppc" xen cmdline

2025-05-20 Thread Penny, Zheng
[Public] > -Original Message- > From: Jan Beulich > Sent: Tuesday, May 20, 2025 5:16 PM > To: Penny, Zheng > Cc: Huang, Ray ; Andrew Cooper > ; Anthony PERARD ; > Orzel, Michal ; Julien Grall ; Roger Pau > Monné ; Stefano Stabellini ; > xen- > de...@lists.xenproject.org > Subject: Re: [

Re: [RFC PATCH] xen: Introduce extra IRQ count domain creation parameter

2025-05-20 Thread Roger Pau Monné
On Fri, May 16, 2025 at 01:50:25PM +, Teddy Astie wrote: > When doing PCI Passthrough with high-IRQ devices (e.g NVMe drives), > the default limit may be unefficient as not all domains requires > more IRQs. > > Introduce a new parameter to allow the toolstack to tune the IRQ > count if more is

Re: [PATCH v4 12/15] tools/xenpm: Print CPPC parameters for amd-cppc driver

2025-05-20 Thread Jan Beulich
On 20.05.2025 10:22, Penny, Zheng wrote: >> -Original Message- >> From: Jan Beulich >> Sent: Tuesday, May 13, 2025 4:03 PM >> >> On 09.05.2025 08:36, Penny, Zheng wrote: -Original Message- From: Jan Beulich Sent: Wednesday, April 30, 2025 9:55 PM On 14.04.

Re: [PATCH v4 05/15] xen/x86: introduce "cpufreq=amd-cppc" xen cmdline

2025-05-20 Thread Jan Beulich
On 20.05.2025 10:28, Penny, Zheng wrote: > [Public] > >> -Original Message- >> From: Jan Beulich >> Sent: Monday, May 19, 2025 9:19 PM >> To: Penny, Zheng >> Cc: Huang, Ray ; Andrew Cooper >> ; Anthony PERARD ; >> Orzel, Michal ; Julien Grall ; Roger >> Pau >> Monné ; Stefano Stabellini

Re: [PATCH v4 09/10] vpci/msi: Free MSI resources when init_msi() fails

2025-05-20 Thread Jan Beulich
On 20.05.2025 11:09, Roger Pau Monné wrote: > On Tue, May 20, 2025 at 08:40:28AM +0200, Jan Beulich wrote: >> On 09.05.2025 11:05, Jiqian Chen wrote: >>> When init_msi() fails, the previous new changes will hide MSI >>> capability, it can't rely on vpci_deassign_device() to remove >>> all MSI relat

Re: Request for patch to fix boot loop issue in Xen 4.17.6

2025-05-20 Thread Roger Pau Monné
On Sat, May 03, 2025 at 02:02:32PM +, Ngamia Djabiri Julie wrote: > Dear Xen developers, > > I would like to ask if the following fix can also be included in Xen 4.17.6 > (and eventually in the Xen versions after 4.17.6 that don't have the fix) : Hello, 4.17.6 is planned for the end of the

RE: [PATCH v4 12/15] tools/xenpm: Print CPPC parameters for amd-cppc driver

2025-05-20 Thread Penny, Zheng
[Public] > -Original Message- > From: Jan Beulich > Sent: Tuesday, May 13, 2025 4:03 PM > To: Penny, Zheng > Cc: Huang, Ray ; Anthony PERARD > ; xen-devel@lists.xenproject.org > Subject: Re: [PATCH v4 12/15] tools/xenpm: Print CPPC parameters for amd-cppc > driver > > On 09.05.2025 08:36

Re: [PATCH v4 09/10] vpci/msi: Free MSI resources when init_msi() fails

2025-05-20 Thread Roger Pau Monné
On Tue, May 20, 2025 at 08:40:28AM +0200, Jan Beulich wrote: > On 09.05.2025 11:05, Jiqian Chen wrote: > > When init_msi() fails, the previous new changes will hide MSI > > capability, it can't rely on vpci_deassign_device() to remove > > all MSI related resources anymore, those resources must be >

Re: [PATCH v2 12/16] xen/riscv: introduce intc_init() and helpers

2025-05-20 Thread Oleksii Kurochko
On 5/15/25 11:29 AM, Jan Beulich wrote: On 06.05.2025 18:51, Oleksii Kurochko wrote: Introduce intc_init() to initialize the interrupt controller using the registered hardware ops. Also add intc_route_irq_to_xen() to route IRQs to Xen, with support for setting IRQ type and priority via new inte

RE: [PATCH v4 05/15] xen/x86: introduce "cpufreq=amd-cppc" xen cmdline

2025-05-20 Thread Penny, Zheng
[Public] > -Original Message- > From: Jan Beulich > Sent: Monday, May 19, 2025 9:19 PM > To: Penny, Zheng > Cc: Huang, Ray ; Andrew Cooper > ; Anthony PERARD ; > Orzel, Michal ; Julien Grall ; Roger Pau > Monné ; Stefano Stabellini ; > xen- > de...@lists.xenproject.org > Subject: Re: [P

xen/arm: Virtio-PCI for dom0less on ARM

2025-05-20 Thread Edgar E. Iglesias
Hi all, Following up on the ARM virtio-pci series I posted a while back ago. There have been some concerns around the delayed and silent apperance of devices on the ECAM area. The spec is not super clear wether this is OK or not but I'm providing some references to the PCI specs and to some real