MSI-X for PV was broken, make it work again. diff -r 8566781df55e drivers/xen/pciback/conf_space_capability_msi.c --- a/drivers/xen/pciback/conf_space_capability_msi.c Mon Sep 01 10:46:19 2008 +0100 +++ b/drivers/xen/pciback/conf_space_capability_msi.c Thu Sep 04 19:26:31 2008 -0400 @@ -51,6 +51,11 @@ } result = pci_enable_msix(dev, entries, op->value); + + for (i = 0; i < op->value; i++) + op->msix_entries[i].entry = entries[i].entry; + op->msix_entries[i].vector = entries[i].vector; + op->value = result; } _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Sorry, missed following again: Signed-off-by: Yu Zhao <yu.zhao@intel.com>>-----Original Message----- >From: Zhao, Yu >Sent: Thursday, September 04, 2008 7:58 PM >To: Keir.Fraser@cl.cam.ac.uk >Cc: xen-devel@lists.xensource.com >Subject: [PATCH] fix PV MSI-X > >MSI-X for PV was broken, make it work again. > >diff -r 8566781df55e drivers/xen/pciback/conf_space_capability_msi.c >--- a/drivers/xen/pciback/conf_space_capability_msi.c Mon Sep 01 10:46:19 >2008 +0100 >+++ b/drivers/xen/pciback/conf_space_capability_msi.c Thu Sep 04 19:26:31 >2008 -0400 >@@ -51,6 +51,11 @@ > } > > result = pci_enable_msix(dev, entries, op->value); >+ >+ for (i = 0; i < op->value; i++) >+ op->msix_entries[i].entry = entries[i].entry; >+ op->msix_entries[i].vector = entries[i].vector; >+ > op->value = result; > } >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
You haven''t put brackets around what is presumably supposed to be a multi-statement block. Did you test this patch? Please send one that at least passes casual observation. :-) -- Keir On 4/9/08 12:57, "Zhao, Yu" <yu.zhao@intel.com> wrote:> MSI-X for PV was broken, make it work again. > > diff -r 8566781df55e drivers/xen/pciback/conf_space_capability_msi.c > --- a/drivers/xen/pciback/conf_space_capability_msi.c Mon Sep 01 10:46:19 2008 > +0100 > +++ b/drivers/xen/pciback/conf_space_capability_msi.c Thu Sep 04 19:26:31 2008 > -0400 > @@ -51,6 +51,11 @@ > } > > result = pci_enable_msix(dev, entries, op->value); > + > + for (i = 0; i < op->value; i++) > + op->msix_entries[i].entry = entries[i].entry; > + op->msix_entries[i].vector = entries[i].vector; > + > op->value = result; > } >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
A bee in a hurry made stupid mistake... did test following patch this time :-) Signed-off-by: Yu Zhao <yu.zhao@intel.com> diff -r 8566781df55e drivers/xen/pciback/conf_space_capability_msi.c --- a/drivers/xen/pciback/conf_space_capability_msi.c Mon Sep 01 10:46:19 2008 +0100 +++ b/drivers/xen/pciback/conf_space_capability_msi.c Thu Sep 04 22:01:01 2008 -0400 @@ -37,22 +37,26 @@ int pciback_enable_msix(struct pciback_device *pdev, struct pci_dev *dev, struct xen_pci_op *op) { + int i; int result; + struct msix_entry entries[op->value]; if (op->value > SH_INFO_MAX_VEC) return -EINVAL; - else { - struct msix_entry entries[op->value]; - int i; - for (i = 0; i < op->value; i++) { - entries[i].entry = op->msix_entries[i].entry; - entries[i].vector = op->msix_entries[i].vector; - } + for (i = 0; i < op->value; i++) { + entries[i].entry = op->msix_entries[i].entry; + entries[i].vector = op->msix_entries[i].vector; + } - result = pci_enable_msix(dev, entries, op->value); - op->value = result; + result = pci_enable_msix(dev, entries, op->value); + + for (i = 0; i < op->value; i++) { + op->msix_entries[i].entry = entries[i].entry; + op->msix_entries[i].vector = entries[i].vector; } + + op->value = result; return result; }>-----Original Message----- >From: Keir Fraser [mailto:keir.fraser@eu.citrix.com] >Sent: Thursday, September 04, 2008 8:52 PM >To: Zhao, Yu >Cc: xen-devel@lists.xensource.com >Subject: Re: [PATCH] fix PV MSI-X > >You haven''t put brackets around what is presumably supposed to be a >multi-statement block. Did you test this patch? Please send one that at >least passes casual observation. :-) > > -- Keir > >On 4/9/08 12:57, "Zhao, Yu" <yu.zhao@intel.com> wrote: > >> MSI-X for PV was broken, make it work again. >> >> diff -r 8566781df55e drivers/xen/pciback/conf_space_capability_msi.c >> --- a/drivers/xen/pciback/conf_space_capability_msi.c Mon Sep 01 10:46:19 >2008 >> +0100 >> +++ b/drivers/xen/pciback/conf_space_capability_msi.c Thu Sep 04 19:26:31 >2008 >> -0400 >> @@ -51,6 +51,11 @@ >> } >> >> result = pci_enable_msix(dev, entries, op->value); >> + >> + for (i = 0; i < op->value; i++) >> + op->msix_entries[i].entry = entries[i].entry; >> + op->msix_entries[i].vector = entries[i].vector; >> + >> op->value = result; >> } >> >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel