mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 10:11:27 +01:00
xen/x86: restrict XENFEAT_pae_pgdir_above_4gb setting to PV guests
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. Add an additional build time guard to short-circuit the setting of XENFEAT_pae_pgdir_above_4gb if the hypervisor has no PV 32bit support. Signed-off-by: Roger Pau Monné <roger@xenproject.org> Reviewed-by: Jan Beulich <jbeulich@suse.com>
This commit is contained in:
1 parent
63d0e8cc84
commit
8cf4ec7d9e
1 file changed
+4
-2
+4
-2
@@ -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 ( IS_ENABLED(CONFIG_PV32) && 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) |
|
||||
|
||||