Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753320AbbG0MkJ (ORCPT ); Mon, 27 Jul 2015 08:40:09 -0400 Received: from smtp02.citrix.com ([66.165.176.63]:10496 "EHLO SMTP02.CITRIX.COM" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751412AbbG0MkH (ORCPT ); Mon, 27 Jul 2015 08:40:07 -0400 X-IronPort-AV: E=Sophos;i="5.15,553,1432598400"; d="scan'208";a="287890887" Message-ID: <55B626A4.4000903@citrix.com> Date: Mon, 27 Jul 2015 13:40:04 +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> <55B5FA39.8000401@citrix.com> <55B60F6E.3040901@citrix.com> In-Reply-To: <55B60F6E.3040901@citrix.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-DLP: MIA1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1125 Lines: 34 On 27/07/15 12:01, Julien Grall wrote: > On 27/07/15 10:30, David Vrabel wrote: >> 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. > > I don't have the impression it's the case or it's not obvious. Oops. You're right. I'll add a if (xen_feature(XENFEAT_auto_translated_physmap)) return true; Check at the top. 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/