Re: [Mini-OS PATCH] Add missing symbol exports for grub-pv

2024-10-29 Thread Samuel Thibault
Juergen Gross, le mar. 29 oct. 2024 12:41:58 +0100, a ecrit: > Grub-pv needs start_info_union and phys_to_machine_mapping to be > accessible. Export both symbols. > > Fixes: 33411a11f848 ("Mini-OS: hide all symbols not exported via > EXPORT_SYMBOLS()") > Reported-by: Natanael Copa > Signed-off-b

[Mini-OS PATCH] Add missing symbol exports for grub-pv

2024-10-29 Thread Juergen Gross
Grub-pv needs start_info_union and phys_to_machine_mapping to be accessible. Export both symbols. Fixes: 33411a11f848 ("Mini-OS: hide all symbols not exported via EXPORT_SYMBOLS()") Reported-by: Natanael Copa Signed-off-by: Juergen Gross --- arch/x86/mm.c| 1 + arch/x86/setup.c | 1 + 2 fi

Re: [PATCH 12/14] x86/fpu: Pass explicit xsave areas to fpu_(f)xsave()

2024-10-29 Thread Alejandro Vallejo
On Tue Oct 29, 2024 at 8:37 AM GMT, Jan Beulich wrote: > On 28.10.2024 16:49, Alejandro Vallejo wrote: > > --- a/xen/arch/x86/xstate.c > > +++ b/xen/arch/x86/xstate.c > > @@ -300,9 +300,8 @@ void compress_xsave_states(struct vcpu *v, const void > > *src, unsigned int size) > > vcpu_unmap_xsav

Re: [PATCH 01/14] x86/xstate: Update stale assertions in fpu_x{rstor,save}()

2024-10-29 Thread Alejandro Vallejo
On Tue Oct 29, 2024 at 8:13 AM GMT, Jan Beulich wrote: > On 28.10.2024 18:16, Andrew Cooper wrote: > > On 28/10/2024 3:49 pm, Alejandro Vallejo wrote: > >> The asserts' intent was to establish whether the xsave instruction was > >> usable or not, which at the time was strictly given by the presence

[PATCH v7 1/5] x86/boot: Rework how 32bit C is linked/included for early boot

2024-10-29 Thread Frediano Ziglio
Right now, the two functions which were really too complicated to write in asm are compiled as 32bit PIC, linked to a blob and included directly, using global asm() to arrange for them to have function semantics. This is limiting and fragile; the use of data relocations will compile fine but malfu

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

2024-10-29 Thread Jan Beulich
On 28.10.2024 18:38, Ayan Kumar Halder wrote: > On 28/10/2024 15:01, Jan Beulich wrote: >> On 28.10.2024 15:39, Ayan Kumar Halder wrote: >>> On 28/10/2024 12:55, Jan Beulich wrote: On 28.10.2024 13:45, Ayan Kumar Halder wrote: > --- a/xen/arch/Kconfig > +++ b/xen/arch/Kconfig > @@

Re: [Mini-OS PATCH] Add missing symbol exports for grub-pv

2024-10-29 Thread Andrew Cooper
On 29/10/2024 12:02 pm, Jürgen Groß wrote: > On 29.10.24 13:01, Andrew Cooper wrote: >> On 29/10/2024 11:50 am, Samuel Thibault wrote: >>> Juergen Gross, le mar. 29 oct. 2024 12:41:58 +0100, a ecrit: Grub-pv needs start_info_union and phys_to_machine_mapping to be accessible. Export both

Re: [Mini-OS PATCH] Add missing symbol exports for grub-pv

2024-10-29 Thread Juergen Gross
On 29.10.24 13:13, Andrew Cooper wrote: On 29/10/2024 12:02 pm, Jürgen Groß wrote: On 29.10.24 13:01, Andrew Cooper wrote: On 29/10/2024 11:50 am, Samuel Thibault wrote: Juergen Gross, le mar. 29 oct. 2024 12:41:58 +0100, a ecrit: Grub-pv needs start_info_union and phys_to_machine_mapping to

Re: [PATCH 02/14] x86/xstate: Create map/unmap primitives for xsave areas

2024-10-29 Thread Jan Beulich
On 29.10.2024 12:57, Alejandro Vallejo wrote: > On Mon Oct 28, 2024 at 5:20 PM GMT, Andrew Cooper wrote: >> On 28/10/2024 3:49 pm, Alejandro Vallejo wrote: >>> diff --git a/xen/arch/x86/include/asm/xstate.h >>> b/xen/arch/x86/include/asm/xstate.h >>> index 07017cc4edfd..36260459667c 100644 >>> ---

Re: [PATCH 05/14] x86/xstate: Map/unmap xsave area in xstate_set_init() and handle_setbv()

2024-10-29 Thread Jan Beulich
On 29.10.2024 14:00, Alejandro Vallejo wrote: > On Tue Oct 29, 2024 at 8:26 AM GMT, Jan Beulich wrote: >> On 28.10.2024 16:49, Alejandro Vallejo wrote: >>> --- a/xen/arch/x86/xstate.c >>> +++ b/xen/arch/x86/xstate.c >>> @@ -993,7 +993,12 @@ int handle_xsetbv(u32 index, u64 new_bv) >>> >>>

Re: [PATCH 05/14] x86/xstate: Map/unmap xsave area in xstate_set_init() and handle_setbv()

