On Tue, May 16, 2023 at 12:54:12PM +0200, Michal Privoznik wrote: > Michal Prívozník (4): > conf: Introduce MTE domain feature > qemu:: Introduce QEMU_CAPS_MACHINE_VIRT_MTE capability > qemu: Validate MTE feature > qemu: Generate command line for MTE feature
I wish I'd managed to see this before it got reviewed and merged :/ For context, I have been following the development of the MTE feature in QEMU for a while, and was planning to work on the libvirt part later down the line. The main reason why I have not done so yet is that there are still some open questions about the interface. Specifically, MTE is not just a single thing: there are at least two versions that I'm aware of, MTE and MTE3. Right now, mte=on gives you MTE3 with TCG and whatever the host supports on KVM. Of course the latter is problematic when it comes to guaranteeing a stable guest ABI... I think a reasonable interface would be similar to what we have for GIC, with a 'version' attribute used to explicitly choose between MTE and MTE3, and some logic to fill in a reasonable value for the host by default. But there's also the question of whether MTE should be a machine property in the first place, rather than a CPU feature? Committing to any specific interface in libvirt at this point in time feels premature, as it's pretty much guaranteed that it will no longer fit once the questions above have been answered. Last but not least, the way detection has been implemented is not accurate: as of today, QEMU does *not* support enabling MTE with KVM. Patches adding this feature have been posted[1] and are going to be merged soon, but even then just looking at the machine type property is not going to be enough to determine whether MTE can actually be used. CC'ing Connie so that she can point out any mistakes I might have made above :) [1] https://lists.gnu.org/archive/html/qemu-devel/2023-04/msg05452.html -- Andrea Bolognani / Red Hat / Virtualization