From mboxrd@z Thu Jan 1 00:00:00 1970 From: Razvan Cojocaru Subject: Re: [PATCH V4 5/5] xen: Handle resumed instruction based on previous mem_event reply Date: Mon, 08 Sep 2014 18:53:43 +0300 Message-ID: <540DD107.8010000@bitdefender.com> References: <1409911297-3360-1-git-send-email-rcojocaru@bitdefender.com> <1409911297-3360-6-git-send-email-rcojocaru@bitdefender.com> <540DEC4A02000078000322A8@mail.emea.novell.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 1XR1GJ-0002r6-A1 for xen-devel@lists.xenproject.org; Mon, 08 Sep 2014 15:53:51 +0000 In-Reply-To: <540DEC4A02000078000322A8@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 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 09/08/14 18:50, Jan Beulich wrote: >>>> 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. I'll change that and test the code first thing tomorrow. Thanks, Razvan Cojocaru