[Skiboot] [PATCH] core/pci: Fix criteria in pci_cfg_reg_filter()

Gavin Shan gwshan at linux.vnet.ibm.com
Tue Nov 8 09:43:55 AEDT 2016


On Mon, Nov 07, 2016 at 05:56:58PM +1100, Stewart Smith wrote:
>Gavin Shan <gwshan at linux.vnet.ibm.com> writes:
>> The criteria to match the filter according to PCI config register
>> offset and length is strict one, meaning the accessed region should
>> matches with the filter's tracking region. However, the code isn't
>> correct enough - @len should be replaced with @pcrf->len.
>>
>> The strict matching has to account for the length of current PCI
>> config register access. We have to specify precise region through
>> @start and @len in pci_virt_add_filter() when creating the filter.
>> We lost flexibility. This changes the strict criteria to a relaxed
>> one - the matched filter is returned when the accessed region is
>> overlapped with the filter's region. With this change, the individual
>> filter's handlers should validate the accessed (register) region if
>> necessary.
>>
>> Fixes: 85daa7f00c50 ("core/pci: Support virtual device")
>> Signed-off-by: Gavin Shan <gwshan at linux.vnet.ibm.com>
>
>For some reason I marked this as "Accepted" in patchwork and didn't
>actually merge+push. My extreme bad.
>
>Anyway, merged to master as of e2fa37e75e428220940e0d901f0ad6d0cf0db37c
>

Thanks, Stewart.

>
>-- 
>Stewart Smith
>OPAL Architect, IBM.



More information about the Skiboot mailing list