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

Re: [Xen-devel] question on share ept page table with vtd



Andrew Cooper wrote on 2014-02-01:
> On 01/02/2014 00:29, Zhang, Yang Z wrote:
>> Hi all
>> 
>> I have a question with the page table share between EPT and VTD
>> which is
> enabled by default. Currently, we will enable log_dirty mode to track
> vram. And when first enable the log dirty mode, it will set all guest
> ram to readonly in EPT entry. The question is that if a page is
> current used as DMA write buffer, isn't it a problem?
>> 
>> best regards
>> yang
> 
> Looking at the code, it would indeed appear to be a problem.
> 
> Is has presumably gone unnoticed until now as all writes into the vram
> would have been from software, and hit the log_dirty logic, rather
> than DMA writes hitting the IOMMU.
> 

Yes, and I do saw the issue that caused by this that SRIOV fails issue with Xen 
4.4+qemu-xen-dir. 
http://www.gossamer-threads.com/lists/xen/devel/315663

There are two places that will call paging_log_dirty_enable() to enable log 
dirty mode: one is in vram tracking and on is in domain saving. Since VT-d is 
not recommended to use with saving/restore, so for latter case, it is OK. But 
for the vram tracking, I don't think we need to set all guest ram to readonly 
when first enable log dirty mode. Only set the memory range that used by vram 
is enough.
Furthermore, I think sharing EPT page table with VT-d is not a good idea since 
hypervisor can mark the ram as readonly in any time and in any usage mode in 
furture. If sharing page table is used, this will becomes impossible. 

> ~Andrew


Best regards,
Yang


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.