Re: [PATCH v3 1/2] x86/mm: add API for marking only part of a MMIO page read only

2024-05-21 Thread Jan Beulich
On 21.05.2024 17:33, Marek Marczykowski-Górecki wrote: > On Tue, May 21, 2024 at 05:16:58PM +0200, Jan Beulich wrote: >> On 21.05.2024 04:54, Marek Marczykowski-Górecki wrote: >>> --- a/xen/arch/x86/include/asm/mm.h >>> +++ b/xen/arch/x86/include/asm/mm.h >>> @@ -522,9 +522,27 @@ extern struct

[xen-4.17-testing test] 186063: regressions - FAIL

2024-05-21 Thread osstest service owner
flight 186063 xen-4.17-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/186063/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-arm64-xsm 6 xen-buildfail REGR. vs. 185864

Re: [PATCH] Revert "evtchn: refuse EVTCHNOP_status for Xen-bound event channels"

2024-05-21 Thread Stefano Stabellini
On Tue, 21 May 2024, Jan Beulich wrote: > On 17.05.2024 22:28, Stefano Stabellini wrote: > > On Fri, 17 May 2024, Jan Beulich wrote: > >> On 17.05.2024 03:21, Stefano Stabellini wrote: > >>> On Thu, 16 May 2024, Jan Beulich wrote: > 1) In the discussion George claimed that exposing status

Re: [PATCH 3/3] xen/x86: Address two misc MISRA 17.7 violations

2024-05-21 Thread Stefano Stabellini
On Tue, 21 May 2024, Andrew Cooper wrote: > Neither text_poke() nor watchdog_setup() have return value consulted. Switch > them to being void. > > Signed-off-by: Andrew Cooper Reviewed-by: Stefano Stabellini > --- > CC: George Dunlap > CC: Jan Beulich > CC: Stefano Stabellini > CC:

Re: [PATCH 2/3] xen/x86: Drop useless non-Kconfig CONFIG_* variables

2024-05-21 Thread Stefano Stabellini
On Tue, 21 May 2024, Andrew Cooper wrote: > These are all either completely unused, or do nothing useful. > > Signed-off-by: Andrew Cooper Reviewed-by: Stefano Stabellini > --- > CC: George Dunlap > CC: Jan Beulich > CC: Stefano Stabellini > CC: Julien Grall > CC: Roberto Bagnara > CC:

Re: [PATCH v3 5/8] xen/arm/gic: Allow routing/removing interrupt to running VMs

2024-05-21 Thread Henry Wang
Hi Stefano, On 5/22/2024 9:16 AM, Stefano Stabellini wrote: On Wed, 22 May 2024, Henry Wang wrote: Hi Julien, On 5/21/2024 8:30 PM, Julien Grall wrote: Hi, On 21/05/2024 05:35, Henry Wang wrote: diff --git a/xen/arch/arm/gic-vgic.c b/xen/arch/arm/gic-vgic.c index 56490dbc43..956c11ba13

Re: [PATCH 1/3] xen/lzo: Implement COPY{4,8} using memcpy()

2024-05-21 Thread Stefano Stabellini
On Tue, 21 May 2024, Andrew Cooper wrote: > This is simpler and easier for both humans and compilers to read. > > It also addresses 6 instances of MISRA R5.3 violation (shadowing of the ptr_ > local variable inside both {put,get}_unaligned()). > > No change, not even in the compiled binary. > >

Re: [PATCH v3 5/8] xen/arm/gic: Allow routing/removing interrupt to running VMs

2024-05-21 Thread Stefano Stabellini
On Wed, 22 May 2024, Henry Wang wrote: > Hi Julien, > > On 5/21/2024 8:30 PM, Julien Grall wrote: > > Hi, > > > > On 21/05/2024 05:35, Henry Wang wrote: > > > diff --git a/xen/arch/arm/gic-vgic.c b/xen/arch/arm/gic-vgic.c > > > index 56490dbc43..956c11ba13 100644 > > > ---

Re: [PATCH v3 5/8] xen/arm/gic: Allow routing/removing interrupt to running VMs

2024-05-21 Thread Henry Wang
Hi Julien, On 5/21/2024 8:30 PM, Julien Grall wrote: Hi, On 21/05/2024 05:35, Henry Wang wrote: diff --git a/xen/arch/arm/gic-vgic.c b/xen/arch/arm/gic-vgic.c index 56490dbc43..956c11ba13 100644 --- a/xen/arch/arm/gic-vgic.c +++ b/xen/arch/arm/gic-vgic.c @@ -439,24 +439,33 @@ int

