From: Cornelia Huck <cohuck@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>,
Thomas Huth <thuth@redhat.com>,
Laurent Vivier <lvivier@redhat.com>
Cc: Andrew Jones <drjones@redhat.com>,
qemu-arm@nongnu.org, qemu-devel@nongnu.org, kvm@vger.kernel.org,
Cornelia Huck <cohuck@redhat.com>
Subject: [PATCH RFC 0/2] arm: enable MTE for QEMU + kvm
Date: Thu, 12 May 2022 15:11:44 +0200 [thread overview]
Message-ID: <20220512131146.78457-1-cohuck@redhat.com> (raw)
This series enables MTE for kvm guests, if the kernel supports it.
Lightly tested while running under the simulator (the arm64/mte/
kselftests pass... if you wait patiently :)
A new cpu property "mte" (defaulting to on if possible) is introduced;
for tcg, you still need to enable mte at the machine as well.
I've hacked up some very basic qtests; not entirely sure if I'm going
about it the right way.
Some things to look out for:
- Migration is not (yet) supported. I added a migration blocker if we
enable mte in the kvm case. AFAIK, there isn't any hardware available
yet that allows mte + kvm to be used (I think the latest Gravitons
implement mte, but no bare metal instances seem to be available), so
that should not have any impact on real world usage.
- I'm not at all sure about the interaction between the virt machine 'mte'
prop and the cpu 'mte' prop. To keep things working with tcg as before,
a not-specified mte for the cpu should simply give us a guest without
mte if it wasn't specified for the machine. However, mte on the cpu
without mte on the machine should probably generate an error, but I'm not
sure how to detect that without breaking the silent downgrade to preserve
existing behaviour.
- As I'm still new to arm, please don't assume that I know what I'm doing :)
Cornelia Huck (2):
arm/kvm: enable MTE if available
qtests/arm: add some mte tests
target/arm/cpu.c | 18 +++-----
target/arm/cpu.h | 4 ++
target/arm/cpu64.c | 78 ++++++++++++++++++++++++++++++++++
target/arm/kvm64.c | 5 +++
target/arm/kvm_arm.h | 12 ++++++
target/arm/monitor.c | 1 +
tests/qtest/arm-cpu-features.c | 31 ++++++++++++++
7 files changed, 137 insertions(+), 12 deletions(-)
--
2.34.3
next reply other threads:[~2022-05-12 13:13 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-12 13:11 Cornelia Huck [this message]
2022-05-12 13:11 ` [PATCH RFC 1/2] arm/kvm: enable MTE if available Cornelia Huck
2022-06-10 20:48 ` Eric Auger
2022-06-14 8:40 ` Cornelia Huck
2022-06-29 10:38 ` Eric Auger
2022-06-30 15:55 ` Cornelia Huck
2022-05-12 13:11 ` [PATCH RFC 2/2] qtests/arm: add some mte tests Cornelia Huck
2022-05-31 9:29 ` [PATCH RFC 0/2] arm: enable MTE for QEMU + kvm Cornelia Huck
2022-06-08 10:14 ` Cornelia Huck
2022-06-10 20:40 ` Eric Auger
2022-06-13 16:02 ` Cornelia Huck
2022-06-29 10:27 ` Eric Auger
2022-06-30 16:09 ` 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=20220512131146.78457-1-cohuck@redhat.com \
--to=cohuck@redhat.com \
--cc=drjones@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=lvivier@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.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 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).