2015-06-19 11:47+0200, Radim Krčmář: > 2015-06-18 12:50-0300, Eduardo Habkost: > > I have considered introducing "min-[x]level" and "max-{x]level" > > properties to control automatic increasing of level/xlevel. The existing > > X86CPUDefinition.level field could just control min_level, while > > explicit "level=" on the command-line or config file would explicitly > > force a specific value. Probably setting "max-level" on machine-type > > compat code would be enough to restore the previous behavior. > > We'd need to set min-level at least to 7, to capture the raising we do > now, but a feature in level between default and 7 would result in a > different behavior, so we need to make it much uglier :/ > We can add 'compat-level' bit for old machine types and raise to highest > habited function otherwise, optionally with controls you described.
No, features are only in 0x7 and 0xd, so the original solution is good. (We should also be bumping the CPUID level when adding specific features, e.g. to at least 0xB when x2apic is selected.)