Re: [XEN PATCH] automation/eclair_analysis: add already clean rules to the analysis

2024-05-21 Thread Stefano Stabellini
On Tue, 21 May 2024, Nicola Vetrini wrote: > Some MISRA C rules already have no violations in Xen, so they can be > set as clean. > > Reorder the rules in tagging.ecl according to version ordering > (i.e. sort -V) and split the configuration on multiple lines for > readability. > >

[xen-4.18-testing test] 186060: tolerable FAIL - PUSHED

2024-05-21 Thread osstest service owner
flight 186060 xen-4.18-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/186060/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-armhf-armhf-libvirt 16 saverestore-support-checkfail like 185865

[XEN PATCH] automation/eclair_analysis: add already clean rules to the analysis

2024-05-21 Thread Nicola Vetrini
Some MISRA C rules already have no violations in Xen, so they can be set as clean. Reorder the rules in tagging.ecl according to version ordering (i.e. sort -V) and split the configuration on multiple lines for readability. Signed-off-by: Nicola Vetrini ---

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

2024-05-21 Thread osstest service owner
flight 186058 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/186058/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-armhf-armhf-libvirt 16 saverestore-support-checkfail like 186049

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

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

[PATCH 3/3] xen/x86: Address two misc MISRA 17.7 violations

2024-05-21 Thread Andrew Cooper
Neither text_poke() nor watchdog_setup() have return value consulted. Switch them to being void. Signed-off-by: Andrew Cooper --- CC: George Dunlap CC: Jan Beulich CC: Stefano Stabellini CC: Julien Grall CC: Roberto Bagnara CC: consult...@bugseng.com CC: Oleksii Kurochko ---

[PATCH 1/3] xen/lzo: Implement COPY{4,8} using memcpy()

2024-05-21 Thread Andrew Cooper
This is simpler and easier for both humans and compilers to read. It also addresses 6 instances of MISRA R5.3 violation (shadowing of the ptr_ local variable inside both {put,get}_unaligned()). No change, not even in the compiled binary. Signed-off-by: Andrew Cooper --- CC: George Dunlap CC:

[PATCH 2/3] xen/x86: Drop useless non-Kconfig CONFIG_* variables

2024-05-21 Thread Andrew Cooper
These are all either completely unused, or do nothing useful. Signed-off-by: Andrew Cooper --- CC: George Dunlap CC: Jan Beulich CC: Stefano Stabellini CC: Julien Grall CC: Roberto Bagnara CC: consult...@bugseng.com CC: Oleksii Kurochko --- xen/arch/x86/include/asm/config.h | 4

[PATCH for-4.19 0/3] xen: Misc MISRA changes

2024-05-21 Thread Andrew Cooper
Misc fixes collected during today's call. Andrew Cooper (3): xen/lzo: Implement COPY{4,8} using memcpy() xen/x86: Drop useless non-Kconfig CONFIG_* variables xen/x86: Address two misc MISRA 17.7 violations xen/arch/x86/alternative.c| 4 ++-- xen/arch/x86/include/asm/config.h | 4

Re: [PATCH v3 1/2] x86/mm: add API for marking only part of a MMIO page read only

