Ticket #73519: qemu_10.2_monterey_arm64_fix.patch
| File qemu_10.2_monterey_arm64_fix.patch, 1.9 KB (added by peterwwillis (Peter W), 3 months ago) |
|---|
-
target/arm/hvf/hvf.c
a b uint32_t hvf_arm_get_default_ipa_bit_size(void) 830 830 uint32_t hvf_arm_get_default_ipa_bit_size(void) 831 831 { 832 #if __MAC_OS_X_VERSION_MAX_ALLOWED >= 130000 832 833 uint32_t default_ipa_size; 833 834 hv_return_t ret = hv_vm_config_get_default_ipa_size(&default_ipa_size); 834 835 assert_hvf_ok(ret); 835 836 836 return default_ipa_size; 837 #else 838 /* hv_vm_config_get_default_ipa_size requires macOS 13+; on Monterey M1, default is 36 */ 839 return 36; 840 #endif 837 841 } 838 842 839 843 uint32_t hvf_arm_get_max_ipa_bit_size(void) 840 844 { 845 #if __MAC_OS_X_VERSION_MAX_ALLOWED >= 130000 841 846 uint32_t max_ipa_size; 842 847 hv_return_t ret = hv_vm_config_get_max_ipa_size(&max_ipa_size); 843 848 assert_hvf_ok(ret); 844 849 845 850 /* 846 851 * We clamp any IPA size we want to back the VM with to a valid PARange 847 852 * value so the guest doesn't try and map memory outside of the valid range. 848 853 * This logic just clamps the passed in IPA bit size to the first valid 849 854 * PARange value <= to it. 850 855 */ 851 856 return round_down_to_parange_bit_size(max_ipa_size);
