Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755636Ab2JXBhD (ORCPT ); Tue, 23 Oct 2012 21:37:03 -0400 Received: from userp1050.oracle.com ([156.151.31.82]:34326 "EHLO userp1050.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754422Ab2JXBhA (ORCPT ); Tue, 23 Oct 2012 21:37:00 -0400 Date: Tue, 23 Oct 2012 16:47:29 -0700 From: Mukesh Rathor To: Stefano Stabellini Cc: Konrad Rzeszutek Wilk , "linux-kernel@vger.kernel.org" , "xen-devel@lists.xensource.com" , Ian Campbell Subject: Re: [PATCH 4/6] xen/pvh: bootup and setup related changes. Message-ID: <20121023164729.0ed51a1d@mantra.us.oracle.com> In-Reply-To: References: <1350695882-12820-1-git-send-email-konrad.wilk@oracle.com> <1350695882-12820-5-git-send-email-konrad.wilk@oracle.com> <20121022155717.GB25200@phenom.dumpdata.com> Organization: Oracle Corporation X-Mailer: Claws Mail 3.7.6 (GTK+ 2.18.9; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Source-IP: userp1040.oracle.com [156.151.31.81] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2113 Lines: 56 On Tue, 23 Oct 2012 14:07:06 +0100 Stefano Stabellini wrote: > On Mon, 22 Oct 2012, Konrad Rzeszutek Wilk wrote: > > On Mon, Oct 22, 2012 at 02:34:44PM +0100, Stefano Stabellini wrote: > > > On Sat, 20 Oct 2012, Konrad Rzeszutek Wilk wrote: > > > > From: Mukesh Rathor > > > > > > > > for (pfn = PFN_DOWN(start); pfn < xen_max_p2m_pfn; > > > > pfn++) { unsigned long mfn = pfn_to_mfn(pfn); > > > > @@ -100,6 +104,7 @@ static unsigned long __init > > > > xen_do_chunk(unsigned long start, .domid = DOMID_SELF > > > > }; > > > > unsigned long len = 0; > > > > + int xlated_phys = > > > > xen_feature(XENFEAT_auto_translated_physmap); unsigned long pfn; > > > > int ret; > > > > > > > > @@ -113,7 +118,7 @@ static unsigned long __init > > > > xen_do_chunk(unsigned long start, continue; > > > > frame = mfn; > > > > } else { > > > > - if (mfn != INVALID_P2M_ENTRY) > > > > + if (!xlated_phys && mfn != > > > > INVALID_P2M_ENTRY) continue; > > > > frame = pfn; > > > > } > > > > > > Shouldn't we add a "!xlated_phys &&" to the other case as well? > > > > No. That is handled in xen_pvh_identity_map_chunk which > > just does a xen_set_clr_mmio_pvh_pte call for the "released" > > pages. But that is a bit of ... well, extra logic. I think > > if we did this it would work and look much nicer: > > Yes, I think that this version looks better But doesn't boot: (XEN) vmx_hybrid.c:710:d0 Dom:0 EPT violation 0x181 (r--/---), gpa 0x000000bf421e1c, mfn 0xffffffffffffffff, type 4. (XEN) p2m-ept.c:642:d0 Walking EPT tables for domain 0 gfn bf421 (XEN) p2m-ept.c:648:d0 gfn exceeds max_mapped_pfn 4b062 (XEN) vmx_hybrid.c:717:d0 --- GLA 0xffffffffff477e1c I'll have to debug it, or we can go back to the prev version, which I don't think is that un-pretty :). Mukesh -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/