diff --git a/patches/qemu-9.1.2-utm.patch b/patches/qemu-9.1.2-utm.patch index bec97cfbf..8b854858a 100644 --- a/patches/qemu-9.1.2-utm.patch +++ b/patches/qemu-9.1.2-utm.patch @@ -1123,3 +1123,36 @@ index a63a7763a0..141fd35300 100644 -- 2.41.0 +From 6aca8e564507533c53258abf08c0d283ccb207b7 Mon Sep 17 00:00:00 2001 +From: Joelle van Dyne +Date: Mon, 23 Dec 2024 00:15:08 -0800 +Subject: [PATCH v3 3/3] hw/arm/virt: handle hvf with unknown max IPA size + +When it is not possible to determine the max IPA bit size, the helper +function will return 0. We do not try to set up the memmap in this case +and instead fall back to the default in machvirt_init(). + +Signed-off-by: Joelle van Dyne +--- + hw/arm/virt.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/hw/arm/virt.c b/hw/arm/virt.c +index f9b3380815..8c431e24b3 100644 +--- a/hw/arm/virt.c ++++ b/hw/arm/virt.c +@@ -3053,6 +3053,11 @@ static int virt_hvf_get_physical_address_range(MachineState *ms) + int default_ipa_size = hvf_arm_get_default_ipa_bit_size(); + int max_ipa_size = hvf_arm_get_max_ipa_bit_size(); + ++ /* Unknown max ipa size, we'll let the caller figure it out */ ++ if (max_ipa_size == 0) { ++ return 0; ++ } ++ + /* We freeze the memory map to compute the highest gpa */ + virt_set_memmap(vms, max_ipa_size); + +-- +2.41.0 +