]> xenbits.xensource.com Git - xen.git/commit
x86/cpu-policy: Fix migration from Ice Lake to Cascade Lake
authorAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 7 May 2024 11:19:41 +0000 (12:19 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 7 May 2024 15:56:46 +0000 (16:56 +0100)
commita2330b51df267e20e66bbba6c5bf08f0570ed58b
treefc9c6a519dd9d7690b514d4a3cefa8916594326c
parentf4f2f3402b2f4985d69ffc0d46f845d05fd0b60f
x86/cpu-policy: Fix migration from Ice Lake to Cascade Lake

Ever since Xen 4.14, there has been a latent bug with migration.

While some toolstacks can level the features properly, they don't shink
feat.max_subleaf when all features have been dropped.  This is because
we *still* have not completed the toolstack side work for full CPU Policy
objects.

As a consequence, even when properly feature levelled, VMs can't migrate
"backwards" across hardware which reduces feat.max_subleaf.  One such example
is Ice Lake (max_subleaf=2 for INTEL_PSFD) to Cascade Lake (max_subleaf=0).

Extend the max policies feat.max_subleaf to the hightest number Xen knows
about, but leave the default policies matching the host.  This will allow VMs
with a higher feat.max_subleaf than strictly necessary to migrate in.

Eventually we'll manage to teach the toolstack how to avoid creating such VMs
in the first place, but there's still more work to do there.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Roger Pau Monné <roger.pau@citrix.com>
xen/arch/x86/cpu-policy.c