Re: Xen PAT settings vs Linux PAT settings

2024-10-14 Thread Marek Marczykowski-Górecki
On Mon, Oct 14, 2024 at 09:05:58PM +0100, Andrew Cooper wrote: > On 14/10/2024 7:26 pm, Marek Marczykowski-Górecki wrote: > > Hi, > > > > It looks like we've identified the second buggy driver that somewhere > > assumes PAT is configured as Linux normally do natively - nvidia binary > > one this ti

Re: [RFC QEMU PATCH v7 1/1] xen/pci: get gsi for passthrough devices

2024-10-14 Thread Chen, Jiqian
On 2024/10/15 03:34, Stewart Hildebrand wrote: > +Edgar > > On 5/16/24 06:13, Jiqian Chen wrote: >> In PVH dom0, it uses the linux local interrupt mechanism, >> when it allocs irq for a gsi, it is dynamic, and follow >> the principle of applying first, distributing first. And >> the irq number is

Re: [PATCH v3 6/6] xen/arm: mpu: Implement a dummy enable_secondary_cpu_mm

2024-10-14 Thread Luca Fancellu
Hi Ayan, > On 10 Oct 2024, at 15:03, Ayan Kumar Halder wrote: > > Secondary cpus initialization is not yet supported. Thus, we print an > appropriate message and put the secondary cpus in WFE state. > And we introduce to BUILD_BUG_ON to prevent users using from building Xen > on multiprocessor b

Re: [PATCH v3 5/6] xen/arm: mpu: Enable MPU

