From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ed White Subject: Re: [PATCH 00/11] Alternate p2m: support multiple copies of host p2m Date: Thu, 15 Jan 2015 09:28:07 -0800 Message-ID: <54B7F8A7.2010407@intel.com> References: <1420838801-11704-1-git-send-email-edmund.h.white@intel.com> <54B56B79.3010109@citrix.com> <54B579CD.60804@intel.com> <54B583FC.4060800@citrix.com> <54B58E90.20309@intel.com> <54B6151402000078000C580B@mail.emea.novell.com> <54B65C920200007800054BAD@mail.emea.novell.com> <54B6A8D9.904@intel.com> <54B78555020000780005526B@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <54B78555020000780005526B@mail.emea.novell.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: Jan Beulich , Tamas K Lengyel Cc: Keir Fraser , Ian Campbell , Andrew Cooper , Tim Deegan , "xen-devel@lists.xen.org" , Ian Jackson List-Id: xen-devel@lists.xenproject.org On 01/15/2015 12:16 AM, Jan Beulich wrote: >>>> On 14.01.15 at 18:35, wrote: >> On 01/14/2015 03:28 AM, Tamas K Lengyel wrote: >>> At the mem_access trap point you can swap in an altp2m where the >>> gfn->mfn mapping is the one where the breakpoints are hidden, >>> singlestep, then swap the original p2m back. While this approach still >>> has some overhead because of the use of singlestepping, it is going to >>> be faster then what you currently have to do, which is removing all >>> breakpoints, singlestep, then put breakpoints back. Now it would just >>> be a matter of swapping a single pointer. >> >> Right. The key observation is that at any single point in time, a given >> hardware thread can be fetching an instruction or reading data, but not >> both. > > Fine, as long as an instruction reading itself isn't going to lead to > a live lock. > That's not how the hardware works. By the time you figure out that the instruction you are executing reads memory, the instruction itself has been fetched and decoded. That won't happen again during this execution. That's true for every CPU I've ever seen, not just Intel ones. Ed