All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xen/pvh: Do not fill kernel's e820 map in init_pvh_bootparams()
@ 2017-04-20 17:32 Boris Ostrovsky
  2017-04-21  8:37 ` Juergen Gross
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Boris Ostrovsky @ 2017-04-20 17:32 UTC (permalink / raw)
  To: jgross; +Cc: xen-devel, linux-kernel, Boris Ostrovsky

e820 map is updated with information from the zeropage (i.e.
pvh_bootparams) by default_machine_specific_memory_setup().
With the way things are done now, we end up with a duplicated
e820 map.

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
---
This patch is against for-linus-4.12 branch. Since this is not
a critical issue I don't want to submit it to 4.11 at rc8 time
(plus it will require rebasing for-linus-4.12).


 arch/x86/xen/enlighten_pvh.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/arch/x86/xen/enlighten_pvh.c b/arch/x86/xen/enlighten_pvh.c
index 331d769..7ce319a9 100644
--- a/arch/x86/xen/enlighten_pvh.c
+++ b/arch/x86/xen/enlighten_pvh.c
@@ -33,7 +33,6 @@ static void xen_pvh_arch_setup(void)
 static void __init init_pvh_bootparams(void)
 {
 	struct xen_memory_map memmap;
-	unsigned int i;
 	int rc;
 
 	memset(&pvh_bootparams, 0, sizeof(pvh_bootparams));
@@ -60,12 +59,7 @@ static void __init init_pvh_bootparams(void)
 	sanitize_e820_map(pvh_bootparams.e820_map,
 			  ARRAY_SIZE(pvh_bootparams.e820_map),
 			  &memmap.nr_entries);
-
 	pvh_bootparams.e820_entries = memmap.nr_entries;
-	for (i = 0; i < pvh_bootparams.e820_entries; i++)
-		e820_add_region(pvh_bootparams.e820_map[i].addr,
-				pvh_bootparams.e820_map[i].size,
-				pvh_bootparams.e820_map[i].type);
 
 	pvh_bootparams.hdr.cmd_line_ptr =
 		pvh_start_info.cmdline_paddr;
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] xen/pvh: Do not fill kernel's e820 map in init_pvh_bootparams()
  2017-04-20 17:32 [PATCH] xen/pvh: Do not fill kernel's e820 map in init_pvh_bootparams() Boris Ostrovsky
@ 2017-04-21  8:37 ` Juergen Gross
  2017-04-21  8:37 ` Juergen Gross
  2017-04-21  9:37   ` Juergen Gross
  2 siblings, 0 replies; 6+ messages in thread
From: Juergen Gross @ 2017-04-21  8:37 UTC (permalink / raw)
  To: Boris Ostrovsky; +Cc: xen-devel, linux-kernel

On 20/04/17 19:32, Boris Ostrovsky wrote:
> e820 map is updated with information from the zeropage (i.e.
> pvh_bootparams) by default_machine_specific_memory_setup().
> With the way things are done now, we end up with a duplicated
> e820 map.
> 
> Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>

Reviewed-by: Juergen Gross <jgross@suse.com>


Thanks,

Juergen

