Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753597AbbG0JbO (ORCPT ); Mon, 27 Jul 2015 05:31:14 -0400 Received: from smtp.citrix.com ([66.165.176.89]:41944 "EHLO SMTP.CITRIX.COM" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753414AbbG0JbK (ORCPT ); Mon, 27 Jul 2015 05:31:10 -0400 X-IronPort-AV: E=Sophos;i="5.15,552,1432598400"; d="scan'208";a="284628364" Message-ID: <55B5FA39.8000401@citrix.com> Date: Mon, 27 Jul 2015 10:30:33 +0100 From: David Vrabel User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.7.0 MIME-Version: 1.0 To: Julien Grall , David Vrabel , CC: Boris Ostrovsky , , "Daniel Kiper" , Subject: Re: [Xen-devel] [PATCHv2 10/10] xen/balloon: pre-allocate p2m entries for ballooned pages References: <1437738468-24110-1-git-send-email-david.vrabel@citrix.com> <1437738468-24110-11-git-send-email-david.vrabel@citrix.com> <55B2C882.8050903@citrix.com> In-Reply-To: <55B2C882.8050903@citrix.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-DLP: MIA2 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 825 Lines: 22 On 25/07/15 00:21, Julien Grall wrote: > On 24/07/2015 12:47, David Vrabel wrote: >> @@ -550,6 +551,11 @@ int alloc_xenballooned_pages(int nr_pages, struct >> page **pages) >> page = balloon_retrieve(true); >> if (page) { >> pages[pgno++] = page; >> +#ifdef CONFIG_XEN_HAVE_PVMMU >> + ret = xen_alloc_p2m_entry(page_to_pfn(page)); > > Don't you want to call this function only when the guest is not using > auto-translated physmap? xen_alloc_p2m_entry() is a nop in auto-xlate guests, so no need for an additional check here. David -- 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/