qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH RFC v4 19/20] intel_iommu: unmap existing pages


From: Jason Wang
Subject: Re: [Qemu-devel] [PATCH RFC v4 19/20] intel_iommu: unmap existing pages before replay
Date: Mon, 23 Jan 2017 18:29:32 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1



On 2017年01月23日 15:30, Peter Xu wrote:
On Mon, Jan 23, 2017 at 09:57:23AM +0800, Jason Wang wrote:

On 2017年01月22日 17:09, Peter Xu wrote:
On Sun, Jan 22, 2017 at 04:13:32PM +0800, Jason Wang wrote:
On 2017年01月20日 21:08, Peter Xu wrote:
Previous replay works for domain switch only if the original domain does
not have mapped pages. For example, if we switch domain from A to B, it
will only work if A has no existing mapping. If there is, then there's
problem - current replay didn't make sure the old mappings are cleared
before replaying the new one.
I'm not quite sure this is needed. I thought the only thing we need to do is
stop DMA of device during the moving? Or is there an example that will cause
trouble?
I think this patch is essential.

Example:

- device D1 moved to domain A, domain A has no mapping
- map page P1 in domain A, so D1 will have a mapping of page P1
- create domain B with mapping P2
- move D1 from domain A to domain B

Here if we don't unmap existing pages in domain A (P1),
I thought driver should do this work instead of device, because only driver
knows whether or not iova is still needed?
Do you mean "device driver" above?

I don't know whether I understood the question above, but the problem
should be there no matter which one is managing iova?

Thanks,

-- peterx

Yes, I misread the code, this is in fact triggered by guest.

Thanks



reply via email to

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