> ---
> This patch is against for-linus-4.12 branch. Since this is not
> a critical issue I don't want to submit it to 4.11 at rc8 time
> (plus it will require rebasing for-linus-4.12).
> 
> 
>  arch/x86/xen/enlighten_pvh.c | 6 ------
>  1 file changed, 6 deletions(-)
> 
> diff --git a/arch/x86/xen/enlighten_pvh.c b/arch/x86/xen/enlighten_pvh.c
> index 331d769..7ce319a9 100644
> --- a/arch/x86/xen/enlighten_pvh.c
> +++ b/arch/x86/xen/enlighten_pvh.c
> @@ -33,7 +33,6 @@ static void xen_pvh_arch_setup(void)
>  static void __init init_pvh_bootparams(void)
>  {
>  	struct xen_memory_map memmap;
> -	unsigned int i;
>  	int rc;
>  
>  	memset(&pvh_bootparams, 0, sizeof(pvh_bootparams));
> @@ -60,12 +59,7 @@ static void __init init_pvh_bootparams(void)
>  	sanitize_e820_map(pvh_bootparams.e820_map,
>  			  ARRAY_SIZE(pvh_bootparams.e820_map),
>  			  &memmap.nr_entries);
> -
>  	pvh_bootparams.e820_entries = memmap.nr_entries;
> -	for (i = 0; i < pvh_bootparams.e820_entries; i++)
> -		e820_add_region(pvh_bootparams.e820_map[i].addr,
> -				pvh_bootparams.e820_map[i].size,
> -				pvh_bootparams.e820_map[i].type);
>  
>  	pvh_bootparams.hdr.cmd_line_ptr =
>  		pvh_start_info.cmdline_paddr;
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] xen/pvh: Do not fill kernel's e820 map in init_pvh_bootparams()
  2017-04-20 17:32 [PATCH] xen/pvh: Do not fill kernel's e820 map in init_pvh_bootparams() Boris Ostrovsky
  2017-04-21  8:37 ` Juergen Gross
@ 2017-04-21  8:37 ` Juergen Gross
  2017-04-21  9:37   ` Juergen Gross
  2 siblings, 0 replies; 6+ messages in thread
From: Juergen Gross @ 2017-04-21  8:37 UTC (permalink / raw)
  To: Boris Ostrovsky; +Cc: xen-devel, linux-kernel

On 20/04/17 19:32, Boris Ostrovsky wrote:
> e820 map is updated with information from the zeropage (i.e.
> pvh_bootparams) by default_machine_specific_memory_setup().
> With the way things are done now, we end up with a duplicated
> e820 map.
> 
> Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>

Reviewed-by: Juergen Gross <jgross@suse.com>


Thanks,

Juergen

> ---
> This patch is against for-linus-4.12 branch. Since this is not
> a critical issue I don't want to submit it to 4.11 at rc8 time
> (plus it will require rebasing for-linus-4.12).
> 
> 
>  arch/x86/xen/enlighten_pvh.c | 6 ------
>  1 file changed, 6 deletions(-)
> 
> diff --git a/arch/x86/xen/enlighten_pvh.c b/arch/x86/xen/enlighten_pvh.c
> index 331d769..7ce319a9 100644
> --- a/arch/x86/xen/enlighten_pvh.c
> +++ b/arch/x86/xen/enlighten_pvh.c
> @@ -33,7 +33,6 @@ static void xen_pvh_arch_setup(void)
>  static void __init init_pvh_bootparams(void)
>  {
>  	struct xen_memory_map memmap;
> -	unsigned int i;
>  	int rc;
>  
>  	memset(&pvh_bootparams, 0, sizeof(pvh_bootparams));
> @@ -60,12 +59,7 @@ static void __init init_pvh_bootparams(void)
>  	sanitize_e820_map(pvh_bootparams.e820_map,
>  			  ARRAY_SIZE(pvh_bootparams.e820_map),
>  			  &memmap.nr_entries);
> -
>  	pvh_bootparams.e820_entries = memmap.nr_entries;
> -	for (i = 0; i < pvh_bootparams.e820_entries; i++)
> -		e820_add_region(pvh_bootparams.e820_map[i].addr,
> -				pvh_bootparams.e820_map[i].size,
> -				pvh_bootparams.e820_map[i].type);
>  
>  	pvh_bootparams.hdr.cmd_line_ptr =
>  		pvh_start_info.cmdline_paddr;
> 


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] xen/pvh: Do not fill kernel's e820 map in init_pvh_bootparams()
  2017-04-20 17:32 [PATCH] xen/pvh: Do not fill kernel's e820 map in init_pvh_bootparams() Boris Ostrovsky
@ 2017-04-21  9:37   ` Juergen Gross
  2017-04-21  8:37 ` Juergen Gross
  2017-04-21  9:37   ` Juergen Gross
  2 siblings, 0 replies; 6+ messages in thread
From: Juergen Gross @ 2017-04-21  9:37 UTC (permalink / raw)
  To: Boris Ostrovsky; +Cc: xen-devel, linux-kernel

