Re: [PATCH v4 1/3] xen/arm: Add imx8q{m,x} platform glue

2024-04-09 Thread John Ernberg
On 4/9/24 8:47 AM, Michal Orzel wrote: > Hi John, > > On 08/04/2024 18:11, John Ernberg wrote: >> >> >> When using Linux for dom0 there are a bunch of drivers that need to do SMC >> SIP calls into the firmware to enable certain hardware bits like the >> watchdog. >> >> Provide a basic platform glu

[xen-4.15-testing test] 185282: tolerable FAIL - PUSHED

2024-04-09 Thread osstest service owner
flight 185282 xen-4.15-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/185282/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-armhf-armhf-libvirt 16 saverestore-support-checkfail like 185006 test-amd64-amd64-xl-qemuu-win7-a

[ovmf test] 185293: all pass - PUSHED

2024-04-09 Thread osstest service owner
flight 185293 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/185293/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf 963671d3801a6992d1aa06f05d86e32efa6b205e baseline version: ovmf 665789b61bc39de67d3f1

[xen-unstable test] 185281: tolerable FAIL - PUSHED

2024-04-09 Thread osstest service owner
flight 185281 xen-unstable real [real] flight 185292 xen-unstable real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/185281/ http://logs.test-lab.xenproject.org/osstest/logs/185292/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): test-amd6

[xen-unstable-smoke test] 185291: tolerable all pass - PUSHED

2024-04-09 Thread osstest service owner
flight 185291 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/185291/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-libvirt 15 migrate-support-checkfail never pass test-armhf-armhf-xl 1

Re: [XEN PATCH v2 7/9] xen/xsm: address violation of MISRA C Rule 16.2

