From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tim Deegan Subject: Re: [PATCH] Don't track all memory when enabling log dirty to track vram Date: Mon, 10 Feb 2014 09:03:14 +0100 Message-ID: <20140210080314.GA758@deinos.phlegethon.org> References: <1392012840-22555-1-git-send-email-yang.z.zhang@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1392012840-22555-1-git-send-email-yang.z.zhang@intel.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Yang Zhang Cc: andrew.cooper3@citrix.com, xiantao.zhang@intel.com, JBeulich@suse.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org At 14:14 +0800 on 10 Feb (1392038040), Yang Zhang wrote: > From: Yang Zhang > > When enabling log dirty mode, it sets all guest's memory to readonly. > And in HAP enabled domain, it modifies all EPT entries to clear write bit > to make sure it is readonly. This will cause problem if VT-d shares page > table with EPT: the device may issue a DMA write request, then VT-d engine > tells it the target memory is readonly and result in VT-d fault. So that's a problem even if only the VGA framebuffer is being tracked -- DMA from a passthrough device will either cause a spurious error or fail to update the dirt bitmap. I think it would be better not to allow VT-d and EPT to share pagetables in cases where devices are passed through (i.e. all cases where VT-d is in use). Tim.