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

2024-10-30 Thread Luca Fancellu
Hi Ayan, While I rebased the branch on top of your patches, I saw you’ve changed the number of regions mapped at boot time, can I ask why? Compared to https://patchwork.kernel.org/project/xen-devel/patch/20230626033443.2943270-25-penny.zh...@arm.com/: > +FUNC(enable_boot_cpu_mm) > + > +/*

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

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

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

2024-10-30 Thread Jan Beulich
On 29.10.2024 19:16, 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 > regular fields do n

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

2024-10-30 Thread Jan Beulich
On 29.10.2024 18:48, Roger Pau Monné wrote: > On Tue, Oct 29, 2024 at 05:43:24PM +0100, Jan Beulich wrote: >> On 29.10.2024 12:03, Roger Pau Monne wrote: >> Plus with what you said >> earlier about vector vs EOI handle, and with the code using "vector" all >> over the >> place, their (non-)relatio

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

2024-10-30 Thread Andrew Cooper
On 30/10/2024 6:51 am, Jan Beulich wrote: > On 29.10.2024 18:55, 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

Re: [PATCH v2 1/3] xen/riscv: introduce setup_mm()

2024-10-30 Thread Jan Beulich
On 23.10.2024 17:50, Oleksii Kurochko wrote: > Introduce the implementation of setup_mm(), which includes: > 1. Adding all free regions to the boot allocator, as memory is needed >to allocate page tables used for frame table mapping. > 2. Calculating RAM size and the RAM end address. > 3. Setti

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

2024-10-30 Thread Jan Beulich
On 30.10.2024 10:50, oleksii.kuroc...@gmail.com wrote: > 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 >>>    */ >>>   >>> +#in

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

2024-10-30 Thread Andrew Cooper
On 30/10/2024 8:59 am, Roger Pau Monné wrote: > On Tue, Oct 29, 2024 at 05:55:05PM +, Andrew Cooper wrote: >> diff --git a/xen/arch/x86/cpu-policy.c b/xen/arch/x86/cpu-policy.c >> index b6d9fad56773..78bc9872b09a 100644 >> --- a/xen/arch/x86/cpu-policy.c >> +++ b/xen/arch/x86/cpu-policy.c >> @@

[PATCH] x86/setup: Make setup.h header self contained

2024-10-30 Thread Frediano Ziglio
The header uses rangeset structure typedef which definition is not included. Signed-off-by: Frediano Ziglio --- xen/arch/x86/include/asm/setup.h | 1 + 1 file changed, 1 insertion(+) diff --git a/xen/arch/x86/include/asm/setup.h b/xen/arch/x86/include/asm/setup.h index 4874ee8936..e4e96b36bd 10

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

2024-10-30 Thread Jan Beulich
On 29.10.2024 19:16, Alejandro Vallejo wrote: > 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 transf

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

2024-10-30 Thread Julien Grall
On 30/10/2024 10:08, Luca Fancellu wrote: Hi Julien, On 30 Oct 2024, at 09:52, Julien Grall wrote: On Wed, 30 Oct 2024 at 09:17, Luca Fancellu wrote: Hi Ayan, While I rebased the branch on top of your patches, I saw you’ve changed the number of regions mapped at boot time, can I ask why?

[PATCH] x86/mm: Use standard C types for sized integers

2024-10-30 Thread Frediano Ziglio
The header is already using these types. Signed-off-by: Frediano Ziglio --- xen/arch/x86/include/asm/mm.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xen/arch/x86/include/asm/mm.h b/xen/arch/x86/include/asm/mm.h index 2a837f3d59..71a29b2cb3 100644 --- a/xen/arch/x86

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

2024-10-30 Thread Luca Fancellu
Hi Julien, > On 30 Oct 2024, at 10:32, Julien Grall wrote: > > On 30/10/2024 10:08, Luca Fancellu wrote: >> Hi Julien, >>> On 30 Oct 2024, at 09:52, Julien Grall wrote: >>> >>> On Wed, 30 Oct 2024 at 09:17, Luca Fancellu wrote: Hi Ayan, While I rebased the branch on top

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