2024-04-09 Thread Daniel P. Smith
On 4/9/24 16:00, Nicola Vetrini wrote: On 2024-04-09 16:02, Daniel P. Smith wrote: On 4/5/24 05:14, Nicola Vetrini wrote: Refactor the switch so that a violation of MISRA C Rule 16.2 is resolved (A switch label shall only be used when the most closely-enclosing compound statement is the body of

Re: [PATCH v3 3/9] xen/ppc: Introduce stub asm/static-shmem.h

2024-04-09 Thread Shawn Anastasio
Hi Jan, On 3/25/24 10:24 AM, Jan Beulich wrote: > On 14.03.2024 23:15, Shawn Anastasio wrote: >> Required for bootfdt.c to build. >> >> Signed-off-by: Shawn Anastasio > > As a temporary workaround this may be okay, but was the alternative > considered to properly provide stubs in a single centra

[PATCH] xen/public: s/int/int32_t

2024-04-09 Thread Stefano Stabellini
>From 28f83c4ec0c0b5c1e7eb2bd8bc5dc3190314a5b7 Mon Sep 17 00:00:00 2001 From: Stefano Stabellini Date: Tue, 9 Apr 2024 16:19:21 -0700 Subject: [PATCH] public: s/int/int32_t Straightforward int -> int32_t and unsigned int -> uint32_t replacements in public headers. No ABI or semantic changes int

[seabios test] 185287: tolerable FAIL - PUSHED

2024-04-09 Thread osstest service owner
flight 185287 seabios real [real] http://logs.test-lab.xenproject.org/osstest/logs/185287/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-xl-qemuu-win7-amd64 19 guest-stopfail like 185103 test-amd64-amd64-qemuu-nested-amd 20 debi

Re: [XEN PATCH V2] x86/MCE: move intel mcheck init code to separate file

2024-04-09 Thread Stefano Stabellini
On Tue, 9 Apr 2024, Sergiy Kibrik wrote: > Separate Intel nonfatal MCE initialization code from generic MCE code, the > same > way it is done for AMD code. This is to be able to later make intel/amd MCE > code optional in the build. > > Convert to Xen coding style. Clean up unused includes. Remov

[ovmf test] 185288: all pass - PUSHED

2024-04-09 Thread osstest service owner
flight 185288 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/185288/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf 665789b61bc39de67d3f17288bacb4662434e251 baseline version: ovmf 932db9df0caa26daca4ed

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

2024-04-09 Thread Shawn Anastasio
On 4/8/24 1:54 AM, Jan Beulich wrote: > On 05.04.2024 20:20, Shawn Anastasio wrote: >> Conditionalize xen/acpi.h's inclusion of acpi/acpi.h and asm/acpi.h on >> CONFIG_ACPI and import ARM's !CONFIG_ACPI stub for acpi_disabled() so >> that the header can be included on architectures without ACPI sup

Re: [PATCH v2.5 2/2] x86/Kconfig: Introduce CONFIG_{AMD,INTEL} and conditionalise ucode

2024-04-09 Thread Andrew Cooper
On 09/04/2024 10:42 pm, Stefano Stabellini wrote: > On Fri, 27 Oct 2023, Andrew Cooper wrote: >> We eventually want to be able to build a stripped down Xen for a single >> platform. Make a start with CONFIG_{AMD,INTEL} (hidden behind EXPERT, but >> available to randconfig), and adjust the microcod

Re: [XEN PATCH V1] x86/ucode: optional amd/intel ucode build & load

2024-04-09 Thread Stefano Stabellini
On Tue, 9 Apr 2024, Sergiy Kibrik wrote: > 05.04.24 13:57, Andrew Cooper: > > On 05/04/2024 11:30 am, Sergiy Kibrik wrote: > > > Introduce configuration variables to make it possible to selectively turn > > > on/off CPU microcode management code in the build for AMD and Intel CPUs. > > > > > > Thi

Re: [PATCH v2.5 2/2] x86/Kconfig: Introduce CONFIG_{AMD,INTEL} and conditionalise ucode

2024-04-09 Thread Stefano Stabellini
On Fri, 27 Oct 2023, Andrew Cooper wrote: > We eventually want to be able to build a stripped down Xen for a single > platform. Make a start with CONFIG_{AMD,INTEL} (hidden behind EXPERT, but > available to randconfig), and adjust the microcode logic. > > No practical change. > > Signed-off-by:

Re: [PATCH] x86/entry: Fix build with older toolchains

2024-04-09 Thread Stefano Stabellini
On Tue, 9 Apr 2024, Andrew Cooper wrote: > Binutils older than 2.29 doesn't know INCSSPD. > > Fixes: 8e186f98ce0e ("x86: Use indirect calls in reset-stack infrastructure") > Signed-off-by: Andrew Cooper Reviewed-by: Stefano Stabellini > --- > CC: Jan Beulich > CC: Roger Pau Monné > --- > x

[xen-unstable-smoke test] 185289: tolerable all pass - PUSHED

2024-04-09 Thread osstest service owner
flight 185289 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/185289/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-libvirt 15 migrate-support-checkfail never pass test-armhf-armhf-xl 1

[PATCH] x86/entry: Fix build with older toolchains

2024-04-09 Thread Andrew Cooper
Binutils older than 2.29 doesn't know INCSSPD. Fixes: 8e186f98ce0e ("x86: Use indirect calls in reset-stack infrastructure") Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Roger Pau Monné --- xen/arch/x86/x86_64/entry.S | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xen/arch/x86/x

Re: [RFC KERNEL PATCH v4 3/3] PCI/sysfs: Add gsi sysfs for pci_dev

2024-04-09 Thread Bjorn Helgaas
[+to Rafael] On Mon, Apr 08, 2024 at 06:42:31AM +, Chen, Jiqian wrote: > Hi Bjorn, > It has been almost two months since we received your reply last time. > This series are blocking on this patch, since there are patches on Xen and > Qemu side depending on it. > Do you still have any confusio

Re: [XEN PATCH v2 7/9] xen/xsm: address violation of MISRA C Rule 16.2

2024-04-09 Thread Nicola Vetrini
On 2024-04-09 16:02, Daniel P. Smith wrote: On 4/5/24 05:14, Nicola Vetrini wrote: Refactor the switch so that a violation of MISRA C Rule 16.2 is resolved (A switch label shall only be used when the most closely-enclosing compound statement is the body of a switch statement). Note that the swit

Re: [XEN PATCH v2 6/9] x86/hvm: address violations of MISRA C Rule 16.2

2024-04-09 Thread Nicola Vetrini
On 2024-04-08 09:57, Jan Beulich wrote: On 05.04.2024 11:14, Nicola Vetrini wrote: --- a/xen/arch/x86/hvm/hypercall.c +++ b/xen/arch/x86/hvm/hypercall.c @@ -119,12 +119,12 @@ int hvm_hypercall(struct cpu_user_regs *regs) (mode == 8 ? regs->rdi : regs->ebx) == HVMOP_guest_request_vm

Re: [XEN PATCH v2 2/9] x86/cpuid: address violation of MISRA C Rule 16.2

2024-04-09 Thread Nicola Vetrini
On 2024-04-08 09:39, Jan Beulich wrote: On 05.04.2024 11:14, Nicola Vetrini wrote: Refactor the switch so that a violation of MISRA C Rule 16.2 is resolved (A switch label shall only be used when the most closely-enclosing compound statement is the body of a switch statement). Note that the swi

Re: [XEN PATCH v2 1/9] x86/vlapic: tidy switch statement and address MISRA violation

2024-04-09 Thread Nicola Vetrini
On 2024-04-08 09:32, Jan Beulich wrote: On 05.04.2024 11:14, Nicola Vetrini wrote: Remove unneded blank lines between switch clauses. "Unneeded" based on what? We're carefully trying to improve readability of large switch() statements by adding such blank lines (at least) between non- fall-

[linux-linus test] 185279: regressions - FAIL

2024-04-09 Thread osstest service owner
flight 185279 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/185279/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-arm64-pvops 6 kernel-build fail in 185275 REGR. vs. 185270 Tests which are fai

[xen-unstable-smoke test] 185286: tolerable all pass - PUSHED

2024-04-09 Thread osstest service owner
flight 185286 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/185286/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-libvirt 15 migrate-support-checkfail never pass test-armhf-armhf-xl 1

Xen Security Advisory 456 v2 (CVE-2024-2201) - x86: Native Branch History Injection

2024-04-09 Thread Xen . org security team
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Xen Security Advisory CVE-2024-2201 / XSA-456 version 2 x86: Native Branch History Injection UPDATES IN VERSION 2 Public release. ISSUE DESCRIPTION =

Re: [PATCH v2 0/6] xenwatchdogd bugfixes and enhancements

2024-04-09 Thread Anthony PERARD
On Fri, Mar 29, 2024 at 11:10:50AM +, le...@solinno.co.uk wrote: > From: Leigh Brown > > The primary intention of this patch series is to replace the > pathologically bad behaviour of rebooting the domain if you run > "xenwatchdogd -h". To that end, I have implemented comprehensive > argum

Re: [PATCH v2 6/6] docs/man: Add xenwatchdog manual page

2024-04-09 Thread Anthony PERARD
On Fri, Mar 29, 2024 at 11:10:56AM +, le...@solinno.co.uk wrote: > diff --git a/docs/man/xenwatchdogd.8.pod b/docs/man/xenwatchdogd.8.pod > new file mode 100644 > index 00..2f6454f183 > --- /dev/null > +++ b/docs/man/xenwatchdogd.8.pod > @@ -0,0 +1,54 @@ > +=head1 NAME > + > +xenwatchdo

Xen Security Advisory 455 v4 (CVE-2024-31142) - x86: Incorrect logic for BTC/SRSO mitigations

2024-04-09 Thread Xen . org security team
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Xen Security Advisory CVE-2024-31142 / XSA-455 version 4 x86: Incorrect logic for BTC/SRSO mitigations UPDATES IN VERSION 4 Public release. Correct references to prior

Re: [PATCH v2 5/6] tools/misc: xenwatchdogd enhancements

2024-04-09 Thread Anthony PERARD
On Fri, Mar 29, 2024 at 11:10:55AM +, le...@solinno.co.uk wrote: > From: Leigh Brown > > Add enhanced parameter parsing and validation, making use of > getopt_long(). Adds usage() function, ability to run in the foreground, > and the ability to disarm the watchdog timer when exiting. Now che

Re: [PATCH] MAINTAINERS: Update livepatch maintainers

2024-04-09 Thread Konrad Rzeszutek Wilk
On Tue, Apr 09, 2024 at 11:32:07AM +0100, Ross Lagerwall wrote: > Remove Konrad from the livepatch maintainers list as he hasn't been > active for a few years. > At the same time, add Roger as a new maintainer since he has been > actively working on it for a while. > > Signed-off-by: Ross Lagerwal

[XEN PATCH v1 2/5] xen/arm: ffa: use ACCESS_ONCE()

2024-04-09 Thread Jens Wiklander
Replace read_atomic() with ACCESS_ONCE() to match the intended use, that is, to prevent the compiler from (via optimization) reading shared memory more than once. Signed-off-by: Jens Wiklander --- xen/arch/arm/tee/ffa_shm.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) d

