On Wed, Mar 01 2023, Andrea Bolognani <abologna@xxxxxxxxxx> wrote: > On Wed, Mar 01, 2023 at 11:17:40AM +0100, Cornelia Huck wrote: >> On Tue, Feb 28 2023, Andrea Bolognani <abologna@xxxxxxxxxx> wrote: >> > On Tue, Feb 28, 2023 at 04:02:15PM +0100, Cornelia Huck wrote: >> >> +MTE CPU Property >> >> +================ >> >> + >> >> +The ``mte`` property controls the Memory Tagging Extension. For TCG, it requires >> >> +presence of tag memory (which can be turned on for the ``virt`` machine via >> >> +``mte=on``). For KVM, it requires the ``KVM_CAP_ARM_MTE`` capability; until >> >> +proper migration support is implemented, enabling MTE will install a migration >> >> +blocker. >> > >> > Is it okay to use -machine virt,mte=on unconditionally for both KVM >> > and TCG guests when MTE support is requested, or will that not work >> > for the former? >> >> QEMU will error out if you try this with KVM (basically, same behaviour >> as before.) Is that a problem for libvirt, or merely a bit inconvinient? > > I'm actually a bit confused. The documentation for the mte property > of the virt machine type says > > mte > Set on/off to enable/disable emulating a guest CPU which implements > the Arm Memory Tagging Extensions. The default is off. > > So why is there a need to have a CPU property in addition to the > existing machine type property? I think the state prior to my patches is actually a bit confusing: the user needs to set a machine type property (causing tag memory to be allocated), which in turn enables a cpu feature. Supporting the machine type property for KVM does not make much sense IMHO: we don't allocate tag memory for KVM (in fact, that would not work). We have to keep the previous behaviour, and explicitly instructing QEMU to create cpus with a certain feature via a cpu property makes the most sense to me. We might want to tweak the documentation for the machine property to indicate that it creates tag memory and only implicitly enables mte but is a pre-req for it -- thoughts? > > From the libvirt integration point of view, setting the machine type > property only for TCG is not a problem. Ok.