forked from rust-vmm/linux-loader
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Update vm-memory dependency #1
Open
sboeuf
wants to merge
27
commits into
bjzhjing:master
Choose a base branch
from
sboeuf:update_vm_mem_dep
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+6,086
−0
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
912dbb5
to
4ad6efe
Compare
0056eff
to
60c8ce2
Compare
1fb601c
to
b5463a3
Compare
19a0ef5
to
c43b923
Compare
This crate is derived from upstream project: firecracker project commit 223bdb64d3eb445f55872e63d9ed2518d2235759 The following changes are made after code ported from firecracker: - Return the offset in memory where kernel image loading is finished, add the related logic in load function also, according to upstream project crosvm commit 4133b0120d1e16cafbb373b2ae17a214b594038b - Ported to vm-memory, remove dependency on firecrakcer memory-model - Remove dependency on sys_util, use read_util instead Signed-off-by: Cathy Zhang <cathy.zhang@intel.com>
rust-vmm/community#14 Add the license files meanwhile. Signed-off-by: Cathy Zhang <cathy.zhang@intel.com>
Convert the ELF loader to it, the bzImage support will also implement that trait. Having a trait allows us to support further kernel image formats in a common way. Signed-off-by: Cathy Zhang <cathy.zhang@intel.com>
Reimplement KernelLoader trait against structure BzImage to add bzImage loader support. Signed-off-by: Cathy Zhang <cathy.zhang@intel.com>
Signed-off-by: Cathy Zhang <cathy.zhang@intel.com>
And update/add the corresponding README sections. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Handled and consumed by https://buildkite.com/rust-vmm/linux-loader-ci/ Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
As suggested by rust, it's good practice to add documentation to public items of a crate. Thus, add inline links for public traits and structs. Signed-off-by: Cathy Zhang <cathy.zhang@intel.com>
Update Loader with GuestMemory, instead of GuestMemoryMmap backend, which may not be generally used by VMMs. Signed-off-by: Cathy Zhang <cathy.zhang@intel.com>
There is no checking in loader to see if the memory is large enough to store the kernel image, so add this checking to avoid memory overflow. Signed-off-by: Cathy Zhang <cathy.zhang@intel.com>
There are some comments not in a good format, or not presented clearly, correct them. Signed-off-by: Cathy Zhang <cathy.zhang@intel.com>
High memory is defined in linux boot protocol where the protected-mode kernel was relocated. It could be passed by VMM to loader to specify where is the bottom line of kernel image to be loaded. Rename it here to follow the linux boot protocol definition. Signed-off-by: Cathy Zhang <cathy.zhang@intel.com>
A pre-compiled bzImage is needed for bzImage loader unit test, add this hook to prepare it in CI environment by downloading and extracting it in specified path for later test. Signed-off-by: Cathy Zhang <cathy.zhang@intel.com>
The buildkite-agent actually clones the code in ${BUILDKITE_BUILD_CHECKOUT_PATH}. There is no need to add the repository name. Signed-off-by: Andreea Florescu <fandree@amazon.com>
ignore has not taken effect to avoid run bzImage loader unit test, remove it. It's required to follow steps on README.md to do the test. Signed-off-by: Cathy Zhang <cathy.zhang@intel.com>
Reformat code as cargo fmt messages indicate. Signed-off-by: Cathy Zhang <cathy.zhang@intel.com>
This change is made according to the following commit rust-vmm/rust-vmm-container@f5c16fb Signed-off-by: Cathy Zhang <cathy.zhang@intel.com>
Add feature setting to separate elf and bzImage support, which will make convenience for VMM to select loader type based on its needs. Signed-off-by: Cathy Zhang <cathy.zhang@intel.com>
We only need SeekFrom, Cursor, struct_util and mem when either ELF or bzImage are selected. We only need read_struct_slice for ELF. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
coverage-x86 pytest in buildkite failed with message indicating that coverage number is changed. Update this to have test passed. Signed-off-by: Cathy Zhang <cathy.zhang@intel.com>
Update cargo kcov with features setting, and exclude coverage test for autogenerated files: elf.rs and bootparam.rs Signed-off-by: Cathy Zhang <cathy.zhang@intel.com>
We now have 2 pipelines: One coming from rust-vmm-ci and another one specific to linux-loader. The latter builds with all features enabled. Next step: Include rust-vmm-ci as a git submodule. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
...and actually document them. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
bzImage is x86 specific and although ARM supports loading uncompressed kernel images, it follows the Image format (raw ELF + some headers). Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
4be116a
to
891ea4f
Compare
Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
8eb8dea
to
43f5c6b
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Update the vm-memory.