2024-10-30 Thread Luca Fancellu
Hi Julien, > On 30 Oct 2024, at 09:52, Julien Grall wrote: > > On Wed, 30 Oct 2024 at 09:17, Luca Fancellu wrote: >> >> Hi Ayan, >> >> While I rebased the branch on top of your patches, I saw you’ve changed the >> number of regions >> mapped at boot time, can I ask why? > > I have asked the

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

2024-10-30 Thread Roger Pau Monné
On Wed, Oct 30, 2024 at 10:41:40AM +0100, Jan Beulich wrote: > On 29.10.2024 18:48, Roger Pau Monné wrote: > > On Tue, Oct 29, 2024 at 05:43:24PM +0100, Jan Beulich wrote: > >> On 29.10.2024 12:03, Roger Pau Monne wrote: > >> Plus with what you said > >> earlier about vector vs EOI handle, and with

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

2024-10-30 Thread Julien Grall
On Wed, 30 Oct 2024 at 09:17, Luca Fancellu wrote: > > Hi Ayan, > > While I rebased the branch on top of your patches, I saw you’ve changed the > number of regions > mapped at boot time, can I ask why? I have asked the change. If you look at the layout... > > Compared to > https://patchwork.ke

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

2024-10-30 Thread Christian Lindig
> On 29 Oct 2024, at 18:16, Alejandro Vallejo > wrote: > > > The invariant I'd like to (slowly) introduce and discuss is that fields may > have bitflags (e.g: a packed array of booleans indexed by some enumerated > type), but not be mixed with wider fields in the same primitive type. This >

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

2024-10-30 Thread Jan Beulich
On 30.10.2024 11:09, Roger Pau Monné wrote: > On Wed, Oct 30, 2024 at 10:41:40AM +0100, Jan Beulich wrote: >> On 29.10.2024 18:48, Roger Pau Monné wrote: >>> On Tue, Oct 29, 2024 at 05:43:24PM +0100, Jan Beulich wrote: On 29.10.2024 12:03, Roger Pau Monne wrote: > @@ -273,6 +293,13 @@ void

Re: [PATCH] x86/setup: Make setup.h header self contained

2024-10-30 Thread Jan Beulich
On 30.10.2024 11:44, Frediano Ziglio wrote: > The header uses rangeset structure typedef which definition > is not included. And it doesn't need to be. For int remove_xen_ranges(struct rangeset *r); we don't need ... > --- a/xen/arch/x86/include/asm/setup.h > +++ b/xen/arch/x86/include/asm/setu

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

2024-10-30 Thread Roger Pau Monné
On Wed, Oct 30, 2024 at 10:39:12AM +, Andrew Cooper wrote: > On 30/10/2024 8:59 am, Roger Pau Monné wrote: > > On Tue, Oct 29, 2024 at 05:55:05PM +, Andrew Cooper wrote: > >> diff --git a/xen/arch/x86/cpu-policy.c b/xen/arch/x86/cpu-policy.c > >> index b6d9fad56773..78bc9872b09a 100644 > >>

Re: [PATCH] x86/mm: Use standard C types for sized integers

2024-10-30 Thread Frediano Ziglio
On Wed, Oct 30, 2024 at 11:02 AM Jan Beulich wrote: > > On 30.10.2024 11:44, Frediano Ziglio wrote: > > The header is already using these types. > > > > Signed-off-by: Frediano Ziglio > > Acked-by: Jan Beulich > Thanks > Nevertheless I wonder whether ... > > > --- a/xen/arch/x86/include/asm/mm

Re: [PATCH] x86/mm: Use standard C types for sized integers

2024-10-30 Thread Jan Beulich
On 30.10.2024 12:10, Frediano Ziglio wrote: > On Wed, Oct 30, 2024 at 11:02 AM Jan Beulich wrote: >> It's only here where the fixed width type is largely needed (or alternatively >> >> signed int linear_pt_count:16; > > That would be different. Compilers do not allow to take addresses

Re: [PATCH] x86/setup: Make setup.h header self contained