2024-10-14 Thread Luca Fancellu
Hi Ayan, > /* > * Maps the various sections of Xen (described in xen.lds.S) as different MPU > * regions. > @@ -68,10 +92,11 @@ > * Inputs: > * lr : Address to return to. > * > - * Clobbers x0 - x5 > + * Clobbers x0 - x6 > * > */ > FUNC(enable_boot_cpu_mm) > +mov x6, lr > > /*

Re: [PATCH v4 2/6] x86/boot: create a C bundle for 32 bit boot code and use it

2024-10-14 Thread Jan Beulich
On 14.10.2024 18:32, Frediano Ziglio wrote: > On Mon, Oct 14, 2024 at 4:31 PM Anthony PERARD > wrote: >> >> On Mon, Oct 14, 2024 at 09:53:28AM +0100, Frediano Ziglio wrote: >>> diff --git a/xen/arch/x86/boot/Makefile b/xen/arch/x86/boot/Makefile >>> index 1199291d2b..23ad274c89 100644 >>> --- a/xe

Re: [PATCH v2 1/2] xen/riscv: initialize bootinfo from dtb

2024-10-14 Thread Jan Beulich
On 10.10.2024 17:30, Oleksii Kurochko wrote: > --- a/xen/arch/riscv/setup.c > +++ b/xen/arch/riscv/setup.c > @@ -50,6 +50,8 @@ void __init noreturn start_xen(unsigned long bootcpu_id, >_end - _start, false) ) > panic("Failed to add BOOTMOD_XEN\n"); > > +BU

Re: [PATCH v9 1/2] x86/boot: Align mbi2.c stack to 16 bytes

2024-10-14 Thread Jan Beulich
On 10.10.2024 11:45, Frediano Ziglio wrote: > Doing previous testing with an Alder Lake Intel machine the with Nit: flip "the" and "with"? > "x86/boot: Improve MBI2 structure check" commit test started to fail. > Removing the commit makes the tests succeed however there was not apparent > reason

Re: [PATCH] iommu/amd-vi: do not error if device referenced in IVMD is not behind any IOMMU

2024-10-14 Thread Jan Beulich
On 09.10.2024 15:37, Roger Pau Monné wrote: > On Wed, Oct 09, 2024 at 02:09:33PM +0200, Jan Beulich wrote: >> On 09.10.2024 13:47, Roger Pau Monné wrote: >>> On Wed, Oct 09, 2024 at 01:28:19PM +0200, Jan Beulich wrote: On 09.10.2024 13:13, Roger Pau Monné wrote: > I also think returning an

Re: [PATCH v9 2/2] x86/boot: Improve MBI2 structure check

2024-10-14 Thread Jan Beulich
On 10.10.2024 11:45, Frediano Ziglio wrote: > Tag structure should contain at least the tag header. > Entire tag structure must be contained inside MBI2 data. > > Reviewed-by: Jan Beulich > Signed-off-by: Frediano Ziglio Nit (for the future): Tags in chronological order please (maybe with the e

Re: [PATCH v4 1/6] x86/boot: Prep work for 32bit object changes

2024-10-14 Thread Jan Beulich
On 14.10.2024 10:53, Frediano Ziglio wrote: > Broken out of the subsequent patch for clarity. > > * Rename head-bin-objs to obj32 > * Use a .32.o suffix to distinguish these objects > * Factor out $(LD32) > > No functional change. > > Signed-off-by: Frediano Ziglio > Signed-off-by: Andrew Co

Re: [RFC QEMU PATCH v7 1/1] xen/pci: get gsi for passthrough devices

2024-10-14 Thread Stewart Hildebrand
+Edgar On 5/16/24 06:13, Jiqian Chen wrote: > In PVH dom0, it uses the linux local interrupt mechanism, > when it allocs irq for a gsi, it is dynamic, and follow > the principle of applying first, distributing first. And > the irq number is alloced from small to large, but the > applying gsi numbe

Re: Xen PAT settings vs Linux PAT settings

2024-10-14 Thread Andrew Cooper
On 14/10/2024 7:26 pm, Marek Marczykowski-Górecki wrote: > Hi, > > It looks like we've identified the second buggy driver that somewhere > assumes PAT is configured as Linux normally do natively - nvidia binary > one this time[3]. The first one affected was i915, but it turned out to be > a bug in

Xen PAT settings vs Linux PAT settings

2024-10-14 Thread Marek Marczykowski-Górecki
Hi, It looks like we've identified the second buggy driver that somewhere assumes PAT is configured as Linux normally do natively - nvidia binary one this time[3]. The first one affected was i915, but it turned out to be a bug in Linux mm. It was eventually fixed[1], but it was quite painful debug

Re: Xen PAT settings vs Linux PAT settings

2024-10-14 Thread Andrew Cooper
On 14/10/2024 10:37 pm, Marek Marczykowski-Górecki wrote: > On Mon, Oct 14, 2024 at 09:05:58PM +0100, Andrew Cooper wrote: >> On 14/10/2024 7:26 pm, Marek Marczykowski-Górecki wrote: >>> Technically, it's a PV ABI violation, and it does break few things >>> (definitely PV domU with passthrough are

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

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

Re: [PATCH v5 1/3] x86/msi: harden stale pdev handling

2024-10-14 Thread Jan Beulich
On 11.10.2024 17:27, Stewart Hildebrand wrote: > --- a/xen/arch/x86/msi.c > +++ b/xen/arch/x86/msi.c > @@ -1243,7 +1243,12 @@ int pci_reset_msix_state(struct pci_dev *pdev) > { > unsigned int pos = pci_find_cap_offset(pdev->sbdf, PCI_CAP_ID_MSIX); > > -ASSERT(pos); > +if ( !pos ) >

Re: [PATCH] xen/public: add comments regarding interface version bumps

2024-10-14 Thread Jan Beulich
On 14.10.2024 12:33, Juergen Gross wrote: > domctl.h and sysctl.h have an interface version, which needs to be > bumped in case of incompatible modifications of the interface. > > In order to avoid misunderstandings, add a comment to both headers > specifying in which cases a bump is needed. > >

Re: [PATCH] xen/public: add comments regarding interface version bumps

2024-10-14 Thread Julien Grall
Hi Juergen, On 14/10/2024 11:33, Juergen Gross wrote: domctl.h and sysctl.h have an interface version, which needs to be bumped in case of incompatible modifications of the interface. What about vm_event.h? In order to avoid misunderstandings, add a comment to both headers specifying in whi

Re: [PATCH] xen/public: increment domctl interface version

2024-10-14 Thread Jan Beulich
On 14.10.2024 10:00, Jürgen Groß wrote: > On 14.10.24 09:46, Jan Beulich wrote: >> On 14.10.2024 09:36, Jürgen Groß wrote: >>> On 14.10.24 09:14, Jan Beulich wrote: On 14.10.2024 09:06, Juergen Gross wrote: > The recent addition of the XEN_DOMCTL_dt_overlay function was missing > the r

[PATCH] xen/public: add comments regarding interface version bumps

2024-10-14 Thread Juergen Gross
domctl.h and sysctl.h have an interface version, which needs to be bumped in case of incompatible modifications of the interface. In order to avoid misunderstandings, add a comment to both headers specifying in which cases a bump is needed. Signed-off-by: Juergen Gross --- xen/include/public/do

Re: [PATCH] xen/public: increment domctl interface version

2024-10-14 Thread Julien Grall
Hi Jan, On 14/10/2024 11:19, Jan Beulich wrote: On 14.10.2024 10:00, Jürgen Groß wrote: On 14.10.24 09:46, Jan Beulich wrote: On 14.10.2024 09:36, Jürgen Groß wrote: On 14.10.24 09:14, Jan Beulich wrote: On 14.10.2024 09:06, Juergen Gross wrote: The recent addition of the XEN_DOMCTL_dt_over

Re: [PATCH] xen/public: add comments regarding interface version bumps

2024-10-14 Thread Jürgen Groß
On 14.10.24 12:48, Julien Grall wrote: Hi Juergen, On 14/10/2024 11:33, Juergen Gross wrote: domctl.h and sysctl.h have an interface version, which needs to be bumped in case of incompatible modifications of the interface. What about vm_event.h? Indeed. There seem to be others missing, too

[RFC PATCH v1 36/57] xen: Remove PAGE_SIZE compile-time constant assumption

2024-10-14 Thread Ryan Roberts
To prepare for supporting boot-time page size selection, refactor code to remove assumptions about PAGE_SIZE being compile-time constant. Code intended to be equivalent when compile-time page size is active. Allocate enough "frame_list" static storage in the balloon driver for the maximum supporte

Re: [PATCH] xen/public: increment domctl interface version

2024-10-14 Thread Jürgen Groß
On 14.10.24 09:46, Jan Beulich wrote: On 14.10.2024 09:36, Jürgen Groß wrote: On 14.10.24 09:14, Jan Beulich wrote: On 14.10.2024 09:06, Juergen Gross wrote: The recent addition of the XEN_DOMCTL_dt_overlay function was missing the related update of XEN_DOMCTL_INTERFACE_VERSION, as it has been

Re: [PATCH] xen/public: add comments regarding interface version bumps

2024-10-14 Thread Jan Beulich
On 14.10.2024 13:01, Jürgen Groß wrote: > On 14.10.24 12:48, Julien Grall wrote: >> On 14/10/2024 11:33, Juergen Gross wrote: >>> domctl.h and sysctl.h have an interface version, which needs to be >>> bumped in case of incompatible modifications of the interface. >> >> What about vm_event.h? > > I

Re: [PATCH] xen/public: increment domctl interface version

2024-10-14 Thread Jürgen Groß
On 14.10.24 09:14, Jan Beulich wrote: On 14.10.2024 09:06, Juergen Gross wrote: The recent addition of the XEN_DOMCTL_dt_overlay function was missing the related update of XEN_DOMCTL_INTERFACE_VERSION, as it has been the first interface change of the 4.20 release cycle. Fixes: 4c733873b5c2 ("xe

[PATCH v4 4/6] x86/boot: Use boot_vid_info variable directly from C code

2024-10-14 Thread Frediano Ziglio
No more need to pass from assembly code. Signed-off-by: Frediano Ziglio Reviewed-by: Andrew Cooper --- Changes since v1: - split the 2 variable changes into 2 commits. Changes since v2: - revert commit order. --- xen/arch/x86/boot/build32.lds.S | 1 + xen/arch/x86/boot/head.S| 10 +---

[PATCH v4 5/6] x86/boot: Use trampoline_phys variable directly from C code

2024-10-14 Thread Frediano Ziglio
No more need to pass from assembly code. Signed-off-by: Frediano Ziglio Reviewed-by: Andrew Cooper --- Changes since v1: - split the 2 variable changes into 2 commits. Changes since v2: - revert commit order; - avoid useless casts. --- xen/arch/x86/boot/head.S | 6 +- xen/arch/x86/boot/re

[PATCH v4 2/6] x86/boot: create a C bundle for 32 bit boot code and use it

2024-10-14 Thread Frediano Ziglio
The current method to include 32 bit C boot code is: - compile each function we want to use into a separate object file; - each function is compiled with -fpic option; - convert these object files to binary files. This operation removes GOP which we don't want in the executable; - a small assembl

[PATCH v4 0/6] Reuse 32 bit C code more safely

2024-10-14 Thread Frediano Ziglio
This series attempt to: - use more C code, that is replace some assembly code with C; - avoid some code duplication between C and assembly; - prevent some issues having relocations in C code. The idea is extending the current C to binary code conversion done for 32 bit C code called from head.S ma

[PATCH v4 3/6] x86/boot: Reuse code to relocate trampoline

2024-10-14 Thread Frediano Ziglio
Move code from efi-boot.h to a separate, new, reloc-trampoline.c file. Reuse this new code, compiling it for 32bit as well, to replace assembly code in head.S doing the same thing. Signed-off-by: Frediano Ziglio Reviewed-by: Andrew Cooper --- Changes since v3: - fixed a typo in comment; - added

[PATCH v4 1/6] x86/boot: Prep work for 32bit object changes

2024-10-14 Thread Frediano Ziglio
Broken out of the subsequent patch for clarity. * Rename head-bin-objs to obj32 * Use a .32.o suffix to distinguish these objects * Factor out $(LD32) No functional change. Signed-off-by: Frediano Ziglio Signed-off-by: Andrew Cooper --- xen/arch/x86/boot/Makefile | 25 +++--

[PATCH v4 6/6] x86/boot: Clarify comment

2024-10-14 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- xen/arch/x86/boot/reloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/x86/boot/reloc.c b/xen/arch/x86/boot/reloc.c index e50e161b27..e725cfb6eb 100644 --- a/xen/arch/x86/boot/reloc.c +++ b/xen/arch/x86/boot/reloc.c @@ -65,7 +65,7

Re: [RFC PATCH 01/13] PCI: Prepare removing devres from pci_intx()

2024-10-14 Thread Philipp Stanner
On Fri, 2024-10-11 at 16:50 +0300, Andy Shevchenko wrote: > On Fri, Oct 11, 2024 at 02:16:06PM +0200, Philipp Stanner wrote: > > On Thu, 2024-10-10 at 17:40 +0300, Andy Shevchenko wrote: > > > On Wed, Oct 09, 2024 at 10:35:07AM +0200, Philipp Stanner wrote: > > > > pci_intx() is a hybrid function w

Re: [PATCH] xen/public: increment domctl interface version

2024-10-14 Thread Jan Beulich
On 14.10.2024 09:36, Jürgen Groß wrote: > On 14.10.24 09:14, Jan Beulich wrote: >> On 14.10.2024 09:06, Juergen Gross wrote: >>> The recent addition of the XEN_DOMCTL_dt_overlay function was missing >>> the related update of XEN_DOMCTL_INTERFACE_VERSION, as it has been the >>> first interface chang

[PATCH] xen/spinlock: Fix UBSAN "load of address with insufficient space" in lock_prof_init()

2024-10-14 Thread Andrew Cooper
UBSAN complains: (XEN) (XEN) UBSAN: Undefined behaviour in common/spinlock.c:794:10 (XEN) load of address 82d040ae24c8 with insufficient space (XEN) for an object of type 'struct lock_profile *' (XEN) -

Re: [PATCH v4 2/6] x86/boot: create a C bundle for 32 bit boot code and use it

2024-10-14 Thread Frediano Ziglio
On Mon, Oct 14, 2024 at 4:31 PM Anthony PERARD wrote: > > On Mon, Oct 14, 2024 at 09:53:28AM +0100, Frediano Ziglio wrote: > > diff --git a/xen/arch/x86/boot/Makefile b/xen/arch/x86/boot/Makefile > > index 1199291d2b..23ad274c89 100644 > > --- a/xen/arch/x86/boot/Makefile > > +++ b/xen/arch/x86/bo

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

2024-10-14 Thread osstest service owner
flight 188081 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/188081/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-xl-qemut-win7-amd64 19 guest-stopfail like 188073 test-amd64-amd64-xl-qemuu-win7-amd64

[ovmf test] 188083: tolerable FAIL - PUSHED

2024-10-14 Thread osstest service owner
flight 188083 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/188083/ Failures :-/ but no regressions. Regressions which are regarded as allowable (not blocking): test-amd64-amd64-xl-qemuu-ovmf-amd64 16 guest-localmigrate fail REGR. vs. 188065 version targeted for testing: o

Re: [PATCH] xen/public: increment domctl interface version

2024-10-14 Thread Jan Beulich
On 14.10.2024 09:06, Juergen Gross wrote: > The recent addition of the XEN_DOMCTL_dt_overlay function was missing > the related update of XEN_DOMCTL_INTERFACE_VERSION, as it has been the > first interface change of the 4.20 release cycle. > > Fixes: 4c733873b5c2 ("xen/arm: Add XEN_DOMCTL_dt_overla

Re: [PATCH] xen/public: increment domctl interface version

2024-10-14 Thread Jan Beulich
On 14.10.2024 09:14, Jan Beulich wrote: > On 14.10.2024 09:06, Juergen Gross wrote: >> The recent addition of the XEN_DOMCTL_dt_overlay function was missing >> the related update of XEN_DOMCTL_INTERFACE_VERSION, as it has been the >> first interface change of the 4.20 release cycle. >> >> Fixes: 4c

[PATCH] xen/public: increment domctl interface version

2024-10-14 Thread Juergen Gross
The recent addition of the XEN_DOMCTL_dt_overlay function was missing the related update of XEN_DOMCTL_INTERFACE_VERSION, as it has been the first interface change of the 4.20 release cycle. Fixes: 4c733873b5c2 ("xen/arm: Add XEN_DOMCTL_dt_overlay and device attachment to domains") Signed-off-by:

[xen-unstable test] 188079: tolerable FAIL

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

Re: [PATCH v3 4/6] xen/arm: mpu: Create boot-time MPU protection regions

2024-10-14 Thread Ayan Kumar Halder
On 10/10/2024 15:03, Ayan Kumar Halder wrote: Define enable_boot_cpu_mm() for the AArch64-V8R system. Like boot-time page table in MMU system, we need a boot-time MPU protection region configuration in MPU system so Xen can fetch code and data from normal memory. To do this, Xen maps the foll

Re: [PATCH v4 2/6] x86/boot: create a C bundle for 32 bit boot code and use it

2024-10-14 Thread Jan Beulich
On 14.10.2024 17:31, Anthony PERARD wrote: > On Mon, Oct 14, 2024 at 09:53:28AM +0100, Frediano Ziglio wrote: >> diff --git a/xen/arch/x86/boot/Makefile b/xen/arch/x86/boot/Makefile >> index 1199291d2b..23ad274c89 100644 >> --- a/xen/arch/x86/boot/Makefile >> +++ b/xen/arch/x86/boot/Makefile >> @@

Re: [PATCH v4 2/6] x86/boot: create a C bundle for 32 bit boot code and use it

2024-10-14 Thread Andrew Cooper
On 14/10/2024 4:31 pm, Anthony PERARD wrote: > On Mon, Oct 14, 2024 at 09:53:28AM +0100, Frediano Ziglio wrote: >> diff --git a/xen/arch/x86/boot/Makefile b/xen/arch/x86/boot/Makefile >> index 1199291d2b..23ad274c89 100644 >> --- a/xen/arch/x86/boot/Makefile >> +++ b/xen/arch/x86/boot/Makefile >> @

Re: [PATCH] xen/spinlock: Fix UBSAN "load of address with insufficient space" in lock_prof_init()

2024-10-14 Thread Jürgen Groß
On 14.10.24 16:57, Andrew Cooper wrote: UBSAN complains: (XEN) (XEN) UBSAN: Undefined behaviour in common/spinlock.c:794:10 (XEN) load of address 82d040ae24c8 with insufficient space (XEN) for an ob

Re: [PATCH] xen/spinlock: Fix UBSAN "load of address with insufficient space" in lock_prof_init()

2024-10-14 Thread Andrew Cooper
On 14/10/2024 4:12 pm, Jürgen Groß wrote: > On 14.10.24 16:57, Andrew Cooper wrote: >> UBSAN complains: >> >>    (XEN) >> >>    (XEN) UBSAN: Undefined behaviour in common/spinlock.c:794:10 >>    (XEN) load of address f

Re: [PATCH v3 3/6] xen/arm: mpu: Define Xen start address for MPU systems

2024-10-14 Thread Luca Fancellu
+ Frediano for suggestion about header protection define name > +++ b/xen/arch/arm/include/asm/mpu/layout.h > @@ -0,0 +1,33 @@ > +/* SPDX-License-Identifier: GPL-2.0-only */ > + > +#ifndef __ARM_MPU_LAYOUT_H__ > +#define __ARM_MPU_LAYOUT_H__ I think we are moving away from this notation: https://

