
On Wed, May 17, 2023 at 09:14:02AM +0200, Michal Prívozník wrote:
On 5/16/23 18:32, Andrea Bolognani wrote:
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.
Then it's a matter of:
+ if (kvm_arm_mte_supported()) { + object_class_property_add_bool(oc, "mte", virt_get_mte, virt_set_mte); + object_class_property_set_description(oc, "mte", + "Set on/off to enable/disable emulating a " + "guest CPU which implements the ARM " + "Memory Tagging Extension"); + }
I don't think this would work: even if KVM doesn't support MTE, TCG can still emulate it, so the property still needs to show up.
Or querying KVM extensions in libvirt (we already do that for some features).
That would tell us whether KVM itself is MTE-capable, but not whether the QEMU binary can make use of that 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.
Fair enough, feel free to revert my patches.
Let's keep the discussion going for now, but if we get very close to the freeze without a clear consensus on the one you have implemented being the interface that we want I'll probably post a revert. -- Andrea Bolognani / Red Hat / Virtualization