From: Cornelia Huck <cohuck@redhat.com>
To: Gustavo Romero <gustavo.romero@linaro.org>,
Ganapatrao Kulkarni <gankulkarni@os.amperecomputing.com>,
qemu-arm@nongnu.org, qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org, richard.henderson@linaro.org,
alex.bennee@linaro.org, darren@os.amperecomputing.com
Subject: Re: [PATCH V3] arm/kvm: add support for MTE
Date: Wed, 02 Oct 2024 15:42:49 +0200 [thread overview]
Message-ID: <87a5fmsjs6.fsf@redhat.com> (raw)
In-Reply-To: <f3da8f58-615b-42ed-a99d-20bfd9ec6b56@linaro.org>
On Thu, Sep 26 2024, Gustavo Romero <gustavo.romero@linaro.org> wrote:
> Hi Cornelia and Ganapatrao,
>
> On 9/25/24 14:54, Cornelia Huck wrote:
>> On Fri, Sep 20 2024, Ganapatrao Kulkarni <gankulkarni@os.amperecomputing.com> wrote:
>>> +
>>> + /*
>>> + * Clear MTE bits, if not enabled in KVM mode.
>> Maybe add "This matches the MTE bits being masked by KVM in that case."?
>
> Clearing the MTE bits is also necessary when MTE is supported by the
> host (and so KVM can enable the MTE capability - so won't mask the MTE
> bits, but the user didn't want MTE enabled in the guest (mte=on no given
> or explicitly set to =off), so this comment is not always true?
>
> How about something like:
>
> "If MTE is supported by the host but could not be enabled on KVM mode or
> MTE should not be enabled on the guest (e.i. mte=off), clear guest's MTE
> bits."
s/e.i./i.e./ :)
Otherwise fine with me.
>
> I do assume MTE is supported by the host (i.e. MTE bits >= 2 in the host)
> because otherwise condition "if (cpu_isar_feature(aa64_mte, cpu)) { ...
> }" is not
> taken; and at this point cpu->isar->id_aa64pfr1 is set from the host's
> bits via
> kvm_arm_set_cpu_features_from_host() and kvm_arm_get_host_cpu_features ().
>
>
>>> + */
>>> + if (kvm_enabled() && !cpu->kvm_mte) {
>>> + FIELD_DP64(cpu->isar.id_aa64pfr1, ID_AA64PFR1, MTE, 0);
>>> + }
>>> #endif
>>> }
next prev parent reply other threads:[~2024-10-02 13:43 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-20 7:37 [PATCH V3] arm/kvm: add support for MTE Ganapatrao Kulkarni
2024-09-25 12:54 ` Cornelia Huck
2024-09-26 16:11 ` Gustavo Romero
2024-09-27 13:23 ` Ganapatrao Kulkarni
2024-10-02 13:42 ` Cornelia Huck [this message]
2024-09-25 15:47 ` Gustavo Romero
2024-09-25 17:40 ` Ganapatrao Kulkarni
2024-09-26 15:25 ` Gustavo Romero
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=87a5fmsjs6.fsf@redhat.com \
--to=cohuck@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=darren@os.amperecomputing.com \
--cc=gankulkarni@os.amperecomputing.com \
--cc=gustavo.romero@linaro.org \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--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).