From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mukesh Rathor Subject: HYBRID: max_mapped_pfn in ept_set_entry() Date: Wed, 28 Mar 2012 17:08:10 -0700 Message-ID: <20120328170810.332f0b93@mantra.us.oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: "Xen-devel@lists.xensource.com" , Keir Fraser , Ian Campbell , "stefano.stabellini@eu.citrix.com" , Tim.Deegan@citrix.com List-Id: xen-devel@lists.xenproject.org Hi guys, I've a question. For my hybrid (PV in HVM) dom0 I do 1-1 mapping for mmio pages. So, gpfn 000fbf23 maps to 000fbf23 in EPT. The max_mapped_pfn is not adjusted in ept_set_entry() because the mfn is not valid: if ( mfn_valid(mfn_x(mfn)) && (gfn + (1UL << order) - 1 > p2m->max_mapped_pfn) ) p2m->max_mapped_pfn = gfn + (1UL << order) - 1; As a result, clear_mmio_p2m_entry() fails because ept_get_entry() fails because: if ( gfn > p2m->max_mapped_pfn ) goto out; I'm trying to figure the right thing to do here. Should I just change the "gfn > p2m->max_mapped_pfn" in ept_get_entry() to check for INVALID_MFN? I really shouldn't be adjusting max_mapped_pfn for MMIO pages, right? thanks, Mukesh