From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arun Sharma Subject: [PATCH][VT] Use entry_get_paddr(l1e) to get the PFN Date: Wed, 31 Aug 2005 15:24:55 -0700 Message-ID: <20050831222455.GA12749@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Ian Pratt , Keir Fraser Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org Use entry_get_paddr(l1e) to get the PFN Otherwise software used bits might get in the way. Signed-off-by: Arun Sharma --- a/xen/include/asm-x86/shadow_64.h Wed Aug 31 14:53:43 2005 +++ b/xen/include/asm-x86/shadow_64.h Wed Aug 31 15:03:09 2005 @@ -450,7 +450,9 @@ /* * If it's not external mode, then mfn should be machine physical. */ - mfn = __gpfn_to_mfn(d, (entry_get_value(gle) >> PAGE_SHIFT)); + mfn = __gpfn_to_mfn(d, (entry_get_paddr(gle) >> PAGE_SHIFT)); + if (mfn == -1) + return 1; lva = (pgentry_64_t *) phys_to_virt( mfn << PAGE_SHIFT);