Re: [PATCH 04/23] xen/arm: dom0less use domid 0 for hwdom

2025-03-10 Thread Stefano Stabellini
On Sat, 8 Mar 2025, Julien Grall wrote: > On 08/03/2025 00:40, Stefano Stabellini wrote: > > On Fri, 7 Mar 2025, Jason Andryuk wrote: > > > On 2025-03-07 16:01, Julien Grall wrote: > > > > Hi Jason, > > > > > > > > On 07/03/2025 16:03, Jason Andryuk wrote: > > > > > On 2025-03-07 03:31, Julien Gra

Re: [PATCH 04/23] xen/arm: dom0less use domid 0 for hwdom

2025-03-10 Thread Stefano Stabellini
On Sat, 8 Mar 2025, Julien Grall wrote: > On 08/03/2025 00:53, Stefano Stabellini wrote: > > On Fri, 7 Mar 2025, Julien Grall wrote: > > > > init-dom0less only initializes non- introduced domains, so hwdom doesn't > > > > get > > > > its "domid" xenstore node populated.  That leads to other errors.

Re: [PATCH 05/23] xen/arm: Add capabilities to dom0less

2025-03-10 Thread Stefano Stabellini
On Sat, 8 Mar 2025, Julien Grall wrote: > On 08/03/2025 00:02, Jason Andryuk wrote: > > On 2025-03-07 16:21, Julien Grall wrote: > > > Hi Jason, > > > > > > On 07/03/2025 17:58, Jason Andryuk wrote: > > > > On 2025-03-07 04:01, Julien Grall wrote: > > > > > Hi, > > > > > > > > > > On 06/03/2025 2

Re: [PATCH] automation/cirrus-ci: store xen/.config as an artifact

2025-03-10 Thread Stefano Stabellini
On Mon, 10 Mar 2025, Andrew Cooper wrote: > On 10/03/2025 6:38 pm, Roger Pau Monné wrote: > > On Mon, Mar 10, 2025 at 06:30:15PM +, Andrew Cooper wrote: > >> On 10/03/2025 6:16 pm, Roger Pau Monne wrote: > >>> Always store xen/.config as an artifact, renamed to xen-config to match > >>> the nam

[PATCH v2 01/16] exec/tswap: target code can use TARGET_BIG_ENDIAN instead of target_words_bigendian()

2025-03-10 Thread Pierrick Bouvier
Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- include/exec/tswap.h | 11 ++- cpu-target.c | 1 + 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/include/exec/tswap.h b/include/exec/tswap.h index ecd4faef015..2683da0adb7 100644 --- a/include/ex

[PATCH v2 10/16] system/kvm: make kvm_flush_coalesced_mmio_buffer() accessible for common code

2025-03-10 Thread Pierrick Bouvier
This function is used by system/physmem.c will be turn into common code in next commit. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- include/system/kvm.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/system/kvm.h b/include/system/kvm.h i

[PATCH v2 00/16] make system memory API available for common code

2025-03-10 Thread Pierrick Bouvier
The main goal of this series is to be able to call any memory ld/st function from code that is *not* target dependent. As a positive side effect, we can turn related system compilation units into common code. The first 5 patches remove dependency of memory API to cpu headers and remove dependency

[PATCH v2 12/16] hw/xen: add stubs for various functions

2025-03-10 Thread Pierrick Bouvier
Those functions are used by system/physmem.c, and are called only if xen is enabled (which happens only if CONFIG_XEN is not set). So we can crash in case those are called. Acked-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- hw/xen/xen_stubs.c | 56 +

[PATCH v2 02/16] exec/tswap: implement {ld,st}.*_p as functions instead of macros

2025-03-10 Thread Pierrick Bouvier
Defining functions allows to use them from common code, by not depending on TARGET_BIG_ENDIAN. Remove previous macros from exec/cpu-all.h. By moving them out of cpu-all.h, we'll be able to break dependency on cpu.h for memory related functions coming in next commits. Signed-off-by: Pierrick Bouvie

