* [PATCH v2] xen/x86: restrict XENFEAT_pae_pgdir_above_4gb setting to PV guests
@ 2026-10-01 9:19 Roger Pau Monne
2026-10-01 9:49 ` Andrew Cooper
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Roger Pau Monne @ 2026-10-01 9:19 UTC (permalink / raw)
To: xen-devel
Cc: Roger Pau Monne, Andrew Cooper, Anthony PERARD, Michal Orzel,
Jan Beulich, Julien Grall, Stefano Stabellini
XENFEAT_pae_pgdir_above_4gb is only used by 32bit PV guests, hence limit
its setting in XENVER_get_features to the is_pv_domain() guarded section,
with the rest of the PV specific features.
No functional change intended.
Signed-off-by: Roger Pau Monné <roger@xenproject.org>
---
Changes since v1:
- Just move the conditional but don't merge it.
---
xen/common/kernel.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/xen/common/kernel.c b/xen/common/kernel.c
index f4bbd8818fa8..6811599f95fd 100644
--- a/xen/common/kernel.c
+++ b/xen/common/kernel.c
@@ -677,8 +677,6 @@ long do_xen_version(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg)
(1U << XENFEAT_vcpu_time_phys_area) |
#endif
(1U << XENFEAT_runstate_phys_area);
- if ( VM_ASSIST(d, pae_extended_cr3) )
- fi.submap |= (1U << XENFEAT_pae_pgdir_above_4gb);
if ( paging_mode_translate(d) )
fi.submap |=
(1U << XENFEAT_writable_page_tables) |
@@ -690,9 +688,13 @@ long do_xen_version(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg)
#endif
#ifdef CONFIG_X86
if ( is_pv_domain(d) )
+ {
fi.submap |= (1U << XENFEAT_mmu_pt_update_preserve_ad) |
(1U << XENFEAT_highmem_assist) |
(1U << XENFEAT_gnttab_map_avail_bits);
+ if ( VM_ASSIST(d, pae_extended_cr3) )
+ fi.submap |= (1U << XENFEAT_pae_pgdir_above_4gb);
+ }
else
fi.submap |= (1U << XENFEAT_hvm_safe_pvclock) |
(1U << XENFEAT_hvm_callback_vector) |
--
2.55.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v2] xen/x86: restrict XENFEAT_pae_pgdir_above_4gb setting to PV guests
2026-10-01 9:19 [PATCH v2] xen/x86: restrict XENFEAT_pae_pgdir_above_4gb setting to PV guests Roger Pau Monne
@ 2026-10-01 9:49 ` Andrew Cooper
2026-10-01 9:56 ` Teddy Astie
2026-10-01 11:05 ` Jan Beulich
2 siblings, 0 replies; 6+ messages in thread
From: Andrew Cooper @ 2026-10-01 9:49 UTC (permalink / raw)
To: Roger Pau Monne, xen-devel
Cc: Andrew Cooper, Anthony PERARD, Michal Orzel, Jan Beulich,
Julien Grall, Stefano Stabellini
On 01/10/2026 10:19 am, Roger Pau Monne wrote:
> XENFEAT_pae_pgdir_above_4gb is only used by 32bit PV guests, hence limit
> its setting in XENVER_get_features to the is_pv_domain() guarded section,
> with the rest of the PV specific features.
>
> No functional change intended.
>
> Signed-off-by: Roger Pau Monné <roger@xenproject.org>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] xen/x86: restrict XENFEAT_pae_pgdir_above_4gb setting to PV guests
2026-10-01 9:19 [PATCH v2] xen/x86: restrict XENFEAT_pae_pgdir_above_4gb setting to PV guests Roger Pau Monne
2026-10-01 9:49 ` Andrew Cooper
@ 2026-10-01 9:56 ` Teddy Astie
2026-10-01 11:05 ` Jan Beulich
2 siblings, 0 replies; 6+ messages in thread
From: Teddy Astie @ 2026-10-01 9:56 UTC (permalink / raw)
To: Roger Pau Monne, xen-devel
Cc: Andrew Cooper, Anthony PERARD, Michal Orzel, Jan Beulich,
Julien Grall, Stefano Stabellini
[-- Attachment #1.1: Type: text/plain, Size: 1966 bytes --]
Le 01/10/2026 à 11:21, Roger Pau Monne a écrit :
> XENFEAT_pae_pgdir_above_4gb is only used by 32bit PV guests, hence limit
> its setting in XENVER_get_features to the is_pv_domain() guarded section,
> with the rest of the PV specific features.
>
> No functional change intended.
>
> Signed-off-by: Roger Pau Monné <roger@xenproject.org>
> ---
> Changes since v1:
> - Just move the conditional but don't merge it.
> ---
> xen/common/kernel.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/xen/common/kernel.c b/xen/common/kernel.c
> index f4bbd8818fa8..6811599f95fd 100644
> --- a/xen/common/kernel.c
> +++ b/xen/common/kernel.c
> @@ -677,8 +677,6 @@ long do_xen_version(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg)
> (1U << XENFEAT_vcpu_time_phys_area) |
> #endif
> (1U << XENFEAT_runstate_phys_area);
> - if ( VM_ASSIST(d, pae_extended_cr3) )
> - fi.submap |= (1U << XENFEAT_pae_pgdir_above_4gb);
> if ( paging_mode_translate(d) )
> fi.submap |=
> (1U << XENFEAT_writable_page_tables) |
> @@ -690,9 +688,13 @@ long do_xen_version(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg)
> #endif
> #ifdef CONFIG_X86
> if ( is_pv_domain(d) )
> + {
> fi.submap |= (1U << XENFEAT_mmu_pt_update_preserve_ad) |
> (1U << XENFEAT_highmem_assist) |
> (1U << XENFEAT_gnttab_map_avail_bits);
> + if ( VM_ASSIST(d, pae_extended_cr3) )
> + fi.submap |= (1U << XENFEAT_pae_pgdir_above_4gb);
> + }
> else
> fi.submap |= (1U << XENFEAT_hvm_safe_pvclock) |
> (1U << XENFEAT_hvm_callback_vector) |
Reviewed-by: Teddy Astie <teddy.astie@vates.tech>
Teddy
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 665 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] xen/x86: restrict XENFEAT_pae_pgdir_above_4gb setting to PV guests
2026-10-01 9:19 [PATCH v2] xen/x86: restrict XENFEAT_pae_pgdir_above_4gb setting to PV guests Roger Pau Monne
2026-10-01 9:49 ` Andrew Cooper
2026-10-01 9:56 ` Teddy Astie
@ 2026-10-01 11:05 ` Jan Beulich
2026-10-01 14:05 ` Roger Pau Monné
2 siblings, 1 reply; 6+ messages in thread
From: Jan Beulich @ 2026-10-01 11:05 UTC (permalink / raw)
To: Roger Pau Monne
Cc: Andrew Cooper, Anthony PERARD, Michal Orzel, Julien Grall,
Stefano Stabellini, xen-devel
On 01.10.2026 11:19, Roger Pau Monne wrote:
> XENFEAT_pae_pgdir_above_4gb is only used by 32bit PV guests, hence limit
> its setting in XENVER_get_features to the is_pv_domain() guarded section,
> with the rest of the PV specific features.
>
> No functional change intended.
>
> Signed-off-by: Roger Pau Monné <roger@xenproject.org>
> ---
> Changes since v1:
> - Just move the conditional but don't merge it.
And still no CONFIG_PV32 dependency?
Jan
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] xen/x86: restrict XENFEAT_pae_pgdir_above_4gb setting to PV guests
2026-10-01 11:05 ` Jan Beulich
@ 2026-10-01 14:05 ` Roger Pau Monné
2026-10-01 15:05 ` Jan Beulich
0 siblings, 1 reply; 6+ messages in thread
From: Roger Pau Monné @ 2026-10-01 14:05 UTC (permalink / raw)
To: Jan Beulich
Cc: Andrew Cooper, Anthony PERARD, Michal Orzel, Julien Grall,
Stefano Stabellini, xen-devel
On Thu, Oct 01, 2026 at 01:05:39PM +0200, Jan Beulich wrote:
> On 01.10.2026 11:19, Roger Pau Monne wrote:
> > XENFEAT_pae_pgdir_above_4gb is only used by 32bit PV guests, hence limit
> > its setting in XENVER_get_features to the is_pv_domain() guarded section,
> > with the rest of the PV specific features.
> >
> > No functional change intended.
> >
> > Signed-off-by: Roger Pau Monné <roger@xenproject.org>
> > ---
> > Changes since v1:
> > - Just move the conditional but don't merge it.
>
> And still no CONFIG_PV32 dependency?
Andrew specifically asked for this form, or at least that was my
understanding.
Regards, Roger.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] xen/x86: restrict XENFEAT_pae_pgdir_above_4gb setting to PV guests
2026-10-01 14:05 ` Roger Pau Monné
@ 2026-10-01 15:05 ` Jan Beulich
0 siblings, 0 replies; 6+ messages in thread
From: Jan Beulich @ 2026-10-01 15:05 UTC (permalink / raw)
To: Roger Pau Monné
Cc: Andrew Cooper, Anthony PERARD, Michal Orzel, Julien Grall,
Stefano Stabellini, xen-devel
On 01.10.2026 16:05, Roger Pau Monné wrote:
> On Thu, Oct 01, 2026 at 01:05:39PM +0200, Jan Beulich wrote:
>> On 01.10.2026 11:19, Roger Pau Monne wrote:
>>> XENFEAT_pae_pgdir_above_4gb is only used by 32bit PV guests, hence limit
>>> its setting in XENVER_get_features to the is_pv_domain() guarded section,
>>> with the rest of the PV specific features.
>>>
>>> No functional change intended.
>>>
>>> Signed-off-by: Roger Pau Monné <roger@xenproject.org>
>>> ---
>>> Changes since v1:
>>> - Just move the conditional but don't merge it.
>>
>> And still no CONFIG_PV32 dependency?
>
> Andrew specifically asked for this form, or at least that was my
> understanding.
Well, Misra-wise you've added unreachable code this way.
Jan
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-10-01 15:05 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-01 9:19 [PATCH v2] xen/x86: restrict XENFEAT_pae_pgdir_above_4gb setting to PV guests Roger Pau Monne
2026-10-01 9:49 ` Andrew Cooper
2026-10-01 9:56 ` Teddy Astie
2026-10-01 11:05 ` Jan Beulich
2026-10-01 14:05 ` Roger Pau Monné
2026-10-01 15:05 ` Jan Beulich
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.