From: "Daniel P. Berrangé" <berrange@redhat.com>
To: David Edmondson <dme@dme.org>
Cc: Florian Weimer <fweimer@redhat.com>,
Eduardo Habkost <ehabkost@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
Richard Henderson <richard.henderson@linaro.org>,
qemu-devel@nongnu.org, Cleber Rosa <crosa@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [PATCH RFC 2/4] target/i386: define CPU models to model x86-64 ABI levels
Date: Tue, 2 Feb 2021 12:32:39 +0000 [thread overview]
Message-ID: <20210202123239.GE4168502@redhat.com> (raw)
In-Reply-To: <cunsg6els34.fsf@dme.org>
On Tue, Feb 02, 2021 at 09:46:55AM +0000, David Edmondson wrote:
> On Monday, 2021-02-01 at 15:36:04 GMT, Daniel P. Berrangé wrote:
>
> > To paraphrase:
> >
> > https://developers.redhat.com/blog/2021/01/05/building-red-hat-enterprise-linux-9-for-the-x86-64-v2-microarchitecture-level/
> >
> > In 2020, AMD, Intel, Red Hat, and SUSE worked together to define
> > three microarchitecture levels on top of the historical x86-64
> > baseline:
> >
> > * x86-64: original x86_64 baseline instruction set
> > * x86-64-v2: vector instructions up to Streaming SIMD
> > Extensions 4.2 (SSE4.2) and Supplemental
> > Streaming SIMD Extensions 3 (SSSE3), the
> > POPCNT instruction, and CMPXCHG16B
> > * x86-64-v3: vector instructions up to AVX2, MOVBE,
> > and additional bit-manipulation instructions.
> > * x86-64-v4: vector instructions from some of the
> > AVX-512 variants.
> >
> > This list of features is defined in the doc at:
> >
> > https://gitlab.com/x86-psABIs/x86-64-ABI/
> >
> > QEMU has historically defaulted to the "qemu64" CPU model on
> > x86_64 targets, which is approximately the x86-64 baseline
> > ABI, with 'SVM' added.
> >
> > It is thought it might be desirable if QEMU could provide CPU models
> > that closely correspond to the ABI levels, while offering portability
> > across the maximum number of physical CPUs.
> >
> > Historically we've found that defining CPU models with an arbitrary
> > combination of CPU features can be problematic, as some guest OS
> > will not check all features they use, and instead assume that if
> > they see feature "XX", then "YY" will always exist. This is reasonable
> > in bare metal, but subject to breakage in virtualization.
> >
> > Thus in defining the CPI models for the ABI levels, this patch attempted
>
> s/CPI/CPU/
>
> > to base them off an existing CPU model.
> >
> > While each x86-64-abiNNN has a designated vendor, they are designed
> > to be vendor agnostic models. ie they are capable of running on any
> > AMD or Intel physical CPU model that satisfies the ABI level. eg
>
> Only AMD or Intel? (You mention the Hugon chips elsewhere.)
In theory any x86 CPU that meets the ABI level, regardless of vendor
but if any vendor's set of CPUID features diverges too far from other
CPUs of similar level we might have problems.
For example, I had to specially avoid including "aes" in the
x86-64-abi3 because of the Hugon chips lacking it. There might
be other cases like this, since I've only compared CPUID sets
for named CPUs that QEMU includes.
> > None of the CPU models declare any VMX/SVM features. This would
> > make them unable to support nested virtualization with live
> > migration.
>
> How about "Unable to support hardware accelerated nested
> virtualization." ?
>
> Is live migration relevant?
Choice of CPU models is a critical decision in your future ability
to live migrate, so I wanted to call that out specifically.
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 :|
next prev parent reply other threads:[~2021-02-02 12:33 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-01 15:36 [PATCH RFC 0/4] target/i386/cpu: introduce new CPU models for x86-64 ABI levels Daniel P. Berrangé
2021-02-01 15:36 ` [PATCH RFC 1/4] docs: add a table showing x86-64 ABI compatibility levels Daniel P. Berrangé
2021-02-01 16:33 ` Florian Weimer
2021-02-01 17:17 ` Daniel P. Berrangé
2021-02-01 16:53 ` Peter Maydell
2021-02-01 17:19 ` Daniel P. Berrangé
2021-02-02 9:06 ` Florian Weimer
2021-02-01 18:28 ` Eduardo Habkost
2021-02-02 12:24 ` Daniel P. Berrangé
2021-02-02 9:41 ` David Edmondson
2021-02-02 12:23 ` Daniel P. Berrangé
2021-02-02 12:43 ` David Edmondson
2021-02-01 15:36 ` [PATCH RFC 2/4] target/i386: define CPU models to model x86-64 ABI levels Daniel P. Berrangé
2021-02-02 9:46 ` David Edmondson
2021-02-02 12:32 ` Daniel P. Berrangé [this message]
2021-02-02 12:50 ` David Edmondson
2021-02-02 12:54 ` Daniel P. Berrangé
2021-02-01 15:36 ` [PATCH RFC 3/4] NOT FOR MERGE target/i386: use x86-64-abi1 CPU model as default on x86_64 Daniel P. Berrangé
2021-02-01 15:36 ` [PATCH RFC 4/4] NOT FOR MERGE: script for CPU model stuff related to x86-64 ABI levels Daniel P. Berrangé
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210202123239.GE4168502@redhat.com \
--to=berrange@redhat.com \
--cc=crosa@redhat.com \
--cc=dme@dme.org \
--cc=ehabkost@redhat.com \
--cc=fweimer@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).