All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shameerali Kolothum Thodi <shameerali.kolothum.thodi@huawei.com>
To: Eric Auger <eauger@redhat.com>,
	"eric.auger@redhat.com" <eric.auger@redhat.com>,
	Cornelia Huck <cohuck@redhat.com>,
	"eric.auger.pro@gmail.com" <eric.auger.pro@gmail.com>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	"qemu-arm@nongnu.org" <qemu-arm@nongnu.org>,
	"kvmarm@lists.linux.dev" <kvmarm@lists.linux.dev>,
	"peter.maydell@linaro.org" <peter.maydell@linaro.org>,
	"richard.henderson@linaro.org" <richard.henderson@linaro.org>,
	"alex.bennee@linaro.org" <alex.bennee@linaro.org>,
	"maz@kernel.org" <maz@kernel.org>,
	"oliver.upton@linux.dev" <oliver.upton@linux.dev>,
	"sebott@redhat.com" <sebott@redhat.com>,
	"armbru@redhat.com" <armbru@redhat.com>,
	"berrange@redhat.com" <berrange@redhat.com>,
	"abologna@redhat.com" <abologna@redhat.com>,
	"jdenemar@redhat.com" <jdenemar@redhat.com>
Cc: "shahuang@redhat.com" <shahuang@redhat.com>,
	"mark.rutland@arm.com" <mark.rutland@arm.com>,
	"philmd@linaro.org" <philmd@linaro.org>,
	"pbonzini@redhat.com" <pbonzini@redhat.com>,
	"Wangzhou (B)" <wangzhou1@hisilicon.com>,
	Linuxarm <linuxarm@huawei.com>
Subject: RE: [PATCH RFCv2 00/20] kvm/arm: Introduce a customizable aarch64 KVM host model
Date: Thu, 12 Dec 2024 13:09:23 +0000	[thread overview]
Message-ID: <4fb49b5b02bb417399ee871b2c85bb35@huawei.com> (raw)
In-Reply-To: <38604260-6f92-4f16-9a4d-c310cbc52d77@redhat.com>

Hi Eric,

