hw/arm/virt: Rename variable size to region_size in virt_set_high_memmap()

This renames variable 'size' to 'region_size' in virt_set_high_memmap().
Its counterpart ('region_base') will be introduced in next patch.

No functional change intended.

Signed-off-by: Gavin Shan <gshan@redhat.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Reviewed-by: Marc Zyngier <maz@kernel.org>
Tested-by: Zhenyu Zhang <zhenyzha@redhat.com>
Message-id: 20221029224307.138822-3-gshan@redhat.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
Gavin Shan 2022-12-14 14:27:05 +00:00 committed by Peter Maydell
parent 4af6b6edec
commit 370bea9d1c
1 changed files with 8 additions and 7 deletions

View File

@ -1693,15 +1693,16 @@ static uint64_t virt_cpu_mp_affinity(VirtMachineState *vms, int idx)
static void virt_set_high_memmap(VirtMachineState *vms, static void virt_set_high_memmap(VirtMachineState *vms,
hwaddr base, int pa_bits) hwaddr base, int pa_bits)
{ {
hwaddr region_size;
bool fits;
int i; int i;
for (i = VIRT_LOWMEMMAP_LAST; i < ARRAY_SIZE(extended_memmap); i++) { for (i = VIRT_LOWMEMMAP_LAST; i < ARRAY_SIZE(extended_memmap); i++) {
hwaddr size = extended_memmap[i].size; region_size = extended_memmap[i].size;
bool fits;
base = ROUND_UP(base, size); base = ROUND_UP(base, region_size);
vms->memmap[i].base = base; vms->memmap[i].base = base;
vms->memmap[i].size = size; vms->memmap[i].size = region_size;
/* /*
* Check each device to see if they fit in the PA space, * Check each device to see if they fit in the PA space,
@ -1709,9 +1710,9 @@ static void virt_set_high_memmap(VirtMachineState *vms,
* *
* For each device that doesn't fit, disable it. * For each device that doesn't fit, disable it.
*/ */
fits = (base + size) <= BIT_ULL(pa_bits); fits = (base + region_size) <= BIT_ULL(pa_bits);
if (fits) { if (fits) {
vms->highest_gpa = base + size - 1; vms->highest_gpa = base + region_size - 1;
} }
switch (i) { switch (i) {
@ -1726,7 +1727,7 @@ static void virt_set_high_memmap(VirtMachineState *vms,
break; break;
} }
base += size; base += region_size;
} }
} }