Re: [RFC PATCH v2 2/2] kvm/arm64: Try stage2 block mapping for host device MMIO

2021-04-13 Thread Keqian Zhu
Hi Marc, On 2021/4/8 15:28, Keqian Zhu wrote: > Hi Marc, > > On 2021/4/7 21:18, Marc Zyngier wrote: >> On Tue, 16 Mar 2021 13:43:38 +, >> Keqian Zhu wrote: >>> [...] >>> >>> +/* >>> + * Find a mapping size that properly insides the intersection of vma and >>> + * memslot. And hva and pa h

Re: [RFC PATCH v2 2/2] kvm/arm64: Try stage2 block mapping for host device MMIO

2021-04-13 Thread Keqian Zhu
Hi Marc, I think I have fully tested this patch. The next step is to do some restriction on HVA in vfio module, so we can build block mapping for it with a higher probability. Is there anything to improve? If not, could you apply it? ^_^ Thanks, Keqian On 2021/4/7 21:18, Marc Zyngier wrote: >

Re: [RFC PATCH v2 2/2] kvm/arm64: Try stage2 block mapping for host device MMIO

2021-04-08 Thread Keqian Zhu
Hi Marc, On 2021/4/7 21:18, Marc Zyngier wrote: > On Tue, 16 Mar 2021 13:43:38 +, > Keqian Zhu wrote: >> >> The MMIO region of a device maybe huge (GB level), try to use >> block mapping in stage2 to speedup both map and unmap. >> >> Compared to normal memory mapping, we should consider two m

Re: [RFC PATCH v2 2/2] kvm/arm64: Try stage2 block mapping for host device MMIO

2021-04-07 Thread Marc Zyngier
On Tue, 16 Mar 2021 13:43:38 +, Keqian Zhu wrote: > > The MMIO region of a device maybe huge (GB level), try to use > block mapping in stage2 to speedup both map and unmap. > > Compared to normal memory mapping, we should consider two more > points when try block mapping for MMIO region: >

[RFC PATCH v2 2/2] kvm/arm64: Try stage2 block mapping for host device MMIO

2021-03-16 Thread Keqian Zhu
The MMIO region of a device maybe huge (GB level), try to use block mapping in stage2 to speedup both map and unmap. Compared to normal memory mapping, we should consider two more points when try block mapping for MMIO region: 1. For normal memory mapping, the PA(host physical address) and HVA ha