2024-10-29 Thread Jan Beulich
On 28.10.2024 16:49, Alejandro Vallejo wrote: > --- a/xen/arch/x86/xstate.c > +++ b/xen/arch/x86/xstate.c > @@ -993,7 +993,12 @@ int handle_xsetbv(u32 index, u64 new_bv) > > clts(); > if ( curr->fpu_dirtied ) > -asm ( "stmxcsr %0" : "=m" (curr->arch.xsave_area->fpu_s

Re: [PATCH 12/14] x86/fpu: Pass explicit xsave areas to fpu_(f)xsave()

2024-10-29 Thread Jan Beulich
On 28.10.2024 16:49, Alejandro Vallejo wrote: > --- a/xen/arch/x86/xstate.c > +++ b/xen/arch/x86/xstate.c > @@ -300,9 +300,8 @@ void compress_xsave_states(struct vcpu *v, const void > *src, unsigned int size) > vcpu_unmap_xsave_area(v, xstate); > } > > -void xsave(struct vcpu *v, uint64_t

Re: [PATCH v2] x86/io-apic: fix directed EOI when using AMD-Vi interrupt remapping

2024-10-29 Thread Jan Beulich
On 29.10.2024 09:26, Roger Pau Monné wrote: > On Tue, Oct 29, 2024 at 08:40:26AM +0100, Jan Beulich wrote: >> On 28.10.2024 18:22, Roger Pau Monné wrote: >>> On Mon, Oct 28, 2024 at 12:33:42PM +0100, Jan Beulich wrote: On 24.10.2024 17:48, Roger Pau Monne wrote: > --- a/xen/arch/x86/io_api

Re: [PATCH 13/14] x86/fpu: Pass explicit xsave areas to fpu_(f)xrstor()

2024-10-29 Thread Jan Beulich
On 28.10.2024 16:49, Alejandro Vallejo wrote: > --- a/xen/arch/x86/xstate.c > +++ b/xen/arch/x86/xstate.c > @@ -374,11 +374,10 @@ void xsave(struct vcpu *v, struct xsave_struct *ptr, > uint64_t mask) > ptr->fpu_sse.x[FPU_WORD_SIZE_OFFSET] = fip_width; > } > > -void xrstor(struct vcpu *

Re: [PATCH 10/14] x86/mpx: Map/unmap xsave area in in read_bndcfgu()

2024-10-29 Thread Jan Beulich
On 28.10.2024 16:49, Alejandro Vallejo wrote: > --- a/xen/arch/x86/xstate.c > +++ b/xen/arch/x86/xstate.c > @@ -1021,9 +1021,10 @@ int handle_xsetbv(u32 index, u64 new_bv) > > uint64_t read_bndcfgu(void) > { > +uint64_t ret = 0; Seeing the purpose of the variable, imo it would better be na

Re: [PATCH] tools/libxl: remove usage of VLA arrays

2024-10-29 Thread Jan Beulich
On 28.10.2024 18:26, Roger Pau Monné wrote: > On Mon, Oct 28, 2024 at 12:57:30PM +, Frediano Ziglio wrote: >> On Mon, Oct 28, 2024 at 12:48 PM Jan Beulich wrote: >>> >>> On 28.10.2024 13:03, Andrew Cooper wrote: On 28/10/2024 11:48 am, Roger Pau Monne wrote: > Clang 19 complains with

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

2024-10-29 Thread Luca Fancellu
Hi Jan, > On 29 Oct 2024, at 08:08, Jan Beulich wrote: > > On 28.10.2024 18:38, Ayan Kumar Halder wrote: >> On 28/10/2024 15:01, Jan Beulich wrote: >>> On 28.10.2024 15:39, Ayan Kumar Halder wrote: On 28/10/2024 12:55, Jan Beulich wrote: > On 28.10.2024 13:45, Ayan Kumar Halder wrote: >

[PATCH v3] x86/io-apic: fix directed EOI when using AMD-Vi interrupt remapping

2024-10-29 Thread Roger Pau Monne
When using AMD-Vi interrupt remapping the vector field in the IO-APIC RTE is repurposed to contain part of the offset into the remapping table. Previous to 2ca9fbd739b8 Xen had logic so that the offset into the interrupt remapping table would match the vector. Such logic was mandatory for end of

Re: [PATCH 05/14] x86/xstate: Map/unmap xsave area in xstate_set_init() and handle_setbv()

2024-10-29 Thread Alejandro Vallejo
On Tue Oct 29, 2024 at 8:26 AM GMT, Jan Beulich wrote: > On 28.10.2024 16:49, Alejandro Vallejo wrote: > > --- a/xen/arch/x86/xstate.c > > +++ b/xen/arch/x86/xstate.c > > @@ -993,7 +993,12 @@ int handle_xsetbv(u32 index, u64 new_bv) > > > > clts(); > > if ( curr->fpu_dirtied ) >

[PATCH v7 2/5] x86/boot: Reuse code to relocate trampoline

2024-10-29 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 Acked-by: Marek Marczykowski-Górecki --- Changes since v

[PATCH v7 4/5] x86/boot: Use trampoline_phys variable directly from C code

2024-10-29 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

Re: [PATCH 02/14] x86/xstate: Create map/unmap primitives for xsave areas

2024-10-29 Thread Alejandro Vallejo
On Tue Oct 29, 2024 at 8:19 AM GMT, Jan Beulich wrote: > On 28.10.2024 16:49, Alejandro Vallejo wrote: > > --- a/xen/arch/x86/include/asm/xstate.h > > +++ b/xen/arch/x86/include/asm/xstate.h > > @@ -143,4 +143,24 @@ static inline bool xstate_all(const struct vcpu *v) > > (v->arch.xcr0_a

Re: [PATCH 02/14] x86/xstate: Create map/unmap primitives for xsave areas

2024-10-29 Thread Alejandro Vallejo
Hi, On Mon Oct 28, 2024 at 5:20 PM GMT, Andrew Cooper wrote: > On 28/10/2024 3:49 pm, Alejandro Vallejo wrote: > > diff --git a/xen/arch/x86/include/asm/xstate.h > > b/xen/arch/x86/include/asm/xstate.h > > index 07017cc4edfd..36260459667c 100644 > > --- a/xen/arch/x86/include/asm/xstate.h > > +++

Re: [PATCH v3 0/5] x86/xen: Drop absolute references from startup code

2024-10-29 Thread Ard Biesheuvel
On Wed, 9 Oct 2024 at 18:09, Ard Biesheuvel wrote: > > From: Ard Biesheuvel > > This series was broken out of the series I sent recently [0], after > Jason pointed out that my Xen startup code changes conflict with his > changes to make the PVH startup code position independent. > > Jason's work

Re: [PATCH 02/14] x86/xstate: Create map/unmap primitives for xsave areas

2024-10-29 Thread Frediano Ziglio
On Tue, Oct 29, 2024 at 11:58 AM Alejandro Vallejo wrote: > > Hi, > > On Mon Oct 28, 2024 at 5:20 PM GMT, Andrew Cooper wrote: > > On 28/10/2024 3:49 pm, Alejandro Vallejo wrote: > > > diff --git a/xen/arch/x86/include/asm/xstate.h > > > b/xen/arch/x86/include/asm/xstate.h > > > index 07017cc4edf

Re: [Mini-OS PATCH] Add missing symbol exports for grub-pv

2024-10-29 Thread Andrew Cooper
On 29/10/2024 12:17 pm, Juergen Gross wrote: > On 29.10.24 13:13, Andrew Cooper wrote: >> On 29/10/2024 12:02 pm, Jürgen Groß wrote: >>> On 29.10.24 13:01, Andrew Cooper wrote: On 29/10/2024 11:50 am, Samuel Thibault wrote: > Juergen Gross, le mar. 29 oct. 2024 12:41:58 +0100, a ecrit: >>>

Re: [PATCH 01/14] x86/xstate: Update stale assertions in fpu_x{rstor,save}()

2024-10-29 Thread Jan Beulich
On 28.10.2024 18:16, Andrew Cooper wrote: > On 28/10/2024 3:49 pm, Alejandro Vallejo wrote: >> The asserts' intent was to establish whether the xsave instruction was >> usable or not, which at the time was strictly given by the presence of >> the xsave area. After edb48e76458b("x86/fpu: Combine fpu

Re: [PATCH 02/14] x86/xstate: Create map/unmap primitives for xsave areas

2024-10-29 Thread Jan Beulich
On 28.10.2024 16:49, Alejandro Vallejo wrote: > --- a/xen/arch/x86/include/asm/xstate.h > +++ b/xen/arch/x86/include/asm/xstate.h > @@ -143,4 +143,24 @@ static inline bool xstate_all(const struct vcpu *v) > (v->arch.xcr0_accum & XSTATE_LAZY & ~XSTATE_FP_SSE); > } > > +/* > + * Fetch

Re: [Mini-OS PATCH] Add missing symbol exports for grub-pv

2024-10-29 Thread Andrew Cooper
On 29/10/2024 11:50 am, Samuel Thibault wrote: > Juergen Gross, le mar. 29 oct. 2024 12:41:58 +0100, a ecrit: >> Grub-pv needs start_info_union and phys_to_machine_mapping to be >> accessible. Export both symbols. >> >> Fixes: 33411a11f848 ("Mini-OS: hide all symbols not exported via >> EXPORT_SYM

Re: [Mini-OS PATCH] Add missing symbol exports for grub-pv

2024-10-29 Thread Jürgen Groß
On 29.10.24 13:01, Andrew Cooper wrote: On 29/10/2024 11:50 am, Samuel Thibault wrote: Juergen Gross, le mar. 29 oct. 2024 12:41:58 +0100, a ecrit: Grub-pv needs start_info_union and phys_to_machine_mapping to be accessible. Export both symbols. Fixes: 33411a11f848 ("Mini-OS: hide all symbols

Re: [PATCH v3 0/5] x86/xen: Drop absolute references from startup code

2024-10-29 Thread Jürgen Groß
On 29.10.24 13:50, Ard Biesheuvel wrote: On Wed, 9 Oct 2024 at 18:09, Ard Biesheuvel wrote: From: Ard Biesheuvel This series was broken out of the series I sent recently [0], after Jason pointed out that my Xen startup code changes conflict with his changes to make the PVH startup code posit

Re: [PATCH -next v4 01/19] arm64: ptrace: Replace interrupts_enabled() with regs_irqs_disabled()

2024-10-29 Thread Mark Rutland
On Fri, Oct 25, 2024 at 06:06:42PM +0800, Jinjie Ruan wrote: > Implement regs_irqs_disabled(), and replace interrupts_enabled() macro > with regs_irqs_disabled() all over the place. > > No functional changes. > Please say why, e.g. | The generic entry code expects architecture code to provide |

Re: [PATCH 02/14] x86/xstate: Create map/unmap primitives for xsave areas

2024-10-29 Thread Alejandro Vallejo
On Tue Oct 29, 2024 at 1:28 PM GMT, Jan Beulich wrote: > On 29.10.2024 12:57, Alejandro Vallejo wrote: > > On Mon Oct 28, 2024 at 5:20 PM GMT, Andrew Cooper wrote: > >> On 28/10/2024 3:49 pm, Alejandro Vallejo wrote: > >>> diff --git a/xen/arch/x86/include/asm/xstate.h > >>> b/xen/arch/x86/include

Re: [PATCH 02/14] x86/xstate: Create map/unmap primitives for xsave areas

2024-10-29 Thread Alejandro Vallejo
On Tue Oct 29, 2024 at 1:24 PM GMT, Frediano Ziglio wrote: > On Tue, Oct 29, 2024 at 11:58 AM Alejandro Vallejo > wrote: > > > > Hi, > > > > On Mon Oct 28, 2024 at 5:20 PM GMT, Andrew Cooper wrote: > > > On 28/10/2024 3:49 pm, Alejandro Vallejo wrote: > > > > diff --git a/xen/arch/x86/include/asm/

Re: [PATCH] x86/mtrr: Rename mtrr_overwrite_state() to guest_force_mtrr_state()

2024-10-29 Thread Dave Hansen
On 10/29/24 08:13, Kirill A. Shutemov wrote: > On Wed, Oct 16, 2024 at 01:50:48PM +0300, Kirill A. Shutemov wrote: >> Rename the helper to better reflect its function. >> >> Signed-off-by: Kirill A. Shutemov >> Suggested-by: Dave Hansen > > KVM patch is Linus' tree. > > Dave, can you take this

[RFC PATCH 6/6] xen/common: Rename grant_opts to grant_version

2024-10-29 Thread Alejandro Vallejo
... and remove the macros that no longer exist. No functional change. Signed-off-by: Alejandro Vallejo --- xen/common/domain.c | 6 +++--- xen/common/grant_table.c | 3 +-- xen/include/xen/grant_table.h | 4 ++-- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/xen/

Re: [PATCH v7 02/10] xen/x86: Add initial x2APIC ID to the per-vLAPIC save area

2024-10-29 Thread Andrew Cooper
On 21/10/2024 4:45 pm, Alejandro Vallejo wrote: > This allows the initial x2APIC ID to be sent on the migration stream. > This allows further changes to topology and APIC ID assignment without > breaking existing hosts. Given the vlapic data is zero-extended on > restore, fix up migrations from hos

Re: [XEN PATCH] automation/eclair: monitor Rules 11.2 and 18.1 and update configuration

2024-10-29 Thread Stefano Stabellini
On Tue, 29 Oct 2024, Federico Serafini wrote: > Add Rule 11.2 and Rule 18.1 to the monitored set. > > Tag Rule 7.3 as clean. > Tag Rule 11.2 and Rule 20.7 as clean only for arm. > > Rule 2.2, Rule 9.5 and Directive 4.12 are not accepted: > do not enable them and do not tag them as clean. > > Sig

Re: [PATCH] x86/mtrr: Rename mtrr_overwrite_state() to guest_force_mtrr_state()

2024-10-29 Thread Kirill A. Shutemov
On Tue, Oct 29, 2024 at 10:37:07AM -0700, Dave Hansen wrote: > On 10/29/24 08:13, Kirill A. Shutemov wrote: > > On Wed, Oct 16, 2024 at 01:50:48PM +0300, Kirill A. Shutemov wrote: > >> Rename the helper to better reflect its function. > >> > >> Signed-off-by: Kirill A. Shutemov > >> Suggested-by:

Re: [PATCH] x86/mtrr: Rename mtrr_overwrite_state() to guest_force_mtrr_state()

2024-10-29 Thread Kirill A. Shutemov
On Wed, Oct 16, 2024 at 01:50:48PM +0300, Kirill A. Shutemov wrote: > Rename the helper to better reflect its function. > > Signed-off-by: Kirill A. Shutemov > Suggested-by: Dave Hansen KVM patch is Linus' tree. Dave, can you take this one? -- Kiryl Shutsemau / Kirill A. Shutemov

Re: [PATCH 05/14] x86/xstate: Map/unmap xsave area in xstate_set_init() and handle_setbv()

2024-10-29 Thread Alejandro Vallejo
On Tue Oct 29, 2024 at 1:31 PM GMT, Jan Beulich wrote: > On 29.10.2024 14:00, Alejandro Vallejo wrote: > > On Tue Oct 29, 2024 at 8:26 AM GMT, Jan Beulich wrote: > >> On 28.10.2024 16:49, Alejandro Vallejo wrote: > >>> --- a/xen/arch/x86/xstate.c > >>> +++ b/xen/arch/x86/xstate.c > >>> @@ -993,7 +9

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

2024-10-29 Thread Luca Fancellu
Hi Ayan, I forgot another thing: > diff --git a/xen/arch/arm/arm64/mpu/head.S b/xen/arch/arm/arm64/mpu/head.S > new file mode 100644 > index 00..9377ae778c > --- /dev/null > +++ b/xen/arch/arm/arm64/mpu/head.S > @@ -0,0 +1,122 @@ > +/* SPDX-License-Identifier: GPL-2.0-only */ > +/* > + *

Re: [XEN PATCH v1 6/6] CI: Run the builds and tests that use the Debian 12 containers as a normal user

2024-10-29 Thread Javi Merino
Hi Stefano, On Thu, Oct 24, 2024 at 04:47:28PM -0700, Stefano Stabellini wrote: > On Thu, 24 Oct 2024, Javi Merino wrote: > > Use FF_DISABLE_UMASK_FOR_DOCKER_EXECUTOR so that GitLab CI clones xen > > using the user in the image, instead of as root[0]. > > > > In qemu-smoke-dom0*.sh and qemu-alpin

Re: [PATCH v7 5/5] x86/boot: Clarify comment

2024-10-29 Thread Alejandro Vallejo
On Tue Oct 29, 2024 at 4:40 PM GMT, Frediano Ziglio wrote: > On Tue, Oct 29, 2024 at 3:07 PM Andrew Cooper > wrote: > > > > On 29/10/2024 2:53 pm, Roger Pau Monné wrote: > > > On Tue, Oct 29, 2024 at 10:29:42AM +, Frediano Ziglio wrote: > > >> Signed-off-by: Frediano Ziglio > > >> --- > > >>

[PATCH v1] xen/common: move gic_preinit() to common code

2024-10-29 Thread Oleksii Kurochko
Introduce ic_preinit() in common code, as it is not architecture-specific and can be reused by both PPC and RISC-V. The function identifies the node with the interrupt-controller property and calls device_init() for architecture-specific initialization of the interrupt controller when using the dev

Re: [PATCH v3] x86/io-apic: fix directed EOI when using AMD-Vi interrupt remapping

2024-10-29 Thread Jan Beulich
On 29.10.2024 12:03, Roger Pau Monne wrote: > When using AMD-Vi interrupt remapping the vector field in the IO-APIC RTE is > repurposed to contain part of the offset into the remapping table. Previous > to > 2ca9fbd739b8 Xen had logic so that the offset into the interrupt remapping > table would

Re: [PATCH v3] x86/io-apic: fix directed EOI when using AMD-Vi interrupt remapping

2024-10-29 Thread Roger Pau Monné
On Tue, Oct 29, 2024 at 05:43:24PM +0100, Jan Beulich wrote: > On 29.10.2024 12:03, Roger Pau Monne wrote: > > When using AMD-Vi interrupt remapping the vector field in the IO-APIC RTE is > > repurposed to contain part of the offset into the remapping table. > > Previous to > > 2ca9fbd739b8 Xen h

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

2024-10-29 Thread oleksii . kurochko
On Tue, 2024-10-29 at 09:53 +, Andrew Cooper wrote: > On 28/10/2024 12:45 pm, Ayan Kumar Halder wrote: > > diff --git a/CHANGELOG.md b/CHANGELOG.md > > index c499d12dc4..79524cc15f 100644 > > --- a/CHANGELOG.md > > +++ b/CHANGELOG.md > > @@ -12,6 +12,8 @@ The format is based on [Keep a > > Chan

Re: [PATCH v1] xen/common: move gic_preinit() to common code

2024-10-29 Thread Jan Beulich
On 29.10.2024 17:47, Oleksii Kurochko wrote: > --- a/xen/common/device.c > +++ b/xen/common/device.c > @@ -4,10 +4,14 @@ > * xen/arch/arm/device.c > */ > > +#include > #include > #include > #include > #include > +#include > +#include > +#include I don't think non-ACPI configs s

[PATCH] x86/cpu-policy: Extend the guest max policy max leaf/subleaves

2024-10-29 Thread Andrew Cooper
We already have one migration case opencoded (feat.max_subleaf). A more recent discovery is that we advertise x2APIC to guests without ensuring that we provide max_leaf >= 0xb. In general, any leaf known to Xen can be safely configured by the toolstack if it doesn't violate other constraints. Th

Re: [PATCH v1] xen/common: move gic_preinit() to common code

2024-10-29 Thread oleksii . kurochko
On Tue, 2024-10-29 at 17:57 +0100, Jan Beulich wrote: > On 29.10.2024 17:47, Oleksii Kurochko wrote: > > --- a/xen/common/device.c > > +++ b/xen/common/device.c > > @@ -4,10 +4,14 @@ > >   *   xen/arch/arm/device.c > >   */ > >   > > +#include > >  #include > >  #include > >  #include > >  #inc

Re: [PATCH v7 01/10] lib/x86: Bump max basic leaf in {pv,hvm}_max_policy

2024-10-29 Thread Andrew Cooper
On 21/10/2024 4:45 pm, Alejandro Vallejo wrote: > Bump it to ARRAY_SIZE() so toolstack is able to extend a policy past > host limits (i.e: to emulate a feature not present in the host) > > Signed-off-by: Alejandro Vallejo > --- > v7: > * Replaces v6/patch1("Relax checks about policy compatibilit

[RFC PATCH 3/6] tools/ocaml: Rename grant_opts to grant_version

2024-10-29 Thread Alejandro Vallejo
... and remove the macros that no longer exist. No functional change. Signed-off-by: Alejandro Vallejo --- tools/ocaml/libs/xc/xenctrl_stubs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/ocaml/libs/xc/xenctrl_stubs.c b/tools/ocaml/libs/xc/xenctrl_stubs.c index c

[RFC PATCH 5/6] xen/x86: Rename grant_opts to grant_version

2024-10-29 Thread Alejandro Vallejo
... and remove the macros that no longer exist. No functional change. Signed-off-by: Alejandro Vallejo --- xen/arch/x86/setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c index 177f4024abca..a9130161969b 100644 --- a/xen/arch/

[RFC PATCH 4/6] xen/arm: Rename grant_opts to grant_version

2024-10-29 Thread Alejandro Vallejo
... and remove the macros that no longer exist. No functional change. Signed-off-by: Alejandro Vallejo --- xen/arch/arm/dom0less-build.c | 4 ++-- xen/arch/arm/domain_build.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/xen/arch/arm/dom0less-build.c b/xen/arch/arm/do

[RFC PATCH 2/6] tools: Rename grant_opts to grant_version

2024-10-29 Thread Alejandro Vallejo
... and remove the macros that no longer exist. No functional change Signed-off-by: Alejandro Vallejo --- tools/helpers/init-xenstore-domain.c | 2 +- tools/libs/light/libxl_create.c | 2 +- tools/python/xen/lowlevel/xc/xc.c| 2 +- tools/tests/paging

[RFC PATCH 0/6] xen/abi: On wide bitfields inside primitive types

2024-10-29 Thread Alejandro Vallejo
Non-boolean bitfields in the hypercall ABI make it fairly inconvenient to create bindings for any language because (a) they are always ad-hoc and are subject to restrictions regular fields are not (b) require boilerplate that regular fields do not and (c) might not even be part of the core language

Re: [PATCH v2 3/3] drm: remove driver date from struct drm_driver and all drivers

2024-10-29 Thread Jeffrey Hugo
On 10/28/2024 12:51 PM, Jani Nikula wrote: We stopped using the driver initialized date in commit 7fb8af6798e8 ("drm: deprecate driver date") and (eventually) started returning "0" for drm_version ioctl instead. Finish the job, and remove the unused date member from struct drm_driver, its initia

Re: [PATCH v7 1/5] x86/boot: Rework how 32bit C is linked/included for early boot

2024-10-29 Thread Andrew Cooper
On 29/10/2024 10:29 am, Frediano Ziglio wrote: > Right now, the two functions which were really too complicated to write > in asm are compiled as 32bit PIC, linked to a blob and included > directly, using global asm() to arrange for them to have function semantics. > > This is limiting and fragile;

Re: [PATCH v7 5/5] x86/boot: Clarify comment

2024-10-29 Thread Roger Pau Monné
On Tue, Oct 29, 2024 at 10:29:42AM +, Frediano Ziglio wrote: > 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

Re: [PATCH v7 5/5] x86/boot: Clarify comment

2024-10-29 Thread Frediano Ziglio
On Tue, Oct 29, 2024 at 3:07 PM Andrew Cooper wrote: > > On 29/10/2024 2:53 pm, Roger Pau Monné wrote: > > On Tue, Oct 29, 2024 at 10:29:42AM +, Frediano Ziglio wrote: > >> Signed-off-by: Frediano Ziglio > >> --- > >> xen/arch/x86/boot/reloc.c | 2 +- > >> 1 file changed, 1 insertion(+), 1 d

Re: [PATCH v7 5/5] x86/boot: Clarify comment

2024-10-29 Thread Andrew Cooper
On 29/10/2024 2:53 pm, Roger Pau Monné wrote: > On Tue, Oct 29, 2024 at 10:29:42AM +, Frediano Ziglio wrote: >> 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/x

Re: [PATCH -next v4 06/19] arm64: entry: Move arm64_preempt_schedule_irq() into exit_to_kernel_mode()

2024-10-29 Thread Mark Rutland
On Fri, Oct 25, 2024 at 06:06:47PM +0800, Jinjie Ruan wrote: > Move arm64_preempt_schedule_irq() into exit_to_kernel_mode(), so not > only __el1_irq() but also every time when kernel mode irq return, > there is a chance to reschedule. We use exit_to_kernel_mode() for every non-NMI exception return

[RFC PATCH 1/6] xen/domctl: Refine grant_opts into grant_version

2024-10-29 Thread Alejandro Vallejo
grant_opts is overoptimizing for space packing in a hypercall that doesn't warrant the effort. Tweak the ABI without breaking it in order to remove the bitfield by extending it to 8 bits. Xen only supports little-endian systems, so the transformation from uint32_t to uint8_t followed by 3 octets w

Re: [PATCH] x86/cpu-policy: Extend the guest max policy max leaf/subleaves

2024-10-29 Thread Alejandro Vallejo
On Tue Oct 29, 2024 at 5:55 PM GMT, Andrew Cooper wrote: > We already have one migration case opencoded (feat.max_subleaf). A more > recent discovery is that we advertise x2APIC to guests without ensuring that > we provide max_leaf >= 0xb. > > In general, any leaf known to Xen can be safely config

Re: [RFC PATCH 0/6] xen/abi: On wide bitfields inside primitive types

2024-10-29 Thread Alejandro Vallejo
On Tue Oct 29, 2024 at 6:16 PM GMT, Alejandro Vallejo wrote: > Non-boolean bitfields in the hypercall ABI make it fairly inconvenient to > create bindings for any language because (a) they are always ad-hoc and are > subject to restrictions regular fields are not (b) require boilerplate that > regu

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

2024-10-29 Thread Ayan Kumar Halder
On 28/10/2024 15:14, Luca Fancellu wrote: Hi Ayan, Hi Luca, On 28 Oct 2024, at 12:45, Ayan Kumar Halder wrote: Define enable_boot_cpu_mm() for the AArch64-V8R system. Could you use here "Armv8-R AArch64” instead of “AArch64-V8R" Yes. Like boot-time page table in MMU system, we need a

Re: [PATCH -next v4 02/19] arm64: entry: Refactor the entry and exit for exceptions from EL1

2024-10-29 Thread Mark Rutland
On Fri, Oct 25, 2024 at 06:06:43PM +0800, Jinjie Ruan wrote: > These changes refactor the entry and exit routines for the exceptions > from EL1. They store the RCU and lockdep state in a struct > irqentry_state variable on the stack, rather than recording them > in the fields of pt_regs, since it i

Re: [PATCH -next v4 07/19] arm64: entry: Call arm64_preempt_schedule_irq() only if irqs enabled

2024-10-29 Thread Mark Rutland
On Fri, Oct 25, 2024 at 06:06:48PM +0800, Jinjie Ruan wrote: > Only if irqs are enabled when the interrupt trapped, there may be > a chance to reschedule after the interrupt has been handled, so move > arm64_preempt_schedule_irq() into regs_irqs_disabled() check false > if block. > > As Mark point

Re: [PATCH -next v4 03/19] arm64: entry: Remove __enter_from_user_mode()

2024-10-29 Thread Mark Rutland
On Fri, Oct 25, 2024 at 06:06:44PM +0800, Jinjie Ruan wrote: > The __enter_from_user_mode() is only called by enter_from_user_mode(), > so replaced it with enter_from_user_mode(). As with the next two patches, all the __enter_from_*() and __exit_to_*() are supposed to handle the raw entry, closely

Re: [PATCH -next v4 04/19] arm64: entry: Remove __enter_from_kernel_mode()

2024-10-29 Thread Mark Rutland
On Fri, Oct 25, 2024 at 06:06:45PM +0800, Jinjie Ruan wrote: > The __enter_from_kernel_mode() is only called by enter_from_kernel_mode(), > remove it. The point of this split is to cleanly separate the raw entry logic (in __enter_from_kernel_mode() from pieces that run later and can safely be inst

Re: [PATCH v4] NUMA: Introduce NODE_DATA->node_present_pages(RAM pages)

2024-10-29 Thread Jan Beulich
On 27.10.2024 15:43, Bernhard Kaindl wrote: > From: Bernhard Kaindl > > At the moment, Xen keeps track of the spans of PFNs of the NUMA nodes. > But the PFN span sometimes includes large MMIO holes, so these values > might not be an exact representation of the total usable RAM of nodes. > > Xen

Re: [PATCH] x86/io-apic: fix directed EOI when using AMd-Vi interrupt remapping

2024-10-29 Thread Jan Beulich
On 28.10.2024 12:05, Jan Beulich wrote: > On 21.10.2024 13:10, Andrew Cooper wrote: >> On 18/10/2024 9:08 am, Roger Pau Monne wrote: >>> When using AMD-VI interrupt remapping the vector field in the IO-APIC RTE is >>> repurposed to contain part of the offset into the remapping table. >>> Previous

Re: [PATCH v2] x86/io-apic: fix directed EOI when using AMD-Vi interrupt remapping

2024-10-29 Thread Roger Pau Monné
On Tue, Oct 29, 2024 at 08:40:26AM +0100, Jan Beulich wrote: > On 28.10.2024 18:22, Roger Pau Monné wrote: > > On Mon, Oct 28, 2024 at 12:33:42PM +0100, Jan Beulich wrote: > >> On 24.10.2024 17:48, Roger Pau Monne wrote: > >>> --- a/xen/arch/x86/io_apic.c > >>> +++ b/xen/arch/x86/io_apic.c > >>> @@

Re: [PATCH 11/14] x86/mpx: Adjust read_bndcfgu() to clean after itself

2024-10-29 Thread Jan Beulich
On 28.10.2024 16:49, Alejandro Vallejo wrote: > Overwrite the MPX data dumped in the idle XSAVE area to avoid leaking > it. While it's not very sensitive, better to err on the side of caution. > > Signed-off-by: Alejandro Vallejo > --- > Depending on whether the idle domain is considered ASI or n

Re: [PATCH 02/10] x86/ucode: Delete the microcode_init() initcall

2024-10-29 Thread Jan Beulich
On 28.10.2024 18:12, Andrew Cooper wrote: > On 28/10/2024 1:38 pm, Jan Beulich wrote: >> On 28.10.2024 10:18, Andrew Cooper wrote: >>> The comment highlights just how bogus this really is. Being an initcall, >>> the >>> boot allocator is long gone, and bootstrap_unmap() is a no-op. >> How's the b

Re: [PATCH v2] x86/io-apic: fix directed EOI when using AMD-Vi interrupt remapping

2024-10-29 Thread Jan Beulich
On 28.10.2024 18:22, Roger Pau Monné wrote: > On Mon, Oct 28, 2024 at 12:33:42PM +0100, Jan Beulich wrote: >> On 24.10.2024 17:48, Roger Pau Monne wrote: >>> --- a/xen/arch/x86/io_apic.c >>> +++ b/xen/arch/x86/io_apic.c >>> @@ -71,6 +71,24 @@ static int apic_pin_2_gsi_irq(int apic, int pin); >>>

Re: [PATCH 06/14] x86/hvm: Map/unmap xsave area in hvmemul_{get,put}_fpu()

2024-10-29 Thread Jan Beulich
On 28.10.2024 16:49, Alejandro Vallejo wrote: > --- a/xen/arch/x86/hvm/emulate.c > +++ b/xen/arch/x86/hvm/emulate.c > @@ -2371,7 +2371,8 @@ static int cf_check hvmemul_get_fpu( > alternative_vcall(hvm_funcs.fpu_dirty_intercept); > else if ( type == X86EMUL_FPU_fpu ) > { > -

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

2024-10-29 Thread Luca Fancellu
> On 29 Oct 2024, at 09:41, Jan Beulich wrote: > > On 29.10.2024 10:30, Luca Fancellu wrote: >> Hi Jan, >> >>> On 29 Oct 2024, at 08:08, Jan Beulich wrote: >>> >>> On 28.10.2024 18:38, Ayan Kumar Halder wrote: On 28/10/2024 15:01, Jan Beulich wrote: > On 28.10.2024 15:39, Ayan Kumar

[XEN PATCH] automation/eclair: monitor Rules 11.2 and 18.1 and update configuration

2024-10-29 Thread Federico Serafini
Add Rule 11.2 and Rule 18.1 to the monitored set. Tag Rule 7.3 as clean. Tag Rule 11.2 and Rule 20.7 as clean only for arm. Rule 2.2, Rule 9.5 and Directive 4.12 are not accepted: do not enable them and do not tag them as clean. Signed-off-by: Federico Serafini --- automation/eclair_analysis/E

Re: [PATCH] x86/pv: gate setting per-domain slot to XPTI being active for the domain

2024-10-29 Thread Roger Pau Monné
On Tue, Oct 29, 2024 at 09:48:26AM +, Andrew Cooper wrote: > On 29/10/2024 9:42 am, Roger Pau Monne wrote: > > It's possible to have XPTI not active for all PV domains (active for domUs, > > inactive for dom0), hence don't gate setting the per-domain slot on the > > presence of the per-pCPU sha

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

2024-10-29 Thread Jan Beulich
On 29.10.2024 10:30, Luca Fancellu wrote: > Hi Jan, > >> On 29 Oct 2024, at 08:08, Jan Beulich wrote: >> >> On 28.10.2024 18:38, Ayan Kumar Halder wrote: >>> On 28/10/2024 15:01, Jan Beulich wrote: On 28.10.2024 15:39, Ayan Kumar Halder wrote: > On 28/10/2024 12:55, Jan Beulich wrote: >>

[PATCH] x86/pv: gate setting per-domain slot to XPTI being active for the domain

2024-10-29 Thread Roger Pau Monne
It's possible to have XPTI not active for all PV domains (active for domUs, inactive for dom0), hence don't gate setting the per-domain slot on the presence of the per-pCPU shadow root page-table. Instead set the slot based on whether XPTI is active for the domain. This avoid pointlessly setting

Re: [PATCH] x86/pv: gate setting per-domain slot to XPTI being active for the domain

2024-10-29 Thread Andrew Cooper
On 29/10/2024 9:42 am, Roger Pau Monne wrote: > It's possible to have XPTI not active for all PV domains (active for domUs, > inactive for dom0), hence don't gate setting the per-domain slot on the > presence of the per-pCPU shadow root page-table. Instead set the slot based > on > whether XPTI i

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

2024-10-29 Thread Andrew Cooper
On 28/10/2024 12:45 pm, Ayan Kumar Halder wrote: > diff --git a/CHANGELOG.md b/CHANGELOG.md > index c499d12dc4..79524cc15f 100644 > --- a/CHANGELOG.md > +++ b/CHANGELOG.md > @@ -12,6 +12,8 @@ The format is based on [Keep a > Changelog](https://keepachangelog.com/en/1.0.0/) > - Prefer ACPI rebo

[PATCH v7 3/5] x86/boot: Use boot_vid_info variable directly from C code

2024-10-29 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 v7 0/5] Reuse 32 bit C code more safely

2024-10-29 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 v7 5/5] x86/boot: Clarify comment

2024-10-29 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: [PATCH v7 02/10] xen/x86: Add initial x2APIC ID to the per-vLAPIC save area

2024-10-29 Thread Jan Beulich
On 29.10.2024 21:30, Andrew Cooper wrote: > On 21/10/2024 4:45 pm, Alejandro Vallejo wrote: >> @@ -310,19 +309,16 @@ void guest_cpuid(const struct vcpu *v, uint32_t leaf, >> break; >> >> case 0xb: >> -/* >> - * In principle, this leaf is Intel-only. In practice, it