[PATCH] ci: add yet another HW runner

2025-03-13 Thread Marek Marczykowski-Górecki
This is AMD Zen2 (Ryzen 5 4500U specifically), in a HP Probook 445 G7. This one has working S3, so add a test for it here. Signed-off-by: Marek Marczykowski-Górecki --- Cc: Jan Beulich Cc: Andrew Cooper The suspend test added here currently fails on staging[1], but passes on staging-4.19[2].

[PATCH v4 0/3] make build of vm_event/mem_access/monitor optional

2025-03-13 Thread Sergiy Kibrik
This series aims to provide a possibility to build Xen without mem_access and related features. It is already largely covered by corresponding CONFIG_MEM_ACCESS option, yet there're still some parts remaining. Hopefully this would help to reduce dead code a bit. As coverage of MEM_ACCESS config op

[PATCH v4 2/3] x86:monitor: control monitor.c build with CONFIG_VM_EVENT option

2025-03-13 Thread Sergiy Kibrik
Replace more general CONFIG_HVM option with CONFIG_VM_EVENT which is more relevant and specific to monitoring. This is only to clarify at build level to which subsystem this file belongs. No functional change here, as VM_EVENT depends on HVM. Acked-by: Jan Beulich Signed-off-by: Sergiy Kibrik -

Re: [PATCH] trace: convert init_trace_bufs() to constructor

2025-03-13 Thread Jan Beulich
On 13.03.2025 18:03, Andrew Cooper wrote: > On 13/03/2025 4:37 pm, Jan Beulich wrote: >> On 13.03.2025 17:28, Andrew Cooper wrote: >>> On 13/03/2025 2:19 pm, Jan Beulich wrote: On 13.03.2025 14:58, Andrew Cooper wrote: > On 13/03/2025 1:38 pm, Jan Beulich wrote: > I'm tempted to ack th

[PATCH v4 3/3] xen: mem_access: conditionally compile vm_event.c & monitor.c

2025-03-13 Thread Sergiy Kibrik
From: Stefano Stabellini Extend coverage of CONFIG_VM_EVENT option and make the build of VM events and monitoring support optional. Also make MEM_PAGING option depend on VM_EVENT to document that mem_paging is relying on vm_event. This is to reduce code size on Arm when this option isn't enabled.

[PATCH v4 1/3] xen: kconfig: rename MEM_ACCESS -> VM_EVENT

2025-03-13 Thread Sergiy Kibrik
Use more generic CONFIG_VM_EVENT name throughout Xen code instead of CONFIG_MEM_ACCESS. This reflects the fact that vm_event is a higher level feature, with mem_access & monitor depending on it. Suggested-by: Tamas K Lengyel Acked-by: Tamas K Lengyel Signed-off-by: Sergiy Kibrik --- changes in

Re: [PATCH 05/10] arm/mpu: Introduce frame_table, virt_to_page, maddr_to_virt

2025-03-13 Thread Luca Fancellu
Hi Julien, > On 13 Mar 2025, at 09:22, Julien Grall wrote: > > Hi, > > On 12/03/2025 13:52, Luca Fancellu wrote: >> Introduce variables and functions used in the common Arm code by >> MPU memory management subsystem, provide struct page_info and >> the MPU implementation for helpers and macros

Re: Discussion on unexpected behavior of ARINC653 scheduler

2025-03-13 Thread Jürgen Groß
On 13.03.25 10:27, Choi, Anderson wrote: Juergen, On 13.03.25 07:51, Choi, Anderson wrote: We are observing an incorrect or unexpected behavior with ARINC653 scheduler when we set up multiple ARINC653 CPU pools and assign a different number of domains to each CPU pool. ... It seems there's

Re: [PATCH] block: remove unused parameter

2025-03-13 Thread Ulf Hansson
On Thu, 13 Mar 2025 at 06:13, Anuj Gupta wrote: > > request_queue param is not used by blk_rq_map_sg and __blk_rq_map_sg. > remove it. > > Signed-off-by: Anuj Gupta Acked-by: Ulf Hansson # For MMC/MEMSTICK > --- > block/blk-merge.c | 4 ++-- > block/bsg-lib.c

[PATCH 0/2] VT-d: set_msi_source_id() (XSA-467 follow-up)

2025-03-13 Thread Jan Beulich
1: move obtaining of MSI/HPET source ID 2: have set_msi_source_id() return a success indicator Jan

[PATCH 1/2] VT-d: move obtaining of MSI/HPET source ID

2025-03-13 Thread Jan Beulich
This was the original attempt to address XSA-467, until it was found that IRQs can be off already from higher up the call stack. Nevertheless moving code out of locked regions is generally desirable anyway; some of the callers, after all, don't disable interrupts or acquire other locks. Hence, des

[PATCH 2/2] VT-d: have set_msi_source_id() return a success indicator

2025-03-13 Thread Jan Beulich
Handling possible internal errors by just emitting a (debug-build-only) log message can't be quite enough. Return error codes in those cases, and have the caller propagate those up. Drop a pointless return path, rather than "inventing" an error code for it. While touching the function declarator

Re: [PATCH 4/8] xen/common: Split tlb-clock.h out of mm.h

