qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

答复: [PATCH 1/1] Skip flatview_simplify() for cpu vendor zhaoxin


From: FelixCui-oc
Subject: 答复: [PATCH 1/1] Skip flatview_simplify() for cpu vendor zhaoxin
Date: Mon, 19 Oct 2020 06:55:52 +0000

hi paolo,


>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.         


What is the progress of handling this bug ? 

If the processing is more complicated, can we temporarily remove flatview_simplify()?


hi Alex,


>the issue here is that the delete+add passes are racing against an
>assigned device's DMA


Please help comment how to solve this problem.


Best regards

Felixcui-oc 



发件人: Paolo Bonzini <pbonzini@redhat.com>
发送时间: 2020年10月16日 19:42:29
收件人: FelixCui-oc; Richard Henderson; Eduardo Habkost; Alex Williamson
抄送: qemu-devel@nongnu.org; RockCui-oc; Tony W Wang-oc; CobeChen-oc; Alex Williamson
主题: Re: [PATCH 1/1] Skip flatview_simplify() for cpu vendor zhaoxin
 
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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]