Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1323251 > unrolled thread

[PATCH v2 04/11] xen/hvmlite: Allow HVMlite guests delay initializing grant table

Started byBoris Ostrovsky <boris.ostrovsky@oracle.com>
First post2016-02-01 16:50 +0100
Last post2016-02-03 20:00 +0100
Articles 4 — 3 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH v2 04/11] xen/hvmlite: Allow HVMlite guests delay initializing grant table Boris Ostrovsky <boris.ostrovsky@oracle.com> - 2016-02-01 16:50 +0100
    Re: [Xen-devel] [PATCH v2 04/11] xen/hvmlite: Allow HVMlite guests  delay initializing grant table David Vrabel <david.vrabel@citrix.com> - 2016-02-02 17:20 +0100
      Re: [Xen-devel] [PATCH v2 04/11] xen/hvmlite: Allow HVMlite guests  delay initializing grant table Boris Ostrovsky <boris.ostrovsky@oracle.com> - 2016-02-02 17:50 +0100
    Re: [PATCH v2 04/11] xen/hvmlite: Allow HVMlite guests delay  initializing grant table "Luis R. Rodriguez" <mcgrof@suse.com> - 2016-02-03 20:00 +0100

#1323251 — [PATCH v2 04/11] xen/hvmlite: Allow HVMlite guests delay initializing grant table

FromBoris Ostrovsky <boris.ostrovsky@oracle.com>
Date2016-02-01 16:50 +0100
Subject[PATCH v2 04/11] xen/hvmlite: Allow HVMlite guests delay initializing grant table
Message-ID<qXoTN-4WL-29@gated-at.bofh.it>
.. just like we currently do for PVH guests

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
---
 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 <xen/balloon.h>
 #include <xen/events.h>
 #include <linux/slab.h>
@@ -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
-- 
1.7.1

[toc] | [next] | [standalone]


#1324242 — Re: [Xen-devel] [PATCH v2 04/11] xen/hvmlite: Allow HVMlite guests delay initializing grant table

FromDavid Vrabel <david.vrabel@citrix.com>
Date2016-02-02 17:20 +0100
SubjectRe: [Xen-devel] [PATCH v2 04/11] xen/hvmlite: Allow HVMlite guests delay initializing grant table
Message-ID<qXLQn-5Be-25@gated-at.bofh.it>
In reply to#1323251
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.vrabel@citrix.com>

David

> Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
> ---
>  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 <xen/balloon.h>
>  #include <xen/events.h>
>  #include <linux/slab.h>
> @@ -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
> 

[toc] | [prev] | [next] | [standalone]


#1324270 — Re: [Xen-devel] [PATCH v2 04/11] xen/hvmlite: Allow HVMlite guests delay initializing grant table

FromBoris Ostrovsky <boris.ostrovsky@oracle.com>
Date2016-02-02 17:50 +0100
SubjectRe: [Xen-devel] [PATCH v2 04/11] xen/hvmlite: Allow HVMlite guests delay initializing grant table
Message-ID<qXMjn-5NR-17@gated-at.bofh.it>
In reply to#1324242
On 02/02/2016 11:13 AM, David Vrabel wrote:
> 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).

Yes, it's wrong. I'll re-word it.

-boris

[toc] | [prev] | [next] | [standalone]


#1325856 — Re: [PATCH v2 04/11] xen/hvmlite: Allow HVMlite guests delay initializing grant table

From"Luis R. Rodriguez" <mcgrof@suse.com>
Date2016-02-03 20:00 +0100
SubjectRe: [PATCH v2 04/11] xen/hvmlite: Allow HVMlite guests delay initializing grant table
Message-ID<qYaOK-5HS-15@gated-at.bofh.it>
In reply to#1323251
On Mon, Feb 01, 2016 at 10:38:50AM -0500, Boris Ostrovsky wrote:
> 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();
>  }

For instance if we had pv types generalized then this would just be a one line
addition for __gnttab_init() to support hvmlite. Much cleaner, generalizes the
extensions and gets folks thinking about the types on all calls Xen init call
sites.

  Luis

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web