diff mbox series

[PULL,28/30] target/arm/kvm: gic: Prevent creating userspace GICv3 with KVM

Message ID 20180209110314.11766-29-peter.maydell@linaro.org
State Accepted
Commit bd55947884b5421697d186016b0e57b1d6643fe0
Headers show
Series target-arm queue | expand

Commit Message

Peter Maydell Feb. 9, 2018, 11:03 a.m. UTC
From: Christoffer Dall <christoffer.dall@linaro.org>


KVM doesn't support emulating a GICv3 in userspace, only GICv2.  We
currently attempt this anyway, and as a result a KVM guest doesn't
receive interrupts and the user is left wondering why.  Report an error
to the user if this particular combination is requested.

Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

Message-id: 20180201205307.30343-1-christoffer.dall@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

---
 target/arm/kvm_arm.h | 4 ++++
 1 file changed, 4 insertions(+)

-- 
2.16.1
diff mbox series

Patch

diff --git a/target/arm/kvm_arm.h b/target/arm/kvm_arm.h
index ff53e9fafb..cfb7e5af72 100644
--- a/target/arm/kvm_arm.h
+++ b/target/arm/kvm_arm.h
@@ -234,6 +234,10 @@  static inline const char *gicv3_class_name(void)
         exit(1);
 #endif
     } else {
+        if (kvm_enabled()) {
+            error_report("Userspace GICv3 is not supported with KVM");
+            exit(1);
+        }
         return "arm-gicv3";
     }
 }