Skip to content
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
wants to merge 27 commits into
base: master
Choose a base branch
from

Conversation

sboeuf
Copy link

@sboeuf sboeuf commented May 23, 2019

Update the vm-memory.

@bjzhjing bjzhjing force-pushed the master branch 8 times, most recently from 912dbb5 to 4ad6efe Compare June 6, 2019 17:06
@sameo sameo force-pushed the master branch 2 times, most recently from 0056eff to 60c8ce2 Compare June 6, 2019 17:40
@bjzhjing bjzhjing force-pushed the master branch 3 times, most recently from 1fb601c to b5463a3 Compare June 6, 2019 21:36
@sameo sameo force-pushed the master branch 12 times, most recently from 19a0ef5 to c43b923 Compare June 7, 2019 14:37
bjzhjing added 3 commits June 13, 2019 11:03
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>
bjzhjing and others added 23 commits June 13, 2019 11:03
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>
@sboeuf sboeuf force-pushed the update_vm_mem_dep branch from 4be116a to 891ea4f Compare June 14, 2019 18:39
Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
@sboeuf sboeuf force-pushed the update_vm_mem_dep branch from 8eb8dea to 43f5c6b Compare June 14, 2019 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants