-
Notifications
You must be signed in to change notification settings - Fork 356
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
kexec: fix wrong calculation method of ramdisk_start #119
Conversation
Signed-off-by: Koichi Shiraishi <zchee.io@gmail.com>
Use the initrd_addr_max value from the kernel header if the kernel version is 2.03 or newer. Use hardcoded(0x37ffffff) value if older. Compare the initrd_max and memory.size, and re-assign if initrd_max is larger. Add ALIGNDOWN for ramdisk_start, uses prevent to go past the address limit. Based on qemu/hw/i386/pc.c Signed-off-by: Koichi Shiraishi <zchee.io@gmail.com>
backport to moby/hyperkit#68 Original commit messages Various bits of code (e.g. kernel and initrd loading) rely on memory.base and memory.size referring to lowmem only, with highmem being handled separately, in order to avoid locating things into the MMIO region between the two. Rename the variable to make this more obvious and to forestall any ideas about "fixing" memory.size. Signed-off-by: Koichi Shiraishi <zchee.io@gmail.com>
@mist64 two years pass, we still can not boot 4.x kernels... |
@zchee thank you very much! Finally I run Ubuntu 18.04 on xhyve! You've made my day! brew install -s xhyve
cd $(brew --cache)
tar -xf xhyve--0.2.0.tar.gz
cd xhyve-0.2.0
wget https://patch-diff.githubusercontent.com/raw/mist64/xhyve/pull/119.patch
patch < 119.patch
cd ..
rm xhyve--0.2.0.tar.gz
tar -cjf xhyve--0.2.0.tar.gz xhyve-0.2.0
shasum -a 256 xhyve--0.2.0.tar.gz
brew edit xhyve
brew reinstall -s xhyve Blog post in Russian: https://delfer.ru/2018/10/24/%d0%bf%d0%b0%d1%82%d1%87%d0%b8%d0%bc-%d0%bf%d0%b0%d0%ba%d0%b5%d1%82%d1%8b-brew-%d0%b4%d0%bb%d1%8f-macos/ |
@delfer np :) FYI, it’s already merged on moby/hyperkit. So you can use almost the same implementations of the native hypervisor feature no need to apply the patch. Enjoy Hypervisor.framework, also thanks for wrote blog post :) |
@zchee thank you very much for
I've just replaced |
By |
@jeremyhu And yes,
I was just refer to qemu source, didn't copy. The moby/hyperkit also merged previously. |
It feels like we should have a new release tagged. 0.2.0 was tagged back in July 2015. @jeremyhu thoughts on this? |
That's probably a good idea. There are a couple other PRs in the queue that we should look at and then maybe a 0.3.0 might be in order. =) |
Fix
ramdisk_start
promlem in thekexec.c
.This pull request is backported to moby/hyperkit#66.
As in the #116 and #74,
That logic is sometimes
initrd
will overlap with thekernel
memory space.So, change calculation method using the
initrd_addr_max
variable from the kernel header data.0x37ffffff
) value if older.initrd_max
andlowmem.size
, and re-assign ifinitrd_max
is larger.ALIGNDOWN
macro forramdisk_start
, uses prevent to go past the address limit.initrd_addr_max
.memory
tolowmem
Based qemu/hw/i386/pc.c.
Close #116