diff options
| author | Akihiko Odaki <akihiko.odaki@daynix.com> | 2023-08-22 17:31:03 +0100 |
|---|---|---|
| committer | Peter Maydell <peter.maydell@linaro.org> | 2023-08-22 17:31:03 +0100 |
| commit | bc3e41a0e8a3c932733dd363dfcfb38bf167b707 (patch) | |
| tree | 9561fa2a42d0c6f3a3b81f5826087cd07140cdb7 /hw/arm/virt.c | |
| parent | 875b3eb88f7d09c0bd650b3d5f0e642d55f199bc (diff) | |
| download | focaccia-qemu-bc3e41a0e8a3c932733dd363dfcfb38bf167b707.tar.gz focaccia-qemu-bc3e41a0e8a3c932733dd363dfcfb38bf167b707.zip | |
accel/kvm: Use negative KVM type for error propagation
On MIPS, kvm_arch_get_default_type() returns a negative value when an error occurred so handle the case. Also, let other machines return negative values when errors occur and declare returning a negative value as the correct way to propagate an error that happened when determining KVM type. Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Message-id: 20230727073134.134102-5-akihiko.odaki@daynix.com Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Diffstat (limited to 'hw/arm/virt.c')
| -rw-r--r-- | hw/arm/virt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 7d9dbc2663..83c05f1b9f 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -2913,7 +2913,7 @@ static int virt_kvm_type(MachineState *ms, const char *type_str) "require an IPA range (%d bits) larger than " "the one supported by the host (%d bits)", requested_pa_size, max_vm_pa_size); - exit(1); + return -1; } /* * We return the requested PA log size, unless KVM only supports |