From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH RFC v2 1/4] x86/mm: Shadow and p2m changes for PV mem_access Date: Fri, 22 Aug 2014 19:52:43 +0100 Message-ID: <53F7917B.6050806@citrix.com> References: <1404787805-4540-1-git-send-email-aravindp@cisco.com> <53D13457020000780002599B@mail.emea.novell.com> <97A500D504438F4ABC02EBA81613CC633188B795@xmb-aln-x02.cisco.com> <53D221270200007800025CEA@mail.emea.novell.com> <97A500D504438F4ABC02EBA81613CC633188BE3A@xmb-aln-x02.cisco.com> <53D60EA002000078000265FC@mail.emea.novell.com> <97A500D504438F4ABC02EBA81613CC633188EC46@xmb-aln-x02.cisco.com> <53D8B6AC0200007800027844@mail.emea.novell.com> <97A500D504438F4ABC02EBA81613CC633188EF44@xmb-aln-x02.cisco.com> <53DB52380200007800028448@mail.emea.novell.com> <97A500D504438F4ABC02EBA81613CC633188FBD7@xmb-aln-x02.cisco.com> <53DF4C6B0200007800028CA5@mail.emea.novell.com> <97A500D504438F4ABC02EBA81613CC63318A2DBD@xmb-rcd-x02.cisco.com> <53E096C902000078000294A2@mail.emea.novell.com> <97A500D504438F4ABC02EBA81613CC63318E00F6@xmb-aln-x02.cisco.com> <53F70E99.7030501@citrix.com> <97A500D504438F4ABC02EBA81613CC63318E0495@xmb-aln-x02.cisco.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XKtxR-0007Sv-9e for xen-devel@lists.xenproject.org; Fri, 22 Aug 2014 18:53:05 +0000 In-Reply-To: <97A500D504438F4ABC02EBA81613CC63318E0495@xmb-aln-x02.cisco.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: "Aravindh Puthiyaparambil (aravindp)" , Jan Beulich Cc: "xen-devel@lists.xenproject.org" , Tim Deegan , Keir Fraser , Ian Jackson , Ian Campbell List-Id: xen-devel@lists.xenproject.org On 22/08/14 19:28, Aravindh Puthiyaparambil (aravindp) wrote: >> Please find below a POC patch that includes pausing and unpausing the >> domain during the Xen writes to guest memory. I have it on top of the patch >> that was using CR0.WP to highlight the difference. Please take a look and let >> me know if this solution is acceptable. >>> PS: I do realize whatever I do to create_bounce_frame() will have to be >> reflected in the compat version. If this is correct approach I will do the same >> there too. >>> Thanks, >>> Aravindh >> I am concerned with the addition of a the vcpu specifics to >> shadow_write_entries(). Most of the shadow code is already vcpu centric >> where it should be domain centric, and steps are being made to alleviate >> these problems. > All the call sites of shadow_write_entries() are vcpu specific which I why I thought it was OK to extend this to shadow_write_entries(). What are the steps being taken to alleviate the problems? Maybe I can piggy back on them? You are not the first person to make this assumption. I have a patch series being worked on a "when I am not more busy" basis, but I don't think there is anything useful you could piggy back on. This problem aside, your current proposal does not work when crossing page boundaries where the adjacent page is also read-only. This is an issue which really does need fixing. Unfortunately, I am at a loss as to what to suggest. No practical solution comes to mind without using CR0.WP, and that has associated problem. ~Andrew