[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 7/9] i386: Make unversioned CPU models be ali
From: |
Daniel P . Berrangé |
Subject: |
Re: [Qemu-devel] [PATCH v2 7/9] i386: Make unversioned CPU models be aliases |
Date: |
Tue, 2 Jul 2019 14:57:53 +0100 |
User-agent: |
Mutt/1.12.0 (2019-05-25) |
On Tue, Jul 02, 2019 at 10:45:25AM +0100, Daniel P. Berrangé wrote:
> On Thu, Jun 27, 2019 at 09:28:42PM -0300, Eduardo Habkost wrote:
> > This will make unversioned CPU models behavior depend on the
> > machine type:
> >
> > * "pc-*-4.0" and older will not report them as aliases.
> > This is done to keep compatibility with older QEMU versions
> > after management software starts translating aliases.
> >
> > * "pc-*-4.1" will translate unversioned CPU models to -v1.
> > This is done to keep compatibility with existing management
> > software, that still relies on CPU model runnability promises.
> >
> > * "none" will translate unversioned CPU models to their latest
> > version. This is planned become the default in future machine
> > types (probably in pc-*-4.3).
> >
> > Signed-off-by: Eduardo Habkost <address@hidden>
> > ---
> > Patch v1 was "[PATCH 4/6] i386: Infrastructure for versioned CPU
> > models", and was split into multiple patches.
> >
> > Changes v1 -> v2:
> > * Make version numbers simple integers, completely independent
> > from machine type versions
> > * New X86CPUVersion typedef
> > * New CPU_VERSION_* defines to make X86CPUModel::version
> > semantics clearer
> > ---
> > include/hw/i386/pc.h | 3 +
> > target/i386/cpu.h | 12 ++
> > hw/i386/pc.c | 3 +
> > hw/i386/pc_piix.c | 4 +
> > hw/i386/pc_q35.c | 4 +
> > target/i386/cpu.c | 52 ++++++++-
> > tests/acceptance/x86_cpu_model_versions.py | 126 +++++++++++++++++++++
> > 7 files changed, 203 insertions(+), 1 deletion(-)
> > diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
> > index 57232aed6b..397e1fdd2f 100644
> > --- a/hw/i386/pc_q35.c
> > +++ b/hw/i386/pc_q35.c
> > @@ -367,8 +367,10 @@ static void pc_q35_machine_options(MachineClass *m)
> >
> > static void pc_q35_4_1_machine_options(MachineClass *m)
> > {
> > + PCMachineClass *pcmc = PC_MACHINE_CLASS(m);
> > pc_q35_machine_options(m);
> > m->alias = "q35";
> > + pcmc->default_cpu_version = 1;
>
> How will this work in future if we need to introduce a v2 of some,
> but not all CPU models, and then further a v3 of some others.
>
> Can we select Haswell-v1, Skylake-Server-v2, CascadeLake-v3
> as defaults in some way ?
Answered in reply to a later patch so
Reviewed-by: Daniel P. Berrangé <address@hidden>
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|