libxenguest/x86: ensure CPUID[1].EBX[32:16] is non-zero for HVM
authorJan Beulich <jbeulich@suse.com>
Mon, 30 Aug 2021 13:19:31 +0000 (15:19 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 30 Aug 2021 13:19:31 +0000 (15:19 +0200)
commitdaaf007eb3467f900a2e20fadbc4c6f3bfcaa356
tree106a48aa9d561c2913893c888aa8118953e7fe79
parent8064488062641ae505b2a7369611c38057a7788b
libxenguest/x86: ensure CPUID[1].EBX[32:16] is non-zero for HVM

We unconditionally set HTT, so merely doubling the value read from
hardware isn't going to be correct if that value is zero.

Reported-by: Julien Grall <julien@xen.org>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Tested-by: Julien Grall <julien@xen.org>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
tools/libs/guest/xg_cpuid_x86.c