|
From: | Paolo Bonzini |
Subject: | Re: [PATCH 1/1] Remove flatview_simplify() |
Date: | Tue, 30 Mar 2021 18:35:49 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 |
On 30/03/21 18:33, Richard Henderson wrote:
Flatview_simplify() can merge many small memory ranges into a large one and contains EHCI dma buffers. For example,the merged range maybe0xc0000-0xbfffffff. When seabios write PAM register to change the properties of part of the merged range from RW to readonly, this action cause the merged IOVA mapping will be unmapped.But EHCI device still send DMA cycles and then IOMMU blocks the DMA cycles of EHCI device.You've described the problem, and it is quite obviously *not* in memory.c.
Well, sort of.The problem is that neither VFIO nor KVM support atomically switching the memory map. For KVM that would be possible, for VFIO based on past discussion it would be much harder. Removing flatview_simplify() seems to be the easiest way to bypass the issue.
That said, perhaps it's better to keep the simplification within a page-sized range, to avoid introducing subpages unnecessarily.
Paolo
[Prev in Thread] | Current Thread | [Next in Thread] |