[PATCH v2 08/16] exec/memory-internal: remove dependency on cpu.h

2025-03-10 Thread Pierrick Bouvier
Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- include/exec/memory-internal.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/exec/memory-internal.h b/include/exec/memory-internal.h index 100c1237ac2..b729f3b25ad 100644 --- a/include/exec/memory-internal.h +++ b/

[PATCH v2 16/16] system/ioport: make compilation unit common

2025-03-10 Thread Pierrick Bouvier
Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- system/ioport.c| 1 - system/meson.build | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/system/ioport.c b/system/ioport.c index 55c2a752396..89daae9d602 100644 --- a/system/ioport.c +++ b/system/ioport.

[PATCH v2 11/16] exec/ram_addr: call xen_hvm_modified_memory only if xen is enabled

2025-03-10 Thread Pierrick Bouvier
Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- include/exec/ram_addr.h | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/include/exec/ram_addr.h b/include/exec/ram_addr.h index 7c011fadd11..098fccb5835 100644 --- a/include/exec/ram_addr.h +++ b/inclu

[PATCH v2 09/16] exec/ram_addr: remove dependency on cpu.h

2025-03-10 Thread Pierrick Bouvier
Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- include/exec/ram_addr.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/exec/ram_addr.h b/include/exec/ram_addr.h index 3d8df4edf15..7c011fadd11 100644 --- a/include/exec/ram_addr.h +++ b/include/exe

[PATCH v2 04/16] exec/memory_ldst_phys: extract memory_ldst_phys declarations from cpu-all.h

2025-03-10 Thread Pierrick Bouvier
They are now accessible through exec/memory.h instead, and we make sure all variants are available for common or target dependent code. Move stl_phys_notdirty function as well. Cached endianness agnostic version rely on st/ld*_p, which is available through tswap.h. Signed-off-by: Pierrick Bouvier

Re: [PATCH 00/16] make system memory API available for common code

2025-03-10 Thread BALATON Zoltan
On Mon, 10 Mar 2025, Pierrick Bouvier wrote: On 3/10/25 09:28, Pierrick Bouvier wrote: Hi Zoltan, On 3/10/25 06:23, BALATON Zoltan wrote: On Sun, 9 Mar 2025, Pierrick Bouvier wrote: The main goal of this series is to be able to call any memory ld/st function from code that is *not* target de

Re: [PATCH 08/23] xen/arm: dom0less seed xenstore grant table entry

2025-03-10 Thread Jan Beulich
On 10.03.2025 09:17, Juergen Gross wrote: > On 10.03.25 09:01, Jan Beulich wrote: >> On 06.03.2025 23:03, Jason Andryuk wrote: >>> +shared_entry_v1(gt, idx).flags = flags; >>> +shared_entry_v1(gt, idx).domid = be_domid; >>> +shared_entry_v1(gt, idx).frame = frame; >>> +} >> >> In common

Re: [PATCH] xen/domain: Initialise the domain handle before inserting into the domlist

2025-03-10 Thread Jan Beulich
On 07.03.2025 17:46, Andrew Cooper wrote: > As soon as the the domain is in the domlist, it can be queried via various > means, ahead of being fully constructed. Ensure it the UUID give by the > toolstack is in place ahead of this. Nit: The latter sentence is a little bumpy to read. > Signed-off

Re: [PATCH v3 0/2] tools/hvmloader: Decouple APIC IDs from vCPU IDs

2025-03-10 Thread Jan Beulich
On 04.02.2025 18:31, Alejandro Vallejo wrote: > v2->v3: > * Moved "extern uint32_t *cpu_to_apicid;" to patch1 > > v2: > https://lore.kernel.org/xen-devel/20250204144542.7399-1-alejandro.vall...@cloud.com/T/#t > v1->v2: > * Dropped patch to skip writing the MP Tables if apicid >= 255 > > v1:

Ping: [PATCH] PCI: drop pci_segments_init()

