Skip to content

Conversation

@bonzini
Copy link
Member

@bonzini bonzini commented Nov 7, 2025

Summary of the PR

As discussed in #327, make the main interface to vm-memory the one that includes permissions and lets fewer aspects of the implementation through.

Based on #361.

Requirements

Before submitting your PR, please make sure you addressed the following
requirements:

  • All commits in this PR have Signed-Off-By trailers (with
    git commit -s), and the commit message has max 60 characters for the
    summary and max 75 characters for each description line.
  • All added/changed functionality has a corresponding unit/integration
    test.
  • All added/changed public-facing functionality has entries in the "Upcoming
    Release" section of CHANGELOG.md (if no such section exists, please create one).
  • Any newly added unsafe code is properly documented.

The purpose of the function is exactly to change a pointer obtained
from a mutable VolatileSlice into a reference, and doing so is
unsafe.  So just shut up clippy.

Signed-off-by: Paolo Bonzini <[email protected]>
Rename GuestMemory to GuestMemoryBackend, IoMemory to GuestMemory.
This allows users of vm-memory to be aware of access permissions
for memory, with no change to callers that just use the `Bytes`
interface.

Signed-off-by: Paolo Bonzini <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
After the rename, the primary interface to vm-memory is almost
completely absent in DESIGN.md.  Give it more importance and
remove some details of GuestMemoryBackend that are now
obsolete.

Signed-off-by: Paolo Bonzini <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
@bonzini
Copy link
Member Author

bonzini commented Nov 7, 2025

I'm not sure if this should be 0.18.0 or 0.19.0.

@XanClic, I think the current main branch causes some breakage for vhost_kern? If so, the "semver trick" release should be 0.18.0 and the one with renamed symbols would be 0.19.0. Then 0.18.0 would be an easy upgrade for everyone except vhost_kern, whereas 0.19.0 could be more tricky.

@bonzini bonzini marked this pull request as draft November 7, 2025 10:00
@bonzini bonzini changed the title Rename iomemory Rename GuestMemory->GuestMemoryBackend, IoMemory->GuestMemory Nov 7, 2025
@likebreath likebreath mentioned this pull request Nov 7, 2025
4 tasks
`GuestMemory`; therefore, all callers that just use the `Bytes` interface
remain completely unchanged.

- \[[#362](https://github.com/rust-vmm/vm-memory/pull/362)\] Rename `GuestMemory` to `GuestMemoryBackend`, `IoMemory` to `GuestMemoryBackend`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo: IoMemory to GuestMemoryBackend GuestMemory

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.

2 participants