LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH -mm 1/2] kexec/i386: kexec page table code clean up - add arch_kimage
@ 2008-01-09  2:57 Huang, Ying
  2008-01-10  1:14 ` Vivek Goyal
  0 siblings, 1 reply; 6+ messages in thread
From: Huang, Ying @ 2008-01-09  2:57 UTC (permalink / raw)
  To: Eric W. Biederman, Vivek Goyal, Andrew Morton; +Cc: linux-kernel

This patch add an architecture specific struct arch_kimage into struct
kimage. Three pointers to page table pages used by kexec are added to
struct arch_kimage. The page tables pages are dynamically allocated in
machine_kexec_prepare instead of statically from BSS segment. This
will save up to 20k memory when kexec image is not loaded.

Signed-off-by: Huang Ying <ying.huang@intel.com>

---
 arch/x86/kernel/machine_kexec_32.c |   68 +++++++++++++++++++++++++------------
 include/asm-x86/kexec_32.h         |   12 ++++++
 include/linux/kexec.h              |    4 ++
 3 files changed, 63 insertions(+), 21 deletions(-)

--- a/arch/x86/kernel/machine_kexec_32.c
+++ b/arch/x86/kernel/machine_kexec_32.c
@@ -11,6 +11,7 @@
 #include <linux/delay.h>
 #include <linux/init.h>
 #include <linux/numa.h>
+#include <linux/gfp.h>
 #include <asm/pgtable.h>
 #include <asm/pgalloc.h>
 #include <asm/tlbflush.h>
@@ -21,15 +22,6 @@
 #include <asm/desc.h>
 #include <asm/system.h>
 
-#define PAGE_ALIGNED __attribute__ ((__aligned__(PAGE_SIZE)))
-static u32 kexec_pgd[1024] PAGE_ALIGNED;
-#ifdef CONFIG_X86_PAE
-static u32 kexec_pmd0[1024] PAGE_ALIGNED;
-static u32 kexec_pmd1[1024] PAGE_ALIGNED;
-#endif
-static u32 kexec_pte0[1024] PAGE_ALIGNED;
-static u32 kexec_pte1[1024] PAGE_ALIGNED;
-
 static void set_idt(void *newidt, __u16 limit)
 {
 	struct Xgt_desc_struct curidt;
@@ -72,6 +64,28 @@ static void load_segments(void)
 #undef __STR
 }
 
+static void alloc_page_tables(struct kimage *image)
+{
+	image->arch_kimage.pgd = (pgd_t *)get_zeroed_page(GFP_KERNEL);
+#ifdef CONFIG_X86_PAE
+	image->arch_kimage.pmd0 = (pmd_t *)get_zeroed_page(GFP_KERNEL);
+	image->arch_kimage.pmd1 = (pmd_t *)get_zeroed_page(GFP_KERNEL);
+#endif
+	image->arch_kimage.pte0 = (pte_t *)get_zeroed_page(GFP_KERNEL);
+	image->arch_kimage.pte1 = (pte_t *)get_zeroed_page(GFP_KERNEL);
+}
+
+static void free_page_tables(struct kimage *image)
+{
+	free_page((unsigned long)image->arch_kimage.pgd);
+#ifdef CONFIG_X86_PAE
+	free_page((unsigned long)image->arch_kimage.pmd0);
+	free_page((unsigned long)image->arch_kimage.pmd1);
+#endif
+	free_page((unsigned long)image->arch_kimage.pte0);
+	free_page((unsigned long)image->arch_kimage.pte1);
+}
+
 /*
  * A architecture hook called to validate the
  * proposed image and prepare the control pages
@@ -83,10 +97,21 @@ static void load_segments(void)
  * reboot code buffer to allow us to avoid allocations
  * later.
  *
- * Currently nothing.
+ * - Allocate page tables
  */
 int machine_kexec_prepare(struct kimage *image)
 {
+	alloc_page_tables(image);
+	if (!image->arch_kimage.pgd ||
+#ifdef CONFIG_X86_PAE
+	    !image->arch_kimage.pmd0 ||
+	    !image->arch_kimage.pmd1 ||
+#endif
+	    !image->arch_kimage.pte0 ||
+	    !image->arch_kimage.pte1) {
+		free_page_tables(image);
+		return -ENOMEM;
+	}
 	return 0;
 }
 
@@ -96,6 +121,7 @@ int machine_kexec_prepare(struct kimage 
  */
 void machine_kexec_cleanup(struct kimage *image)
 {
+	free_page_tables(image);
 }
 
 /*
@@ -115,18 +141,18 @@ NORET_TYPE void machine_kexec(struct kim
 
 	page_list[PA_CONTROL_PAGE] = __pa(control_page);
 	page_list[VA_CONTROL_PAGE] = (unsigned long)relocate_kernel;
-	page_list[PA_PGD] = __pa(kexec_pgd);
-	page_list[VA_PGD] = (unsigned long)kexec_pgd;
+	page_list[PA_PGD] = __pa(image->arch_kimage.pgd);
+	page_list[VA_PGD] = (unsigned long)image->arch_kimage.pgd;
 #ifdef CONFIG_X86_PAE
-	page_list[PA_PMD_0] = __pa(kexec_pmd0);
-	page_list[VA_PMD_0] = (unsigned long)kexec_pmd0;
-	page_list[PA_PMD_1] = __pa(kexec_pmd1);
-	page_list[VA_PMD_1] = (unsigned long)kexec_pmd1;
-#endif
-	page_list[PA_PTE_0] = __pa(kexec_pte0);
-	page_list[VA_PTE_0] = (unsigned long)kexec_pte0;
-	page_list[PA_PTE_1] = __pa(kexec_pte1);
-	page_list[VA_PTE_1] = (unsigned long)kexec_pte1;
+	page_list[PA_PMD_0] = __pa(image->arch_kimage.pmd0);
+	page_list[VA_PMD_0] = (unsigned long)image->arch_kimage.pmd0;
+	page_list[PA_PMD_1] = __pa(image->arch_kimage.pmd1);
+	page_list[VA_PMD_1] = (unsigned long)image->arch_kimage.pmd1;
+#endif
+	page_list[PA_PTE_0] = __pa(image->arch_kimage.pte0);
+	page_list[VA_PTE_0] = (unsigned long)image->arch_kimage.pte0;
+	page_list[PA_PTE_1] = __pa(image->arch_kimage.pte1);
+	page_list[VA_PTE_1] = (unsigned long)image->arch_kimage.pte1;
 
 	/* The segment registers are funny things, they have both a
 	 * visible and an invisible part.  Whenever the visible part is
--- a/include/asm-x86/kexec_32.h
+++ b/include/asm-x86/kexec_32.h
@@ -94,6 +94,18 @@ relocate_kernel(unsigned long indirectio
 		unsigned long start_address,
 		unsigned int has_pae) ATTRIB_NORET;
 
+#define ARCH_HAS_ARCH_KIMAGE
+
+struct arch_kimage {
+	pgd_t *pgd;
+#ifdef CONFIG_X86_PAE
+	pmd_t *pmd0;
+	pmd_t *pmd1;
+#endif
+	pte_t *pte0;
+	pte_t *pte1;
+};
+
 #endif /* __ASSEMBLY__ */
 
 #endif /* _I386_KEXEC_H */
--- a/include/linux/kexec.h
+++ b/include/linux/kexec.h
@@ -98,6 +98,10 @@ struct kimage {
 	unsigned int type : 1;
 #define KEXEC_TYPE_DEFAULT 0
 #define KEXEC_TYPE_CRASH   1
+
+#ifdef ARCH_HAS_ARCH_KIMAGE
+	struct arch_kimage arch_kimage;
+#endif
 };
 
 


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

* Re: [PATCH -mm 1/2] kexec/i386: kexec page table code clean up - add arch_kimage
  2008-01-09  2:57 [PATCH -mm 1/2] kexec/i386: kexec page table code clean up - add arch_kimage Huang, Ying
@ 2008-01-10  1:14 ` Vivek Goyal
  2008-01-10  2:06   ` Huang, Ying
  2008-01-10  8:15   ` Simon Horman
  0 siblings, 2 replies; 6+ messages in thread
