hw/arm/virt: handle hvf with unknown max IPA size
Quoted 15 lines · Joelle van Dyne
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 <[email protected]>--- hw/arm/virt.c | 5 +++++ 1 file changed, 5 insertions(+)hw/arm/virt.c +0
-0
hw/arm/virt.c static int virt_hvf_get_physical_address_range(MachineState *ms) · line 3059
Quoted 7 lines
hw/arm/virt.c +4
-0@@ -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 ; + }
When can this happen? There are other places where we call hvf_arm_get_max_ipa_bit_size() and assume it's valid. The implementation calls assert_hvf_ok(ret), so if it returns at all then we ought to have got a valid IPA size from macos...
thanks
-- PMM