[XEN PATCH v1 3/5] xen/arm: ffa: simplify ffa_handle_mem_share()

2024-04-09 Thread Jens Wiklander
Simplify ffa_handle_mem_share() by removing the start_page_idx and last_page_idx parameters from get_shm_pages() and check that the number of pages matches expectations at the end of get_shm_pages(). Signed-off-by: Jens Wiklander --- xen/arch/arm/tee/ffa_shm.c | 18 ++ 1 file cha

[XEN PATCH v1 0/5] FF-A notifications

2024-04-09 Thread Jens Wiklander
Hi, This patch set adds support for FF-A notifications. We only support global notifications, per vCPU notifications remain unsupported. The first three patches are further cleanup and can be merged before the rest if desired. A physical SGI is used to make Xen aware of pending FF-A notification

[XEN PATCH v1 4/5] xen/arm: allow dynamically assigned SGI handlers

2024-04-09 Thread Jens Wiklander
Updates so request_irq() can be used with a dynamically assigned SGI irq as input. gic_route_irq_to_xen() don't gic_set_irq_type() for SGIs since they have their type assigned earlier during boot gic_interrupt() is updated to route the dynamically assigned SGIs to do_IRQ() instead of do_sgi(). Th

[XEN PATCH v1 5/5] xen/arm: ffa: support notification