From: Vivek Goyal @ 2008-01-10  1:14 UTC (permalink / raw)
  To: Huang, Ying; +Cc: Eric W. Biederman, Andrew Morton, linux-kernel

On Wed, Jan 09, 2008 at 10:57:47AM +0800, Huang, Ying wrote:
> This patch add an architecture specific struct arch_kimage into struct
> kimage. Three pointers to page table pages used by kexec are added to
> struct arch_kimage. The page tables pages are dynamically allocated in
> machine_kexec_prepare instead of statically from BSS segment. This
> will save up to 20k memory when kexec image is not loaded.
> 
> Signed-off-by: Huang Ying <ying.huang@intel.com>
> 

There were some discussions in the past regarding static page table 
allocation vs dynamic. Can't recall it now though. Eric will know it
better.

Anyway, this allocation is taking place at load time and not kexec execute
time so as such should not be an issue for kdump.

Have you tested Xen too? Does it run into issues with this change?


> ---
>  arch/x86/kernel/machine_kexec_32.c |   68 +++++++++++++++++++++++++------------
>  include/asm-x86/kexec_32.h         |   12 ++++++
>  include/linux/kexec.h              |    4 ++
>  3 files changed, 63 insertions(+), 21 deletions(-)
> 
> --- a/arch/x86/kernel/machine_kexec_32.c
> +++ b/arch/x86/kernel/machine_kexec_32.c
> @@ -11,6 +11,7 @@
>  #include <linux/delay.h>
>  #include <linux/init.h>
>  #include <linux/numa.h>
> +#include <linux/gfp.h>
>  #include <asm/pgtable.h>
>  #include <asm/pgalloc.h>
>  #include <asm/tlbflush.h>
> @@ -21,15 +22,6 @@
>  #include <asm/desc.h>
>  #include <asm/system.h>
>  
> -#define PAGE_ALIGNED __attribute__ ((__aligned__(PAGE_SIZE)))
> -static u32 kexec_pgd[1024] PAGE_ALIGNED;
> -#ifdef CONFIG_X86_PAE
> -static u32 kexec_pmd0[1024] PAGE_ALIGNED;
> -static u32 kexec_pmd1[1024] PAGE_ALIGNED;
> -#endif
> -static u32 kexec_pte0[1024] PAGE_ALIGNED;
> -static u32 kexec_pte1[1024] PAGE_ALIGNED;
> -
>  static void set_idt(void *newidt, __u16 limit)
>  {
>  	struct Xgt_desc_struct curidt;
> @@ -72,6 +64,28 @@ static void load_segments(void)
>  #undef __STR
>  }
>  
> +static void alloc_page_tables(struct kimage *image)
> +{

This is too generic a name. How about something like
arch_alloc_kexec_page_tables()

> +	image->arch_kimage.pgd = (pgd_t *)get_zeroed_page(GFP_KERNEL);
> +#ifdef CONFIG_X86_PAE
> +	image->arch_kimage.pmd0 = (pmd_t *)get_zeroed_page(GFP_KERNEL);
> +	image->arch_kimage.pmd1 = (pmd_t *)get_zeroed_page(GFP_KERNEL);
> +#endif
> +	image->arch_kimage.pte0 = (pte_t *)get_zeroed_page(GFP_KERNEL);
> +	image->arch_kimage.pte1 = (pte_t *)get_zeroed_page(GFP_KERNEL);
> +}
> +
> +static void free_page_tables(struct kimage *image)
> +{

How about arch_free_kexec_page_tables()

> +	free_page((unsigned long)image->arch_kimage.pgd);
> +#ifdef CONFIG_X86_PAE
> +	free_page((unsigned long)image->arch_kimage.pmd0);
> +	free_page((unsigned long)image->arch_kimage.pmd1);
> +#endif
> +	free_page((unsigned long)image->arch_kimage.pte0);
> +	free_page((unsigned long)image->arch_kimage.pte1);
> +}
> +
>  /*
>   * A architecture hook called to validate the
>   * proposed image and prepare the control pages
> @@ -83,10 +97,21 @@ static void load_segments(void)
>   * reboot code buffer to allow us to avoid allocations
>   * later.
>   *
> - * Currently nothing.
> + * - Allocate page tables
>   */
>  int machine_kexec_prepare(struct kimage *image)
>  {
> +	alloc_page_tables(image);
> +	if (!image->arch_kimage.pgd ||
> +#ifdef CONFIG_X86_PAE
> +	    !image->arch_kimage.pmd0 ||
> +	    !image->arch_kimage.pmd1 ||
> +#endif
> +	    !image->arch_kimage.pte0 ||
> +	    !image->arch_kimage.pte1) {
> +		free_page_tables(image);
> +		return -ENOMEM;

I think this error handling can be done in alloc_page_tables() itself and
following will look neater.

  if (!alloc_page_tables)
	return -ENOMEM.

Thanks
Vivek

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

* Re: [PATCH -mm 1/2] kexec/i386: kexec page table code clean up - add arch_kimage
  2008-01-10  1:14 ` Vivek Goyal
@ 2008-01-10  2:06   ` Huang, Ying
  2008-01-10  8:15   ` Simon Horman
  1 sibling, 0 replies; 6+ messages in thread
From: Huang, Ying @ 2008-01-10  2:06 UTC (permalink / raw)
  To: Vivek Goyal; +Cc: Eric W. Biederman, Andrew Morton, linux-kernel

On Wed, 2008-01-09 at 20:14 -0500, Vivek Goyal wrote:
[...]
> >  
> > +static void alloc_page_tables(struct kimage *image)
> > +{
> 
> This is too generic a name. How about something like
> arch_alloc_kexec_page_tables()

OK, I will change it.

> > +	image->arch_kimage.pgd = (pgd_t *)get_zeroed_page(GFP_KERNEL);
> > +#ifdef CONFIG_X86_PAE
> > +	image->arch_kimage.pmd0 = (pmd_t *)get_zeroed_page(GFP_KERNEL);
> > +	image->arch_kimage.pmd1 = (pmd_t *)get_zeroed_page(GFP_KERNEL);
> > +#endif
> > +	image->arch_kimage.pte0 = (pte_t *)get_zeroed_page(GFP_KERNEL);
> > +	image->arch_kimage.pte1 = (pte_t *)get_zeroed_page(GFP_KERNEL);
> > +}
> > +
> > +static void free_page_tables(struct kimage *image)
> > +{
> 
> How about arch_free_kexec_page_tables()

OK, I will change it.

> > +	free_page((unsigned long)image->arch_kimage.pgd);
> > +#ifdef CONFIG_X86_PAE
> > +	free_page((unsigned long)image->arch_kimage.pmd0);
> > +	free_page((unsigned long)image->arch_kimage.pmd1);
> > +#endif
> > +	free_page((unsigned long)image->arch_kimage.pte0);
> > +	free_page((unsigned long)image->arch_kimage.pte1);
> > +}
> > +
> >  /*
> >   * A architecture hook called to validate the
> >   * proposed image and prepare the control pages
> > @@ -83,10 +97,21 @@ static void load_segments(void)
> >   * reboot code buffer to allow us to avoid allocations
> >   * later.
> >   *
> > - * Currently nothing.
> > + * - Allocate page tables
> >   */
> >  int machine_kexec_prepare(struct kimage *image)
> >  {
> > +	alloc_page_tables(image);
> > +	if (!image->arch_kimage.pgd ||
> > +#ifdef CONFIG_X86_PAE
> > +	    !image->arch_kimage.pmd0 ||
> > +	    !image->arch_kimage.pmd1 ||
> > +#endif
> > +	    !image->arch_kimage.pte0 ||
> > +	    !image->arch_kimage.pte1) {
> > +		free_page_tables(image);
> > +		return -ENOMEM;
> 
> I think this error handling can be done in alloc_page_tables() itself and
> following will look neater.

OK, I will change it.

Best Regards,
Huang Ying


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

* Re: [PATCH -mm 1/2] kexec/i386: kexec page table code clean up - add arch_kimage
  2008-01-10  1:14 ` Vivek Goyal
  2008-01-10  2:06   ` Huang, Ying
@ 2008-01-10  8:15   ` Simon Horman
  2008-01-14 13:29     ` Ian Campbell
  1 sibling, 1 reply; 6+ messages in thread
From: Simon Horman @ 2008-01-10  8:15 UTC (permalink / raw)
  To: Vivek Goyal
  Cc: Huang, Ying, Eric W. Biederman, Andrew Morton, linux-kernel,
	Magnus Damm, Ian Campbell

[ CCing Magnus Damm and Ian Campbell ]

On Wed, Jan 09, 2008 at 08:14:23PM -0500, Vivek Goyal wrote:
> On Wed, Jan 09, 2008 at 10:57:47AM +0800, Huang, Ying wrote:
> > This patch add an architecture specific struct arch_kimage into struct
> > kimage. Three pointers to page table pages used by kexec are added to
> > struct arch_kimage. The page tables pages are dynamically allocated in
> > machine_kexec_prepare instead of statically from BSS segment. This
> > will save up to 20k memory when kexec image is not loaded.
> > 
> > Signed-off-by: Huang Ying <ying.huang@intel.com>
> > 
> 
> There were some discussions in the past regarding static page table 
> allocation vs dynamic. Can't recall it now though. Eric will know it
> better.
> 
> Anyway, this allocation is taking place at load time and not kexec execute
> time so as such should not be an issue for kdump.

IIRC correctly the previous dynamic page table patches were
posted by Magnus and the discussion mainly revolved around issues of
taste. For what it is worth, I am completely in favour of this change
as not everyone (actually probably very few people) use kexec,
and this is a saving for them - assuming the code bloat is less than 20k.

> Have you tested Xen too? Does it run into issues with this change?

Xen will need to be updated for this change but it shouldn't be a big
deal. Basically right now it calls __ma() (which is kind of like __pa())
on kexec_pgd and friends. Updating the arguments to __ma() to use
the new arch_kimage pointers should be easy enough.

N.B: As this is Dom0 code (not DomU) it is maintained in the xen
repository and has been merged into Linux.

See machine_kexec_setup_load_arg() in
http://xenbits.xensource.com/linux-2.6.18-xen.hg?file/353802ec1caf/arch/i386/kernel/machine_kexec.c

> > ---
> >  arch/x86/kernel/machine_kexec_32.c |   68 +++++++++++++++++++++++++------------
> >  include/asm-x86/kexec_32.h         |   12 ++++++
> >  include/linux/kexec.h              |    4 ++
> >  3 files changed, 63 insertions(+), 21 deletions(-)
> > 
> > --- a/arch/x86/kernel/machine_kexec_32.c
> > +++ b/arch/x86/kernel/machine_kexec_32.c
> > @@ -11,6 +11,7 @@
> >  #include <linux/delay.h>
> >  #include <linux/init.h>
> >  #include <linux/numa.h>
> > +#include <linux/gfp.h>
> >  #include <asm/pgtable.h>
> >  #include <asm/pgalloc.h>
> >  #include <asm/tlbflush.h>
> > @@ -21,15 +22,6 @@
> >  #include <asm/desc.h>
> >  #include <asm/system.h>
> >  
> > -#define PAGE_ALIGNED __attribute__ ((__aligned__(PAGE_SIZE)))
> > -static u32 kexec_pgd[1024] PAGE_ALIGNED;
> > -#ifdef CONFIG_X86_PAE
> > -static u32 kexec_pmd0[1024] PAGE_ALIGNED;
> > -static u32 kexec_pmd1[1024] PAGE_ALIGNED;
> > -#endif
> > -static u32 kexec_pte0[1024] PAGE_ALIGNED;
> > -static u32 kexec_pte1[1024] PAGE_ALIGNED;
> > -
> >  static void set_idt(void *newidt, __u16 limit)
> >  {
> >  	struct Xgt_desc_struct curidt;
> > @@ -72,6 +64,28 @@ static void load_segments(void)
> >  #undef __STR
> >  }
> >  
> > +static void alloc_page_tables(struct kimage *image)
> > +{
> 
> This is too generic a name. How about something like
> arch_alloc_kexec_page_tables()
> 
> > +	image->arch_kimage.pgd = (pgd_t *)get_zeroed_page(GFP_KERNEL);
> > +#ifdef CONFIG_X86_PAE
> > +	image->arch_kimage.pmd0 = (pmd_t *)get_zeroed_page(GFP_KERNEL);
> > +	image->arch_kimage.pmd1 = (pmd_t *)get_zeroed_page(GFP_KERNEL);
> > +#endif
> > +	image->arch_kimage.pte0 = (pte_t *)get_zeroed_page(GFP_KERNEL);
> > +	image->arch_kimage.pte1 = (pte_t *)get_zeroed_page(GFP_KERNEL);
> > +}
> > +
> > +static void free_page_tables(struct kimage *image)
> > +{
> 
> How about arch_free_kexec_page_tables()
> 
> > +	free_page((unsigned long)image->arch_kimage.pgd);
> > +#ifdef CONFIG_X86_PAE
> > +	free_page((unsigned long)image->arch_kimage.pmd0);
> > +	free_page((unsigned long)image->arch_kimage.pmd1);
> > +#endif
> > +	free_page((unsigned long)image->arch_kimage.pte0);
> > +	free_page((unsigned long)image->arch_kimage.pte1);
> > +}
> > +
> >  /*
> >   * A architecture hook called to validate the
> >   * proposed image and prepare the control pages
> > @@ -83,10 +97,21 @@ static void load_segments(void)
> >   * reboot code buffer to allow us to avoid allocations
> >   * later.
> >   *
> > - * Currently nothing.
> > + * - Allocate page tables
> >   */
> >  int machine_kexec_prepare(struct kimage *image)
> >  {
> > +	alloc_page_tables(image);
> > +	if (!image->arch_kimage.pgd ||
> > +#ifdef CONFIG_X86_PAE
> > +	    !image->arch_kimage.pmd0 ||
> > +	    !image->arch_kimage.pmd1 ||
> > +#endif
> > +	    !image->arch_kimage.pte0 ||
> > +	    !image->arch_kimage.pte1) {
> > +		free_page_tables(image);
> > +		return -ENOMEM;
> 
> I think this error handling can be done in alloc_page_tables() itself and
> following will look neater.
> 
>   if (!alloc_page_tables)
> 	return -ENOMEM.
> 
> Thanks
> Vivek
> --
> 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/
> 

-- 
Horms


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

* Re: [PATCH -mm 1/2] kexec/i386: kexec page table code clean up - add arch_kimage
  2008-01-10  8:15   ` Simon Horman
@ 2008-01-14 13:29     ` Ian Campbell
  2008-01-15  1:34       ` Simon Horman
  0 siblings, 1 reply; 6+ messages in thread
From: Ian Campbell @ 2008-01-14 13:29 UTC (permalink / raw)
  To: Simon Horman
  Cc: Vivek Goyal, Huang, Ying, Eric W. Biederman, Andrew Morton,
	linux-kernel, Magnus Damm


On Thu, 2008-01-10 at 17:15 +0900, Simon Horman wrote: 
> > Have you tested Xen too? Does it run into issues with this change?
> 
> Xen will need to be updated for this change but it shouldn't be a big
> deal. Basically right now it calls __ma() (which is kind of like __pa())
> on kexec_pgd and friends. Updating the arguments to __ma() to use
> the new arch_kimage pointers should be easy enough.

I think you mean the Xen specific parts of the kexec machinery in the
kernel.c would need updating rather than the hypervisor, right?

I don't think these changes will cause anything more than minor problems
for whoever ports the Xen kexec stuff upstream.

> N.B: As this is Dom0 code (not DomU) it is maintained in the xen
> repository and has been merged into Linux.

I don't think we would bother backporting these changes to there, would
we?

Ian.



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

* Re: [PATCH -mm 1/2] kexec/i386: kexec page table code clean up - add arch_kimage
  2008-01-14 13:29     ` Ian Campbell
@ 2008-01-15  1:34       ` Simon Horman
  0 siblings, 0 replies; 6+ messages in thread
From: Simon Horman @ 2008-01-15  1:34 UTC (permalink / raw)
  To: Ian Campbell
  Cc: Vivek Goyal, Huang, Ying, Eric W. Biederman, Andrew Morton,
	linux-kernel, Magnus Damm

On Mon, Jan 14, 2008 at 01:29:36PM +0000, Ian Campbell wrote:
> 
> On Thu, 2008-01-10 at 17:15 +0900, Simon Horman wrote: 
> > > Have you tested Xen too? Does it run into issues with this change?
> > 
> > Xen will need to be updated for this change but it shouldn't be a big
> > deal. Basically right now it calls __ma() (which is kind of like __pa())
> > on kexec_pgd and friends. Updating the arguments to __ma() to use
> > the new arch_kimage pointers should be easy enough.
> 
> I think you mean the Xen specific parts of the kexec machinery in the
> kernel.c would need updating rather than the hypervisor, right?

Yes, that is right. Sorry for the confusion.

> I don't think these changes will cause anything more than minor problems
> for whoever ports the Xen kexec stuff upstream.
> 
> > N.B: As this is Dom0 code (not DomU) it is maintained in the xen
> > repository and has been merged into Linux.
> 
> I don't think we would bother backporting these changes to there, would
> we?

No, I was more thinking of the situation where Xen moves its kernel forwards.

-- 
Horms


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

end of thread, other threads:[~2008-01-15  1:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-09  2:57 [PATCH -mm 1/2] kexec/i386: kexec page table code clean up - add arch_kimage Huang, Ying
2008-01-10  1:14 ` Vivek Goyal
2008-01-10  2:06   ` Huang, Ying
2008-01-10  8:15   ` Simon Horman
2008-01-14 13:29     ` Ian Campbell
2008-01-15  1:34       ` Simon Horman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).