2025-03-13 Thread Andrew Cooper
On 13/03/2025 12:59 pm, Jan Beulich wrote: > On 12.03.2025 18:45, Andrew Cooper wrote: >> xen/mm.h includes asm/tlbflush.h almost at the end, which creates a horrible >> tangle. This is in order to provide two common files with an abstraction >> over >> the x86-specific TLB clock logic. >> >> Fir

Re: [PATCH v1] CHANGELOG.md: Mention PCI passthrough for HVM domUs

2025-03-13 Thread Oleksii Kurochko
On 3/13/25 10:48 AM, Roger Pau Monné wrote: On Thu, Mar 13, 2025 at 08:42:25AM +0100, Jan Beulich wrote: On 12.03.2025 17:36, Roger Pau Monné wrote: On Wed, Mar 12, 2025 at 09:51:09AM +0100, Jan Beulich wrote: On 12.03.2025 05:02, Jiqian Chen wrote: PCI passthrough is already supported for

Re: [RFC PATCH] xen/amd-iommu: Add interrupt remapping quirk for ath11k

2025-03-13 Thread Jason Andryuk
On 2025-02-27 05:23, Roger Pau Monné wrote: On Wed, Feb 26, 2025 at 04:11:25PM -0500, Jason Andryuk wrote: The ath11k device supports and tries to enable 32 MSIs. Linux in PVH dom0 and HVM domU fails enabling 32 and falls back to just 1, so that is all that has been tested. DYK why it fails

[PATCH 6/7] x86/vga: fix mapping of the VGA text buffer

2025-03-13 Thread Roger Pau Monne
The call to ioremap_wc() in video_init() will always fail, because video_init() is called ahead of vm_init_type(), and so the underlying __vmap() call will fail to allocate the linear address space. Fix by reverting to the previous behavior and using the directmap entries in the low 1MB. Note the

[PATCH 3/7] x86/dom0: placate GCC 12 compile-time errors with UBSAN and PVH_GUEST

2025-03-13 Thread Roger Pau Monne
When building Xen with GCC 12 with UBSAN and PVH_GUEST both enabled the compiler emits the following errors: arch/x86/setup.c: In function '__start_xen': arch/x86/setup.c:1504:19: error: 'consider_modules' reading 40 bytes from a region of size 4 [-Werror=stringop-overread] 1504 | en

[PATCH 4/7] xen/ubsan: expand pointer overflow message printing

2025-03-13 Thread Roger Pau Monne
Add messages about operations against the NULL pointer, or that result in a NULL pointer. Signed-off-by: Roger Pau Monné --- xen/common/ubsan/ubsan.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/xen/common/ubsan/ubsan.c b/xen/common/ubsan/ubsan.c index 7eb

[PATCH 7/7] kconfig/randconfig: enable UBSAN for randconfig

2025-03-13 Thread Roger Pau Monne
Introduce an additional Kconfig check to only offer the option if the compiler supports -fsanitize=undefined. We no longer use Travis CI, so the original motivation for not enabling UBSAN might no longer present. Regardless, the option won't be present in the first place if the compiler doesn't s

[PATCH 5/7] x86/ioremap: prevent additions against the NULL pointer

2025-03-13 Thread Roger Pau Monne
This was reported by clang UBSAN as: UBSAN: Undefined behaviour in arch/x86/mm.c:6297:40 applying zero offset to null pointer [...] Xen call trace: [] R common/ubsan/ubsan.c#ubsan_epilogue+0xa/0xc0 [] F __ubsan_handle_pointer_overflow+0xcb/0x100 [] F ioremap_wc+0xc8/0xe0 [] F video

Re: [PATCH 08/16] xen/arm: add watchdog domain suspend/resume helpers

2025-03-13 Thread Jan Beulich
On 05.03.2025 10:11, Mykola Kvach wrote: > From: Mykola Kvach > > This patch implements suspend/resume helpers for the watchdog. > While a domain is suspended its watchdogs must be paused. Otherwise, > if the domain stays in the suspend state for a longer period of time > compared to the watchdog

Re: [PATCH 1/6] symbols: add minimal self-test

