[Skiboot] [PATCH] phb4: Fix TVE encoding for start address

Frederic Barrat fbarrat at linux.vnet.ibm.com
Fri Feb 3 22:23:16 AEDT 2017



Le 03/02/2017 à 04:37, Benjamin Herrenschmidt a écrit :
> On Fri, 2017-02-03 at 14:34 +1100, Alistair Popple wrote:
>> Do we also need the same fix to hw/phb3.c and hw/npu.c?
>>
>> I haven't tested this but it looks reasonable. If I'm not mistaken
>> the
>> old behaviour would have allowed a PCIe device to access addresses
>> below it's allocated PCIe bus address so this just increases
>> protection by further restricting device access.
>
> I *think* we always put 0 in there anyway, don't we ?
>
> As for PHB3 and NPU, check the spec to see where the bits are.


yeah, I think the OS only tries to write 0 in there. Though for 
capi2/CX5, I intend to try restricting to the capi window, which is why 
it caught my attention (DMA ops will be on tvt1). But that won't be in 
that function anyway.

For the sake of it, I've checked the phb3 spec. Same thing. I don't have 
the npu v1 spec. Alistair, if you can check, I could submit a followup 
patch to cover phb3 and npu.

   Fred




More information about the Skiboot mailing list