Gianni Tedesco
2010-Oct-18 17:26 UTC
[Xen-devel] [PATCH]: msi: Mask out multi-function flag from PCI_HEADER_TYPE in read_pci_mem_bar()
This leads to an erroneous WARN_ON and possibly other side effects. It seems to me that even multi-function devices ought to enjoy the privilege of MSI-X capabilities. Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com> diff -r fc2242ac90e1 xen/arch/x86/msi.c --- a/xen/arch/x86/msi.c Mon Oct 18 11:31:47 2010 +0100 +++ b/xen/arch/x86/msi.c Mon Oct 18 18:14:22 2010 +0100 @@ -527,7 +527,7 @@ static u64 read_pci_mem_bar(u8 bus, u8 s u8 limit; u32 addr; - switch ( pci_conf_read8(bus, slot, func, PCI_HEADER_TYPE) ) + switch ( pci_conf_read8(bus, slot, func, PCI_HEADER_TYPE) & 0x7f ) { case PCI_HEADER_TYPE_NORMAL: limit = 6; _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Jan Beulich
2010-Oct-19 07:21 UTC
[Xen-devel] Re: [PATCH]: msi: Mask out multi-function flag from PCI_HEADER_TYPE in read_pci_mem_bar()
Noticed I should have replied to this one.>>> On 18.10.10 at 19:26, Gianni Tedesco <gianni.tedesco@citrix.com> wrote: > This leads to an erroneous WARN_ON and possibly other side effects. It > seems to me that even multi-function devices ought to enjoy the > privilege of MSI-X capabilities. > > Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com>Acked-by: Jan Beulich <jbeulich@novell.com>> diff -r fc2242ac90e1 xen/arch/x86/msi.c > --- a/xen/arch/x86/msi.c Mon Oct 18 11:31:47 2010 +0100 > +++ b/xen/arch/x86/msi.c Mon Oct 18 18:14:22 2010 +0100 > @@ -527,7 +527,7 @@ static u64 read_pci_mem_bar(u8 bus, u8 s > u8 limit; > u32 addr; > > - switch ( pci_conf_read8(bus, slot, func, PCI_HEADER_TYPE) ) > + switch ( pci_conf_read8(bus, slot, func, PCI_HEADER_TYPE) & 0x7f ) > { > case PCI_HEADER_TYPE_NORMAL: > limit = 6;_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel