From: "Jan Beulich" Subject: Re: [PATCH RFC v2 1/4] x86/mm: Shadow and p2m changes for PV mem_access Date: Tue, 05 Aug 2014 07:33:13 +0100 Message-ID: <53E096C902000078000294A2@mail.emea.novell.com> References: <1404787805-4540-1-git-send-email-aravindp@cisco.com> <1404787805-4540-2-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> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XEYJB-0000hm-Gm for xen-devel@lists.xenproject.org; Tue, 05 Aug 2014 06:33:17 +0000 In-Reply-To: <97A500D504438F4ABC02EBA81613CC63318A2DBD@xmb-rcd-x02.cisco.com> Content-Disposition: inline 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)" Cc: "xen-devel@lists.xenproject.org" , Keir Fraser , Ian Jackson , Ian Campbell , Tim Deegan List-Id: xen-devel@lists.xenproject.org >>> On 05.08.14 at 02:14, wrote: >>>>> Good point. The only other thing I can think of to get around this >>>>> issue is to pause the domain during these writes and unpause it on the >>>>> way out of the guest access functions. >>>> >>>>If that's tolerable guest-performance-wise... >>> >>> It would be for the use cases we. The performance hit would only be for >>> users who want to watch for writes to memory that is shared between Xen >>and >>> the guest. Given that which variant would you prefer between the CR0.WP >>and >>> pagetable methods? >> >>Since the page table one has the overall smaller window of reduced >>protection, I think I'd prefer that one. However, judging the overhead >>acceptability by just the specific use case you have is perhaps >>insufficient for including your changes in the public tree, especially >>with no clear perspective of how to reduce it if someone indeed cared. > > I am a little lost by your statement about specific use case. People using > mem_access typically use it for security and guest inspection purposes. They > are aware of the performance hits that come along with that. Given that use > case, would you please reconsider including these changes? Or were you > talking about other use cases? No, at least not about unspecified hypothetical ones. But again - a vague statement like you gave, without any kind of quantification of the imposed overhead, isn't going to be good enough a judgment. After all pausing a domain can be quite problematic for its performance if that happens reasonably frequently. Otoh I admit that the user of your new mechanism has a certain level of control over the impact via the number of pages (s)he wants to write-protect. So yes, perhaps it isn't going to be too bad as long as the hackery you need to do isn't. Jan