Commit f869f1b
committed
NVIDIA: SAUCE: hw/vfio: adjust alignment for hugepfnmap
Qemu's determination of the VMA address for a region needs an
update to handle regions that may be a BAR, but with the actual
size of the mapping to not be at a power-of-2 alignment.
This happens for the case of Grace based systems, where the device
memory is exposed as a BAR. The mapping however is only of the
size of the actual physical memory, which may not be a power-of-2
aligned. This affects hugepfnmap mappings on such regions.
The current algorithm determines the VMA address alignment based
on the mapping alignment. This needs change so as to be based
on the next power-of-2 of the mapping size.
This patch updates the algorithm to achieve the alignment.
Signed-off-by: Ankit Agrawal <[email protected]>1 parent e60f89a commit f869f1b
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
252 | 252 | | |
253 | 253 | | |
254 | 254 | | |
255 | | - | |
| 255 | + | |
256 | 256 | | |
257 | 257 | | |
258 | 258 | | |
| |||
0 commit comments