Skip to contentSkip to conversation

KVM build breakage

PATCH Jes Sorensen 2 participants 4 messages Feb 24, 2009 – Feb 25, 2009 KVM

lore
Share & tools
lore
#0 lore raw

Hi,

A snapshot of Avi's tree as of today breaks on ia64. Looks like it is the recent MSI support that caused this.

Sheng Yang, please make sure to test on non x86 when you implement things like these that clearly will only build on x86.

This patch boots on ia64 for me.

Thanks,
Jes

CC arch/ia64/kvm/../../../virt/kvm/irq_comm.o
arch/ia64/kvm/../../../virt/kvm/irq_comm.c: In function 'kvm_set_msi':
arch/ia64/kvm/../../../virt/kvm/irq_comm.c:54: error: 'MSI_ADDR_DEST_ID_MASK' undeclared (first use in this function) arch/ia64/kvm/../../../virt/kvm/irq_comm.c:54: error: (Each undeclared identifier is reported only once arch/ia64/kvm/../../../virt/kvm/irq_comm.c:54: error: for each function it appears in.) arch/ia64/kvm/../../../virt/kvm/irq_comm.c:55: error: 'MSI_ADDR_DEST_ID_SHIFT' undeclared (first use in this function) arch/ia64/kvm/../../../virt/kvm/irq_comm.c:56: error: 'MSI_DATA_VECTOR_MASK' undeclared (first use in this function) arch/ia64/kvm/../../../virt/kvm/irq_comm.c:57: error: 'MSI_DATA_VECTOR_SHIFT' undeclared (first use in this function) arch/ia64/kvm/../../../virt/kvm/irq_comm.c:58: error: 'MSI_ADDR_DEST_MODE_SHIFT' undeclared (first use in this function) arch/ia64/kvm/../../../virt/kvm/irq_comm.c:60: error: 'MSI_DATA_TRIGGER_SHIFT' undeclared (first use in this function) arch/ia64/kvm/../../../virt/kvm/irq_comm.c:62: error: 'MSI_DATA_DELIVERY_MODE_SHIFT' undeclared (first use in this function) arch/ia64/kvm/../../../virt/kvm/irq_comm.c:76: error: implicit declaration of function 'kvm_apic_set_irq' make[1]: *** [arch/ia64/kvm/../../../virt/kvm/irq_comm.o] Error 1
make: *** [arch/ia64/kvm] Error 2

commit e4caaecb2fa206ee513756fe17593d7b3334be7b

Author: Sheng Yang <[email protected]>
Date:   Tue Feb 10 13:57:06 2009 +0800

KVM: Use irq routing API for MSI

Merge MSI userspace interface with IRQ routing table. Notice the
API have been
changed, and using IRQ routing table would be the only interface
kvm-userspace
supported.

Do not try to build MSI support on architectures where MSI definitions are not available.

---
 virt/kvm/irq_comm.c |    4 ++++
 1 file changed, 4 insertions(+)
virt/kvm/irq_comm.c +4 -0
Index: kvm/virt/kvm/irq_comm.c
===================================================================
@@ -45,6 +45,7 @@
 	return kvm_ioapic_set_irq(kvm->arch.vioapic, e->irqchip.pin, level);
 }
 
+#ifdef CONFIG_X86
 static int kvm_set_msi(struct kvm_kernel_irq_routing_entry *e,
 		       struct kvm *kvm, int level)
 {
@@ -95,6 +96,7 @@
 	}
 	return r;
 }
