x86/AMD: make HT range dynamic for Fam17 and up
authorJan Beulich <jbeulich@suse.com>
Tue, 19 Oct 2021 08:04:13 +0000 (10:04 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 19 Oct 2021 08:04:13 +0000 (10:04 +0200)
commitd6e38eea2d806c53d976603717aebf6e5de30a1e
tree951ab5314b8203ee95c1de5d549462a4467cc0a0
parenta8cddbac5051020bb4a59a7f0ea27500c51063fb
x86/AMD: make HT range dynamic for Fam17 and up

At the time of d838ac2539cf ("x86: don't allow Dom0 access to the HT
address range") documentation correctly stated that the range was
completely fixed. For Fam17 and newer, it lives at the top of physical
address space, though.

To correctly determine the top of physical address space, we need to
account for their physical address reduction, hence the calculation of
paddr_bits also gets adjusted.

While for paddr_bits < 40 the HT range is completely hidden, there's no
need to suppress the range insertion in that case: It'll just have no
real meaning.

Reported-by: Igor Druzhinin <igor.druzhinin@citrix.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
xen/arch/x86/cpu/common.c
xen/arch/x86/dom0_build.c