aboutsummaryrefslogtreecommitdiff
path: root/lib/test-string_helpers.c
diff options
context:
space:
mode:
authorJason Wang <[email protected]>2013-07-25 16:54:35 +0800
committerH. Peter Anvin <[email protected]>2013-08-05 06:35:33 -0700
commit9df56f19a500bea90d160be1bf77e4fbcd204d3f (patch)
treec2a19340b172daba4f8005788f10cdbfd4455327 /lib/test-string_helpers.c
parent1085ba7f552d84aa8ac0ae903fa8d0cc2ff9f79d (diff)
x86: Correctly detect hypervisor
We try to handle the hypervisor compatibility mode by detecting hypervisor through a specific order. This is not robust, since hypervisors may implement each others features. This patch tries to handle this situation by always choosing the last one in the CPUID leaves. This is done by letting .detect() return a priority instead of true/false and just re-using the CPUID leaf where the signature were found as the priority (or 1 if it was found by DMI). Then we can just pick hypervisor who has the highest priority. Other sophisticated detection method could also be implemented on top. Suggested by H. Peter Anvin and Paolo Bonzini. Acked-by: K. Y. Srinivasan <[email protected]> Cc: Haiyang Zhang <[email protected]> Cc: Konrad Rzeszutek Wilk <[email protected]> Cc: Jeremy Fitzhardinge <[email protected]> Cc: Doug Covelli <[email protected]> Cc: Borislav Petkov <[email protected]> Cc: Dan Hecht <[email protected]> Cc: Paul Gortmaker <[email protected]> Cc: Marcelo Tosatti <[email protected]> Cc: Gleb Natapov <[email protected]> Cc: Paolo Bonzini <[email protected]> Cc: Frederic Weisbecker <[email protected]> Signed-off-by: Jason Wang <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: H. Peter Anvin <[email protected]>
Diffstat (limited to 'lib/test-string_helpers.c')
0 files changed, 0 insertions, 0 deletions