+#endif
 
 /* This should be called with the kvm->lock mutex held
  * Return value:
@@ -262,12 +264,14 @@
 		e->irqchip.irqchip = ue->u.irqchip.irqchip;
 		e->irqchip.pin = ue->u.irqchip.pin + delta;
 		break;
+#ifdef CONFIG_X86
 	case KVM_IRQ_ROUTING_MSI:
 		e->set = kvm_set_msi;
 		e->msi.address_lo = ue->u.msi.address_lo;
 		e->msi.address_hi = ue->u.msi.address_hi;
 		e->msi.data = ue->u.msi.data;
 		break;
+#endif
 	default:
 		goto out;
 	}
#1 lore raw

Hi, Jes
I have fixed it and the patches has been in kvm.git's master branch, please retry :)
Xiantao

-----Original Message-----
From: Jes Sorensen [mailto:[email protected]]
Sent: Wednesday, February 25, 2009 12:25 AM
To: Sheng Yang
Cc: Avi Kivity; [email protected]; [email protected]; Zhang, Xiantao
Subject: KVM build breakage

Hi,

A snapshot of Avi's tree as of today breaks on ia64. Looks like it is the recent MSI support that caused this.

Sheng Yang, please make sure to test on non x86 when you implement things like these that clearly will only build on x86.

This patch boots on ia64 for me.

Thanks,
Jes

CC arch/ia64/kvm/../../../virt/kvm/irq_comm.o
arch/ia64/kvm/../../../virt/kvm/irq_comm.c: In function 'kvm_set_msi':
arch/ia64/kvm/../../../virt/kvm/irq_comm.c:54: error:
'MSI_ADDR_DEST_ID_MASK' undeclared (first use in this function) arch/ia64/kvm/../../../virt/kvm/irq_comm.c:54: error: (Each undeclared identifier is reported only once arch/ia64/kvm/../../../virt/kvm/irq_comm.c:54: error: for each function it appears in.) arch/ia64/kvm/../../../virt/kvm/irq_comm.c:55: error:
'MSI_ADDR_DEST_ID_SHIFT' undeclared (first use in this function) arch/ia64/kvm/../../../virt/kvm/irq_comm.c:56: error:
'MSI_DATA_VECTOR_MASK' undeclared (first use in this function) arch/ia64/kvm/../../../virt/kvm/irq_comm.c:57: error:
'MSI_DATA_VECTOR_SHIFT' undeclared (first use in this function) arch/ia64/kvm/../../../virt/kvm/irq_comm.c:58: error:
'MSI_ADDR_DEST_MODE_SHIFT' undeclared (first use in this function) arch/ia64/kvm/../../../virt/kvm/irq_comm.c:60: error:
'MSI_DATA_TRIGGER_SHIFT' undeclared (first use in this function) arch/ia64/kvm/../../../virt/kvm/irq_comm.c:62: error:
'MSI_DATA_DELIVERY_MODE_SHIFT' undeclared (first use in this function) arch/ia64/kvm/../../../virt/kvm/irq_comm.c:76: error: implicit declaration of function 'kvm_apic_set_irq'
make[1]: *** [arch/ia64/kvm/../../../virt/kvm/irq_comm.o] Error 1
make: *** [arch/ia64/kvm] Error 2

commit e4caaecb2fa206ee513756fe17593d7b3334be7b

Author: Sheng Yang <[email protected]>
Date:   Tue Feb 10 13:57:06 2009 +0800

KVM: Use irq routing API for MSI

Merge MSI userspace interface with IRQ routing table. Notice the
API have been
changed, and using IRQ routing table would be the only interface
kvm-userspace
supported.

#2 lore raw
Quoted 3 lines · Xiantao

Hi, Jes
I have fixed it and the patches has been in kvm.git's master branch, please retry :)
Xiantao

Hi Xiantao,

Good timing, you must have pushed it right after I pulled it down for my testing. This seems to work for me, but it will still break for PowerPC I think.

Cheers,
Jes

#3 lore raw

PPC doesn't compile this source file, I think :)
Xiantao

-----Original Message-----
From: Jes Sorensen [mailto:[email protected]]
Sent: Wednesday, February 25, 2009 6:06 PM
To: Zhang, Xiantao
Cc: Sheng Yang; Avi Kivity; [email protected]; [email protected]
Subject: Re: KVM build breakage

Quoted 3 lines · Xiantao

Hi, Jes
I have fixed it and the patches has been in kvm.git's master branch, please retry :)
Xiantao

Hi Xiantao,

Good timing, you must have pushed it right after I pulled it down for my testing. This seems to work for me, but it will still break for PowerPC I think.

Cheers,
Jes