From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH RFC V2 2/6] xen: Optimize introspection access to guest state Date: Fri, 11 Jul 2014 19:09:25 +0100 Message-ID: <53C02855.5050806@citrix.com> References: <1405093418-23481-1-git-send-email-rcojocaru@bitdefender.com> <1405093418-23481-2-git-send-email-rcojocaru@bitdefender.com> <53C016A9.6070701@citrix.com> <53C026F5.1050102@bitdefender.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <53C026F5.1050102@bitdefender.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: Razvan Cojocaru , xen-devel@lists.xen.org Cc: mdontu@bitdefender.com, tim@xen.org, JBeulich@suse.com List-Id: xen-devel@lists.xenproject.org On 11/07/14 19:03, Razvan Cojocaru wrote: > On 07/11/2014 07:54 PM, Andrew Cooper wrote: >> On 11/07/14 16:43, Razvan Cojocaru wrote: >>> @@ -1407,6 +1464,9 @@ bool_t p2m_mem_access_check(paddr_t gpa, bool_t gla_valid, unsigned long gla, >>> if ( p2ma != p2m_access_n2rwx ) >>> vcpu_pause_nosync(v); >>> >>> + if ( req ) >>> + p2m_mem_event_fill_regs(req); >> Should this not be part of the if ( req ) just above the pause_nosync() ? > Yes, that would make it more readable. I wanted to make sure that the > vcpu is paused before filling in register data, but considering the > context in which this code executes, it shouldn't matter if I just move > it up. > > > Thanks, > Razvan Cojocaru vcpu_pause() & friends are purely scheduler accounting. Nothing in there will play with register state. ~Andrew