On Thu, 27 Nov 2025 22:55:19 +0000
Alireza Sanaee <[email protected]> wrote:
> Add a new memory-backend-tagged supports a tag property where you can
> find it based on tag. This is useful for scenarios where you want to add
> a piece of memory for a particular purpose to be passed for another
> device.
>
> At the moment, this only supports a ram-backed object where we add a tag
> to it, and it temporary. However, we are planning for a generalized
> approach. The plan is to have a shim object where we add a tag to it,
> and then it can be later linked to any BACKEND object types.
>
> Example use QMP API:
> {
>
> "execute": "object-add",
> "arguments": {
> "qom-type": "memory-backend-tagged",
> "id": "tm0",
> "size": 1073741824,
> "tag": "6be13bce-ae34-4a77-b6c3-16df975fcf1a"
> }
> }
>
> Tags are assumed to be UUID. But this is something for debate maybe.
>
> Signed-off-by: Alireza Sanaee <[email protected]>
Just to keep a note here on what we discussed offline
Given this doesn't end up with a shim, but rather would need a
variant for each potential backend type, I'd not do this and instead
(For now) anyway, just add tag as a property to the HostMemoryBackend
We can come up with a clever solution later if that isn't an acceptable
path forwards.
Jonathan