]> xenbits.xensource.com Git - xen.git/commit
x86/cpu-policy: Extend the guest max policy max leaf/subleaves
authorAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 29 Oct 2024 17:21:08 +0000 (17:21 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 30 Oct 2024 17:34:32 +0000 (17:34 +0000)
commitfa2d8318033e468a4ded1fc3d721dc3e019e449b
tree006409ca944d877ed94e50bda33542734a46e851
parentbb7296d77f171c7bfbafab30ed51e9be29660e39
x86/cpu-policy: Extend the guest max policy max leaf/subleaves

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.

Therefore, introduce guest_common_{max,default}_leaves() to generalise the
special case we currently have for feat.max_subleaf, in preparation to be able
to provide x2APIC topology in leaf 0xb even on older hardware.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Alejandro Vallejo <alejandro.vallejo@cloud.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/cpu-policy.c