On 20/04/17 19:32, Boris Ostrovsky wrote:
> e820 map is updated with information from the zeropage (i.e.
> pvh_bootparams) by default_machine_specific_memory_setup().
> With the way things are done now, we end up with a duplicated
> e820 map.
> 
> Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
> ---
> This patch is against for-linus-4.12 branch. Since this is not
> a critical issue I don't want to submit it to 4.11 at rc8 time
> (plus it will require rebasing for-linus-4.12).
> 
> 
>  arch/x86/xen/enlighten_pvh.c | 6 ------
>  1 file changed, 6 deletions(-)
> 
> diff --git a/arch/x86/xen/enlighten_pvh.c b/arch/x86/xen/enlighten_pvh.c
> index 331d769..7ce319a9 100644
> --- a/arch/x86/xen/enlighten_pvh.c
> +++ b/arch/x86/xen/enlighten_pvh.c
> @@ -33,7 +33,6 @@ static void xen_pvh_arch_setup(void)
>  static void __init init_pvh_bootparams(void)
>  {
>  	struct xen_memory_map memmap;
> -	unsigned int i;
>  	int rc;
>  
>  	memset(&pvh_bootparams, 0, sizeof(pvh_bootparams));
> @@ -60,12 +59,7 @@ static void __init init_pvh_bootparams(void)
>  	sanitize_e820_map(pvh_bootparams.e820_map,
>  			  ARRAY_SIZE(pvh_bootparams.e820_map),
>  			  &memmap.nr_entries);

Sorry, only saw it now: can't you just delete the sanitize_e820_map()
call, too?


Juergen

> -
>  	pvh_bootparams.e820_entries = memmap.nr_entries;
> -	for (i = 0; i < pvh_bootparams.e820_entries; i++)
> -		e820_add_region(pvh_bootparams.e820_map[i].addr,
> -				pvh_bootparams.e820_map[i].size,
> -				pvh_bootparams.e820_map[i].type);
>  
>  	pvh_bootparams.hdr.cmd_line_ptr =
>  		pvh_start_info.cmdline_paddr;
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] xen/pvh: Do not fill kernel's e820 map in init_pvh_bootparams()
@ 2017-04-21  9:37   ` Juergen Gross
  0 siblings, 0 replies; 6+ messages in thread
From: Juergen Gross @ 2017-04-21  9:37 UTC (permalink / raw)
  To: Boris Ostrovsky; +Cc: xen-devel, linux-kernel

On 20/04/17 19:32, Boris Ostrovsky wrote:
> e820 map is updated with information from the zeropage (i.e.
> pvh_bootparams) by default_machine_specific_memory_setup().
> With the way things are done now, we end up with a duplicated
> e820 map.
> 
> Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
> ---
> This patch is against for-linus-4.12 branch. Since this is not
> a critical issue I don't want to submit it to 4.11 at rc8 time
> (plus it will require rebasing for-linus-4.12).
> 
> 
>  arch/x86/xen/enlighten_pvh.c | 6 ------
>  1 file changed, 6 deletions(-)
> 
> diff --git a/arch/x86/xen/enlighten_pvh.c b/arch/x86/xen/enlighten_pvh.c
> index 331d769..7ce319a9 100644
> --- a/arch/x86/xen/enlighten_pvh.c
> +++ b/arch/x86/xen/enlighten_pvh.c
> @@ -33,7 +33,6 @@ static void xen_pvh_arch_setup(void)
>  static void __init init_pvh_bootparams(void)
>  {
>  	struct xen_memory_map memmap;
> -	unsigned int i;
>  	int rc;
>  
>  	memset(&pvh_bootparams, 0, sizeof(pvh_bootparams));
> @@ -60,12 +59,7 @@ static void __init init_pvh_bootparams(void)
>  	sanitize_e820_map(pvh_bootparams.e820_map,
>  			  ARRAY_SIZE(pvh_bootparams.e820_map),
>  			  &memmap.nr_entries);

Sorry, only saw it now: can't you just delete the sanitize_e820_map()
call, too?


Juergen

> -
>  	pvh_bootparams.e820_entries = memmap.nr_entries;
> -	for (i = 0; i < pvh_bootparams.e820_entries; i++)
> -		e820_add_region(pvh_bootparams.e820_map[i].addr,
> -				pvh_bootparams.e820_map[i].size,
> -				pvh_bootparams.e820_map[i].type);
>  
>  	pvh_bootparams.hdr.cmd_line_ptr =
>  		pvh_start_info.cmdline_paddr;
> 


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] xen/pvh: Do not fill kernel's e820 map in init_pvh_bootparams()
@ 2017-04-20 17:32 Boris Ostrovsky
  0 siblings, 0 replies; 6+ messages in thread
From: Boris Ostrovsky @ 2017-04-20 17:32 UTC (permalink / raw)
  To: jgross; +Cc: xen-devel, Boris Ostrovsky, linux-kernel

e820 map is updated with information from the zeropage (i.e.
pvh_bootparams) by default_machine_specific_memory_setup().
With the way things are done now, we end up with a duplicated
e820 map.

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
---
This patch is against for-linus-4.12 branch. Since this is not
a critical issue I don't want to submit it to 4.11 at rc8 time
(plus it will require rebasing for-linus-4.12).


 arch/x86/xen/enlighten_pvh.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/arch/x86/xen/enlighten_pvh.c b/arch/x86/xen/enlighten_pvh.c
index 331d769..7ce319a9 100644
--- a/arch/x86/xen/enlighten_pvh.c
+++ b/arch/x86/xen/enlighten_pvh.c
@@ -33,7 +33,6 @@ static void xen_pvh_arch_setup(void)
 static void __init init_pvh_bootparams(void)
 {
 	struct xen_memory_map memmap;
-	unsigned int i;
 	int rc;
 
 	memset(&pvh_bootparams, 0, sizeof(pvh_bootparams));
@@ -60,12 +59,7 @@ static void __init init_pvh_bootparams(void)
 	sanitize_e820_map(pvh_bootparams.e820_map,
 			  ARRAY_SIZE(pvh_bootparams.e820_map),
 			  &memmap.nr_entries);
-
 	pvh_bootparams.e820_entries = memmap.nr_entries;
-	for (i = 0; i < pvh_bootparams.e820_entries; i++)
-		e820_add_region(pvh_bootparams.e820_map[i].addr,
-				pvh_bootparams.e820_map[i].size,
-				pvh_bootparams.e820_map[i].type);
 
 	pvh_bootparams.hdr.cmd_line_ptr =
 		pvh_start_info.cmdline_paddr;
-- 
2.7.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-04-21  9:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-20 17:32 [PATCH] xen/pvh: Do not fill kernel's e820 map in init_pvh_bootparams() Boris Ostrovsky
2017-04-21  8:37 ` Juergen Gross
2017-04-21  8:37 ` Juergen Gross
2017-04-21  9:37 ` Juergen Gross
2017-04-21  9:37   ` Juergen Gross
  -- strict thread matches above, loose matches on Subject: below --
2017-04-20 17:32 Boris Ostrovsky

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.