From xen-devel-bounces@lists.xen.org Tue Feb 11 09:07:46 2014 Received: (at maildrop) by bugs.xenproject.org; 11 Feb 2014 09:07:46 +0000 Received: from lists.xen.org ([50.57.142.19]) by bugs.xenproject.org with esmtp (Exim 4.80) (envelope-from ) id 1WD9Ji-000237-0F for xen-devel-maildrop-Eithu9ie@bugs.xenproject.org; Tue, 11 Feb 2014 09:07:46 +0000 Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WD9EK-00059k-NZ; Tue, 11 Feb 2014 09:02:12 +0000 Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WD9EJ-00059f-69 for xen-devel@lists.xen.org; Tue, 11 Feb 2014 09:02:11 +0000 Received: from [85.158.143.35:35409] by server-2.bemta-4.messagelabs.com id 92/2E-10891-217E9F25; Tue, 11 Feb 2014 09:02:10 +0000 X-Env-Sender: tim@xen.org X-Msg-Ref: server-12.tower-21.messagelabs.com!1392109327!4735289!1 X-Originating-IP: [5.39.92.215] X-SpamReason: No, hits=0.2 required=7.0 tests=RCVD_ILLEGAL_IP X-StarScan-Received: X-StarScan-Version: 6.9.16; banners=-,-,- X-VirusChecked: Checked Received: (qmail 31313 invoked from network); 11 Feb 2014 09:02:07 -0000 Received: from deinos.phlegethon.org (HELO mail.phlegethon.org) (5.39.92.215) by server-12.tower-21.messagelabs.com with DHE-RSA-AES256-SHA encrypted SMTP; 11 Feb 2014 09:02:07 -0000 Received: from tjd by mail.phlegethon.org with local (Exim 4.82 (FreeBSD)) (envelope-from ) id 1WD9EA-000ONR-NP; Tue, 11 Feb 2014 09:02:02 +0000 Date: Tue, 11 Feb 2014 10:02:02 +0100 From: Tim Deegan To: "Zhang, Yang Z" Message-ID: <20140211090202.GC92054@deinos.phlegethon.org> References: <1392012840-22555-1-git-send-email-yang.z.zhang@intel.com> <20140210080314.GA758@deinos.phlegethon.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.22 (2013-10-16) X-SA-Known-Good: Yes X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: tim@xen.org X-SA-Exim-Scanned: No (on mail.phlegethon.org); SAEximRunCond expanded to false Cc: "andrew.cooper3@citrix.com" , "Zhang, Xiantao" , "JBeulich@suse.com" , "xen-devel@lists.xen.org" Subject: Re: [Xen-devel] [PATCH] Don't track all memory when enabling log dirty to track vram X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org At 08:15 +0000 on 10 Feb (1392016516), Zhang, Yang Z wrote: > Tim Deegan wrote on 2014-02-10: > > 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. > > Do you mean the VGA frambuffer will be used as DMA buffer in guest? If yes, I think it's guest's responsibility to ensure it never happens. > I don't think that works. We can't expect arbitrary OSes to (a) know they're running on Xen and (b) know that that means they can't DMA to or from their framebuffers. > Without VT-d and EPT share page, we still cannot track the memory > updating from DMA. Yeah, but at least we don't risk crashing the _host_ by throwing DMA failures around. > I think the point is that we cannot track the > memory updating via DMA. So the user should use the log dirty mode > carefully. Also, I am not sure whether the memory updating from dom0 > and QEMU is tracked currently. Yes, dom0 and qemu updates are tracked in the log-dirty bitmaps. Tim. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel