[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Xen-devel] [PATCH][VTD] pci mmcfg patch for x86-64 - version 3



 
>> +int __init pci_mmcfg_arch_init(void)
>> +{
>> +    return 1;
>> +}
>
>Should return 0.  And add a dummy pci_dev_base() function.
>
>

Done.  Added pci_dev_base() returning 0 in x86_32 version of mmconfig.c.


>> diff -r 6595393a3d28 xen/arch/x86/mmconfig_64.c
>> --- /dev/null        Thu Jan 01 00:00:00 1970 +0000
>> +++ b/xen/arch/x86/mmconfig_64.c     Tue Dec 09 06:42:13 2008 -0800
>
>Put following two functions in generic x86.
>
>> +int pci_mmcfg_read(unsigned int seg, unsigned int bus,
>> +                      unsigned int devfn, int reg, int len, 
>u32 *value)
>> +{
>> +    char __iomem *addr;
>> +
>> +    /* Why do we have this when nobody checks it. How about 
>a BUG()!? -AK */
>> +    if (unlikely((bus > 255) || (devfn > 255) || (reg > 4095))) {
>> +err:                *value = -1;
>> +            return -EINVAL;
>> +    }
>
>Also fail if (pci_probe & PCI_PROBE_MMCONF) == 0.  Or alternatively do
>this check in pci_dev_base().
>

I added the check in both read/write functions instead of pci_dev_base().  It 
is probably better from maintainence point as it is more straight forward.

Allen

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.