> -----Original Message-----
> From: Eric Auger <eauger@redhat.com>
> Sent: Thursday, December 12, 2024 8:42 AM
> To: eric.auger@redhat.com; Cornelia Huck <cohuck@redhat.com>;
> eric.auger.pro@gmail.com; qemu-devel@nongnu.org; qemu-
> arm@nongnu.org; kvmarm@lists.linux.dev; peter.maydell@linaro.org;
> richard.henderson@linaro.org; alex.bennee@linaro.org; maz@kernel.org;
> oliver.upton@linux.dev; sebott@redhat.com; Shameerali Kolothum Thodi
> <shameerali.kolothum.thodi@huawei.com>; armbru@redhat.com;
> berrange@redhat.com; abologna@redhat.com; jdenemar@redhat.com
> Cc: shahuang@redhat.com; mark.rutland@arm.com; philmd@linaro.org;
> pbonzini@redhat.com
> Subject: Re: [PATCH RFCv2 00/20] kvm/arm: Introduce a customizable
> aarch64 KVM host model
> 
> Shameer,
> 
> On 12/12/24 09:12, Eric Auger wrote:
> > Connie,
> >
> > On 12/6/24 12:21, Cornelia Huck wrote:
> >> A respin/update on the aarch64 KVM cpu models. Also available at
> >> gitlab.com/cohuck/qemu arm-cpu-model-rfcv2
> >>
> >> Find Eric's original cover letter below, so that I do not need to
> >> repeat myself on the aspects that have not changed since RFCv1 :)
> >>
> >> Changes from RFCv1:
> >>
> >> Rebased on more recent QEMU (some adaptions in the register
> conversions
> >> of the first few patches.)
> >>
> >> Based on feedback, I have removed the "custom" cpu model; instead, I
> >> have added the new SYSREG_<REG>_<FIELD> properties to the "host"
> model.
> >> This works well if you want to tweak anything that does not correspond
> >> to the existing properties for the host model; however, if you e.g.
> >> wanted to tweak sve, you have two ways to do so -- we'd probably either
> >> want to check for conflicts, or just declare precedence. The kvm-specific
> >> props remain unchanged, as they are orthogonal to this configuration.
> >>
> >> The cpu model expansion for the "host" model now dumps the new
> SYSREG_
> >> properties in addition to the existing host model properties; this is a
> >> bit ugly, but I don't see a good way on how to split this up.
> >>
> >> Some more adaptions due to the removal of the "custom" model.
> >>
> >> Things *not* changed from RFCv1:
> >>
> >> SYSREG_ property naming (can be tweaked easily, once we are clear on
> what
> >> the interface should look like.)
> >>
> >> Sysreg generation scripts, and the generated files (I have not updated
> >> anything there.) I think generating the various definitions makes sense,
> >> as long as we double-check the generated files on each update (which
> would
> >> be something to trigger manually anyway.)
> >>
> >> What I would like us to reach some kind of consensus on:
> >>
> >> How to continue with the patches moving the ID registers from the isar
> >> struct into the idregs array. These are a bit of churn to drag along;
> >> if they make sense, maybe they can be picked independently of this
> series?
> >>
> >> Whether it make sense to continue with the approach of tweaking
> values in
> >> the ID registers in general. If we want to be able to migrate between
> cpus
> >> that do not differ wildly, we'll encounter differences that cannot be
> >> expressed via FEAT_xxx -- e.g. when comparing various AmpereAltra Max
> systems,
> >> they only differ in parts of CTR_EL0 -- which is not a feature register, but
> >> a writable register.
> > In v1 most of the commenters said they would prefer to see FEAT props
> > instead of IDREG field props. I think we shall try to go in this
> > direction anyway. As you pointed out there will be some cases where
> FEAT
> > won't be enough (CTR_EL0 is a good example). So I tend to think the end
> > solution will be a mix of FEAT and ID reg field props.
> >
> > Personally I would smoothly migrate what we can from ID reg field props
> > to FEAT props (maybe using prop aliases?), starting from the easiest 1-1
> > mappings and then adressing the FEAT that are more complex but are
> > explictly needed to enable the use cases we are interested in, at RedHat:
> > migration within Ampere AltraMax family, migration within NVidia Grace
> > family, migration within AmpereOne family and migration between
> Graviton3/4.
> >
> > We have no info about other's use cases. If some of you want to see some
> > other live migration combinations addressed, please raise your voice.
> In relation to [1] you seem to be also interested in the migration
> between heterogeneous systems with qemu.

Yes. That is correct.

> Do you think targeting migration within a cpu family is enough for your
> use cases. How different are the source and destination host on your
> cases. Do you thing feat props are relevant in your case or would you
> need lower granularity at idreg field levelto pass the migration?

I think, from the current requirement we have for migration, the source and
destination mostly can be handled by FEAT_XXX. But like Ampere, we do need
to manage the CTR_EL0 differences[1].

Also we do have differences in GIC support as well(AA64PFR0_EL1.GIC) which 
I am not sure how to manage with FEAT_XXX.

And we are checking with our Product team whether we need to support migration
from an old CPU type in which case we have to do a bit more analysis.

Thanks,
Shameer

1. https://lore.kernel.org/kvmarm/20241022073943.35764-1-shameerali.kolothum.thodi@huawei.com/



 
 

WARNING: multiple messages have this Message-ID (diff)
From: Shameerali Kolothum Thodi via <qemu-devel@nongnu.org>
To: Eric Auger <eauger@redhat.com>,
	"eric.auger@redhat.com" <eric.auger@redhat.com>,
	Cornelia Huck <cohuck@redhat.com>,
	"eric.auger.pro@gmail.com" <eric.auger.pro@gmail.com>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	"qemu-arm@nongnu.org" <qemu-arm@nongnu.org>,
	"kvmarm@lists.linux.dev" <kvmarm@lists.linux.dev>,
	"peter.maydell@linaro.org" <peter.maydell@linaro.org>,
	"richard.henderson@linaro.org" <richard.henderson@linaro.org>,
	"alex.bennee@linaro.org" <alex.bennee@linaro.org>,
	"maz@kernel.org" <maz@kernel.org>,
	"oliver.upton@linux.dev" <oliver.upton@linux.dev>,
	"sebott@redhat.com" <sebott@redhat.com>,
	"armbru@redhat.com" <armbru@redhat.com>,
	"berrange@redhat.com" <berrange@redhat.com>,
	"abologna@redhat.com" <abologna@redhat.com>,
	"jdenemar@redhat.com" <jdenemar@redhat.com>
