Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759168Ab3JQRon (ORCPT ); Thu, 17 Oct 2013 13:44:43 -0400 Received: from smtp02.citrix.com ([66.165.176.63]:38538 "EHLO SMTP02.CITRIX.COM" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758855Ab3JQRoj (ORCPT ); Thu, 17 Oct 2013 13:44:39 -0400 X-IronPort-AV: E=Sophos;i="4.93,515,1378857600"; d="scan'208";a="61976353" From: Stefano Stabellini To: CC: , , , , , Stefano Stabellini Subject: [PATCH v8 04/19] xen/x86: allow __set_phys_to_machine for autotranslate guests Date: Thu, 17 Oct 2013 18:43:19 +0100 Message-ID: <1382031814-8782-4-git-send-email-stefano.stabellini@eu.citrix.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain X-DLP: MIA2 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1209 Lines: 35 Allow __set_phys_to_machine to be called for autotranslate guests. It can be used to keep track of phys_to_machine changes, however we don't do anything with the information at the moment. Signed-off-by: Stefano Stabellini --- arch/x86/xen/p2m.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/x86/xen/p2m.c b/arch/x86/xen/p2m.c index 95fb2aa..59d9e70 100644 --- a/arch/x86/xen/p2m.c +++ b/arch/x86/xen/p2m.c @@ -798,10 +798,10 @@ bool __set_phys_to_machine(unsigned long pfn, unsigned long mfn) { unsigned topidx, mididx, idx; - if (unlikely(xen_feature(XENFEAT_auto_translated_physmap))) { - BUG_ON(pfn != mfn && mfn != INVALID_P2M_ENTRY); + /* don't track P2M changes in autotranslate guests */ + if (unlikely(xen_feature(XENFEAT_auto_translated_physmap))) return true; - } + if (unlikely(pfn >= MAX_P2M_PFN)) { BUG_ON(mfn != INVALID_P2M_ENTRY); return true; -- 1.7.2.5 -- 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/