xen-detect: make CPUID fallback CPUID-faulting aware
authorJan Beulich <jbeulich@suse.com>
Tue, 20 Oct 2020 06:53:53 +0000 (08:53 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 20 Oct 2020 06:53:53 +0000 (08:53 +0200)
commit7b36d16d21ae70a1eaabe577b7e4b42ed0f1a7d1
tree1e5426eeea7f2010dda929c4fc729ef3923df278
parent25467bb5d121735af4969834a62bca752a7bfe10
xen-detect: make CPUID fallback CPUID-faulting aware

Relying on presence / absence of hypervisor leaves in raw / escaped
CPUID output cannot be used to tell apart PV and HVM on CPUID faulting
capable hardware. Utilize a PV-only feature flag to avoid false positive
HVM detection.

While at it also short circuit the main detection loop: For PV, only
the base group of leaves can possibly hold hypervisor information.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Wei Liu <wl@xen.org>
tools/misc/xen-detect.c