From mboxrd@z Thu Jan 1 00:00:00 1970 From: Boris Ostrovsky Subject: Re: [PATCH v6 1/4] x86: Consolidate boolean inputs in hvm and p2m into a shared bitmap. Date: Mon, 11 Aug 2014 13:13:07 -0400 Message-ID: <53E8F9A3.7030506@oracle.com> References: <1407768526-29112-1-git-send-email-tamas.lengyel@zentific.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1407768526-29112-1-git-send-email-tamas.lengyel@zentific.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: Tamas K Lengyel , xen-devel@lists.xen.org Cc: kevin.tian@intel.com, ian.campbell@citrix.com, stefano.stabellini@eu.citrix.com, eddie.dong@intel.com, ian.jackson@eu.citrix.com, JBeulich@suse.com, Aravind.Gopalakrishnan@amd.com, jun.nakajima@intel.com, suravee.suthikulpanit@amd.com List-Id: xen-devel@lists.xenproject.org On 08/11/2014 10:48 AM, Tamas K Lengyel wrote: diff --git a/xen/arch/x86/hvm/svm/svm.c b/xen/arch/x86/hvm/svm/svm.c index 76616ac..1f72e19 100644 --- a/xen/arch/x86/hvm/svm/svm.c +++ b/xen/arch/x86/hvm/svm/svm.c @@ -1394,7 +1394,7 @@ const struct hvm_function_table * __init start_svm(void) } static void svm_do_nested_pgfault(struct vcpu *v, - struct cpu_user_regs *regs, uint32_t npfec, paddr_t gpa) + struct cpu_user_regs *regs, uint32_t pfec, paddr_t gpa) I am not sure I understand the reason behind this change. This *is* still a nested page fault error code, isn't it? Was this to avoid name collision with npfec variable that is added below? -boris > { > int ret; > unsigned long gfn = gpa >> PAGE_SHIFT; > @@ -1403,10 +1403,13 @@ static void svm_do_nested_pgfault(struct vcpu *v, > p2m_access_t p2ma; > struct p2m_domain *p2m = NULL; > > - ret = hvm_hap_nested_page_fault(gpa, 0, ~0ul, > - 1, /* All NPFs count as reads */ > - npfec & PFEC_write_access, > - npfec & PFEC_insn_fetch); > + struct npfec npfec = { > + .read_access = 1, /* All NPFs count as reads */ > + .write_access = !!(pfec & PFEC_write_access), > + .insn_fetch = !!(pfec & PFEC_insn_fetch) > + }; > + > + ret = hvm_hap_nested_page_fault(gpa, ~0ul, npfec); >