From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Jan Beulich" Subject: Re: [PATCH V4 5/5] xen: Handle resumed instruction based on previous mem_event reply Date: Mon, 08 Sep 2014 16:50:02 +0100 Message-ID: <540DEC4A02000078000322A8@mail.emea.novell.com> References: <1409911297-3360-1-git-send-email-rcojocaru@bitdefender.com> <1409911297-3360-6-git-send-email-rcojocaru@bitdefender.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 1XR1Ch-0002WQ-RE for xen-devel@lists.xenproject.org; Mon, 08 Sep 2014 15:50:07 +0000 In-Reply-To: <1409911297-3360-6-git-send-email-rcojocaru@bitdefender.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: Razvan Cojocaru Cc: kevin.tian@intel.com, keir@xen.org, ian.campbell@citrix.com, stefano.stabellini@eu.citrix.com, andrew.cooper3@citrix.com, eddie.dong@intel.com, tim@xen.org, jun.nakajima@intel.com, xen-devel@lists.xenproject.org, ian.jackson@eu.citrix.com List-Id: xen-devel@lists.xenproject.org >>> On 05.09.14 at 12:01, wrote: > --- a/xen/arch/x86/hvm/vmx/vmx.c > +++ b/xen/arch/x86/hvm/vmx/vmx.c > @@ -1695,6 +1695,21 @@ static void vmx_enable_msr_exit_interception(struct domain *d) > MSR_TYPE_W); > } > > +static bool_t vmx_exited_by_nested_pagefault(void) > +{ > + unsigned long exit_qualification, exit_reason; > + > + __vmread(VM_EXIT_REASON, &exit_reason); > + ASSERT(exit_reason == EXIT_REASON_EPT_VIOLATION); > + > + __vmread(EXIT_QUALIFICATION, &exit_qualification); > + > + if ( (exit_qualification & EPT_GLA_FAULT) == 0 ) > + return 0; > + > + return 1; > +} So I said a number of times that I think this new function can go away with the recent changes introducing struct npfec, making the interesting bit of information already available to p2m_mem_access_check() if I'm not mistaken. And the previous excuse of that code not being committed yet is no longer valid. Jan