Skip to content

Update vm-memory dependency to 0.18#348

Draft
XanClic wants to merge 3 commits intorust-vmm:mainfrom
XanClic:vm-memory-0.18
Draft

Update vm-memory dependency to 0.18#348
XanClic wants to merge 3 commits intorust-vmm:mainfrom
XanClic:vm-memory-0.18

Conversation

@XanClic
Copy link
Copy Markdown
Contributor

@XanClic XanClic commented Mar 11, 2026

Summary of the PR

This PR updates the vm-memory dependency to 0.18.

It’s a draft because it needs virtio-queue and virtio-bindings (from vm-virtio) to have releases with the same dependency bump, so for now, the last patch uses [patch.crates-io] to point to the github repo.

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. (None added.)
  • 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. (None added.)

XanClic added 3 commits March 11, 2026 11:02
This test changes flags and bits to make the object invalid, and checks
that `is_valid()` catches it.  It always reverts that change after every
test.

As a result, there is an assignment at the end to make the object valid
again, with no check remaining afterwards.  For me, the compiler
complains about that, so add a final assertion to make it happy.

Signed-off-by: Hanna Czenczek <hreitz@redhat.com>
vhost_kern requires physical `GuestMemory` (uses `.get_host_address()`),
so we have to restrict its `GuestAddressSpace` requirement to physical
memory only.

In this patch, that is not actually a restriction, but with vm-memory
0.18, there is going to be a difference between physical and potentially
non-physical memory (`GuestMemoryBackend` vs. `GuestMemory`).

Signed-off-by: Hanna Czenczek <hreitz@redhat.com>
Update our vm-memory and vm-virtio dependencies to a version with IOMMU
(i.e. non-physical `GuestMemory` and `IommuMemory`) support.

In some places, that means we need to import `GuestMemoryBackend` now to
retain access to that trait’s methods. (`GuestMemoryBackend` is what
used to be `GuestMemory`.)

For vhost_kern, it means we need to have `PhysicalGuestAddressSpace`
require `GuestMemoryBackend` instead of `GuestMemory` because, as
explained in HEAD^, it strictly requires physical memory, and that is
what `GuestMemoryBackend` is.

(Marked as a draft until all of the updated dependencies have had proper
releases and this commit just bumps their version number instead of
pointing to non-released commits.)

Signed-off-by: Hanna Czenczek <hreitz@redhat.com>
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.

1 participant