Re: [PATCH v3 2/6] xen/arm: mpu: Introduce choice between MMU and MPU

2024-10-14 Thread Luca Fancellu
Hi Ayan, > On 10 Oct 2024, at 15:03, Ayan Kumar Halder wrote: > > There are features in the forthcoming patches which are dependent on > MPU. For eg fixed start address. > Also, some of the Xen features (eg STATIC_MEMORY) will be selected > by the MPU configuration. > > Thus, this patch introdu

Re: [PATCH v3 1/6] xen/arm: Skip initializing the BSS section when it is empty

2024-10-14 Thread Luca Fancellu
Hi Ayan, > On 10 Oct 2024, at 15:03, Ayan Kumar Halder wrote: > > If the BSS section is empty, then the function can just return. > > Signed-off-by: Ayan Kumar Halder Reviewed-by: Luca Fancellu mailto:luca.fance...@arm.com>>

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

2024-10-14 Thread osstest service owner
flight 188084 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/188084/ 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 1

Re: [PATCH v3 4/6] xen/arm: mpu: Create boot-time MPU protection regions

2024-10-14 Thread Luca Fancellu
Hi Ayan, > diff --git a/xen/arch/arm/arm64/mpu/head.S b/xen/arch/arm/arm64/mpu/head.S > new file mode 100644 > index 00..4a21bc815c > --- /dev/null > +++ b/xen/arch/arm/arm64/mpu/head.S > @@ -0,0 +1,130 @@ > +/* SPDX-License-Identifier: GPL-2.0-only */ > +/* > + * Start-of-day code for an

Re: [PATCH v4 2/6] x86/boot: create a C bundle for 32 bit boot code and use it

2024-10-14 Thread Anthony PERARD
On Mon, Oct 14, 2024 at 09:53:28AM +0100, Frediano Ziglio wrote: > diff --git a/xen/arch/x86/boot/Makefile b/xen/arch/x86/boot/Makefile > index 1199291d2b..23ad274c89 100644 > --- a/xen/arch/x86/boot/Makefile > +++ b/xen/arch/x86/boot/Makefile > @@ -1,4 +1,5 @@ > obj-bin-y += head.o > +obj-bin-y +