2024-04-09 Thread Jens Wiklander
Add support for FF-A notifications, currently limited to an SP (Secure Partition) sending an asynchronous notification to a guest. Guests and Xen itself are made aware of pending notifications with an interrupt. The interrupt handler retrieves the notifications using the FF-A ABI and deliver them

[XEN PATCH v1 1/5] xen/arm: ffa: refactor ffa_handle_call()

2024-04-09 Thread Jens Wiklander
Refactors the large switch block in ffa_handle_call() to use common code for the simple case where it's either an error code or success with no further parameters. Signed-off-by: Jens Wiklander --- xen/arch/arm/tee/ffa.c | 30 ++ 1 file changed, 10 insertions(+), 20 d

Re: [PATCH v2 4/6] tools/misc: xenwatchdogd: add parse_secs()

2024-04-09 Thread Anthony PERARD
On Fri, Mar 29, 2024 at 11:10:54AM +, le...@solinno.co.uk wrote: > diff --git a/tools/misc/xenwatchdogd.c b/tools/misc/xenwatchdogd.c > index 2e7f9f51c5..19ec4c5359 100644 > --- a/tools/misc/xenwatchdogd.c > +++ b/tools/misc/xenwatchdogd.c > @@ -49,6 +49,18 @@ static void catch_usr1(int sig) >

Re: [PATCH v2 06/13] xen/arm: Avoid code duplication in find_unallocated_memory

2024-04-09 Thread Luca Fancellu
> On 9 Apr 2024, at 14:38, Michal Orzel wrote: > > Hi Luca, > > On 09/04/2024 13:45, Luca Fancellu wrote: >> >> >> The function find_unallocated_memory is using the same code to >> loop through 3 structure of the same type, in order to avoid >> code duplication, rework the code to have only

Re: [PATCH] xen-hvm: Avoid livelock while handling buffered ioreqs

2024-04-09 Thread Peter Maydell
On Tue, 9 Apr 2024 at 15:20, Ross Lagerwall wrote: > > On Tue, Apr 9, 2024 at 11:20 AM Anthony PERARD > wrote: > > > > On Thu, Apr 04, 2024 at 03:08:33PM +0100, Ross Lagerwall wrote: > > > diff --git a/hw/xen/xen-hvm-common.c b/hw/xen/xen-hvm-common.c > > > index 1627da739822..1116b3978938 10064

Re: [PATCH v2 3/6] tools/misc: xenwatchdogd: add static qualifier

2024-04-09 Thread Anthony PERARD
On Fri, Mar 29, 2024 at 11:10:53AM +, le...@solinno.co.uk wrote: > From: Leigh Brown > > Make all functions except main() static in xenwatchdogd.c. Also make > the remaining global variable static. > > Signed-off-by: Leigh Brown Reviewed-by: Anthony PERARD Thanks, -- Anthony PERARD

