RE: [PATCH] memory: Optimize replay of guest mapping

2023-02-14 Thread Duan, Zhenzhong
a...@redhat.com; >phi...@linaro.org >Subject: Re: [PATCH] memory: Optimize replay of guest mapping > >On Tue, Feb 14, 2023 at 07:04:56AM +, Duan, Zhenzhong wrote: >> >> @@ -1936,7 +1935,7 @@ void >> >> memory_region_iommu_replay(IOMMUMemoryRegion *iommu_mr,

Re: [PATCH] memory: Optimize replay of guest mapping

2023-02-14 Thread Peter Xu
On Tue, Feb 14, 2023 at 07:04:56AM +, Duan, Zhenzhong wrote: > >> @@ -1936,7 +1935,7 @@ void > >> memory_region_iommu_replay(IOMMUMemoryRegion *iommu_mr, > >IOMMUNotifier > >> *n) > >> > >> granularity = memory_region_iommu_get_min_page_size(iommu_mr); > >> > >> -for (addr = 0; addr <

RE: [PATCH] memory: Optimize replay of guest mapping

2023-02-14 Thread Duan, Zhenzhong
com; da...@redhat.com; phi...@linaro.org >Subject: Re: [PATCH] memory: Optimize replay of guest mapping > >On Tue, Feb 14, 2023 at 11:43 AM Zhenzhong Duan > wrote: >> >> On x86, there are two notifiers registered due to vtd-ir memory region >> splitting the whol

Re: [PATCH] memory: Optimize replay of guest mapping

2023-02-14 Thread Jason Wang
On Tue, Feb 14, 2023 at 11:43 AM Zhenzhong Duan wrote: > > On x86, there are two notifiers registered due to vtd-ir memory region > splitting the whole address space. During replay of the address space > for each notifier, the whole address space is scanned which is > unnecessory. > > We only