[SLOF] [RFC PATCH] pci-properties: Enforce all MMIO BARs to be 64K page aligned

Nikunj A Dadhania nikunj at linux.vnet.ibm.com
Mon Dec 14 16:25:29 AEDT 2015


yongji xie <xyjxie at linux.vnet.ibm.com> writes:

> 在 2015/12/11 17:40, Nikunj A Dadhania 写道:
>> Yongji Xie <xyjxie at linux.vnet.ibm.com> writes:
>>
>>> QEMU may passthrough a pci device of which BARs are smaller than
>>> 64KB(PAGE_SIZE) to guest if all PCI MMIO BARs are page aligned in
>>> host. But these passthru-BARs' mmio page would be shared with other
>>> BARs in guest if guest doesn't support all PCI MMIO BARs to be page
>>> aligned. This would cause the pci-passthrough fail and mmio emulation
>>> happens in host.
>>>
>>> To solve this performance issue, this patch enforces the alignment
>>> of all MMIO BARs allocations to be at least 64K page aligned so that
>>> the mmio page of one BAR would not be shared with other BARs in guest.
>> So this would be basically hard-code (host page size 64k) page size. Is
>> there a better way to communicate this to the guest ?
> Yes, I know hard-code is not a good idea.

>> We can pass host page size in the device tree and make this generic.

> So you mean we can add a OF property like "ibm, mmio-bars-alignment"
> for phb device node in QEMU and pass it to SLOF? Thanks.

Yes, something like that.

Alexey, what will be the right place to put ?

Regards
Nikunj



More information about the SLOF mailing list