Re: [PATCH v2 2/6] tools/misc: rework xenwatchdogd signal handling

2024-04-09 Thread Anthony PERARD
On Fri, Mar 29, 2024 at 11:10:52AM +, le...@solinno.co.uk wrote: > From: Leigh Brown > > Rework xenwatchdogd signal handling to do the minimum in the signal > handler. This is a very minor enhancement. > > Signed-off-by: Leigh Brown Reviewed-by: Anthony PERARD Thanks, -- Anthony PERARD

Re: [PATCH] x86/cpuid: Don't expose {IPRED,RRSBA,BHI}_CTRL to PV guests

2024-04-09 Thread Roger Pau Monné
On Tue, Apr 09, 2024 at 03:11:05PM +0100, Andrew Cooper wrote: > All of these are prediction-mode (i.e. CPL) based. They don't operate as > expected in PV context, and need emulating to have the intended behaviour. > > Fixes: 4dd676070684 ("x86/spec-ctrl: Expose IPRED_CTRL to guests") > Fixes: 47

Re: [PATCH] xen-hvm: Avoid livelock while handling buffered ioreqs

2024-04-09 Thread Ross Lagerwall
On Tue, Apr 9, 2024 at 11:20 AM Anthony PERARD wrote: > > On Thu, Apr 04, 2024 at 03:08:33PM +0100, Ross Lagerwall wrote: > > diff --git a/hw/xen/xen-hvm-common.c b/hw/xen/xen-hvm-common.c > > index 1627da739822..1116b3978938 100644 > > --- a/hw/xen/xen-hvm-common.c > > +++ b/hw/xen/xen-hvm-common

[PATCH] x86/cpuid: Don't expose {IPRED,RRSBA,BHI}_CTRL to PV guests

2024-04-09 Thread Andrew Cooper
All of these are prediction-mode (i.e. CPL) based. They don't operate as expected in PV context, and need emulating to have the intended behaviour. Fixes: 4dd676070684 ("x86/spec-ctrl: Expose IPRED_CTRL to guests") Fixes: 478e4787fa64 ("x86/spec-ctrl: Expose RRSBA_CTRL to guests") Fixes: 583f1d09

Re: [XEN PATCH v2 7/9] xen/xsm: address violation of MISRA C Rule 16.2

2024-04-09 Thread Daniel P. Smith
On 4/5/24 05:14, Nicola Vetrini wrote: Refactor the switch so that a violation of MISRA C Rule 16.2 is resolved (A switch label shall only be used when the most closely-enclosing compound statement is the body of a switch statement). Note that the switch clause ending with the pseudo keyword "fal

Re: [PATCH v2 06/13] xen/arm: Avoid code duplication in find_unallocated_memory

2024-04-09 Thread Michal Orzel
Hi Luca, On 09/04/2024 13:45, Luca Fancellu wrote: > > > The function find_unallocated_memory is using the same code to > loop through 3 structure of the same type, in order to avoid > code duplication, rework the code to have only one loop that > goes through all the structures. > > Signed-off

Re: [PATCH v2 04/13] xen/arm: Introduce a generic way to access memory bank structures

2024-04-09 Thread Michal Orzel
Hi Luca, On 09/04/2024 13:45, Luca Fancellu wrote: > > > Currently the 'stuct meminfo' is defining a static defined array of s/stuct/struct > 'struct membank' of NR_MEM_BANKS elements, some feature like s/feature/features > shared memory don't require such amount of memory allocation but > mig

Re: [PATCH v2 03/13] xen/arm: Pass struct kernel_info parameter to make_resv_memory_node

2024-04-09 Thread Michal Orzel
Hi Luca, The title should be "xen/arm: Pass struct kernel_info parameter to make_{resv,shm}_memory_node given that you're modifying both functions. On 09/04/2024 13:45, Luca Fancellu wrote: > > > The struct domain parameter is not used in make_resv_memory_node > and in its called function make

Re: [PATCH] x86/alternatives: fix .init section reference in _apply_alternatives()

2024-04-09 Thread Roger Pau Monné
On Tue, Apr 09, 2024 at 01:56:16PM +0100, Andrew Cooper wrote: > On 09/04/2024 1:50 pm, Roger Pau Monne wrote: > > The code in _apply_alternatives() will unconditionally attempt to read > > __initdata_cf_clobber_{start,end} when called as part of applying > > alternatives > > to a livepatch payloa