Cc: "shahuang@redhat.com" <shahuang@redhat.com>,
	"mark.rutland@arm.com" <mark.rutland@arm.com>,
	"philmd@linaro.org" <philmd@linaro.org>,
	"pbonzini@redhat.com" <pbonzini@redhat.com>,
	"Wangzhou (B)" <wangzhou1@hisilicon.com>,
	Linuxarm <linuxarm@huawei.com>
Subject: RE: [PATCH RFCv2 00/20] kvm/arm: Introduce a customizable aarch64 KVM host model
Date: Thu, 12 Dec 2024 13:09:23 +0000	[thread overview]
Message-ID: <4fb49b5b02bb417399ee871b2c85bb35@huawei.com> (raw)
In-Reply-To: <38604260-6f92-4f16-9a4d-c310cbc52d77@redhat.com>

Hi Eric,

> -----Original Message-----
> From: Eric Auger <eauger@redhat.com>
> Sent: Thursday, December 12, 2024 8:42 AM
> To: eric.auger@redhat.com; Cornelia Huck <cohuck@redhat.com>;
> eric.auger.pro@gmail.com; qemu-devel@nongnu.org; qemu-
> arm@nongnu.org; kvmarm@lists.linux.dev; peter.maydell@linaro.org;
> richard.henderson@linaro.org; alex.bennee@linaro.org; maz@kernel.org;
> oliver.upton@linux.dev; sebott@redhat.com; Shameerali Kolothum Thodi
> <shameerali.kolothum.thodi@huawei.com>; armbru@redhat.com;
> berrange@redhat.com; abologna@redhat.com; jdenemar@redhat.com
> Cc: shahuang@redhat.com; mark.rutland@arm.com; philmd@linaro.org;
> pbonzini@redhat.com
> Subject: Re: [PATCH RFCv2 00/20] kvm/arm: Introduce a customizable
> aarch64 KVM host model
> 
> Shameer,
> 
> On 12/12/24 09:12, Eric Auger wrote:
> > Connie,
> >
> > On 12/6/24 12:21, Cornelia Huck wrote:
> >> A respin/update on the aarch64 KVM cpu models. Also available at
> >> gitlab.com/cohuck/qemu arm-cpu-model-rfcv2
> >>
> >> Find Eric's original cover letter below, so that I do not need to
> >> repeat myself on the aspects that have not changed since RFCv1 :)
> >>
> >> Changes from RFCv1:
> >>
> >> Rebased on more recent QEMU (some adaptions in the register
> conversions
> >> of the first few patches.)
> >>
> >> Based on feedback, I have removed the "custom" cpu model; instead, I
> >> have added the new SYSREG_<REG>_<FIELD> properties to the "host"
> model.
> >> This works well if you want to tweak anything that does not correspond
> >> to the existing properties for the host model; however, if you e.g.
> >> wanted to tweak sve, you have two ways to do so -- we'd probably either
> >> want to check for conflicts, or just declare precedence. The kvm-specific
> >> props remain unchanged, as they are orthogonal to this configuration.
> >>
> >> The cpu model expansion for the "host" model now dumps the new
> SYSREG_
> >> properties in addition to the existing host model properties; this is a
> >> bit ugly, but I don't see a good way on how to split this up.
> >>
> >> Some more adaptions due to the removal of the "custom" model.
> >>
> >> Things *not* changed from RFCv1:
> >>
> >> SYSREG_ property naming (can be tweaked easily, once we are clear on
> what
> >> the interface should look like.)
> >>
> >> Sysreg generation scripts, and the generated files (I have not updated
> >> anything there.) I think generating the various definitions makes sense,
> >> as long as we double-check the generated files on each update (which
> would
> >> be something to trigger manually anyway.)
> >>
> >> What I would like us to reach some kind of consensus on:
> >>
> >> How to continue with the patches moving the ID registers from the isar
> >> struct into the idregs array. These are a bit of churn to drag along;
> >> if they make sense, maybe they can be picked independently of this
> series?
> >>
> >> Whether it make sense to continue with the approach of tweaking
> values in
> >> the ID registers in general. If we want to be able to migrate between
> cpus
> >> that do not differ wildly, we'll encounter differences that cannot be
> >> expressed via FEAT_xxx -- e.g. when comparing various AmpereAltra Max
> systems,
> >> they only differ in parts of CTR_EL0 -- which is not a feature register, but
> >> a writable register.
> > In v1 most of the commenters said they would prefer to see FEAT props
> > instead of IDREG field props. I think we shall try to go in this
> > direction anyway. As you pointed out there will be some cases where
> FEAT
> > won't be enough (CTR_EL0 is a good example). So I tend to think the end
> > solution will be a mix of FEAT and ID reg field props.
> >
> > Personally I would smoothly migrate what we can from ID reg field props
> > to FEAT props (maybe using prop aliases?), starting from the easiest 1-1
> > mappings and then adressing the FEAT that are more complex but are
> > explictly needed to enable the use cases we are interested in, at RedHat:
> > migration within Ampere AltraMax family, migration within NVidia Grace
> > family, migration within AmpereOne family and migration between
> Graviton3/4.
> >
> > We have no info about other's use cases. If some of you want to see some
> > other live migration combinations addressed, please raise your voice.
> In relation to [1] you seem to be also interested in the migration
> between heterogeneous systems with qemu.

