From: Cornelia Huck <cohuck@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: "Andrea Bolognani" <abologna@redhat.com>,
"Thomas Huth" <thuth@redhat.com>,
"Laurent Vivier" <lvivier@redhat.com>,
qemu-arm@nongnu.org, qemu-devel@nongnu.org, kvm@vger.kernel.org,
"Eric Auger" <eauger@redhat.com>,
"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
"Juan Quintela" <quintela@redhat.com>,
"Gavin Shan" <gshan@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Richard Henderson" <richard.henderson@linaro.org>
Subject: Re: [PATCH v6 1/2] arm/kvm: add support for MTE
Date: Fri, 03 Mar 2023 17:30:57 +0100 [thread overview]
Message-ID: <87zg8tztj2.fsf@redhat.com> (raw)
In-Reply-To: <CAFEAcA-Q6hzgW-B52X5XEtZsvBX64qSr9wSKizLVYu58mPdXKw@mail.gmail.com>
On Thu, Mar 02 2023, Peter Maydell <peter.maydell@linaro.org> wrote:
> On Thu, 2 Mar 2023 at 14:29, Cornelia Huck <cohuck@redhat.com> wrote:
>>
>> On Thu, Mar 02 2023, Peter Maydell <peter.maydell@linaro.org> wrote:
>> > I think having MTE in the specific case of KVM behave differently
>> > to how we've done all these existing properties and how we've
>> > done MTE for TCG would be confusing. The simplest thing is to just
>> > follow the existing UI for TCG MTE.
>> >
>> > The underlying reason for this is that MTE in general is not a feature
>> > only of the CPU, but also of the whole system design. It happens
>> > that KVM gives us tagged RAM "for free" but that's an oddity
>> > of the KVM implementation -- in real hardware there needs to
>> > be system level support for tagging.
>>
>> Hm... the Linux kernel actually seems to consider MTE to be a cpu
>> feature (at least, it lists it in the cpu features).
>>
>> So, is your suggestion to use the 'mte' prop of the virt machine to mean
>> "enable all prereqs for MTE, i.e. allocate tag memory for TCG and enable
>> MTE in the kernel for KVM"? For TCG, we'll get MTE for the max cpu
>> model; for KVM, we'd get MTE for host (== max), but I'm wondering what
>> should happen if we get named cpu models and the user specifies one
>> where we won't have MTE (i.e. some pre-8.5 one)?
>
> I think we can probably cross that bridge when we get to it,
> but I imagine the semantics would be "cortex-foo plus MTE"
> (in the same way that -cpu cortex-foo,+x,-y can add and
> subtract features from a baseline).
I'm wondering how we should try to model this, given that
cpu_model_advertised_features is a bit of a weird mix of architecture
flags and implementation-specific knobs.
Given that there are some KVM patchsets floating around to allow
userspace to limit some features for migration compat handling, I don't
think it will be too long before we'll try to figure out how to do cpu
models for KVM in QEMU as well...
next prev parent reply other threads:[~2023-03-03 16:31 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-28 15:02 [PATCH v6 0/2] arm: enable MTE for QEMU + kvm Cornelia Huck
2023-02-28 15:02 ` [PATCH v6 1/2] arm/kvm: add support for MTE Cornelia Huck
2023-02-28 17:34 ` Andrea Bolognani
2023-03-01 10:17 ` Cornelia Huck
2023-03-01 13:51 ` Andrea Bolognani
2023-03-01 14:15 ` Cornelia Huck
2023-03-01 14:54 ` Andrea Bolognani
2023-03-02 13:26 ` Cornelia Huck
2023-03-02 13:39 ` Andrea Bolognani
2023-03-02 13:46 ` Peter Maydell
2023-03-02 14:28 ` Cornelia Huck
2023-03-02 16:00 ` Peter Maydell
2023-03-03 16:30 ` Cornelia Huck [this message]
2023-03-07 17:05 ` Cornelia Huck
2023-03-03 16:11 ` Peter Maydell
2023-03-03 16:18 ` Cornelia Huck
2023-02-28 15:02 ` [PATCH v6 2/2] qtests/arm: add some mte tests Cornelia Huck
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=87zg8tztj2.fsf@redhat.com \
--to=cohuck@redhat.com \
--cc=abologna@redhat.com \
--cc=dgilbert@redhat.com \
--cc=eauger@redhat.com \
--cc=gshan@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=lvivier@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=philmd@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
--cc=richard.henderson@linaro.org \
--cc=thuth@redhat.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.