Skip to content

Conversation

@sboeuf
Copy link

@sboeuf sboeuf commented Jun 21, 2019

No description provided.

Added a struct which keeps track of the file and offset associated with
a guest memory region backed by a memory mapped file.

Signed-off-by: Alexandru Agache <aagch@amazon.com>
Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
Signed-off-by: Alexandru Agache <aagch@amazon.com>
Also, refactored some names and the way we resolve paths to use
different `Error` and `Result` definitions.

Signed-off-by: Alexandru Agache <aagch@amazon.com>
The GuestRegionMmap constructor now checks that adding the guest base
address to the length of the mapped region does not overflow.

Signed-off-by: Alexandru Agache <aagch@amazon.com>
The new method simplifies the creation of a GuestMemoryMmap object
that contains file backed regions (potentially alongside anonymous
memory regions). Also, updated the GuestMemoryRegion trait with
the `file_offset` method, and implemented it for GuestRegionMmap.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
Signed-off-by: Alexandru Agache <aagch@amazon.com>
Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
@sboeuf
Copy link
Author

sboeuf commented Jun 21, 2019

@alexandruag this PR is not intended to be merged, but more a reference based on your PR #29, which I rebased on top of master and where I added one new commit to fix windows build and unit tests.
Please squash it into your PR if you agree with the code. The point is to prevent from breaking Windows, but I think @tkreuzer should submit a follow up PR to add more tests once #29 gets merged.

One thing to notice, I followed this document to be able build the code and the tests for windows, this was very handy.

@jiangliu
Copy link
Member

Should we close this PR now?

@sboeuf sboeuf closed this Jul 12, 2019
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.

3 participants