Skip to contentSkip to conversation

Fix build of kvm-all.c when no KVM_CAP_IRQ_ROUTING

PATCH In review Jens Freimann 2 participants 2 messages Jun 5, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix build of kvm-all.c when no KVM_CAP_IRQ_ROUTING

In kvm-all.c an #ifdef KVM_CAP_IRQ_ROUTING was missing in two places which broke the build when this capability is not enabled. Found when building the s390-softmmu target.

---
 kvm-all.c |    4 ++++
 1 file changed, 4 insertions(+)
kvm-all.c +4 -0
index 489ee53..95634ef 100644
@@ -62,10 +62,12 @@ typedef struct KVMSlot
 
 typedef struct kvm_dirty_log KVMDirtyLog;
 
+#ifdef KVM_CAP_IRQ_ROUTING
 typedef struct KVMMSIRoute {
     struct kvm_irq_routing_entry kroute;
     QTAILQ_ENTRY(KVMMSIRoute) entry;
 } KVMMSIRoute;
+#endif
 
 struct KVMState
 {
@@ -1286,7 +1288,9 @@ int kvm_init(void)
     s->pit_state2 = kvm_check_extension(s, KVM_CAP_PIT_STATE2);
 #endif
 
+#ifdef KVM_CAP_IRQ_ROUTING
     s->direct_msi = (kvm_check_extension(s, KVM_CAP_SIGNAL_MSI) > 0);
+#endif
 
     ret = kvm_arch_init(s);
     if (ret < 0) {
Signature · 1 line
1.7.10.4
#1 lore raw

Am 05.06.2012 09:16, schrieb Jens Freimann:

Quoted 5 lines

In kvm-all.c an #ifdef KVM_CAP_IRQ_ROUTING was missing in two places which broke the build when this capability is not enabled. Found when building the s390-softmmu target.

A patch by Jan moves the first chunk instead and fixes another issue as well in v2. Cc'ing Jan to verify.

Andreas

Quoted 31 lines
---
 kvm-all.c |    4 ++++
 1 file changed, 4 insertions(+)
kvm-all.c +4 -0
index 489ee53..95634ef 100644
@@ -62,10 +62,12 @@ typedef struct KVMSlot
 
 typedef struct kvm_dirty_log KVMDirtyLog;
 
+#ifdef KVM_CAP_IRQ_ROUTING
 typedef struct KVMMSIRoute {
     struct kvm_irq_routing_entry kroute;
     QTAILQ_ENTRY(KVMMSIRoute) entry;
 } KVMMSIRoute;
+#endif
 
 struct KVMState
 {
@@ -1286,7 +1288,9 @@ int kvm_init(void)
     s->pit_state2 = kvm_check_extension(s, KVM_CAP_PIT_STATE2);
 #endif
 
+#ifdef KVM_CAP_IRQ_ROUTING
     s->direct_msi = (kvm_check_extension(s, KVM_CAP_SIGNAL_MSI) > 0);
+#endif
 
     ret = kvm_arch_init(s);
     if (ret < 0) {
Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg