* [PATCH] pvgrub: initialise p2m_size
@ 2015-05-10 13:14 Wei Liu
2015-05-11 10:48 ` Ian Campbell
2015-05-13 23:51 ` Samuel Thibault
0 siblings, 2 replies; 5+ messages in thread
From: Wei Liu @ 2015-05-10 13:14 UTC (permalink / raw)
To: xen-devel; +Cc: Ian Jackson, Wei Liu, Ian Campbell
In 84083790 ("libxc: add p2m_size to xc_dom_image") a new field is
added. We should initialised this field in pvgrub as well, otherwise
xc_dom_build_image won't work properly.
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
---
stubdom/grub/kexec.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/stubdom/grub/kexec.c b/stubdom/grub/kexec.c
index dc8db81..4c33b25 100644
--- a/stubdom/grub/kexec.c
+++ b/stubdom/grub/kexec.c
@@ -276,12 +276,13 @@ void kexec(void *kernel, long kernel_size, void *module, long module_size, char
dom->total_pages = start_info.nr_pages;
/* equivalent of arch_setup_meminit */
+ dom->p2m_size = dom->total_pages;
/* setup initial p2m */
- dom->p2m_host = malloc(sizeof(*dom->p2m_host) * dom->total_pages);
+ dom->p2m_host = malloc(sizeof(*dom->p2m_host) * dom->p2m_size);
/* Start with our current P2M */
- for (i = 0; i < dom->total_pages; i++)
+ for (i = 0; i < dom->p2m_size; i++)
dom->p2m_host[i] = pfn_to_mfn(i);
if ( (rc = xc_dom_build_image(dom)) != 0 ) {
--
1.9.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] pvgrub: initialise p2m_size
2015-05-10 13:14 [PATCH] pvgrub: initialise p2m_size Wei Liu
@ 2015-05-11 10:48 ` Ian Campbell
2015-05-13 23:51 ` Samuel Thibault
1 sibling, 0 replies; 5+ messages in thread
From: Ian Campbell @ 2015-05-11 10:48 UTC (permalink / raw)
To: Wei Liu; +Cc: xen-devel, Ian Jackson
On Sun, 2015-05-10 at 14:14 +0100, Wei Liu wrote:
> In 84083790 ("libxc: add p2m_size to xc_dom_image") a new field is
> added. We should initialised this field in pvgrub as well, otherwise
> xc_dom_build_image won't work properly.
>
> Signed-off-by: Wei Liu <wei.liu2@citrix.com>
> Cc: Ian Campbell <ian.campbell@citrix.com>
> Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Acked + Applied , thanks.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] pvgrub: initialise p2m_size
2015-05-10 13:14 [PATCH] pvgrub: initialise p2m_size Wei Liu
2015-05-11 10:48 ` Ian Campbell
@ 2015-05-13 23:51 ` Samuel Thibault
2015-05-14 2:56 ` Wei Liu
1 sibling, 1 reply; 5+ messages in thread
From: Samuel Thibault @ 2015-05-13 23:51 UTC (permalink / raw)
To: Wei Liu; +Cc: xen-devel, Ian Jackson, Ian Campbell
Wei Liu, le Sun 10 May 2015 14:14:51 +0100, a écrit :
> In 84083790 ("libxc: add p2m_size to xc_dom_image") a new field is
> added. We should initialised this field in pvgrub as well, otherwise
> xc_dom_build_image won't work properly.
>
> Signed-off-by: Wei Liu <wei.liu2@citrix.com>
> Cc: Ian Campbell <ian.campbell@citrix.com>
> Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
> ---
> stubdom/grub/kexec.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/stubdom/grub/kexec.c b/stubdom/grub/kexec.c
> index dc8db81..4c33b25 100644
> --- a/stubdom/grub/kexec.c
> +++ b/stubdom/grub/kexec.c
> @@ -276,12 +276,13 @@ void kexec(void *kernel, long kernel_size, void *module, long module_size, char
> dom->total_pages = start_info.nr_pages;
>
> /* equivalent of arch_setup_meminit */
> + dom->p2m_size = dom->total_pages;
>
> /* setup initial p2m */
> - dom->p2m_host = malloc(sizeof(*dom->p2m_host) * dom->total_pages);
> + dom->p2m_host = malloc(sizeof(*dom->p2m_host) * dom->p2m_size);
>
> /* Start with our current P2M */
> - for (i = 0; i < dom->total_pages; i++)
> + for (i = 0; i < dom->p2m_size; i++)
> dom->p2m_host[i] = pfn_to_mfn(i);
>
> if ( (rc = xc_dom_build_image(dom)) != 0 ) {
> --
> 1.9.1
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel
>
--
Samuel
`When you say "I wrote a program that crashed Windows", people just stare at
you blankly and say "Hey, I got those with the system, *for free*".'
(By Linus Torvalds)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] pvgrub: initialise p2m_size
2015-05-13 23:51 ` Samuel Thibault
@ 2015-05-14 2:56 ` Wei Liu
2015-05-14 8:56 ` Ian Campbell
0 siblings, 1 reply; 5+ messages in thread
From: Wei Liu @ 2015-05-14 2:56 UTC (permalink / raw)
To: Samuel Thibault, Wei Liu, xen-devel, Ian Jackson, Ian Campbell
On Thu, May 14, 2015 at 01:51:18AM +0200, Samuel Thibault wrote:
> Wei Liu, le Sun 10 May 2015 14:14:51 +0100, a écrit :
> > In 84083790 ("libxc: add p2m_size to xc_dom_image") a new field is
> > added. We should initialised this field in pvgrub as well, otherwise
> > xc_dom_build_image won't work properly.
> >
> > Signed-off-by: Wei Liu <wei.liu2@citrix.com>
> > Cc: Ian Campbell <ian.campbell@citrix.com>
> > Cc: Ian Jackson <ian.jackson@eu.citrix.com>
>
> Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
>
Thanks for the ack! Ian already applied this one.
Sorry I forgot to CC you when I sent this patch. I will remember doing
so next time.
Wei.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] pvgrub: initialise p2m_size
2015-05-14 2:56 ` Wei Liu
@ 2015-05-14 8:56 ` Ian Campbell
0 siblings, 0 replies; 5+ messages in thread
From: Ian Campbell @ 2015-05-14 8:56 UTC (permalink / raw)
To: Wei Liu; +Cc: Samuel Thibault, Ian Jackson, xen-devel
On Thu, 2015-05-14 at 03:56 +0100, Wei Liu wrote:
> On Thu, May 14, 2015 at 01:51:18AM +0200, Samuel Thibault wrote:
> > Wei Liu, le Sun 10 May 2015 14:14:51 +0100, a écrit :
> > > In 84083790 ("libxc: add p2m_size to xc_dom_image") a new field is
> > > added. We should initialised this field in pvgrub as well, otherwise
> > > xc_dom_build_image won't work properly.
> > >
> > > Signed-off-by: Wei Liu <wei.liu2@citrix.com>
> > > Cc: Ian Campbell <ian.campbell@citrix.com>
> > > Cc: Ian Jackson <ian.jackson@eu.citrix.com>
> >
> > Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
> >
>
> Thanks for the ack! Ian already applied this one.
>
> Sorry I forgot to CC you when I sent this patch. I will remember doing
> so next time.
Likewise, I should have waited too.
>
> Wei.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-05-14 8:56 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-10 13:14 [PATCH] pvgrub: initialise p2m_size Wei Liu
2015-05-11 10:48 ` Ian Campbell
2015-05-13 23:51 ` Samuel Thibault
2015-05-14 2:56 ` Wei Liu
2015-05-14 8:56 ` Ian Campbell
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.