On 28/10/25 13:07, Richard Henderson wrote:
On 10/28/25 06:42, Philippe Mathieu-Daudé wrote:
Emit a warning when HVF doesn't return the IPA bit length
and return -1 as "this accelerator is not usable", allowing
QEMU to try with the next one (when using '-accel hvf:tcg').
Reported-by: Ivan Krasilnikov
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2981
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
---
hw/arm/virt.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index 175023897a7..1d65fa471dc 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -3225,8 +3225,12 @@ static int
virt_hvf_get_physical_address_range(MachineState *ms)
{
VirtMachineState *vms = VIRT_MACHINE(ms);
- int default_ipa_size = hvf_arm_get_default_ipa_bit_size();
- int max_ipa_size = hvf_arm_get_max_ipa_bit_size();
+ uint32_t default_ipa_size = hvf_arm_get_default_ipa_bit_size();
+ uint32_t max_ipa_size = hvf_arm_get_max_ipa_bit_size();
+ if (!default_ipa_size || !max_ipa_size) {
+ warn_report("HVF didn't report IPA bit length");
+ return -1;
+ }
I suppose this goes back to the previous patch.
It might have been slightly less confusing to merge them, but the
underlying questions about when and how this can fail remain.
Right. I'm dropping this patch.