hw/arm/virt.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
Use TAG_GRANULE definition when creating the memory region where the
FEAT_MTE tags are stored.
Signed-off-by: Gustavo Romero <gromero@redhat.com>
---
hw/arm/virt.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index 9d192515d8..0d56197dac 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -2308,8 +2308,10 @@ static void create_tag_ram(MemoryRegion *tag_sysmem,
{
MemoryRegion *tagram = g_new(MemoryRegion, 1);
- memory_region_init_ram(tagram, NULL, name, size / 32, &error_fatal);
- memory_region_add_subregion(tag_sysmem, base / 32, tagram);
+ /* We store 2 granules in 1 byte. */
+ memory_region_init_ram(tagram, NULL, name, size / (2 * TAG_GRANULE),
+ &error_fatal);
+ memory_region_add_subregion(tag_sysmem, base / (2 * TAG_GRANULE), tagram);
}
static void create_secure_ram(VirtMachineState *vms,
--
2.47.3
On Fri, 9 Oct 2026 at 13:16, Gustavo Romero <gromero@redhat.com> wrote: > > Use TAG_GRANULE definition when creating the memory region where the > FEAT_MTE tags are stored. > > Signed-off-by: Gustavo Romero <gromero@redhat.com> > --- > hw/arm/virt.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) Applied to target-arm.next, thanks. -- PMM
On 9/10/26 14:15, Gustavo Romero wrote: > Use TAG_GRANULE definition when creating the memory region where the > FEAT_MTE tags are stored. > > Signed-off-by: Gustavo Romero <gromero@redhat.com> > --- > hw/arm/virt.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
© 2016 - 2026 Red Hat, Inc.