2024-05-21 Thread Marek Marczykowski-Górecki
On Tue, May 21, 2024 at 05:16:58PM +0200, Jan Beulich wrote: > On 21.05.2024 04:54, Marek Marczykowski-Górecki wrote: > > --- a/xen/arch/x86/include/asm/mm.h > > +++ b/xen/arch/x86/include/asm/mm.h > > @@ -522,9 +522,27 @@ extern struct rangeset *mmio_ro_ranges; > > void memguard_guard_stack(void

Re: [PATCH v3 1/2] x86/mm: add API for marking only part of a MMIO page read only

2024-05-21 Thread Jan Beulich
On 21.05.2024 04:54, Marek Marczykowski-Górecki wrote: > --- a/xen/arch/x86/include/asm/mm.h > +++ b/xen/arch/x86/include/asm/mm.h > @@ -522,9 +522,27 @@ extern struct rangeset *mmio_ro_ranges; > void memguard_guard_stack(void *p); > void memguard_unguard_stack(void *p); > > +/* > + * Add more

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

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

[libvirt test] 186057: tolerable all pass - PUSHED

2024-05-21 Thread osstest service owner
flight 186057 libvirt real [real] http://logs.test-lab.xenproject.org/osstest/logs/186057/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-armhf-armhf-libvirt 16 saverestore-support-checkfail like 186025 test-amd64-amd64-libvirt 15

Re: [PATCH v15 1/5] arm/vpci: honor access size when returning an error

2024-05-21 Thread Julien Grall
Hi Stewart, On 17/05/2024 18:06, Stewart Hildebrand wrote: From: Volodymyr Babchuk Guest can try to read config space using different access sizes: 8, 16, 32, 64 bits. We need to take this into account when we are returning an error back to MMIO handler, otherwise it is possible to provide

Re: [PATCH v3 7/8] tools: Introduce the "xl dt-overlay {attach,detach}" commands

2024-05-21 Thread Jason Andryuk
On 2024-05-21 00:35, Henry Wang wrote: With the XEN_DOMCTL_dt_overlay DOMCTL added, users should be able to attach/detach devices from the provided DT overlay to domains. Support this by introducing a new set of "xl dt-overlay" commands and related documentation, i.e. "xl dt-overlay

[linux-linus test] 186052: tolerable FAIL - PUSHED

2024-05-21 Thread osstest service owner
flight 186052 linux-linus real [real] flight 186061 linux-linus real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/186052/ http://logs.test-lab.xenproject.org/osstest/logs/186061/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking):

Re: [PATCH v3 4/8] tools/arm: Introduce the "nr_spis" xl config entry

2024-05-21 Thread Jason Andryuk
On 2024-05-21 00:35, Henry Wang wrote: Currently, the number of SPIs allocated to the domain is only configurable for Dom0less DomUs. Xen domains are supposed to be platform agnostics and therefore the numbers of SPIs for libxl guests should not be based on the hardware. Introduce a new xl

Re: [PATCH v3 5/8] xen/arm/gic: Allow routing/removing interrupt to running VMs

2024-05-21 Thread Julien Grall
Hi, On 21/05/2024 05:35, Henry Wang wrote: From: Vikram Garhwal Currently, routing/removing physical interrupts are only allowed at the domain creation/destroy time. For use cases such as dynamic device tree overlay adding/removing, the routing/removing of physical IRQ to running domains

Re: [XEN PATCH 4/4] x86_64/cpu_idle: address violations of MISRA C Rule 20.7

2024-05-21 Thread Jan Beulich
On 16.05.2024 01:19, Stefano Stabellini wrote: > On Wed, 15 May 2024, Nicola Vetrini wrote: >> MISRA C Rule 20.7 states: "Expressions resulting from the expansion >> of macro parameters shall be enclosed in parentheses". Therefore, some >> macro definitions should gain additional parentheses to

Re: [XEN PATCH 3/4] x86_64/uaccess: address violations of MISRA C Rule 20.7

2024-05-21 Thread Jan Beulich
On 16.05.2024 01:19, Stefano Stabellini wrote: > On Wed, 15 May 2024, Nicola Vetrini wrote: >> MISRA C Rule 20.7 states: "Expressions resulting from the expansion >> of macro parameters shall be enclosed in parentheses". Therefore, some >> macro definitions should gain additional parentheses to

Re: [XEN PATCH 2/4] x86/hvm: address violations of MISRA C Rule 20.7

2024-05-21 Thread Jan Beulich
On 16.05.2024 01:18, Stefano Stabellini wrote: > On Wed, 15 May 2024, Nicola Vetrini wrote: >> MISRA C Rule 20.7 states: "Expressions resulting from the expansion >> of macro parameters shall be enclosed in parentheses". Therefore, some >> macro definitions should gain additional parentheses to

Re: [XEN PATCH 1/4] x86/vpmu: address violations of MISRA C Rule 20.7

2024-05-21 Thread Jan Beulich
On 16.05.2024 01:17, Stefano Stabellini wrote: > On Wed, 15 May 2024, Nicola Vetrini wrote: >> MISRA C Rule 20.7 states: "Expressions resulting from the expansion >> of macro parameters shall be enclosed in parentheses". Therefore, some >> macro definitions should gain additional parentheses to

Re: [PATCH v10 03/14] xen/bitops: implement fls{l}() in common logic

2024-05-21 Thread Jan Beulich
On 17.05.2024 15:54, Oleksii Kurochko wrote: > To avoid the compilation error below, it is needed to update to places > in common/page_alloc.c where flsl() is used as now flsl() returns unsigned > int: > > ./include/xen/kernel.h:18:21: error: comparison of distinct pointer types > lacks a cast

Re: [PATCH v10 02/14] xen: introduce generic non-atomic test_*bit()

2024-05-21 Thread Jan Beulich
On 17.05.2024 15:54, Oleksii Kurochko wrote: > The following generic functions were introduced: > * test_bit > * generic__test_and_set_bit > * generic__test_and_clear_bit > * generic__test_and_change_bit > > These functions and macros can be useful for architectures > that don't have

Re: [PATCH for-4.19? v4 4/6] x86: Make the maximum number of altp2m views configurable

2024-05-21 Thread Jan Beulich
On 18.05.2024 13:02, Petr Beneš wrote: > --- a/xen/arch/x86/domain.c > +++ b/xen/arch/x86/domain.c > @@ -685,6 +685,18 @@ int arch_sanitise_domain_config(struct > xen_domctl_createdomain *config) > return -EINVAL; > } > > +if ( config->nr_altp2m && !hvm_altp2m_supported() ) > +

Re: [PATCH for-4.19 v3 2/3] xen: enable altp2m at create domain domctl

2024-05-21 Thread Jan Beulich
On 17.05.2024 15:33, Roger Pau Monne wrote: > Enabling it using an HVM param is fragile, and complicates the logic when > deciding whether options that interact with altp2m can also be enabled. > > Leave the HVM param value for consumption by the guest, but prevent it from > being set. Enabling

Re: [PATCH v2 05/12] IOMMU: rename and re-type ats_enabled

2024-05-21 Thread Jan Beulich
On 21.05.2024 12:03, Roger Pau Monné wrote: > On Tue, May 21, 2024 at 08:21:35AM +0200, Jan Beulich wrote: >> On 20.05.2024 12:29, Roger Pau Monné wrote: >>> On Wed, May 15, 2024 at 12:07:50PM +0200, Jan Beulich wrote: On 06.05.2024 15:53, Roger Pau Monné wrote: > On Mon, May 06, 2024 at

Re: [XEN PATCH v3 2/6] x86/intel: move vmce_has_lmce() routine to header

2024-05-21 Thread Jan Beulich
On 21.05.2024 12:00, Sergiy Kibrik wrote: > 21.05.24 09:05, Jan Beulich: >>> This is because MCG_LMCE_P is defined in arch/x86/cpu/mcheck/x86_mca.h >>> -- so either MCG_LMCE_P (+ a bunch of MCG_* declarations) has to be >>> moved to common header to be accessible, or local x86_mca.h got to be >>>

Re: [PATCH v2 05/12] IOMMU: rename and re-type ats_enabled

2024-05-21 Thread Roger Pau Monné
On Tue, May 21, 2024 at 08:21:35AM +0200, Jan Beulich wrote: > On 20.05.2024 12:29, Roger Pau Monné wrote: > > On Wed, May 15, 2024 at 12:07:50PM +0200, Jan Beulich wrote: > >> On 06.05.2024 15:53, Roger Pau Monné wrote: > >>> On Mon, May 06, 2024 at 03:20:38PM +0200, Jan Beulich wrote: > On

Re: [XEN PATCH v3 2/6] x86/intel: move vmce_has_lmce() routine to header

2024-05-21 Thread Sergiy Kibrik
21.05.24 09:05, Jan Beulich: This is because MCG_LMCE_P is defined in arch/x86/cpu/mcheck/x86_mca.h -- so either MCG_LMCE_P (+ a bunch of MCG_* declarations) has to be moved to common header to be accessible, or local x86_mca.h got to be included from common arch/x86/include/asm/mce.h. As for

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

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

Re: [PATCH for-4.19] xen/x86: limit interrupt movement done by fixup_irqs()

2024-05-21 Thread Jan Beulich
On 16.05.2024 17:56, Roger Pau Monné wrote: > On Thu, May 16, 2024 at 05:00:54PM +0200, Jan Beulich wrote: >> On 16.05.2024 15:22, Roger Pau Monne wrote: >>> --- a/xen/arch/x86/irq.c >>> +++ b/xen/arch/x86/irq.c >>> @@ -2527,7 +2527,7 @@ static int __init cf_check setup_dump_irqs(void) >>> } >>>

Re: [PATCH for-4.19] xen/x86: limit interrupt movement done by fixup_irqs()

2024-05-21 Thread Jan Beulich
On 16.05.2024 18:23, Roger Pau Monné wrote: > On Thu, May 16, 2024 at 06:04:22PM +0200, Jan Beulich wrote: >> On 16.05.2024 17:56, Roger Pau Monné wrote: >>> On Thu, May 16, 2024 at 05:00:54PM +0200, Jan Beulich wrote: On 16.05.2024 15:22, Roger Pau Monne wrote: > @@ -2576,7 +2576,12 @@

Re: [PATCH v3] xen/arm: Set correct per-cpu cpu_core_mask

2024-05-21 Thread Michal Orzel
On 21/05/2024 09:51, Henry Wang wrote: > Hi Michal, > > On 5/21/2024 3:47 PM, Michal Orzel wrote: >> Hi Henry. >> >> On 3/21/2024 11:57 AM, Henry Wang wrote: In the common sysctl command XEN_SYSCTL_physinfo, the value of cores_per_socket is calculated based on the cpu_core_mask of

Re: [PATCH v3] xen/arm: Set correct per-cpu cpu_core_mask

2024-05-21 Thread Henry Wang
Hi Michal, On 5/21/2024 3:47 PM, Michal Orzel wrote: Hi Henry. On 3/21/2024 11:57 AM, Henry Wang wrote: In the common sysctl command XEN_SYSCTL_physinfo, the value of cores_per_socket is calculated based on the cpu_core_mask of CPU0. Currently on Arm this is a fixed value 1 (can be checked

Re: [PATCH v3] xen/arm: Set correct per-cpu cpu_core_mask

2024-05-21 Thread Michal Orzel
Hi Henry. On 20/05/2024 04:57, Henry Wang wrote: > Hi All, > > Gentle ping since it has been a couple of months, any comments on this > updated patch? Thanks! Sorry for the late reply. > > Kind regards, > Henry > > On 3/21/2024 11:57 AM, Henry Wang wrote: >> In the common sysctl command

Re: [PATCH v2 06/12] VT-d: respect ACPI SATC's ATC_REQUIRED flag

2024-05-21 Thread Jan Beulich
On 20.05.2024 13:36, Roger Pau Monné wrote: > On Wed, May 15, 2024 at 12:42:40PM +0200, Jan Beulich wrote: >> On 06.05.2024 15:38, Roger Pau Monné wrote: >>> On Thu, Feb 15, 2024 at 11:16:11AM +0100, Jan Beulich wrote: When the flag is set, permit Dom0 to control the device (no worse than

Re: [PATCH v2 05/12] IOMMU: rename and re-type ats_enabled

2024-05-21 Thread Jan Beulich
On 20.05.2024 12:29, Roger Pau Monné wrote: > On Wed, May 15, 2024 at 12:07:50PM +0200, Jan Beulich wrote: >> On 06.05.2024 15:53, Roger Pau Monné wrote: >>> On Mon, May 06, 2024 at 03:20:38PM +0200, Jan Beulich wrote: On 06.05.2024 14:42, Roger Pau Monné wrote: > On Thu, Feb 15, 2024 at

Re: [PATCH] Revert "evtchn: refuse EVTCHNOP_status for Xen-bound event channels"

2024-05-21 Thread Jan Beulich
On 17.05.2024 22:28, Stefano Stabellini wrote: > On Fri, 17 May 2024, Jan Beulich wrote: >> On 17.05.2024 03:21, Stefano Stabellini wrote: >>> On Thu, 16 May 2024, Jan Beulich wrote: 1) In the discussion George claimed that exposing status information in an uncontrolled manner is okay.

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

2024-05-21 Thread Jan Beulich
On 16.05.2024 16:46, Alejandro Vallejo wrote: > Hi, > > On 16/05/2024 13:37, Jan Beulich wrote: >> On 16.05.2024 14:29, Alejandro Vallejo wrote: >>> On 16/05/2024 12:35, Roger Pau Monné wrote: On Thu, May 16, 2024 at 12:07:10PM +0100, Alejandro Vallejo wrote: > Bring test_x86_emulator in

Re: [XEN PATCH v3 2/6] x86/intel: move vmce_has_lmce() routine to header

2024-05-21 Thread Jan Beulich
On 20.05.2024 11:32, Sergiy Kibrik wrote: > 16.05.24 12:39, Jan Beulich: >> On 14.05.2024 10:20, Sergiy Kibrik wrote: >>> Moving this function out of mce_intel.c would make it possible to disable >>> build of Intel MCE code later on, because the function gets called from >>> common x86 code. >> >>