2025-03-13 Thread Andrew Cooper
On 13/03/2025 1:52 pm, Jan Beulich wrote: > ... before making changes to the involved logic. > > Signed-off-by: Jan Beulich > --- > With this FAST_SYMBOL_LOOKUP may make sense to permit enabling even > when LIVEPATCH=n. Thoughts? (In this case "symbols: centralize and re- > arrange $(all_symbols)

Re: [PATCH 06/16] xen/arm: Introduce system suspend config option

2025-03-13 Thread Jan Beulich
On 05.03.2025 10:11, Mykola Kvach wrote: > --- a/xen/arch/arm/Kconfig > +++ b/xen/arch/arm/Kconfig > @@ -475,6 +475,17 @@ config ARM64_HARDEN_BRANCH_PREDICTOR > config ARM32_HARDEN_BRANCH_PREDICTOR > def_bool y if ARM_32 && HARDEN_BRANCH_PREDICTOR > > +config SYSTEM_SUSPEND > + bool "Sy

Re: [PATCH 04/10] arm/mpu: Implement virt/maddr conversion in MPU system

2025-03-13 Thread Julien Grall
Hi Luca, On 12/03/2025 13:52, Luca Fancellu wrote: From: Penny Zheng virt_to_maddr and maddr_to_virt are used widely in Xen code. So even there is no VMSA in MPU system, we keep the interface in MPU to don't change the existing common code. Typo: I think you mean "to avoid changing". In o

Re: [PATCH v2] tools: Mark ACPI SDTs as NVS in the PVH build path

2025-03-13 Thread Jan Beulich
On 11.03.2025 10:29, Alejandro Vallejo wrote: > Commit cefeffc7e583 marked ACPI tables as NVS in the hvmloader path > because SeaBIOS may otherwise just mark it as RAM. There is, however, > yet another reason to do it even in the PVH path. Xen's incarnation of > AML relies on having access to some

Re: [PATCH] block: remove unused parameter

2025-03-13 Thread Jens Axboe
On Thu, 13 Mar 2025 09:23:18 +0530, Anuj Gupta wrote: > request_queue param is not used by blk_rq_map_sg and __blk_rq_map_sg. > remove it. > > Applied, thanks! [1/1] block: remove unused parameter commit: 61667cb6644f6fb01eb8baa928e381c016b5ed7b Best regards, -- Jens Axboe

Re: [PATCH 5/8] xen/arch: Strip out tlb-clock stubs for non-implementors

2025-03-13 Thread Jan Beulich
On 12.03.2025 18:45, Andrew Cooper wrote: > Now that there's a common stub implementation TLB clocks, there's no need for > architectures to provide their own. > > Repeatedly zeroing page->tlbflush_timestamp is no use, so provide an even more > empty common stub for page_set_tlbflush_timestamp().

Re: [PATCH] trace: convert init_trace_bufs() to constructor

2025-03-13 Thread Andrew Cooper
On 13/03/2025 1:38 pm, Jan Beulich wrote: > There's no need for each arch to invoke it directly, and there's no need > for having a stub either. With the present placement of the calls to > init_constructors() it can easily be a constructor itself. > > Signed-off-by: Jan Beulich This has a side e

Re: [PATCH] trace: convert init_trace_bufs() to constructor

2025-03-13 Thread Jan Beulich
On 13.03.2025 14:58, Andrew Cooper wrote: > On 13/03/2025 1:38 pm, Jan Beulich wrote: >> There's no need for each arch to invoke it directly, and there's no need >> for having a stub either. With the present placement of the calls to >> init_constructors() it can easily be a constructor itself. >>

Re: [PATCH 1/6] symbols: add minimal self-test

2025-03-13 Thread Jan Beulich
On 13.03.2025 16:35, Andrew Cooper wrote: > On 13/03/2025 1:52 pm, Jan Beulich wrote: >> ... before making changes to the involved logic. >> >> Signed-off-by: Jan Beulich >> --- >> With this FAST_SYMBOL_LOOKUP may make sense to permit enabling even >> when LIVEPATCH=n. Thoughts? (In this case "sym

Re: [PATCH 04/16] xen/cpu: prevent disable_nonboot_cpus crash on ARM64

2025-03-13 Thread Jan Beulich
On 11.03.2025 21:47, Julien Grall wrote: > Hi Mykola, > > On 05/03/2025 09:11, Mykola Kvach wrote: >> If we call disable_nonboot_cpus on ARM64 with system_state set >> to SYS_STATE_suspend, the following assertion will be triggered: >> >> ``` >> (XEN) [ 25.582712] Disabling non-boot CPUs ... >>

Re: [PATCH 1/6] symbols: add minimal self-test

2025-03-13 Thread Andrew Cooper
On 13/03/2025 3:39 pm, Jan Beulich wrote: > On 13.03.2025 16:35, Andrew Cooper wrote: >> On 13/03/2025 1:52 pm, Jan Beulich wrote: >>> ... before making changes to the involved logic. >>> >>> Signed-off-by: Jan Beulich >>> --- >>> With this FAST_SYMBOL_LOOKUP may make sense to permit enabling even

Re: [RFC PATCH] xen/amd-iommu: Add interrupt remapping quirk for ath11k

2025-03-13 Thread Roger Pau Monné
On Thu, Mar 13, 2025 at 11:30:28AM -0400, Jason Andryuk wrote: > On 2025-02-27 05:23, Roger Pau Monné wrote: > > On Wed, Feb 26, 2025 at 04:11:25PM -0500, Jason Andryuk wrote: > > > > > > The ath11k device supports and tries to enable 32 MSIs. Linux in PVH > > > dom0 and HVM domU fails enabling 3

Re: [PATCH 05/16] xen/percpu: don't initialize percpu on resume

2025-03-13 Thread Jan Beulich
On 05.03.2025 10:11, Mykola Kvach wrote: > --- a/xen/common/percpu.c > +++ b/xen/common/percpu.c > @@ -74,7 +74,8 @@ static int cf_check cpu_percpu_callback( > switch ( action ) > { > case CPU_UP_PREPARE: > -rc = init_percpu_area(cpu); > +if ( system_state != SYS_STAT

[PATCH 5/6] symbols: arrange to know where functions end

2025-03-13 Thread Jan Beulich
When determining the symbol for a given address (e.g. for the %pS logging format specifier), so far the size of a symbol (function) was assumed to be everything until the next symbol. There may be gaps though, which would better be recognizable in output (often suggesting something odd is going on)

Re: [PATCH 5/8] xen/arch: Strip out tlb-clock stubs for non-implementors

2025-03-13 Thread Andrew Cooper
On 13/03/2025 1:05 pm, Jan Beulich wrote: > On 12.03.2025 18:45, Andrew Cooper wrote: >> Now that there's a common stub implementation TLB clocks, there's no need for >> architectures to provide their own. >> >> Repeatedly zeroing page->tlbflush_timestamp is no use, so provide an even >> more >> e

[PATCH 0/6] symbols: assorted adjustments

2025-03-13 Thread Jan Beulich
The main goal was what patch 5 does, but on the way there various other things became noticeable, and some preparation was necessary, too. 1: add minimal self-test 2: don't over-align generated data 3: sanitize a few variable's types 4: split symbols_num_syms 5: arrange to know where functions end

Re: [PATCH v2] tools: Mark ACPI SDTs as NVS in the PVH build path

2025-03-13 Thread Alejandro Vallejo
On Thu Mar 13, 2025 at 1:14 PM GMT, Jan Beulich wrote: > On 11.03.2025 10:29, Alejandro Vallejo wrote: > > Commit cefeffc7e583 marked ACPI tables as NVS in the hvmloader path > > because SeaBIOS may otherwise just mark it as RAM. There is, however, > > yet another reason to do it even in the PVH pa

Re: [PATCH v1 02/19] xen/xsm: wrap around xsm_sysctl with CONFIG_SYSCTL

2025-03-13 Thread Alejandro Vallejo
On Thu Mar 13, 2025 at 12:05 PM GMT, Jan Beulich wrote: > On 13.03.2025 12:43, Alejandro Vallejo wrote: > > On Wed Mar 12, 2025 at 4:06 AM GMT, Penny Zheng wrote: > >> --- a/xen/include/xsm/dummy.h > >> +++ b/xen/include/xsm/dummy.h > >> @@ -180,11 +180,18 @@ static XSM_INLINE int cf_check xsm_domc

[PATCH 4/6] symbols: split symbols_num_syms

2025-03-13 Thread Jan Beulich
In preparation for inserting address entries into symbols_addresses[] / symbols_offsets[] without enlarging symbols_sorted_offsets[], split symbols_num_syms into symbols_num_addrs (counting entries in the former plus symbols_names[] as well as, less directly, symbols_markers[]) and symbols_num_name

Re: [PATCH 1/2] VT-d: move obtaining of MSI/HPET source ID

2025-03-13 Thread Andrew Cooper
On 13/03/2025 1:33 pm, Jan Beulich wrote: > This was the original attempt to address XSA-467, until it was found > that IRQs can be off already from higher up the call stack. Nevertheless > moving code out of locked regions is generally desirable anyway; some of > the callers, after all, don't disa

Re: [PATCH v1 02/19] xen/xsm: wrap around xsm_sysctl with CONFIG_SYSCTL

2025-03-13 Thread Jan Beulich
On 13.03.2025 12:43, Alejandro Vallejo wrote: > On Wed Mar 12, 2025 at 4:06 AM GMT, Penny Zheng wrote: >> --- a/xen/include/xsm/dummy.h >> +++ b/xen/include/xsm/dummy.h >> @@ -180,11 +180,18 @@ static XSM_INLINE int cf_check xsm_domctl( >> } >> } >> >> +#ifdef CONFIG_SYSCTL >> static XSM_I

Re: [PATCH] xen/sched: fix arinc653 to not use variables across cpupools

2025-03-13 Thread Andrew Cooper
On 13/03/2025 9:31 am, Juergen Gross wrote: > a653sched_do_schedule() is using two function local static variables, > which is resulting in bad behavior when using more than one cpupool > with the arinc653 scheduler. > > Fix that by moving those variables to the scheduler private data. > > Fixes: 2

Re: [PATCH v1 03/19] xen/sysctl: wrap around XEN_SYSCTL_readconsole

2025-03-13 Thread Alejandro Vallejo
Hi, Ok, so readconsole is done here. I see how if you're also removing the console handler for the sysctl that's a bit unwiledly to do in one go. I think my earlier remarks still hold in terms of removal of else branches of ifdefs. On Wed Mar 12, 2025 at 4:06 AM GMT, Penny Zheng wrote: > The fol

Re: [PATCH 8/8] xen/mm: Exclude flushtlb.h from mm.h for x86

2025-03-13 Thread Andrew Cooper
On 13/03/2025 9:13 am, Jan Beulich wrote: > On 12.03.2025 18:45, Andrew Cooper wrote: >> alternative.c and livepatch.c pick up flushtlb.h transitively through mm.h. >> >> Fix these, and finally resolve the TODO in microcode/amd.c >> >> Signed-off-by: Andrew Cooper > Acked-by: Jan Beulich > > Tha

Re: [PATCH v1 05/19] xen/sysctl: wrap around XEN_SYSCTL_sched_id

2025-03-13 Thread Alejandro Vallejo
On Wed Mar 12, 2025 at 4:06 AM GMT, Penny Zheng wrote: > The following function shall be wrapped: > - scheduler_id > > Signed-off-by: Penny Zheng > --- > xen/common/sched/core.c | 2 ++ > xen/include/xen/sched.h | 7 +++ > 2 files changed, 9 insertions(+) > > diff --git a/xen/common/sched/cor

Re: [PATCH 4/8] xen/common: Split tlb-clock.h out of mm.h

2025-03-13 Thread Jan Beulich
On 12.03.2025 18:45, Andrew Cooper wrote: > xen/mm.h includes asm/tlbflush.h almost at the end, which creates a horrible > tangle. This is in order to provide two common files with an abstraction over > the x86-specific TLB clock logic. > > First, introduce CONFIG_HAS_TLB_CLOCK, selected by x86 o

Re: [PATCH] block: remove unused parameter

2025-03-13 Thread Jinpu Wang
On Thu, Mar 13, 2025 at 6:14 AM Anuj Gupta wrote: > > request_queue param is not used by blk_rq_map_sg and __blk_rq_map_sg. > remove it. > > Signed-off-by: Anuj Gupta > --- > block/blk-merge.c | 4 ++-- > block/bsg-lib.c | 2 +- > drivers/block/mtip32xx/mtip

Re: [PATCH 2/2] VT-d: have set_msi_source_id() return a success indicator

2025-03-13 Thread Andrew Cooper
On 13/03/2025 1:34 pm, Jan Beulich wrote: > Handling possible internal errors by just emitting a (debug-build-only) > log message can't be quite enough. Return error codes in those cases, > and have the caller propagate those up. > > Drop a pointless return path, rather than "inventing" an error co

Re: [PATCH v2] tools: Mark ACPI SDTs as NVS in the PVH build path

2025-03-13 Thread Jan Beulich
On 13.03.2025 15:30, Alejandro Vallejo wrote: > On Thu Mar 13, 2025 at 1:14 PM GMT, Jan Beulich wrote: >> On 11.03.2025 10:29, Alejandro Vallejo wrote: >>> Commit cefeffc7e583 marked ACPI tables as NVS in the hvmloader path >>> because SeaBIOS may otherwise just mark it as RAM. There is, however, >

Re: [PATCH 2/2] VT-d: have set_msi_source_id() return a success indicator

2025-03-13 Thread Jan Beulich
On 13.03.2025 16:01, Andrew Cooper wrote: > On 13/03/2025 1:34 pm, Jan Beulich wrote: >> Handling possible internal errors by just emitting a (debug-build-only) >> log message can't be quite enough. Return error codes in those cases, >> and have the caller propagate those up. >> >> Drop a pointless

Re: [PATCH v1 10/19] xen/page: fix return type of online_page()

2025-03-13 Thread Jan Beulich
On 13.03.2025 09:30, Jan Beulich wrote: > On 12.03.2025 05:06, Penny Zheng wrote: >> This commit fixes return type of online_page(), which shall be int >> to include correct error value. >> >> Signed-off-by: Penny Zheng > > While the patch can certainly be taken as-is, ... > >> --- a/xen/common/

Re: [PATCH] [RFC] vpci: allow BAR write while mapped

2025-03-13 Thread Alejandro Vallejo
On Wed Mar 12, 2025 at 7:50 PM GMT, Stewart Hildebrand wrote: > Xen vPCI refuses BAR writes if the BAR is mapped in p2m. If firmware > initialized the BAR to a bad address, Linux will try to write a new > address to the BAR without disabling memory decoding. Allow the write > by updating p2m right

Re: [PATCH 05/16] xen/percpu: don't initialize percpu on resume

2025-03-13 Thread Jan Beulich
On 11.03.2025 21:59, Julien Grall wrote: > On 05/03/2025 09:11, Mykola Kvach wrote: >> Invocation of the CPU_UP_PREPARE notification >> on ARM64 during resume causes a crash: >> >> (XEN) [ 315.807606] Error bringing CPU1 up: -16 >> (XEN) [ 315.811926] Xen BUG at common/cpu.c:258 >> [...] >> (XEN)

[PATCH v4 00/17] make system memory API available for common code

2025-03-13 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 v4 05/17] exec/memory.h: make devend_memop "target defines" agnostic

2025-03-13 Thread Pierrick Bouvier
Will allow to make system/memory.c common later. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- include/exec/memory.h | 16 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/include/exec/memory.h b/include/exec/memory.h index da21e9150b5..069021

Re: [PATCH v1 18/19] xen/sysctl: wrap around arch-specific arch_do_sysctl

2025-03-13 Thread Jan Beulich
On 12.03.2025 05:06, Penny Zheng wrote: > --- a/xen/arch/arm/Kconfig > +++ b/xen/arch/arm/Kconfig > @@ -140,7 +140,7 @@ config HAS_ITS > depends on GICV3 && !NEW_VGIC && !ARM_32 > > config OVERLAY_DTB > - bool "DTB overlay support (UNSUPPORTED)" if UNSUPPORTED > + bool "DTB over

Re: [PATCH] trace: convert init_trace_bufs() to constructor

2025-03-13 Thread Jan Beulich
On 13.03.2025 17:28, Andrew Cooper wrote: > On 13/03/2025 2:19 pm, Jan Beulich wrote: >> On 13.03.2025 14:58, Andrew Cooper wrote: >>> On 13/03/2025 1:38 pm, Jan Beulich wrote: >>> I'm tempted to ack this on the basis that it is an improvement, but a /* >>> TODO this is all mad, please fix */ would

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

2025-03-13 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. Reviewed-by: Richard Henderson

[PATCH v4 06/17] codebase: prepare to remove cpu.h from exec/exec-all.h

2025-03-13 Thread Pierrick Bouvier
Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- include/tcg/tcg-op.h | 1 + target/ppc/helper_regs.h | 2 ++ hw/ppc/spapr_nested.c | 1 + hw/sh4/sh7750.c| 1 + page-vary-target.c | 2 +- target/ppc/tcg-excp_helper.c | 1 +

[PATCH v4 09/17] exec/ram_addr: remove dependency on cpu.h

2025-03-13 Thread Pierrick Bouvier
Needed so compilation units including it can be common. 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 e4c28fbec9b..f5d574261

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

2025-03-13 Thread Pierrick Bouvier
Needed so compilation units including it can be common. 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..b729f

[PATCH v4 07/17] exec/exec-all: remove dependency on cpu.h

2025-03-13 Thread Pierrick Bouvier
Previous commit changed files relying transitively on it. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- include/exec/exec-all.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h index dd5c40f2233..19b0eda44a7 100644 --- a/i

[PATCH v4 03/17] exec/memory_ldst: extract memory_ldst declarations from cpu-all.h

2025-03-13 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. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- include/exec/cpu-all.h | 12 include/exec/memory_ldst.h.inc | 4

[PATCH v4 13/17] system/physmem: compilation unit is now common to all targets

2025-03-13 Thread Pierrick Bouvier
Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- system/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/meson.build b/system/meson.build index eec07a94513..bd82ef132e7 100644 --- a/system/meson.build +++ b/system/meson.build @@ -3,7 +3,6 @

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

2025-03-13 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 v4 10/17] system/kvm: make kvm_flush_coalesced_mmio_buffer() accessible for common code

2025-03-13 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 v4 14/17] include/exec/memory: extract devend_big_endian from devend_memop

2025-03-13 Thread Pierrick Bouvier
we'll use it in system/memory.c. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- include/exec/memory.h | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/include/exec/memory.h b/include/exec/memory.h index 069021ac3ff..70177304a92 100644 -

Re: [PATCH 5/6] symbols: arrange to know where functions end

2025-03-13 Thread Andrew Cooper
On 13/03/2025 1:54 pm, Jan Beulich wrote: > When determining the symbol for a given address (e.g. for the %pS > logging format specifier), so far the size of a symbol (function) was > assumed to be everything until the next symbol. There may be gaps > though, which would better be recognizable in o

[PATCH v4 12/17] hw/xen: add stubs for various functions

2025-03-13 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 v4 17/17] system/ioport: make compilation unit common

2025-03-13 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 v4 15/17] include/exec/memory: move devend functions to memory-internal.h

2025-03-13 Thread Pierrick Bouvier
Only system/physmem.c and system/memory.c use those functions, so we can move then to internal header. Signed-off-by: Pierrick Bouvier --- include/exec/memory-internal.h | 19 +++ include/exec/memory.h | 18 -- 2 files changed, 19 insertions(+), 18 deleti

[PATCH v1] drivers: Change amd_iommu struct to contain pci_sbdf_t, simplify code

2025-03-13 Thread Andrii Sultanov
Following on from 250d87dc, struct amd_iommu has its seg and bdf fields backwards with relation to pci_sbdf_t. Swap them around, and simplify the expressions regenerating an sbdf_t from seg+bdf. Simplify ioapic_sbdf and bpet_sbdf along the way. Adjust functions taking seg and bdf fields of these s

Re: [PATCH 4/8] xen/common: Split tlb-clock.h out of mm.h

2025-03-13 Thread Andrew Cooper
On 13/03/2025 7:43 pm, Nicola Vetrini wrote: > On 2025-03-13 14:35, Andrew Cooper wrote: >> On 13/03/2025 12:59 pm, Jan Beulich wrote: >>> On 12.03.2025 18:45, Andrew Cooper wrote: xen/mm.h includes asm/tlbflush.h almost at the end, which creates a horrible tangle.  This is in order

Re: [PATCH v1] drivers: Change amd_iommu struct to contain pci_sbdf_t, simplify code

2025-03-13 Thread Andrew Cooper
On 13/03/2025 6:57 pm, Andrii Sultanov wrote: > Following on from 250d87dc, struct amd_iommu has its seg and bdf fields > backwards with relation to pci_sbdf_t. Swap them around, and simplify the > expressions regenerating an sbdf_t from seg+bdf. > > Simplify ioapic_sbdf and bpet_sbdf along the way

Re: [PATCH 2/7] x86/wait: prevent duplicated assembly labels

2025-03-13 Thread Andrew Cooper
On 13/03/2025 3:30 pm, Roger Pau Monne wrote: > diff --git a/xen/common/wait.c b/xen/common/wait.c > index cb6f5ff3c20a..2fcbbe8d0c71 100644 > --- a/xen/common/wait.c > +++ b/xen/common/wait.c > @@ -170,6 +162,54 @@ static void __prepare_to_wait(struct waitqueue_vcpu *wqv) > : "0" (0), "1"

Re: [PATCH v1 06/19] xen/sysctl: wrap around XEN_SYSCTL_perfc_op

2025-03-13 Thread Stefano Stabellini
On Thu, 13 Mar 2025, Jan Beulich wrote: > On 13.03.2025 00:12, Stefano Stabellini wrote: > > On Wed, 12 Mar 2025, Penny Zheng wrote: > >> perfc_control() and perfc_copy_info() are responsible for providing control > >> of perf counters via XEN_SYSCTL_perfc_op in DOM0, so they both shall > >> be wra

[PATCH] trace: convert init_trace_bufs() to constructor

2025-03-13 Thread Jan Beulich
There's no need for each arch to invoke it directly, and there's no need for having a stub either. With the present placement of the calls to init_constructors() it can easily be a constructor itself. Signed-off-by: Jan Beulich --- Same could then apparently be done for heap_init_late(). Thoughts

[PATCH 1/6] symbols: add minimal self-test

2025-03-13 Thread Jan Beulich
... before making changes to the involved logic. Signed-off-by: Jan Beulich --- With this FAST_SYMBOL_LOOKUP may make sense to permit enabling even when LIVEPATCH=n. Thoughts? (In this case "symbols: centralize and re- arrange $(all_symbols) calculation" would want pulling ahead.) --- a/xen/comm

[PATCH 2/6] symbols: don't over-align generated data

2025-03-13 Thread Jan Beulich
x86 is one of the few architectures where .align has the same meaning as .balign; most other architectures (Arm, PPC, and RISC-V in particular) give it the same meaning as .p2align. Aligning every one of these item to 256 bytes (on all 64-bit architectures except x86-64) is clearly too much. Signe

[PATCH 3/6] symbols: sanitize a few variable's types

2025-03-13 Thread Jan Beulich
Parameter and return types of symbols_expand_symbol() make clear that xensyms_read()'s next_offset doesn't need to be 64-bit. xensyms_read()'s first parameter type makes clear that the function's next_symbols doesn't need to be 64-bit. symbols_num_syms'es type makes clear that iteration locals in

[PATCH 6/6] symbols: centralize and re-arrange $(all_symbols) calculation

2025-03-13 Thread Jan Beulich
For one there's no need for each architecture to have the same logic. Move to the root Makefile, also to calculate just once. And then re-arrange to permit FAST_SYMBOL_LOOKUP to be independent of LIVEPATCH, which may be useful in (at least) debugging. Signed-off-by: Jan Beulich --- Likely syms-w

[PATCH v8 RESEND 3/6] Arm32: use new-style entry annotations for entry code

2025-03-13 Thread Jan Beulich
Signed-off-by: Jan Beulich Tested-by: Luca Fancellu # arm --- Should the GLOBAL()s also be replaced? --- v7: New. --- a/xen/arch/arm/arm32/entry.S +++ b/xen/arch/arm/arm32/entry.S @@ -31,7 +31,7 @@ * r4: Set to a non-zero value if a pending Abort exception took place. * Otherwise, it w

Re: [PATCH v1 02/19] xen/xsm: wrap around xsm_sysctl with CONFIG_SYSCTL

2025-03-13 Thread Alejandro Vallejo
Hi, On Wed Mar 12, 2025 at 4:06 AM GMT, Penny Zheng wrote: > Signed-off-by: Penny Zheng > --- > xen/include/xsm/dummy.h | 7 +++ > xen/include/xsm/xsm.h | 9 + > xen/xsm/dummy.c | 2 ++ > xen/xsm/flask/hooks.c | 4 > 4 files changed, 22 insertions(+) > > diff --git a

Re: [PATCH v4] docs: specify numerical values of Xenstore commands

2025-03-13 Thread Anthony PERARD
On Thu, Mar 13, 2025 at 12:06:40PM +0100, Juergen Gross wrote: > In docs/misc/xenstore.txt all Xenstore commands are specified, but > the specifications lack the numerical values of the commands. > > Add a table with all commands, their values, and a potential remark > (e.g. whether the command is

Re: [PATCH 05/16] xen/percpu: don't initialize percpu on resume

2025-03-13 Thread Jürgen Groß
On 13.03.25 16:54, Jan Beulich wrote: On 11.03.2025 21:59, Julien Grall wrote: On 05/03/2025 09:11, Mykola Kvach wrote: Invocation of the CPU_UP_PREPARE notification on ARM64 during resume causes a crash: (XEN) [ 315.807606] Error bringing CPU1 up: -16 (XEN) [ 315.811926] Xen BUG at common/c

Re: [PATCH 1/6] symbols: add minimal self-test

2025-03-13 Thread Jan Beulich
On 13.03.2025 16:44, Andrew Cooper wrote: > On 13/03/2025 3:39 pm, Jan Beulich wrote: >> On 13.03.2025 16:35, Andrew Cooper wrote: >>> On 13/03/2025 1:52 pm, Jan Beulich wrote: ... before making changes to the involved logic. Signed-off-by: Jan Beulich --- With this FAST_S

Re: [RFC PATCH] xen/amd-iommu: Add interrupt remapping quirk for ath11k

2025-03-13 Thread Jan Beulich
On 13.03.2025 17:02, Andrew Cooper wrote: > On 13/03/2025 3:47 pm, Roger Pau Monné wrote: >> On Thu, Mar 13, 2025 at 11:30:28AM -0400, Jason Andryuk wrote: >>> On 2025-02-27 05:23, Roger Pau Monné wrote: On Wed, Feb 26, 2025 at 04:11:25PM -0500, Jason Andryuk wrote: > The ath11k device sup

Re: [PATCH 2/6] symbols: don't over-align generated data

2025-03-13 Thread Jan Beulich
On 13.03.2025 17:07, Andrew Cooper wrote: > On 13/03/2025 1:53 pm, Jan Beulich wrote: >> x86 is one of the few architectures where .align has the same meaning as >> .balign; most other architectures (Arm, PPC, and RISC-V in particular) >> give it the same meaning as .p2align. Aligning every one of

Re: [PATCH 05/16] xen/percpu: don't initialize percpu on resume

2025-03-13 Thread Jan Beulich
On 13.03.2025 17:05, Jürgen Groß wrote: > On 13.03.25 16:54, Jan Beulich wrote: >> On 11.03.2025 21:59, Julien Grall wrote: >>> On 05/03/2025 09:11, Mykola Kvach wrote: Invocation of the CPU_UP_PREPARE notification on ARM64 during resume causes a crash: (XEN) [ 315.807606] Erro

Re: [RFC PATCH] xen/amd-iommu: Add interrupt remapping quirk for ath11k

2025-03-13 Thread Andrew Cooper
On 13/03/2025 3:47 pm, Roger Pau Monné wrote: > On Thu, Mar 13, 2025 at 11:30:28AM -0400, Jason Andryuk wrote: >> On 2025-02-27 05:23, Roger Pau Monné wrote: >>> On Wed, Feb 26, 2025 at 04:11:25PM -0500, Jason Andryuk wrote: The ath11k device supports and tries to enable 32 MSIs. Linux in PVH

Re: [RFC PATCH] xen/amd-iommu: Add interrupt remapping quirk for ath11k

2025-03-13 Thread Andrew Cooper
On 13/03/2025 4:07 pm, Jan Beulich wrote: > On 13.03.2025 17:02, Andrew Cooper wrote: >> On 13/03/2025 3:47 pm, Roger Pau Monné wrote: >>> On Thu, Mar 13, 2025 at 11:30:28AM -0400, Jason Andryuk wrote: On 2025-02-27 05:23, Roger Pau Monné wrote: > On Wed, Feb 26, 2025 at 04:11:25PM -0500,

Re: [PATCH v1 01/19] xen: introduce CONFIG_SYSCTL

2025-03-13 Thread Jan Beulich
On 13.03.2025 11:58, Alejandro Vallejo wrote: > Hi, > > On Wed Mar 12, 2025 at 4:06 AM GMT, Penny Zheng wrote: >> From: Stefano Stabellini >> > > Commit message? > >> Signed-off-by: Stefano Stabellini >> Signed-off-by: Sergiy Kibrik >> Signed-off-by: Penny Zheng >> --- >> xen/common/Kconfig

Re: [PATCH 4/6] symbols: split symbols_num_syms

2025-03-13 Thread Andrew Cooper
On 13/03/2025 1:54 pm, Jan Beulich wrote: > In preparation for inserting address entries into symbols_addresses[] / > symbols_offsets[] without enlarging symbols_sorted_offsets[], split > symbols_num_syms into symbols_num_addrs (counting entries in the former > plus symbols_names[] as well as, less

Re: [PATCH] trace: convert init_trace_bufs() to constructor

2025-03-13 Thread Andrew Cooper
On 13/03/2025 2:19 pm, Jan Beulich wrote: > On 13.03.2025 14:58, Andrew Cooper wrote: >> On 13/03/2025 1:38 pm, Jan Beulich wrote: >>> There's no need for each arch to invoke it directly, and there's no need >>> for having a stub either. With the present placement of the calls to >>> init_construct

Re: [PATCH 3/7] x86/dom0: placate GCC 12 compile-time errors with UBSAN and PVH_GUEST

2025-03-13 Thread Andrew Cooper
On 13/03/2025 3:30 pm, Roger Pau Monne wrote: > When building Xen with GCC 12 with UBSAN and PVH_GUEST both enabled the > compiler emits the following errors: > > arch/x86/setup.c: In function '__start_xen': > arch/x86/setup.c:1504:19: error: 'consider_modules' reading 40 bytes from a > region of

Re: [PATCH v1] drivers: Change amd_iommu struct to contain pci_sbdf_t, simplify code

2025-03-13 Thread Jason Andryuk
On 2025-03-13 14:57, Andrii Sultanov wrote: Following on from 250d87dc, struct amd_iommu has its seg and bdf fields backwards with relation to pci_sbdf_t. Swap them around, and simplify the expressions regenerating an sbdf_t from seg+bdf. Simplify ioapic_sbdf and bpet_sbdf along the way. Adjust

Re: [PATCH 03/16] xen/arm: introduce a separate struct for watchdog timers

2025-03-13 Thread Jan Beulich
On 05.03.2025 10:11, Mykola Kvach wrote: > From: Mirela Simonovic > > Introduce a separate struct for watchdog timers. It is needed to properly > implement the suspend/resume actions for the watchdog timers. To be able > to restart watchdog timer after suspend we need to remember their > frequenc

Re: [PATCH 6/7] x86/vga: fix mapping of the VGA text buffer

2025-03-13 Thread Andrew Cooper
On 13/03/2025 3:30 pm, Roger Pau Monne wrote: > The call to ioremap_wc() in video_init() will always fail, because > video_init() is called ahead of vm_init_type(), and so the underlying > __vmap() call will fail to allocate the linear address space. > > Fix by reverting to the previous behavior an

Re: [PATCH 4/8] xen/common: Split tlb-clock.h out of mm.h

2025-03-13 Thread Nicola Vetrini
On 2025-03-13 14:35, Andrew Cooper wrote: On 13/03/2025 12:59 pm, Jan Beulich wrote: On 12.03.2025 18:45, Andrew Cooper wrote: xen/mm.h includes asm/tlbflush.h almost at the end, which creates a horrible tangle. This is in order to provide two common files with an abstraction over the x86-sp

  1   2   >