accel/kvm: Use negative KVM type for error propagation
commitbc3e41a0e8a3c932733dd363dfcfb38bf167b707
authorAkihiko Odaki <akihiko.odaki@daynix.com>
Tue, 22 Aug 2023 16:31:03 +0000 (22 17:31 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Tue, 22 Aug 2023 16:31:03 +0000 (22 17:31 +0100)
tree9561fa2a42d0c6f3a3b81f5826087cd07140cdb7
parent875b3eb88f7d09c0bd650b3d5f0e642d55f199bc
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>
accel/kvm/kvm-all.c
hw/arm/virt.c
hw/ppc/spapr.c