2024-10-30 Thread Frediano Ziglio
On Wed, Oct 30, 2024 at 10:59 AM Jan Beulich wrote: > > On 30.10.2024 11:44, Frediano Ziglio wrote: > > The header uses rangeset structure typedef which definition > > is not included. > > And it doesn't need to be. For > > int remove_xen_ranges(struct rangeset *r); > > we don't need ... > > > ---

Re: [PATCH v7 04/10] tools/hvmloader: Retrieve (x2)APIC IDs from the APs themselves

2024-10-30 Thread Andrew Cooper
On 21/10/2024 4:45 pm, Alejandro Vallejo wrote: > diff --git a/tools/firmware/hvmloader/config.h > b/tools/firmware/hvmloader/config.h > index cd716bf39245..04cab1e59f08 100644 > --- a/tools/firmware/hvmloader/config.h > +++ b/tools/firmware/hvmloader/config.h > @@ -4,6 +4,8 @@ > #include > #in

Re: Xen 4.20 release schedule

2024-10-30 Thread Andrew Cooper
On 21/10/2024 1:02 pm, oleksii.kuroc...@gmail.com wrote: > Hello everyone, > > As there were no objections to the proposed release schedule > (https://lore.kernel.org/xen-devel/CAMacjJxEi6PThwH2=nwg3he8eqn39aiaxzcw3bqf7i4ycmj...@mail.gmail.com/ > ), I've updated the wiki with the schedule for Xen 4

[QUESTION] tools/xenstored: Best way to proceed with the protocol modification

2024-10-30 Thread Andrii Sultanov
Hello, (CC-ing Jürgen as the original author of the xenstored partial directory patches: https://lore.kernel.org/xen-devel/20161205074853.13268-1-jgr...@suse.com/) I'm investigating implementing XS_DIRECTORY_PART support in Oxenstored, and have come by a possible issue - the protocol specifies th

[PATCH v2] x86/setup: Make setup.h header self contained

2024-10-30 Thread Frediano Ziglio
The header uses rangeset structure pointer. Forward declare the structure. Signed-off-by: Frediano Ziglio --- Changes since v1: - use structure forward declaration instead of including header. --- xen/arch/x86/include/asm/setup.h | 1 + 1 file changed, 1 insertion(+) diff --git a/xen/arch/x86/i

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

2024-10-30 Thread Roger Pau Monné
On Wed, Oct 30, 2024 at 02:45:19PM +, Andrew Cooper wrote: > On 30/10/2024 11:03 am, Roger Pau Monné wrote: > > On Wed, Oct 30, 2024 at 10:39:12AM +, Andrew Cooper wrote: > >> On 30/10/2024 8:59 am, Roger Pau Monné wrote: > >>> On Tue, Oct 29, 2024 at 05:55:05PM +, Andrew Cooper wrote:

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

2024-10-30 Thread Alejandro Vallejo
In the course of preparing this answer I just noticed that altp2m_opts suffers from the exact same annoyance, with the exact same fix. I just noticed while rebasing my Rust branch. On Wed Oct 30, 2024 at 9:14 AM GMT, Jan Beulich wrote: > On 29.10.2024 19:16, Alejandro Vallejo wrote: > > Non-bool

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

2024-10-30 Thread Alejandro Vallejo
Hi, On Wed Oct 30, 2024 at 9:08 AM GMT, Jan Beulich wrote: > On 29.10.2024 19:16, Alejandro Vallejo wrote: > > 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

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

2024-10-30 Thread Roger Pau Monné
On Wed, Oct 30, 2024 at 03:59:12PM +, Alejandro Vallejo wrote: > On Wed Oct 30, 2024 at 3:13 PM GMT, Roger Pau Monné wrote: > > On Wed, Oct 30, 2024 at 02:45:19PM +, Andrew Cooper wrote: > > > On 30/10/2024 11:03 am, Roger Pau Monné wrote: > > > > On Wed, Oct 30, 2024 at 10:39:12AM +, A

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

2024-10-30 Thread Andrew Cooper
On 30/10/2024 3:13 pm, Roger Pau Monné wrote: > On Wed, Oct 30, 2024 at 02:45:19PM +, Andrew Cooper wrote: >> On 30/10/2024 11:03 am, Roger Pau Monné wrote: >>> On Wed, Oct 30, 2024 at 10:39:12AM +, Andrew Cooper wrote: On 30/10/2024 8:59 am, Roger Pau Monné wrote: > On Tue, Oct 29

[PATCH v2] xen/common: Move gic_preinit() to common code

2024-10-30 Thread Oleksii Kurochko
Introduce ic_preinit() in the common codebase, as it is not architecture-specific and can be reused by both PPC and RISC-V. This function identifies the node with the interrupt-controller property in the device tree and calls device_init() to handle architecture-specific initialization of the inter

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

2024-10-30 Thread Alejandro Vallejo
On Wed Oct 30, 2024 at 8:45 AM GMT, Christian Lindig wrote: > > > > On 29 Oct 2024, at 18:16, Alejandro Vallejo > > wrote: > > > > > > The invariant I'd like to (slowly) introduce and discuss is that fields may > > have bitflags (e.g: a packed array of booleans indexed by some enumerated > > ty

[PATCH for-4.19] Config: Update MiniOS revision

2024-10-30 Thread Andrew Cooper
A new branch from xen-RELEASE-4.19.0, for now containing commit a400dd517068 ("Add missing symbol exports for grub-pv"). Signed-off-by: Andrew Cooper --- CC: Juergen Gross CC: Jan Beulich CC: Stefano Stabellini CC: Julien Grall --- Config.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH] Config: Update MiniOS revision

2024-10-30 Thread Andrew Cooper
Commit 6d5159e8410b ("Add missing symbol exports for grub-pv") Signed-off-by: Andrew Cooper --- CC: Juergen Gross CC: Jan Beulich CC: Stefano Stabellini CC: Julien Grall --- Config.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Config.mk b/Config.mk index 6dd2f9439cfc

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

2024-10-30 Thread Andrew Cooper
On 30/10/2024 5:10 pm, Roger Pau Monné wrote: > On Wed, Oct 30, 2024 at 04:51:34PM +, Andrew Cooper wrote: >> On 30/10/2024 3:13 pm, Roger Pau Monné wrote: >>> On Wed, Oct 30, 2024 at 02:45:19PM +, Andrew Cooper wrote: On 30/10/2024 11:03 am, Roger Pau Monné wrote: > On Wed, Oct 30

[PATCH] scripts: Fix git-checkout.sh to work with branches other than master

2024-10-30 Thread Andrew Cooper
Xen uses master for QEMU_UPSTREAM_REVISION, and has done for other trees too in the path. Apparently we've never specified a different branch, because the git-clone rune only pulls in the master branch; it does not pull in diverging branches. Fix this by stating which branch/tag is wanted. $TAG

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

2024-10-30 Thread Alejandro Vallejo
On Wed Oct 30, 2024 at 3:13 PM GMT, Roger Pau Monné wrote: > On Wed, Oct 30, 2024 at 02:45:19PM +, Andrew Cooper wrote: > > On 30/10/2024 11:03 am, Roger Pau Monné wrote: > > > On Wed, Oct 30, 2024 at 10:39:12AM +, Andrew Cooper wrote: > > >> On 30/10/2024 8:59 am, Roger Pau Monné wrote: >

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

2024-10-30 Thread Roger Pau Monné
On Wed, Oct 30, 2024 at 04:51:34PM +, Andrew Cooper wrote: > On 30/10/2024 3:13 pm, Roger Pau Monné wrote: > > On Wed, Oct 30, 2024 at 02:45:19PM +, Andrew Cooper wrote: > >> On 30/10/2024 11:03 am, Roger Pau Monné wrote: > >>> On Wed, Oct 30, 2024 at 10:39:12AM +, Andrew Cooper wrote:

Re: [PATCH v2 1/3] xen/riscv: introduce setup_mm()

2024-10-30 Thread oleksii . kurochko
On Wed, 2024-10-30 at 11:25 +0100, Jan Beulich wrote: > On 23.10.2024 17:50, Oleksii Kurochko wrote: > > Introduce the implementation of setup_mm(), which includes: > > 1. Adding all free regions to the boot allocator, as memory is > > needed > >    to allocate page tables used for frame table mapp

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

2024-10-30 Thread Alejandro Vallejo
Hi, On Wed Oct 30, 2024 at 6:37 AM GMT, Jan Beulich wrote: > 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: > >> -

Re: [PATCH v7 04/10] tools/hvmloader: Retrieve (x2)APIC IDs from the APs themselves

2024-10-30 Thread Jan Beulich
On 30.10.2024 12:31, Andrew Cooper wrote: > On 21/10/2024 4:45 pm, Alejandro Vallejo wrote: >> --- a/tools/firmware/hvmloader/mp_tables.c >> +++ b/tools/firmware/hvmloader/mp_tables.c >> @@ -198,8 +198,10 @@ static void fill_mp_config_table(struct mp_config_table >> *mpct, int length) >> /* fills

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

2024-10-30 Thread Alejandro Vallejo
I'm fine with all suggestions, with one exception that needs a bit more explanation... On Tue Oct 29, 2024 at 8:30 PM GMT, Andrew Cooper wrote: > 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 change

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

2024-10-30 Thread Jan Beulich
On 30.10.2024 13:03, Alejandro Vallejo wrote: > On Wed Oct 30, 2024 at 6:37 AM GMT, Jan Beulich wrote: >> 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, brea

Re: [QUESTION] tools/xenstored: Best way to proceed with the protocol modification

2024-10-30 Thread Jürgen Groß
On 30.10.24 12:58, Andrii Sultanov wrote: Hello, (CC-ing Jürgen as the original author of the xenstored partial directory patches: https://lore.kernel.org/xen-devel/20161205074853.13268-1- jgr...@suse.com/ ) I'm inv

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

2024-10-30 Thread Andrew Cooper
On 30/10/2024 6:37 am, Jan Beulich wrote: > 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 pr

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

2024-10-30 Thread Roger Pau Monné
On Wed, Oct 30, 2024 at 11:57:39AM +0100, Jan Beulich wrote: > On 30.10.2024 11:09, Roger Pau Monné wrote: > > On Wed, Oct 30, 2024 at 10:41:40AM +0100, Jan Beulich wrote: > >> On 29.10.2024 18:48, Roger Pau Monné wrote: > >>> On Tue, Oct 29, 2024 at 05:43:24PM +0100, Jan Beulich wrote: > On 2

Re: [PATCH] x86/setup: Make setup.h header self contained

2024-10-30 Thread Andrew Cooper
On 30/10/2024 11:17 am, Jan Beulich wrote: > On 30.10.2024 12:15, Frediano Ziglio wrote: >> On Wed, Oct 30, 2024 at 10:59 AM Jan Beulich wrote: >>> On 30.10.2024 11:44, Frediano Ziglio wrote: The header uses rangeset structure typedef which definition is not included. >>> And it doesn't

Re: [PATCH] x86/mm: Use standard C types for sized integers

2024-10-30 Thread Jan Beulich
On 30.10.2024 11:44, Frediano Ziglio wrote: > The header is already using these types. > > Signed-off-by: Frediano Ziglio Acked-by: Jan Beulich Nevertheless I wonder whether ... > --- a/xen/arch/x86/include/asm/mm.h > +++ b/xen/arch/x86/include/asm/mm.h > @@ -230,7 +230,7 @@ struct page_info

Re: [PATCH] x86/setup: Make setup.h header self contained

2024-10-30 Thread Jan Beulich
On 30.10.2024 12:15, Frediano Ziglio wrote: > On Wed, Oct 30, 2024 at 10:59 AM Jan Beulich wrote: >> >> On 30.10.2024 11:44, Frediano Ziglio wrote: >>> The header uses rangeset structure typedef which definition >>> is not included. >> >> And it doesn't need to be. For >> >> int remove_xen_ranges(

[PATCH] x86/mm: ensure L2 is always freed if empty

2024-10-30 Thread Roger Pau Monne
The current logic in modify_xen_mappings() allows for fully empty L2 tables to not be freed and unhooked from the parent L3 if the last L2 slot is not populated. Ensure that even when an L2 slot is empty the logic to check whether the whole L2 can be removed is not skipped. Signed-off-by: Roger P

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

2024-10-30 Thread Ard Biesheuvel
On Tue, 29 Oct 2024 at 13:54, Jürgen Groß wrote: > > On 29.10.24 13:50, Ard Biesheuvel wrote: > > On Wed, 9 Oct 2024 at 18:09, Ard Biesheuvel wrote: > >> .. > > > > Ping? > > I have queued this series for 6.13. > Thanks!

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

2024-10-30 Thread Andrew Cooper
On 30/10/2024 11:03 am, Roger Pau Monné wrote: > On Wed, Oct 30, 2024 at 10:39:12AM +, Andrew Cooper wrote: >> On 30/10/2024 8:59 am, Roger Pau Monné wrote: >>> On Tue, Oct 29, 2024 at 05:55:05PM +, Andrew Cooper wrote: diff --git a/xen/arch/x86/cpu-policy.c b/xen/arch/x86/cpu-policy.c

Re: [PATCH v7 05/10] tools/libacpi: Use LUT of APIC IDs rather than function pointer

2024-10-30 Thread Andrew Cooper
On 21/10/2024 4:45 pm, Alejandro Vallejo wrote: > diff --git a/tools/include/xenguest.h b/tools/include/xenguest.h > index e01f494b772a..aa50b78dfb89 100644 > --- a/tools/include/xenguest.h > +++ b/tools/include/xenguest.h > @@ -22,6 +22,8 @@ > #ifndef XENGUEST_H > #define XENGUEST_H > > +#incl

Re: [PATCH v2] x86/setup: Make setup.h header self contained

2024-10-30 Thread Andrew Cooper
On 30/10/2024 2:13 pm, Frediano Ziglio wrote: > The header uses rangeset structure pointer. > Forward declare the structure. > > Signed-off-by: Frediano Ziglio Acked-by: Andrew Cooper

Re: [PATCH] scripts: Fix git-checkout.sh to work with branches other than master

2024-10-30 Thread Stefano Stabellini
On Wed, 30 Oct 2024, Andrew Cooper wrote: > Xen uses master for QEMU_UPSTREAM_REVISION, and has done for other trees too > in the path. Apparently we've never specified a different branch, because the > git-clone rune only pulls in the master branch; it does not pull in diverging > branches. Fix

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

2024-10-30 Thread Jinjie Ruan
On 2024/10/29 22:52, Mark Rutland wrote: > 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 exi

Re: [PATCH 00/13] Remove implicit devres from pci_intx()

2024-10-30 Thread Bjorn Helgaas
On Tue, Oct 15, 2024 at 08:51:10PM +0200, Philipp Stanner wrote: > @Driver-Maintainers: Your driver might be touched by patch "Remove > devres from pci_intx()". You might want to take a look. > > Changes since the RFC [1]: > - Add a patch deprecating pci{m}_intx(). (Heiner, Andy, Me) > - Add A

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

2024-10-30 Thread Jinjie Ruan
On 2024/10/29 22:19, Mark Rutland wrote: > 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

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

2024-10-30 Thread Jinjie Ruan
On 2024/10/29 22:33, Mark Rutland wrote: > 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 reco

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

2024-10-30 Thread Jinjie Ruan
On 2024/10/29 22:42, Mark Rutland wrote: > 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_

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

2024-10-30 Thread Jinjie Ruan
On 2024/10/29 22:37, Mark Rutland wrote: > 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_mo

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

2024-10-30 Thread Jan Beulich
On 29.10.2024 18:55, 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 configured by the to

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

2024-10-30 Thread Roger Pau Monné
On Tue, Oct 29, 2024 at 05:55:05PM +, 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