Re: [PATCH] x86/alternatives: fix .init section reference in _apply_alternatives()

2024-04-09 Thread Andrew Cooper
On 09/04/2024 1:50 pm, Roger Pau Monne wrote: > The code in _apply_alternatives() will unconditionally attempt to read > __initdata_cf_clobber_{start,end} when called as part of applying alternatives > to a livepatch payload. When CET-IBT is active. In practice this narrows the impact to ADL/RPL

[PATCH] x86/alternatives: fix .init section reference in _apply_alternatives()

2024-04-09 Thread Roger Pau Monne
The code in _apply_alternatives() will unconditionally attempt to read __initdata_cf_clobber_{start,end} when called as part of applying alternatives to a livepatch payload. That leads to a page-fault as __initdata_cf_clobber_{start,end} living in .init section will have been unmapped by the time

[libvirt test] 185278: tolerable all pass - PUSHED

2024-04-09 Thread osstest service owner
flight 185278 libvirt real [real] http://logs.test-lab.xenproject.org/osstest/logs/185278/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-armhf-armhf-libvirt 16 saverestore-support-checkfail like 185244 test-amd64-amd64-libvirt-xsm 15 migrate-s

[XEN PATCH V2] x86/MCE: move intel mcheck init code to separate file

2024-04-09 Thread Sergiy Kibrik
Separate Intel nonfatal MCE initialization code from generic MCE code, the same way it is done for AMD code. This is to be able to later make intel/amd MCE code optional in the build. Convert to Xen coding style. Clean up unused includes. Remove seemingly outdated comment about MCE check period.

Xen Security Advisory 454 v2 (CVE-2023-46842) - x86 HVM hypercalls may trigger Xen bug check

2024-04-09 Thread Xen . org security team
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Xen Security Advisory CVE-2023-46842 / XSA-454 version 2 x86 HVM hypercalls may trigger Xen bug check UPDATES IN VERSION 2 Avoid new Misra violation in 1st staging patch.

[PATCH v2 13/13] xen/arm: List static shared memory regions as /memory nodes

2024-04-09 Thread Luca Fancellu
Currently Xen is not exporting the static shared memory regions to the device tree as /memory node, this commit is fixing this issue. The static shared memory banks can be part of the memory range available for the domain, so if they are overlapping with the normal memory banks, they need to be me

[PATCH v2 05/13] xen/arm: Conditional compilation of kernel_info.shm_mem member

2024-04-09 Thread Luca Fancellu
The user of shm_mem member of the 'struct kernel_info' is only the code managing the static shared memory feature, which can be compiled out using CONFIG_STATIC_SHM, so in case the feature is not requested, that member won't be used and will waste memory space. To address this issue, protect the m

[PATCH v2 03/13] xen/arm: Pass struct kernel_info parameter to make_resv_memory_node

2024-04-09 Thread Luca Fancellu
The struct domain parameter is not used in make_resv_memory_node and in its called function make_shm_memory_node, so drop it from both function, also, take the occasion to pass directly struct kernel_info, from which we can infer other parameter passed to the functions and drop them as well. Signe

[PATCH v2 11/13] xen/arm: fix duplicate /reserved-memory node in Dom0

2024-04-09 Thread Luca Fancellu
From: Penny Zheng In case there is a /reserved-memory node already present in the host dtb, current Xen codes would create yet another /reserved-memory node when the static shared memory feature is enabled and static shared memory regions are present. This would result in an incorrect device tree

[PATCH v2 06/13] xen/arm: Avoid code duplication in find_unallocated_memory

2024-04-09 Thread Luca Fancellu
The function find_unallocated_memory is using the same code to loop through 3 structure of the same type, in order to avoid code duplication, rework the code to have only one loop that goes through all the structures. Signed-off-by: Luca Fancellu --- v2: - Add comment in the loop inside find_una

[PATCH v2 01/13] xen/arm: remove stale addr_cells/size_cells in assign_shared_memory

2024-04-09 Thread Luca Fancellu
From: Penny Zheng Function parameters {addr_cells,size_cells} are stale parameters in assign_shared_memory, so we shall remove them. Signed-off-by: Penny Zheng Signed-off-by: Luca Fancellu Reviewed-by: Michal Orzel --- v2: - no change v1: - This is this patch: https://patchwork.kernel.org/

