[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] kexec: add more pages to v1 environment
commit 5cb57f4bddee1f11079e69bf43c193a8b104c476 Author: Jan Beulich <jbeulich@xxxxxxxx> AuthorDate: Tue Jun 9 16:00:24 2015 +0200 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Tue Jun 9 16:00:24 2015 +0200 kexec: add more pages to v1 environment Destination pages need mappings to be added to the page tables in the v1 case (where nothing else calls machine_kexec_add_page() for them). Further, without the tools mapping the low 1Mb (expected by at least some Linux version), we need to do so in the hypervisor in the v1 case. Suggested-by: David Vrabel <david.vrabel@xxxxxxxxxx> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> Tested-by: Alan Robinson <alan.robinson@xxxxxxxxxxxxxx> Reviewed-by: David Vrabel <david.vrabel@xxxxxxxxxx> Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> --- xen/common/kexec.c | 18 ++++++++++++++++++ xen/common/kimage.c | 5 +++++ 2 files changed, 23 insertions(+), 0 deletions(-) diff --git a/xen/common/kexec.c b/xen/common/kexec.c index 3b4275e..1e4a667 100644 --- a/xen/common/kexec.c +++ b/xen/common/kexec.c @@ -1003,6 +1003,24 @@ static int kexec_do_load_v1(xen_kexec_load_v1_t *load, int compat) if ( ret < 0 ) goto error; + if ( arch == EM_386 || arch == EM_X86_64 ) + { + /* + * Ensure 0 - 1 MiB is mapped and accessible by the image. + * + * This allows access to VGA memory and the region purgatory copies + * in the crash case. + */ + unsigned long addr; + + for ( addr = 0; addr < MB(1); addr += PAGE_SIZE ) + { + ret = machine_kexec_add_page(kimage, addr, addr); + if ( ret < 0 ) + goto error; + } + } + ret = kexec_load_slot(kimage); if ( ret < 0 ) goto error; diff --git a/xen/common/kimage.c b/xen/common/kimage.c index 9b79a5e..8c4854d 100644 --- a/xen/common/kimage.c +++ b/xen/common/kimage.c @@ -923,6 +923,11 @@ int kimage_build_ind(struct kexec_image *image, unsigned long ind_mfn, ret = kimage_add_page(image, page_to_maddr(xen_page)); if ( ret < 0 ) goto done; + + ret = machine_kexec_add_page(image, dest, dest); + if ( ret < 0 ) + goto done; + dest += PAGE_SIZE; break; } -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |