File tree Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -50,6 +50,14 @@ bool vgic_has_its(struct kvm *kvm)
5050
5151bool vgic_supports_direct_msis (struct kvm * kvm )
5252{
53+ /*
54+ * Deliberately conflate vLPI and vSGI support on GICv4.1 hardware,
55+ * indirectly allowing userspace to control whether or not vPEs are
56+ * allocated for the VM.
57+ */
58+ if (system_supports_direct_sgis () && !vgic_supports_direct_sgis (kvm ))
59+ return false;
60+
5361 return kvm_vgic_global_state .has_gicv4 && vgic_has_its (kvm );
5462}
5563
Original file line number Diff line number Diff line change @@ -396,15 +396,7 @@ bool vgic_supports_direct_sgis(struct kvm *kvm);
396396
397397static inline bool vgic_supports_direct_irqs (struct kvm * kvm )
398398{
399- /*
400- * Deliberately conflate vLPI and vSGI support on GICv4.1 hardware,
401- * indirectly allowing userspace to control whether or not vPEs are
402- * allocated for the VM.
403- */
404- if (system_supports_direct_sgis ())
405- return vgic_supports_direct_sgis (kvm );
406-
407- return vgic_supports_direct_msis (kvm );
399+ return vgic_supports_direct_msis (kvm ) || vgic_supports_direct_sgis (kvm );
408400}
409401
410402int vgic_v4_init (struct kvm * kvm );
You can’t perform that action at this time.
0 commit comments