From: "Jan Beulich" Subject: Re: [PATCH RFC v2 1/4] x86/mm: Shadow and p2m changes for PV mem_access Date: Mon, 25 Aug 2014 08:33:28 +0100 Message-ID: <53FB02E8020000780002D09B@mail.emea.novell.com> References: <1404787805-4540-1-git-send-email-aravindp@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> <53F77EEC020000780002CC3E@mail.emea.novell.com> <97A500D504438F4ABC02EBA81613CC63318E04E7@xmb-aln-x02.cisco.com> <53F798D9.9090800@citrix.com> <97A500D504438F4ABC02EBA81613CC63318E057E@xmb-aln-x02.cisco.com> <53F7A1C3.3060007@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XLomR-0006Cp-LJ for xen-devel@lists.xenproject.org; Mon, 25 Aug 2014 07:33:31 +0000 In-Reply-To: <53F7A1C3.3060007@citrix.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)" , Andrew Cooper Cc: "xen-devel@lists.xenproject.org" , Keir Fraser , Ian Jackson , Ian Campbell , Tim Deegan List-Id: xen-devel@lists.xenproject.org >>> On 22.08.14 at 22:02, wrote: > On 22/08/14 20:48, Aravindh Puthiyaparambil (aravindp) wrote: >> Sigh, if only I could bound the CR0.WP solution :-( > > I wonder whether, in the case that mem_access is enabled, it would be > reasonable to perform the CR0.WP sections with interrupts disabled? Which still wouldn't cover NMIs (albeit we might be able to live with that). But what's worse - taking faults with interrupts disabled requires extra care, and annotating code normally run with interrupts enabled with the special .ex_table.pre annotations doesn't seem like a very nice route, as that could easily hide other problems in the future. Jan > The user/admin is already taking a performance hit from mem_access in > the first place, and delaying hardware interrupts a little almost > certainly a lesser evil than whatever mad scheme we devise to fix these > issues. > > With interrupts disabled, the CR0.WP problem is very well bounded. The > only faults which will occur will be as a direct result of the actions > performed, where the fault handlers will follow the extable redirection > and return quickly. > > ~Andrew