From: Ross Lagerwall Subject: [PATCH] x86/xen: Warn when there's no mfn for pfn Date: Thu, 2 Apr 2015 08:28:10 +0100 Message-ID: <1427959690-4682-1-git-send-email-ross.lagerwall@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YdZYc-0000UI-LS for xen-devel@lists.xenproject.org; Thu, 02 Apr 2015 07:28:54 +0000 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.xenproject.org Cc: Ross Lagerwall , Boris Ostrovsky , David Vrabel List-Id: xen-devel@lists.xenproject.org I recently had to debug dom0 taking a fatal page fault and it would have been useful if it warned when creating a non-present pte if there's no mfn for a pfn. Signed-off-by: Ross Lagerwall --- arch/x86/xen/mmu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c index adca9e2..4cacc11 100644 --- a/arch/x86/xen/mmu.c +++ b/arch/x86/xen/mmu.c @@ -397,6 +397,7 @@ static pteval_t pte_pfn_to_mfn(pteval_t val) * pte_mfn_to_pfn is asymmetric. */ if (unlikely(mfn == INVALID_P2M_ENTRY)) { + printk(KERN_WARNING "No mfn for pfn %lx, creating non-present pte\n", pfn); mfn = 0; flags = 0; } else -- 2.1.0