From e6bf350287c239f16261e83b094c6e29f79e2b12 Mon Sep 17 00:00:00 2001 From: yangfei Date: Sat, 26 Mar 2022 15:02:53 +0800 Subject: [PATCH] hw/arm/virt.c: Modify the pvtime ram size to 64Kib align Modify the ram size of pvtime to 64Kib align. When execute virsh dump it will check whether the memory of start/end address is align to guest's pagesize. If the host pagesize is 4Kib, it will assert when the guest is 16Kib or 64Kib align. --- hw/arm/virt.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index b81d22d68f..f09b9b9029 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -1966,9 +1966,6 @@ static void virt_cpu_post_init(VirtMachineState *vms, MemoryRegion *sysmem) MemoryRegion *pvtime = g_new(MemoryRegion, 1); hwaddr pvtime_size = max_cpus * PVTIME_SIZE_PER_CPU; - /* The memory region size must be a multiple of host page size. */ - pvtime_size = REAL_HOST_PAGE_ALIGN(pvtime_size); - if (pvtime_size > pvtime_reg_size) { error_report("pvtime requires a %" HWADDR_PRId " byte memory region for %d CPUs," @@ -1977,7 +1974,7 @@ static void virt_cpu_post_init(VirtMachineState *vms, MemoryRegion *sysmem) exit(1); } - memory_region_init_ram(pvtime, NULL, "pvtime", pvtime_size, NULL); + memory_region_init_ram(pvtime, NULL, "pvtime", pvtime_reg_size, NULL); memory_region_add_subregion(sysmem, pvtime_reg_base, pvtime); } -- Gitee