On Tue, Jun 25, 2019 at 01:35:17PM +0800, Tao Xu wrote: > On 6/25/2019 1:00 PM, Eduardo Habkost wrote: > > Add new version of Cascadelake-Server CPU model, setting > > stepping=5 and enabling the IA32_ARCH_CAPABILITIES MSR. > > > > The new feature will introduce a new host software requirement, > > breaking our CPU model runnability promises. This means we can't > > enable the new CPU model version by default in QEMU 4.1, because > > management software isn't ready yet to resolve CPU model aliases. > > This is why the feature is being enabled in a > > Cascadelake-Server-4.1.1 CPU model instead of > > Cascadelake-Server-4.1. > > > > Includes a test case to ensure the right combinations of > > machine-type + CPU model + command-line feature flags will work > > as expected. > > > > Signed-off-by: Eduardo Habkost <ehabk...@redhat.com> > > --- > > Cc: "Hu, Robert" <robert...@intel.com> > > Cc: Tao Xu <tao3...@intel.com> > > Cc: jingqi....@intel.com, > > Cc: "Lai, Paul C" <paul.c....@intel.com> > > --- > > target/i386/cpu.c | 15 +++++ > > tests/acceptance/x86_cpu_model_versions.py | 71 ++++++++++++++++++++++ > > 2 files changed, 86 insertions(+) > > > > diff --git a/target/i386/cpu.c b/target/i386/cpu.c > > index 121f568954..8edae04161 100644 > > --- a/target/i386/cpu.c > > +++ b/target/i386/cpu.c > > @@ -2607,6 +2607,21 @@ static X86CPUDefinition builtin_x86_defs[] = { > ... > > + # versioned CPU model overrides machine-type: > > + vm = self.get_vm() > > + vm.add_args('-S') > > + vm.set_machine('pc-i440fx-4.0') > > + vm.add_args('-cpu', > > 'Cascadelake-Server-4.1,x-force-features=on,check=off,enforce=off') > > + vm.launch() > > + self.assertFalse(get_cpu_prop(vm, 'arch-capabilities'), > > + 'pc-i440fx-4.1 + Cascadelake-Server-4.1 should > > not have arch-capabilities') > > + > > + vm = self.get_vm() > > + vm.add_args('-S') > > + vm.set_machine('pc-i440fx-4.0') > > + vm.add_args('-cpu', > > 'Cascadelake-Server-4.1.1,x-force-features=on,check=off,enforce=off') > > + vm.launch() > > + self.assertTrue(get_cpu_prop(vm, 'arch-capabilities'), > > + 'pc-i440fx-4.1 + Cascadelake-Server-4.1 should > > have arch-capabilities') > Hi Eduardo > > Could me ask why here the error show "Cascadelake-Server-4.1" instead of > "Cascadelake-Server-4.1.1"?
My mistake. Will fix it. > > And will you add the MSR_ARCH_CAP_RDCL_NO, MSR_ARCH_CAP_IBRS_ALL, and > MSR_ARCH_CAP_SKIP_L1DFL_VMENTRY into .features[FEAT_ARCH_CAPABILITIES]? I will do it. I don't know why I didn't notice them in the "Add some MSR based features on Cascadelake-Server CPU model" patches you sent. -- Eduardo