hw/arm/virt: Use TAG_GRANULE when creating tag memory
PATCH 1/1 hw/arm/virt: Use TAG_GRANULE when creating tag memory
Use TAG_GRANULE definition when creating the memory region where the FEAT_MTE tags are stored.
Signed-off-by Gustavo Romero <[email protected]>
--- hw/arm/virt.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
hw/arm/virt.c +4 -2
@@ -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,
Signature · 1 line
2.47.3
Quoted 7 lines · Gustavo Romero
Use
TAG_GRANULEdefinition when creating the memory region where theFEAT_MTEtags are stored.Signed-off-by Gustavo Romero <[email protected]>--- hw/arm/virt.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
Reviewed-by Philippe Mathieu-Daudé <[email protected]>
Peter Maydell
AppliedQuoted 8 lines · Gustavo Romero
Use
TAG_GRANULEdefinition when creating the memory region where theFEAT_MTEtags are stored.Signed-off-by Gustavo Romero <[email protected]>--- hw/arm/virt.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
Applied to target-arm.next, thanks.
-- PMM