[PATCH v2 09/13] xen/arm: Reduce struct membank size on static shared memory

2024-04-09 Thread Luca Fancellu
Currently the memory footprint of the static shared memory feature is impacting all the struct meminfo instances with memory space that is not going to be used. To solve this issue, rework the static shared memory extra information linked to the memory bank to another structure, struct shmem_memba

[PATCH v2 12/13] xen/device_tree: Introduce function to merge overlapping intervals

2024-04-09 Thread Luca Fancellu
Introduce a function that given an array of cells containing (address,size) intervals, merges the overlapping ones, returning an array with no overlapping intervals. The algorithm needs to sort the intervals by ascending order address, so the sort() function already included in the codebase is use

[PATCH v2 04/13] xen/arm: Introduce a generic way to access memory bank structures

2024-04-09 Thread Luca Fancellu
Currently the 'stuct meminfo' is defining a static defined array of 'struct membank' of NR_MEM_BANKS elements, some feature like shared memory don't require such amount of memory allocation but might want to reuse existing code to manipulate this kind of structure that is just as 'struct meminfo' b

[PATCH v2 10/13] xen/arm: remove shm holes from extended regions

2024-04-09 Thread Luca Fancellu
From: Penny Zheng Static shared memory acts as reserved memory in guest, so it shall be excluded from extended regions. Extended regions are taken care of under three different scenarios: normal DomU, direct-map domain with iommu on, and direct-map domain with iommu off. For normal DomU, we cre

[PATCH v2 00/13] Static shared memory followup v2 - pt1

2024-04-09 Thread Luca Fancellu
This serie is a partial rework of this other serie: https://patchwork.kernel.org/project/xen-devel/cover/20231206090623.1932275-1-penny.zh...@arm.com/ The original serie is addressing an issue of the static shared memory feature that impacts the memory footprint of other component when the feature

[PATCH v2 07/13] xen/arm: Avoid code duplication in check_reserved_regions_overlap

2024-04-09 Thread Luca Fancellu
The function check_reserved_regions_overlap is calling 'meminfo_overlap_check' on the same type of structure, this code can be written in a way to avoid code duplication, so rework the function to do that. Signed-off-by: Luca Fancellu --- v2: - no changes v1: - new patch --- --- xen/arch/arm/s

[PATCH v2 08/13] xen/arm: Introduce helper for static memory pages

2024-04-09 Thread Luca Fancellu
Introduce a new helper function in the static-memory module that can be called to manage static memory banks, this is done to reuse the code when other modules would like to manage static memory banks that are not part of the reserved_mem structure, this is done because the static shared memory ban

[PATCH v2 02/13] xen/arm: avoid repetitive checking in process_shm_node

2024-04-09 Thread Luca Fancellu
From: Penny Zheng Putting overlap and overflow checking in the loop is causing repetitive operation, so this commit extracts both checking outside the loop. Signed-off-by: Penny Zheng Signed-off-by: Luca Fancellu Reviewed-by: Michal Orzel --- v2: - add Michal R-by v1: - Rework of https://p

Re: [PATCH v2 1/6] tools/misc: xenwatchdogd: use EXIT_* constants

2024-04-09 Thread Anthony PERARD
On Fri, Mar 29, 2024 at 11:10:51AM +, le...@solinno.co.uk wrote: > From: Leigh Brown > > Use EXIT_SUCCESS/EXIT_FAILURE constants instead of magic numbers. > > Signed-off-by: Leigh Brown Reviewed-by: Anthony PERARD Thanks, -- Anthony PERARD

Re: [PATCH v2] libxl: devd: Spawn QEMU for 9pfs

2024-04-09 Thread Anthony PERARD
On Sun, Apr 07, 2024 at 04:58:09PM -0400, Jason Andryuk wrote: > Add support for xl devd to support 9pfs in a domU. devd need to spawn a > pvqemu for the domain to service 9pfs as well as qdisk backends. Rename > num_qdisks to pvqemu_refcnt to be more generic. > > Keep the qdisk-backend-pid xens

[xen-unstable test] 185277: tolerable FAIL

2024-04-09 Thread osstest service owner
flight 185277 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/185277/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-armhf-armhf-libvirt 16 saverestore-support-checkfail like 185274 test-amd64-amd64-xl-qemut-win7-amd64