2025-03-10 Thread Jan Beulich
On 26.02.2025 12:38, Jan Beulich wrote: > Have callers invoke pci_add_segment() directly instead: With radix tree > initialization moved out of the function, its name isn't quite > describing anymore what it actually does. > > On x86 move the logic into __start_xen() itself, to reduce the risk of

Re: [PATCH 05/23] xen/arm: Add capabilities to dom0less

2025-03-10 Thread Bertrand Marquis
Hi, > On 8 Mar 2025, at 13:37, Julien Grall wrote: > > Hi Jason, > > On 08/03/2025 00:02, Jason Andryuk wrote: >> On 2025-03-07 16:21, Julien Grall wrote: >>> Hi Jason, >>> >>> On 07/03/2025 17:58, Jason Andryuk wrote: On 2025-03-07 04:01, Julien Grall wrote: > Hi, > > On 06/

Re: [PATCH] xen: Update minimum toolchain requirements

2025-03-10 Thread Jan Beulich
On 07.03.2025 18:54, Andrew Cooper wrote: > GCC 4.1.2 is from 2007, and Binutils 2.16 is a similar vintage. Clang 3.5 is > from 2014. Supporting toolchains this old is a massive development and > testing burden. > > Set a minimum baseline of GCC 5.1 across the board, along with Binutils 2.25 > w

Re: [PATCH 08/23] xen/arm: dom0less seed xenstore grant table entry

2025-03-10 Thread Juergen Gross
On 10.03.25 09:01, Jan Beulich wrote: On 06.03.2025 23:03, Jason Andryuk wrote: +shared_entry_v1(gt, idx).flags = flags; +shared_entry_v1(gt, idx).domid = be_domid; +shared_entry_v1(gt, idx).frame = frame; +} In common code there shouldn't be an assumption that gnttab v1 is in use.

Re: [PATCH 01/23] xen: introduce hardware domain create flag

