OSDN Git Service

powerpc/pseries/iommu: Update call to ibm, query-pe-dma-windows
authorLeonardo Bras <leobras.c@gmail.com>
Wed, 5 Aug 2020 03:04:53 +0000 (00:04 -0300)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 8 Sep 2020 12:57:11 +0000 (22:57 +1000)
commit80f0251231131d164eddab78d2b6c1b8e37d0093
tree0ce2434ba36062b03614bf98476e73edce2a79cc
parentcac3e629086f1b2e31c87a6c9b0130d29843ae86
powerpc/pseries/iommu: Update call to ibm, query-pe-dma-windows

>From LoPAR level 2.8, "ibm,ddw-extensions" index 3 can make the number of
outputs from "ibm,query-pe-dma-windows" go from 5 to 6.

This change of output size is meant to expand the address size of
largest_available_block PE TCE from 32-bit to 64-bit, which ends up
shifting page_size and migration_capable.

This ends up requiring the update of
ddw_query_response->largest_available_block from u32 to u64, and manually
assigning the values from the buffer into this struct, according to
output size.

Also, a routine was created for helping reading the ddw extensions as
suggested by LoPAR: First reading the size of the extension array from
index 0, checking if the property exists, and then returning it's value.

Signed-off-by: Leonardo Bras <leobras.c@gmail.com>
Tested-by: David Dai <zdai@linux.vnet.ibm.com>
Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200805030455.123024-3-leobras.c@gmail.com
arch/powerpc/platforms/pseries/iommu.c