qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v7 0/1] arm: enable MTE for QEMU + kvm
@ 2023-04-28  9:55 Cornelia Huck
  2023-04-28  9:55 ` [PATCH v7 1/1] arm/kvm: add support for MTE Cornelia Huck
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Cornelia Huck @ 2023-04-28  9:55 UTC (permalink / raw)
  To: Peter Maydell, Paolo Bonzini
  Cc: qemu-arm, qemu-devel, kvm, Eric Auger, Juan Quintela, Gavin Shan,
	Philippe Mathieu-Daudé, Richard Henderson, Andrea Bolognani,
	Cornelia Huck

v7 takes a different approach to wiring up MTE, so I still include a cover
letter where I can explain things better, even though it is now only a
single patch :)

Previous versions used a cpu property to control MTE enablement, while
keeping the same semantics for the virt machine "mte" property as used with
tcg. This version now uses the machine property for kvm as well; while it
continues to control allocation of tag memory for tcg, it now also controls
enablement of the kvm capability. Since the cpu prop is now gone, so is the
testing via the arm cpu props test; I don't have a good idea for testing
mte on kvm automatically, since it has a hard dependency on host support.
(Should I tack some futher documentation somewhere? I'm not seeing an
obvious place.)

A kvm guest with mte enabled still cannot be migrated (we need some uffd
interface enhancements before we can support postcopy), so it is still off
per default.

Another open problem is mte vs mte3: tcg emulates mte3, kvm gives the guest
whatever the host supports. Without migration support, this is not too much
of a problem yet, but for compatibility handling, we'll need a way to keep
QEMU from handing out mte3 for guests that might be migrated to a mte3-less
host. We could tack this unto the mte property (specifying the version or
max supported), or we could handle this via cpu properties if we go with
handling compatibility via cpu models (sorting this out for kvm is probably
going to be interesting in general.) In any case, I think we'll need a way
to inform kvm of it.

Tested with kvm selftests on FVP (as I still don't have any hardware with
MTE...) and some make check(-tcg) incantations. Hopefully, I haven't (re)-
introduced too many issues.

Cornelia Huck (1):
  arm/kvm: add support for MTE

 hw/arm/virt.c        | 69 +++++++++++++++++++++++++-------------------
 target/arm/cpu.c     |  9 +++---
 target/arm/cpu.h     |  4 +++
 target/arm/kvm.c     | 35 ++++++++++++++++++++++
 target/arm/kvm64.c   |  5 ++++
 target/arm/kvm_arm.h | 19 ++++++++++++
 6 files changed, 107 insertions(+), 34 deletions(-)

-- 
2.40.0



^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2023-05-29 10:28 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-28  9:55 [PATCH v7 0/1] arm: enable MTE for QEMU + kvm Cornelia Huck
2023-04-28  9:55 ` [PATCH v7 1/1] arm/kvm: add support for MTE Cornelia Huck
2023-04-28 17:50   ` Juan Quintela
2023-05-01  9:37     ` Richard Henderson
2023-05-02  9:03       ` Cornelia Huck
2023-05-02 10:17         ` Juan Quintela
2023-05-02 10:58         ` Richard Henderson
2023-05-04 15:01           ` Cornelia Huck
2023-05-05 15:14             ` Richard Henderson
2023-05-16 13:48   ` Peter Maydell
2023-05-16 20:31   ` Richard Henderson
2023-05-18 10:09 ` [PATCH v7 0/1] arm: enable MTE for QEMU + kvm Peter Maydell
2023-05-22 12:04 ` Cornelia Huck
2023-05-29 10:15   ` Andrea Bolognani
2023-05-29 10:27     ` Peter Maydell

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).