Re: [XEN PATCH V1] x86/ucode: optional amd/intel ucode build & load

2024-04-09 Thread Sergiy Kibrik
05.04.24 13:57, Andrew Cooper: On 05/04/2024 11:30 am, Sergiy Kibrik wrote: Introduce configuration variables to make it possible to selectively turn on/off CPU microcode management code in the build for AMD and Intel CPUs. This is to allow build configuration for a specific CPU, not compile an

[PATCH] MAINTAINERS: Update livepatch maintainers

2024-04-09 Thread Ross Lagerwall
Remove Konrad from the livepatch maintainers list as he hasn't been active for a few years. At the same time, add Roger as a new maintainer since he has been actively working on it for a while. Signed-off-by: Ross Lagerwall --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) d

Re: [PATCH] xen-hvm: Avoid livelock while handling buffered ioreqs

2024-04-09 Thread Anthony PERARD
On Thu, Apr 04, 2024 at 03:08:33PM +0100, Ross Lagerwall wrote: > diff --git a/hw/xen/xen-hvm-common.c b/hw/xen/xen-hvm-common.c > index 1627da739822..1116b3978938 100644 > --- a/hw/xen/xen-hvm-common.c > +++ b/hw/xen/xen-hvm-common.c > @@ -521,22 +521,30 @@ static bool handle_buffered_iopage(XenIO

Re: [PATCH v2 0/3] xen/livepatch: Fix .altinstructions safety checks

2024-04-09 Thread Andrew Cooper
On 17/04/2023 1:13 pm, Andrew Cooper wrote: > This replaces the previous singleton patch, with several build fixes found by > Gitlab. I also included some feedback from Jan on patch 3. > > Andrew Cooper (3): > xen/ELF: Fix ELF32 PRI formatters > arm/alternatives: Rename alt_instr fields which

[PATCH] x86/pat: fix W^X violation false-positives when running as Xen PV guest

2024-04-09 Thread Juergen Gross
When running as Xen PV guest in some cases W^X violation WARN()s have been observed. Those WARN()s are produced by verify_rwx(), which looks into the PTE to verify that writable kernel pages have the NX bit set in order to avoid code modifications of the kernel by rogue code. As the NX bits of all

Re: Linux Xen PV CPA W^X violation false-positives

2024-04-09 Thread Juergen Gross
On 08.04.24 12:22, Anthony PERARD wrote: On Thu, Mar 28, 2024 at 02:00:14PM +0100, Jürgen Groß wrote: Hi Jason, On 28.03.24 02:24, Jason Andryuk wrote: On Wed, Mar 27, 2024 at 7:46 AM Jürgen Groß wrote: On 24.01.24 17:54, Jason Andryuk wrote: + + return new; +

[ovmf test] 185280: all pass - PUSHED

2024-04-09 Thread osstest service owner
flight 185280 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/185280/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf 932db9df0caa26daca4edf133fb2aed7b4a9193e baseline version: ovmf b7f8779fe1f60113fdaab

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

2024-04-09 Thread Michal Orzel
Hi Shawn, On 05/04/2024 20:20, Shawn Anastasio wrote: > > > Conditionalize xen/acpi.h's inclusion of acpi/acpi.h and asm/acpi.h on > CONFIG_ACPI and import ARM's !CONFIG_ACPI stub for acpi_disabled() so > that the header can be included on architectures without ACPI support, > like ppc. > > Thi

[PATCH] xen/riscv: check whether the assembler has Zbb extension support

2024-04-09 Thread Oleksii Kurochko
Update the argument of the as-insn for the Zbb case to verify that Zbb is supported not only by a compiler, but also by an assembler. Signed-off-by: Oleksii Kurochko --- xen/arch/riscv/arch.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xen/arch/riscv/arch.mk b/xen/arch

Re: [PATCH v7 10/19] xen/riscv: introduce atomic.h

2024-04-09 Thread Oleksii
On Mon, 2024-04-08 at 10:23 +0200, Jan Beulich wrote: > On 03.04.2024 12:20, Oleksii Kurochko wrote: > > --- /dev/null > > +++ b/xen/arch/riscv/include/asm/atomic.h > > @@ -0,0 +1,261 @@ > > +/* SPDX-License-Identifier: GPL-2.0-only */ > > +/* > > + * Taken and modified from Linux. > > + * > > + *