On 16/10/20 13:29, FelixCuioc wrote: > The issue here is that an assinged EHCI device accesses > an adjacent mapping between the delete and add phases > of the VFIO MemoryListener. > We want to skip flatview_simplify() is to prevent EHCI > device IOVA mappings from being unmapped.
Hi, there is indeed a bug, but I have already explained last month (https://mail.gnu.org/archive/html/qemu-devel/2020-09/msg01279.html) that this patch is conceptually wrong: 1) you're adding host_get_vendor conditioned on compiling the x86 emulator, so you are breaking compilation on non-x86 machines. 2) you're adding a check for the host, but the bug applies to all hosts. If there is a bug on x86 hardware emulation, it should be fixed even when emulating x86 from ARM. It should also apply to all CPU vendors. Alex, the issue here is that the delete+add passes are racing against an assigned device's DMA. For KVM we were thinking of changing the whole memory map with a single ioctl, but that's much easier because KVM builds its page tables lazily. It would be possible for the IOMMU too but it would require a relatively complicated comparison of the old and new memory maps in the kernel. Paolo