]> git.proxmox.com Git - qemu.git/blobdiff - target-arm/kvm.c
target-arm: Fix incorrect check of kvm_vcpu_ioctl return value
[qemu.git] / target-arm / kvm.c
index 6bfb10350b621cf44c290d3d9d738edd8828894f..b7bdc034fd9b18998106c50c28925f2a54ad2d83 100644 (file)
@@ -21,7 +21,7 @@
 #include "sysemu/kvm.h"
 #include "kvm_arm.h"
 #include "cpu.h"
-#include "hw/arm.h"
+#include "hw/arm/arm.h"
 
 const KVMCapabilityInfo kvm_arch_required_capabilities[] = {
     KVM_CAP_LAST_INFO
@@ -62,8 +62,8 @@ int kvm_arch_init_vcpu(CPUState *cs)
     r.id = KVM_REG_ARM | KVM_REG_SIZE_U64 | KVM_REG_ARM_VFP | 31;
     r.addr = (uintptr_t)(&v);
     ret = kvm_vcpu_ioctl(cs, KVM_GET_ONE_REG, &r);
-    if (ret == ENOENT) {
-        return EINVAL;
+    if (ret == -ENOENT) {
+        return -EINVAL;
     }
     return ret;
 }