From c39c0edf9bb3b968ba95484465a50c7b19f4aa3a Mon Sep 17 00:00:00 2001 From: Eduardo Habkost Date: Wed, 21 Sep 2016 13:30:12 -0300 Subject: target-i386: Automatically set level/xlevel/xlevel2 when needed Instead of requiring users and management software to be aware of required CPUID level/xlevel/xlevel2 values for each feature, automatically increase those values when features need them. This was already done for CPUID[7].EBX, and is now made generic for all CPUID feature flags. Unit test included, to make sure we don't break ABI on older machine-types and don't mess with the CPUID level values if they are explicitly set by the user. Reviewed-by: Richard Henderson Signed-off-by: Eduardo Habkost --- include/hw/i386/pc.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/hw/i386') diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index 29a6c9b60b..47bdf10cfd 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -374,6 +374,11 @@ bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *); .driver = TYPE_X86_CPU,\ .property = "l3-cache",\ .value = "off",\ + },\ + {\ + .driver = TYPE_X86_CPU,\ + .property = "full-cpuid-auto-level",\ + .value = "off",\ }, #define PC_COMPAT_2_6 \ -- cgit v1.2.3