Yes. That is correct.

> Do you think targeting migration within a cpu family is enough for your
> use cases. How different are the source and destination host on your
> cases. Do you thing feat props are relevant in your case or would you
> need lower granularity at idreg field levelto pass the migration?

I think, from the current requirement we have for migration, the source and
destination mostly can be handled by FEAT_XXX. But like Ampere, we do need
to manage the CTR_EL0 differences[1].

Also we do have differences in GIC support as well(AA64PFR0_EL1.GIC) which 
I am not sure how to manage with FEAT_XXX.

And we are checking with our Product team whether we need to support migration
from an old CPU type in which case we have to do a bit more analysis.

Thanks,
Shameer

1. https://lore.kernel.org/kvmarm/20241022073943.35764-1-shameerali.kolothum.thodi@huawei.com/



 
 

  reply	other threads:[~2024-12-12 13:09 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-06 11:21 [PATCH RFCv2 00/20] kvm/arm: Introduce a customizable aarch64 KVM host model Cornelia Huck
2024-12-06 11:21 ` [PATCH RFCv2 01/20] kvm: kvm_get_writable_id_regs Cornelia Huck
2024-12-12 13:59   ` Richard Henderson
2024-12-12 14:12     ` Eric Auger
2024-12-13 15:43       ` Cornelia Huck
2024-12-06 11:21 ` [PATCH RFCv2 02/20] arm/cpu: Add sysreg definitions in cpu-sysregs.h Cornelia Huck
2024-12-12 14:37   ` Richard Henderson
2024-12-12 17:46     ` Eric Auger
2024-12-12 18:12       ` Richard Henderson
2024-12-13 16:16         ` Cornelia Huck
2024-12-06 11:21 ` [PATCH RFCv2 03/20] arm/cpu: Store aa64isar0 into the idregs arrays Cornelia Huck
2024-12-06 11:21 ` [PATCH RFCv2 04/20] arm/cpu: Store aa64isar1/2 into the idregs array Cornelia Huck
2024-12-06 11:21 ` [PATCH RFCv2 05/20] arm/cpu: Store aa64drf0/1 " Cornelia Huck
2024-12-06 11:21 ` [PATCH RFCv2 06/20] arm/cpu: Store aa64mmfr0-3 " Cornelia Huck
2024-12-06 11:22 ` [PATCH RFCv2 07/20] arm/cpu: Store aa64drf0/1 " Cornelia Huck
2024-12-06 11:22 ` [PATCH RFCv2 08/20] arm/cpu: Store aa64smfr0 " Cornelia Huck
2024-12-06 11:22 ` [PATCH RFCv2 09/20] arm/cpu: Store id_isar0-7 " Cornelia Huck
2024-12-06 11:22 ` [PATCH RFCv2 10/20] arm/cpu: Store id_mfr0/1 " Cornelia Huck
2024-12-06 11:22 ` [PATCH RFCv2 11/20] arm/cpu: Store id_dfr0/1 " Cornelia Huck
2024-12-06 11:22 ` [PATCH RFCv2 12/20] arm/cpu: Store id_mmfr0-5 " Cornelia Huck
2024-12-06 11:22 ` [PATCH RFCv2 13/20] arm/cpu: Add infra to handle generated ID register definitions Cornelia Huck
2024-12-06 11:22 ` [PATCH RFCv2 14/20] arm/cpu: Add sysreg generation scripts Cornelia Huck
2024-12-06 11:22 ` [PATCH RFCv2 15/20] arm/cpu: Add generated files Cornelia Huck
2024-12-06 11:22 ` [PATCH RFCv2 16/20] arm/kvm: Allow reading all the writable ID registers Cornelia Huck
2024-12-06 11:22 ` [PATCH RFCv2 17/20] arm/kvm: write back modified ID regs to KVM Cornelia Huck
2024-12-06 11:22 ` [PATCH RFCv2 18/20] arm/cpu: more customization for the kvm host cpu model Cornelia Huck
2024-12-06 11:22 ` [PATCH RFCv2 19/20] arm-qmp-cmds: introspection for ID register props Cornelia Huck
2024-12-06 11:22 ` [PATCH RFCv2 20/20] arm/cpu-features: document ID reg properties Cornelia Huck
2024-12-12  7:41 ` [PATCH RFCv2 00/20] kvm/arm: Introduce a customizable aarch64 KVM host model Eric Auger
2024-12-12  8:12 ` Eric Auger
2024-12-12  8:42   ` Eric Auger
2024-12-12 13:09     ` Shameerali Kolothum Thodi [this message]
2024-12-12 13:09       ` Shameerali Kolothum Thodi via
2024-12-12 13:29       ` Eric Auger
2024-12-12  9:10   ` Daniel P. Berrangé
2024-12-12  9:36     ` Cornelia Huck
2024-12-12 10:04       ` Eric Auger
2024-12-12 14:46         ` Cornelia Huck
2024-12-19 11:35         ` Kashyap Chamarthy
2024-12-19 12:26           ` Marc Zyngier
2024-12-19 12:38             ` Daniel P. Berrangé
2024-12-19 13:01               ` Marc Zyngier
2024-12-19 15:07             ` Kashyap Chamarthy
2024-12-19 15:41               ` Marc Zyngier
2024-12-19 17:51                 ` Daniel P. Berrangé
2024-12-20 16:04                   ` Cornelia Huck
2024-12-21 13:02                   ` Marc Zyngier
2024-12-20 11:52                 ` Kashyap Chamarthy
2024-12-20 16:17                   ` Cornelia Huck
2024-12-21 14:45                   ` Marc Zyngier
2024-12-16 16:42   ` Cornelia Huck
2024-12-16 16:58     ` Cornelia Huck
2024-12-12 13:13 ` Sebastian Ott
2024-12-12 14:46   ` Cornelia Huck
2024-12-17 15:21 ` Marc Zyngier
2024-12-17 18:05   ` Eric Auger

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=4fb49b5b02bb417399ee871b2c85bb35@huawei.com \
    --to=shameerali.kolothum.thodi@huawei.com \
    --cc=abologna@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=armbru@redhat.com \
    --cc=berrange@redhat.com \
    --cc=cohuck@redhat.com \
    --cc=eauger@redhat.com \
    --cc=eric.auger.pro@gmail.com \
    --cc=eric.auger@redhat.com \
    --cc=jdenemar@redhat.com \
    --cc=kvmarm@lists.linux.dev \
    --cc=linuxarm@huawei.com \
    --cc=mark.rutland@arm.com \
    --cc=maz@kernel.org \
    --cc=oliver.upton@linux.dev \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=sebott@redhat.com \
    --cc=shahuang@redhat.com \
    --cc=wangzhou1@hisilicon.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.