From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933359AbcBBQNS (ORCPT ); Tue, 2 Feb 2016 11:13:18 -0500 Received: from smtp02.citrix.com ([66.165.176.63]:16399 "EHLO SMTP02.CITRIX.COM" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932281AbcBBQNN (ORCPT ); Tue, 2 Feb 2016 11:13:13 -0500 X-IronPort-AV: E=Sophos;i="5.22,385,1449532800"; d="scan'208";a="335574943" Subject: Re: [Xen-devel] [PATCH v2 04/11] xen/hvmlite: Allow HVMlite guests delay initializing grant table To: Boris Ostrovsky , , References: <1454341137-14110-1-git-send-email-boris.ostrovsky@oracle.com> <1454341137-14110-5-git-send-email-boris.ostrovsky@oracle.com> CC: , , , From: David Vrabel Message-ID: <56B0D596.4050301@citrix.com> Date: Tue, 2 Feb 2016 16:13:10 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.5.0 MIME-Version: 1.0 In-Reply-To: <1454341137-14110-5-git-send-email-boris.ostrovsky@oracle.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 On 01/02/16 15:38, Boris Ostrovsky wrote: > .. just like we currently do for PVH guests I think this description is wrong. In the HVM guess the grant table initialization is delayed, but here we want to do it immediately (since we may have no platform PCI device to trigger it otherwise). Otherwise, Reviewed-by: David Vrabel David > Signed-off-by: Boris Ostrovsky > --- > arch/x86/xen/grant-table.c | 4 ++-- > drivers/xen/grant-table.c | 8 ++++---- > 2 files changed, 6 insertions(+), 6 deletions(-) > > diff --git a/arch/x86/xen/grant-table.c b/arch/x86/xen/grant-table.c > index e079500..40ad9c2 100644 > --- a/arch/x86/xen/grant-table.c > +++ b/arch/x86/xen/grant-table.c > @@ -110,7 +110,7 @@ int arch_gnttab_init(unsigned long nr_shared) > return arch_gnttab_valloc(&gnttab_shared_vm_area, nr_shared); > } > > -#ifdef CONFIG_XEN_PVH > +#ifdef CONFIG_XEN_PVHVM > #include > #include > #include > @@ -164,7 +164,7 @@ static int __init xlated_setup_gnttab_pages(void) > > static int __init xen_pvh_gnttab_setup(void) > { > - if (!xen_pvh_domain()) > + if (!xen_pvh_domain() && !xen_hvmlite) > return -ENODEV; > > return xlated_setup_gnttab_pages(); > diff --git a/drivers/xen/grant-table.c b/drivers/xen/grant-table.c > index c49f79e..9a239d5 100644 > --- a/drivers/xen/grant-table.c > +++ b/drivers/xen/grant-table.c > @@ -1147,13 +1147,13 @@ EXPORT_SYMBOL_GPL(gnttab_init); > > static int __gnttab_init(void) > { > + if (!xen_domain()) > + return -ENODEV; > + > /* Delay grant-table initialization in the PV on HVM case */ > - if (xen_hvm_domain()) > + if (xen_hvm_domain() && !xen_hvmlite) > return 0; > > - if (!xen_pv_domain()) > - return -ENODEV; > - > return gnttab_init(); > } > /* Starts after core_initcall so that xen_pvh_gnttab_setup can be called >