pvgrub: initialise p2m_size
PATCH 1/1 pvgrub: initialise p2m_size
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.
--- stubdom/grub/kexec.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
stubdom/grub/kexec.c +3 -2
@@ -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 ) {
Signature · 1 line
1.9.1
Quoted 7 lines · Wei Liu
In 84083790 ("libxc: add
p2m_sizetoxc_dom_image") a new field is added. We should initialised this field in pvgrub as well, otherwisexc_dom_build_imagewon't work properly.Signed-off-by Wei Liu <[email protected]>Cc Ian Campbell <[email protected]>Cc Ian Jackson <[email protected]>
Acked + Applied , thanks.
Quoted 7 lines · Wei Liu, le Sun 10 May 2015 14:14:51 +0100, a écrit :
In 84083790 ("libxc: add
p2m_sizetoxc_dom_image") a new field is added. We should initialised this field in pvgrub as well, otherwisexc_dom_build_imagewon't work properly.Signed-off-by Wei Liu <[email protected]>Cc Ian Campbell <[email protected]>Cc Ian Jackson <[email protected]>
Quoted 33 lines
--- stubdom/grub/kexec.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)stubdom/grub/kexec.c +3
-2@@ -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 ) {Signature · 7 lines
1.9.1 _______________________________________________ Xen-devel mailing list [email protected] http://lists.xen.org/xen-devel
Signature · 4 lines
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)
Quoted 11 lines · Samuel Thibault
Quoted 7 lines · Wei Liu, le Sun 10 May 2015 14:14:51 +0100, a écrit :
In 84083790 ("libxc: add
p2m_sizetoxc_dom_image") a new field is added. We should initialised this field in pvgrub as well, otherwisexc_dom_build_imagewon't work properly.Signed-off-by Wei Liu <[email protected]>Cc Ian Campbell <[email protected]>Cc Ian Jackson <[email protected]>Acked-by Samuel Thibault <[email protected]>
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.
Quoted 10 lines · Wei Liu
Quoted 9 lines · Samuel Thibault
Quoted 7 lines · Wei Liu, le Sun 10 May 2015 14:14:51 +0100, a écrit :
In 84083790 ("libxc: add
p2m_sizetoxc_dom_image") a new field is added. We should initialised this field in pvgrub as well, otherwisexc_dom_build_imagewon't work properly.Signed-off-by Wei Liu <[email protected]>Cc Ian Campbell <[email protected]>Cc Ian Jackson <[email protected]>
Quoted 7 lines
Quoted 2 lines
Acked-by Samuel Thibault <[email protected]>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.
Quoted 2 lines
Wei.
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel