[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC 18/21] arm/cpu: Introduce a customizable kvm host cpu model
From: |
Daniel P . Berrangé |
Subject: |
Re: [RFC 18/21] arm/cpu: Introduce a customizable kvm host cpu model |
Date: |
Mon, 28 Oct 2024 16:15:16 +0000 |
User-agent: |
Mutt/2.2.12 (2023-09-09) |
On Mon, Oct 28, 2024 at 05:00:46PM +0100, Cornelia Huck wrote:
> On Fri, Oct 25 2024, Daniel P. Berrangé <berrange@redhat.com> wrote:
>
> > On Fri, Oct 25, 2024 at 03:18:25PM +0200, Eric Auger wrote:
> >> Hi Daniel,
> >>
> >> On 10/25/24 15:06, Daniel P. Berrangé wrote:
> >> > On Fri, Oct 25, 2024 at 12:17:37PM +0200, Eric Auger wrote:
> >> >> At the moment, the custom model does not support legacy options
> >> >> of the host cpu model. We need to understand what we do with those
> >> >> latter (SVE, ...). This means that related KVM ioctl are
> >> >> not called yet.
> >> > It will be pretty painful to have to use different feature
> >> > terminology for different CPU models. Everything in libvirt
> >> > assuming feature terminology varies per-arch, not per-CPU
> >> > model.
> >> Actually as far as I understand those regids/fields would fit all kind
> >> of aarch64 Cortex-A CPUs. So they wouldn't vary per-CPU (I mean their
> >> terminology. Their availability will).
> >
> > What I mean is can we define named models for various different
> > vendor's Cortex-A silicon and just use that without needing to
> > toggle features, except in rare cases.
>
> I'm not sure whether creating named models for various cpus would
> actually scale; what we probably could do is come up with some Armv8.6,
> Armv8.7, ... models and have additional models for some well-known cpus.
> That would also give us some basic sanity checks for feature
> combinations, if we do not want to support completely custom
> frankencpus.
Yep, even on x86 we don't add named models for every conceivable
CPU SKU variant, just one so called "typical" variant for a given
microarchiteture level [1].
The vendor independent Arm CPU spec versions are a good enough
match for typical real world silicon, then it would make sense
to focus mostly on such named CPU models, not try to make an
exhaustive definition of every vendor's impl. I could see there
might be some exceptions where adding a vendor specific named
model would be worthwhile, but hopefully that'd be relatively
uncommon and -cpu Armv8.6,+feat1,+feat2 would be sufficient.
eg toggling 1/2/3 extra features to precise match a vendor's
named mode is ok, but adding 20-30 extra features get a match
is painful. That's the kind of rule of thumb that could be
used when deciding whether its worth adding a vendor specific
named model, vs relying on the generic spec based models.
With regards,
Daniel
[1] we do have CPU model versions, as a way to "bugfix" our
CPU definitions.
--
|: 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 :|
- [RFC 01/21] kvm: kvm_get_writable_id_regs, (continued)
- [RFC 01/21] kvm: kvm_get_writable_id_regs, Eric Auger, 2024/10/25
- [RFC 04/21] arm/cpu: Store aa64isar1/2 into the idregs array, Eric Auger, 2024/10/25
- [RFC 06/21] arm/cpu: Store aa64mmfr0-3 into the idregs array, Eric Auger, 2024/10/25
- [RFC 16/21] arm/kvm: Allow reading all the writable ID registers, Eric Auger, 2024/10/25
- [RFC 07/21] arm/cpu: Store aa64drf0/1 into the idregs array, Eric Auger, 2024/10/25
- [RFC 18/21] arm/cpu: Introduce a customizable kvm host cpu model, Eric Auger, 2024/10/25
- Re: [RFC 18/21] arm/cpu: Introduce a customizable kvm host cpu model, Daniel P . Berrangé, 2024/10/25
- Re: [RFC 18/21] arm/cpu: Introduce a customizable kvm host cpu model, Peter Maydell, 2024/10/28
- Re: [RFC 18/21] arm/cpu: Introduce a customizable kvm host cpu model, Cornelia Huck, 2024/10/28
- Re: [RFC 18/21] arm/cpu: Introduce a customizable kvm host cpu model, Daniel P . Berrangé, 2024/10/28
- Re: [RFC 18/21] arm/cpu: Introduce a customizable kvm host cpu model, Peter Maydell, 2024/10/28
- Re: [RFC 18/21] arm/cpu: Introduce a customizable kvm host cpu model, Oliver Upton, 2024/10/28
- Re: [RFC 18/21] arm/cpu: Introduce a customizable kvm host cpu model, Cornelia Huck, 2024/10/30
- Re: [RFC 18/21] arm/cpu: Introduce a customizable kvm host cpu model, Daniel P . Berrangé, 2024/10/30
- Re: [RFC 18/21] arm/cpu: Introduce a customizable kvm host cpu model, Daniel P . Berrangé, 2024/10/28
[RFC 17/21] arm/kvm: write back modified ID regs to KVM, Eric Auger, 2024/10/25
[RFC 08/21] arm/cpu: Store aa64smfr0 into the idregs array, Eric Auger, 2024/10/25