From mboxrd@z Thu Jan 1 00:00:00 1970 From: Razvan Cojocaru Subject: Re: [PATCH RFC V6 5/5] xen: Handle resumed instruction based on previous mem_event reply Date: Tue, 12 Aug 2014 18:43:29 +0300 Message-ID: <53EA3621.7020906@bitdefender.com> References: <1407769686-7918-1-git-send-email-rcojocaru@bitdefender.com> <1407769686-7918-5-git-send-email-rcojocaru@bitdefender.com> <53EA4CEA020000780002BB82@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <53EA4CEA020000780002BB82@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, ian.campbell@citrix.com, stefano.stabellini@eu.citrix.com, andrew.cooper3@citrix.com, eddie.dong@intel.com, xen-devel@lists.xen.org, jun.nakajima@intel.com, ian.jackson@eu.citrix.com List-Id: xen-devel@lists.xenproject.org On 08/12/2014 06:20 PM, Jan Beulich wrote: >>>> On 11.08.14 at 17:08, wrote: >> --- a/xen/arch/x86/hvm/vmx/vmx.c >> +++ b/xen/arch/x86/hvm/vmx/vmx.c >> @@ -1699,6 +1699,18 @@ static void vmx_enable_msr_exit_interception(struct domain *d) >> vmx_enable_intercept_for_msr(v, msrs[i], MSR_TYPE_W); >> } >> >> +static bool_t vmx_exited_by_nested_pagefault(void) >> +{ >> + unsigned long exit_qualification; >> + >> + __vmread(EXIT_QUALIFICATION, &exit_qualification); >> + >> + if ( (exit_qualification & EPT_GLA_FAULT) == 0 ) >> + return 0; >> + >> + return 1; >> +} > > As (I think) said on the previous version already - this would apparently > benefit from being based on Tamas's recent work (slated to go in once > the series got suitably acked). I agree, that would be great. In the meantime, I just thought that the patches should be self-sufficient. Thanks, Razvan Cojocaru