2025-03-10 Thread Jan Beulich
On 06.03.2025 23:03, Jason Andryuk wrote: > --- a/xen/common/domain.c > +++ b/xen/common/domain.c > @@ -699,7 +699,7 @@ struct domain *domain_create(domid_t domid, > d->is_privileged = flags & CDF_privileged; > > /* Sort out our idea of is_hardware_domain(). */ > -if ( domid == 0 ||

Re: [PATCH 06/23] xen/domctl: Expose privileged and hardware capabilities

2025-03-10 Thread Jan Beulich
On 06.03.2025 23:03, Jason Andryuk wrote: > --- a/xen/include/public/domctl.h > +++ b/xen/include/public/domctl.h > @@ -155,6 +155,12 @@ struct xen_domctl_getdomaininfo { > /* domain has hardware assisted paging */ > #define _XEN_DOMINF_hap 8 > #define XEN_DOMINF_hap(1U<<_XEN_DOMIN

Re: [PATCH v9] vpci: Add resizable bar support

2025-03-10 Thread Oleksii Kurochko
On 2/24/25 4:24 AM, Jiqian Chen wrote: Some devices, like AMDGPU, support resizable bar capability, but vpci of Xen doesn't support this feature, so they fail to resize bars and then cause probing failure. According to PCIe spec, each bar that supports resizing has two registers, PCI_REBAR_CAP

Re: [PATCH v4 1/2] asm-generic: Introduce mm-types.h header

2025-03-10 Thread Oleksii Kurochko
On 3/6/25 7:25 PM, Shawn Anastasio wrote: Introduce a new header, mm-types.h, which will be used to define architecture-specific types pertinent to memory management. This will be used by a future commit to enable >32 bit PTE flags. Suggested-by: Jan Beulich Signed-off-by: Shawn Anastasio Acked

Re: [PATCH] x86/hvm: add HVM-specific Kconfig

2025-03-10 Thread Jan Beulich
On 07.02.2025 23:03, dm...@proton.me wrote: > Add separate menu for configuring HVM build-time settings to help organizing > HVM-specific options. > > Signed-off-by: Denis Mukhin I think it would be nice if "organizing" was further qualified, to really see _why_ the change is being made. A parti

Re: [PATCH v3 2/2] x86/iommu: avoid MSI address and data writes if IRT index hasn't changed

2025-03-10 Thread Jan Beulich
On 10.03.2025 10:55, Roger Pau Monne wrote: > Attempt to reduce the MSI entry writes, and the associated checking whether > memory decoding and MSI-X is enabled for the PCI device, when the MSI data > hasn't changed. > > When using Interrupt Remapping the MSI entry will contain an index into > the

Re: [PATCH] docs: fix INTRODUCE description in xenstore.txt

2025-03-10 Thread Jürgen Groß
On 07.03.25 01:37, Andrew Cooper wrote: On 06/03/2025 7:09 am, Jürgen Groß wrote: On 05.03.25 23:57, Andrew Cooper wrote: On 05/03/2025 8:52 am, Juergen Gross wrote: The description of the Xenstore INTRODUCE command is still referencing xend. Fix that. While at it, make clear that the Xenstor

[PATCH v3 1/2] x86/apic: remove delivery and destination mode fields from drivers

2025-03-10 Thread Roger Pau Monne
All local APIC drivers use physical destination and fixed delivery modes, remove the fields from the genapic struct and simplify the logic. No functional change intended. Signed-off-by: Roger Pau Monné Reviewed-by: Andrew Cooper --- Changes since v2: - Add comment about dest_mode setting. ---

Re: [PATCH v3 0/2] tools/hvmloader: Decouple APIC IDs from vCPU IDs

2025-03-10 Thread Alejandro Vallejo
On Mon Mar 10, 2025 at 8:33 AM GMT, Jan Beulich wrote: > On 04.02.2025 18:31, Alejandro Vallejo wrote: > > v2->v3: > > * Moved "extern uint32_t *cpu_to_apicid;" to patch1 > > > > v2: > > https://lore.kernel.org/xen-devel/20250204144542.7399-1-alejandro.vall...@cloud.com/T/#t > > v1->v2: > > *

Re: [PATCH v3] xen/console: make console buffer size configurable

2025-03-10 Thread Andrew Cooper
On 06/03/2025 8:05 am, dm...@proton.me wrote: > From: Denis Mukhin > > Add new CONRING_SHIFT Kconfig parameter to specify the boot console buffer > size > as a power of 2. > > The supported range is [14..27] -> [16KiB..128MiB]. > > Set default to 15 (32 KiB). > > Link: https://gitlab.com/xen-proj

Re: [PATCH 00/16] make system memory API available for common code

2025-03-10 Thread BALATON Zoltan
On Mon, 10 Mar 2025, Pierrick Bouvier wrote: On 3/10/25 12:40, BALATON Zoltan wrote: On Mon, 10 Mar 2025, Pierrick Bouvier wrote: On 3/10/25 09:28, Pierrick Bouvier wrote: Hi Zoltan, On 3/10/25 06:23, BALATON Zoltan wrote: On Sun, 9 Mar 2025, Pierrick Bouvier wrote: The main goal of this se

Re: [PATCH 00/16] make system memory API available for common code

2025-03-10 Thread BALATON Zoltan
On Sun, 9 Mar 2025, Pierrick Bouvier wrote: The main goal of this series is to be able to call any memory ld/st function from code that is *not* target dependent. Why is that needed? As a positive side effect, we can turn related system compilation units into common code. Are there any nega

[PATCH v2 4/5] xen/arm: ffa: Add indirect message between VM

2025-03-10 Thread Bertrand Marquis
Add support for indirect messages between VMs. This is only enabled if CONFIG_FFA_VM_TO_VM is selected. Signed-off-by: Bertrand Marquis --- Changes in v2: - Switch ifdef to IS_ENABLED --- xen/arch/arm/tee/ffa_msg.c | 96 +++--- xen/arch/arm/tee/ffa_private.h | 4

Re: [PATCH 00/16] make system memory API available for common code

2025-03-10 Thread Pierrick Bouvier
On 3/10/25 12:40, BALATON Zoltan wrote: On Mon, 10 Mar 2025, Pierrick Bouvier wrote: On 3/10/25 09:28, Pierrick Bouvier wrote: Hi Zoltan, On 3/10/25 06:23, BALATON Zoltan wrote: On Sun, 9 Mar 2025, Pierrick Bouvier wrote: The main goal of this series is to be able to call any memory ld/st fu

Re: [PATCH v3] xen/console: make console buffer size configurable

2025-03-10 Thread Stefano Stabellini
On Mon, 10 Mar 2025, Andrew Cooper wrote: > On 06/03/2025 8:05 am, dm...@proton.me wrote: > > From: Denis Mukhin > > > > Add new CONRING_SHIFT Kconfig parameter to specify the boot console buffer > > size > > as a power of 2. > > > > The supported range is [14..27] -> [16KiB..128MiB]. > > > > Set

[PATCH v3 0/2] x86/pci: reduce PCI accesses

2025-03-10 Thread Roger Pau Monne
Hello, First patch is not really related, but it's some cleanup I've found while looking at the other fixes. Patch 2 extends the IOMMU logic to prevent re-writing the same MSI message. Thanks, Roger. Roger Pau Monne (2): x86/apic: remove delivery and destination mode fields from drivers x86

Re: [PATCH 13/16] hw/xen: add stubs for various functions

2025-03-10 Thread Richard Henderson
On 3/9/25 21:58, Pierrick Bouvier wrote: Those functions are used by system/physmem.c, and are called only if xen is enabled (which happens only if CONFIG_XEN is not set). So we can crash in case those are called. Signed-off-by: Pierrick Bouvier --- hw/xen/xen_stubs.c | 56 +++

[PATCH] xen/mcelog: Add __nonstring annotations for unterminated strings

2025-03-10 Thread Kees Cook
When a character array without a terminating NUL character has a static initializer, GCC 15's -Wunterminated-string-initialization will only warn if the array lacks the "nonstring" attribute[1]. Mark the arrays with __nonstring to and correctly identify the char array as "not a C string" and thereb

Re: [PATCH v4 1/2] xen/passthrough: Provide stub functions when !HAS_PASSTHROUGH

2025-03-10 Thread Jan Beulich
On 07.03.2025 10:09, Julien Grall wrote: > Hi Luca, > > On 07/03/2025 07:58, Luca Fancellu wrote: >> When Xen is built without HAS_PASSTHROUGH, there are some parts >> in arm where iommu_* functions are called in the codebase, but >> their implementation is under xen/drivers/passthrough that is >>

Re: [PATCH 08/23] xen/arm: dom0less seed xenstore grant table entry

2025-03-10 Thread Julien Grall
Hi Jason, On 06/03/2025 22:03, Jason Andryuk wrote: With a split hardware and control domain, the control domain may still want and xenstore access. Currently this relies on init-dom0less to seed the grants. This is problematic since we don't want hardware domain to be able to map the control

Re: [PATCH v3] xen/watchdog: Identify which domain watchdog fired

2025-03-10 Thread Jan Beulich
On 07.03.2025 15:24, Andrew Cooper wrote: > When a watchdog fires, the domain is crashed and can't dump any state. > > Xen allows a domain to have two separate watchdogs. Therefore, for a > domain running multiple watchdogs (e.g. one based around network, one > for disk), it is important for diag

Re: [PATCH] PCI: drop pci_segments_init()

2025-03-10 Thread Julien Grall
Hi Jan, On 26/02/2025 11:38, Jan Beulich wrote: Have callers invoke pci_add_segment() directly instead: With radix tree initialization moved out of the function, its name isn't quite describing anymore what it actually does. On x86 move the logic into __start_xen() itself, to reduce the risk of