On Mon, 23 Dec 2024 at 09:30, Joelle van Dyne <j...@getutm.app> wrote: > > 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 <j...@getutm.app> > --- > 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; > + }
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