Skip to contentSkip to conversation

pvops dom0 20090821 issue (msi)

PATCH RESEND New Daniel Schroeder 3 participants 5 messages Aug 21, 2009 – Aug 25, 2009 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

Hi Jeremy,

compilation[1] breaks with:

grep -i msi .config
CONFIG_ARCH_SUPPORTS_MSI=y
# CONFIG_PCI_MSI is not set

with msi configured it compiles...

grep -i msi .config
CONFIG_ARCH_SUPPORTS_MSI=y
CONFIG_PCI_MSI=y

may be its related, this compiled kernel is waiting forever at boot time during "starting xen control daemon"...three finger salute stalls after "unmounting network filesystems"...

if i add pci=nomsi system boots up and everything is fine :)

-
daniel

[1]
CHK include/linux/version.h
CHK include/linux/utsrelease.h
SYMLINK include/asm -> include/asm-x86

  CALL    scripts/checksyscalls.sh
  CHK     include/linux/compile.h
  CC      arch/x86/xen/pci.o

arch/x86/xen/pci.c: In function 'xen_setup_msi_irqs':
arch/x86/xen/pci.c:96: error: 'struct pci_dev' has no member named 'msi_list'
arch/x86/xen/pci.c:96: error: 'struct pci_dev' has no member named 'msi_list'
make[2]: *** [arch/x86/xen/pci.o] Error 1
make[1]: *** [arch/x86/xen] Error 2
make: *** [arch/x86] Error 2
make: *** Waiting for unfinished jobs....

#1 lore raw
Quoted 14 lines · Daniel Schroeder

Hi Jeremy,

compilation[1] breaks with:

grep -i msi .config
CONFIG_ARCH_SUPPORTS_MSI=y
# CONFIG_PCI_MSI is not set

with msi configured it compiles...

grep -i msi .config
CONFIG_ARCH_SUPPORTS_MSI=y
CONFIG_PCI_MSI=y

Quoted 6 lines

may be its related, this compiled kernel is waiting forever at boot time during "starting xen control daemon"...three finger salute stalls after "unmounting network filesystems"...

if i add pci=nomsi system boots up and everything is fine :)

Qing He, any thoughts?

J

Quoted 23 lines

-
daniel

[1]
CHK include/linux/version.h
CHK include/linux/utsrelease.h
SYMLINK include/asm -> include/asm-x86

  CALL    scripts/checksyscalls.sh
  CHK     include/linux/compile.h
  CC      arch/x86/xen/pci.o

arch/x86/xen/pci.c: In function 'xen_setup_msi_irqs':
arch/x86/xen/pci.c:96: error: 'struct pci_dev' has no member named 'msi_list'
arch/x86/xen/pci.c:96: error: 'struct pci_dev' has no member named 'msi_list'
make[2]: *** [arch/x86/xen/pci.o] Error 1
make[1]: *** [arch/x86/xen] Error 2
make: *** [arch/x86] Error 2
make: *** Waiting for unfinished jobs....

A message that is not in the archive (sent off-list or not yet received): 20090824094357.GA32567@ub-qhe2

#3 lore raw

Hi Qing,

Quoted 6 lines · Qing He
Quoted 2 lines

if i add pci=nomsi system boots up and everything is fine :)

What userspace program are you using? I can't find these output message ("xen control daemon") on my system. Do you get the {xen,kernel} dmesg? That may help to identify the problem. And what's your environment?

the system is booting through to this message...this is the message that /etc/init.d/xend gets started...so, i get pretty much everything, but the system strangely stalls...to my surprise, system reacts to three finger salute but stalls after reboot message...

Environment is a PE2900, dual quad Xeon, 24GB ram, 64bit gentoo linux, xen from 3.4 unstable tree...so 3.4.2-rc1-pre at the moment...

-
daniel

#4 lore raw
In reply to a message not in the archive
Quoted 11 lines · Qing He
Quoted 9 lines · Daniel Schroeder

Hi Jeremy,

compilation[1] breaks with:

grep -i msi .config
CONFIG_ARCH_SUPPORTS_MSI=y
# CONFIG_PCI_MSI is not set

Quoted 6 lines

Hi Daniel,

The attached patch should fix this,and also another compilation error of missing domid_t decalaration in drivers/xen/pci.c introduced by map_pirq physop calls.

Could you repost with a commit comment and signed-off-by line?

Thanks,
J

#5 lore raw

PATCH RESEND 1/1 xen: fix msi build errors

This patch fixes the following build errors:
- when CONFIG_PCI_MSI is not set
- domid_t undefined in drivers/xen/pci.c

and warnings of unused function definitions

---

arch/x86/include/asm/xen/pci.h +8 -4
index 714443b..cb84abe 100644
@@ -7,24 +7,28 @@ int xen_create_msi_irq(struct pci_dev *dev,
 			struct msi_desc *msidesc,
 			int type);
 int xen_destroy_irq(int irq);
-int xen_setup_msi_irqs(struct pci_dev *dev, int nvec, int type);
 #else
 static inline int xen_register_gsi(u32 gsi, int triggering, int polarity)
 {
 	return -1;
 }
 
-static int xen_create_msi_irq(struct pci_dev *dev,
+static inline int xen_create_msi_irq(struct pci_dev *dev,
 				struct msi_desc *msidesc,
 				int type)
 {
 	return -1;
 }
-static int xen_destroy_irq(int irq)
+static inline int xen_destroy_irq(int irq)
 {
 	return -1;
 }
-static int xen_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)
+#endif
+
+#if defined(CONFIG_PCI_MSI) && defined(CONFIG_XEN_DOM0_PCI)
+int xen_setup_msi_irqs(struct pci_dev *dev, int nvec, int type);
+#else
+static inline int xen_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)
 {
 	return -1;
 }
arch/x86/xen/pci.c +2 -0
index c0ef627..60bab67 100644
@@ -87,6 +87,7 @@ void __init xen_setup_pirqs(void)
 	}
 }
 
+#ifdef CONFIG_PCI_MSI
 int xen_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)
 {
 	unsigned int irq;
@@ -108,3 +109,4 @@ error:
 	xen_destroy_irq(irq);
 	return ret;
 }
+#endif
drivers/xen/events.c +2 -0
index 409c300..007b1d7 100644
@@ -574,6 +574,7 @@ out:
 	return irq;
 }
 
+#ifdef CONFIG_PCI_MSI
 int xen_destroy_irq(int irq)
 {
 	struct irq_desc *desc;
@@ -659,6 +660,7 @@ out:
 	spin_unlock(&irq_mapping_update_lock);
 	return irq;
 }
+#endif
 
 int xen_vector_from_irq(unsigned irq)
 {
drivers/xen/pci.c +3 -0
index 5156278..a7051f1 100644
@@ -18,8 +18,11 @@
  */
 
 #include <linux/pci.h>
+
+#include <xen/interface/xen.h>
 #include <xen/interface/physdev.h>
 #include <asm/xen/hypercall.h>
+
 #include "../pci/pci.h"