-
Notifications
You must be signed in to change notification settings - Fork 64
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
vhost: vdpa: Provide custom set_vring_addr()
implementation
#165
Merged
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
likebreath
requested review from
eryugey,
jiangliu,
sboeuf,
slp and
stefano-garzarella
as code owners
June 2, 2023 00:26
likebreath
force-pushed
the
0601/fix_vdpa
branch
2 times, most recently
from
June 2, 2023 00:33
fc1f540
to
32eca33
Compare
sboeuf
previously approved these changes
Jun 2, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just minor comments to avoid confusion in the future, the code LGTM.
Unlike other vhost backends (e.g. vhost-net and vhost-vsock), vDPA backends can not work with host virtual address (HVA), instead they expect I/O virtual address (IOVA). The IOVA can be mapped 1:1 with guest physical address (GPA) when no IOMMU is involved. This is why the default implementation of `set_vring_addr()` from Trait `VhostBackend` is no longer working with vDPA backends. To solve this issue, this patch provides a custom `set_vring_addr()` implementation for Trait `VhostKernVdpa`. Fixes: rust-vmm#164 Signed-off-by: Bo Chen <chen.bo@intel.com>
sboeuf
approved these changes
Jun 6, 2023
stefano-garzarella
approved these changes
Jun 6, 2023
likebreath
added a commit
to likebreath/cloud-hypervisor
that referenced
this pull request
Jun 7, 2023
The latest vhost release v0.7.0 has a vDPA regression [1]. It has been fixed in the vhost upstream [2], but no new releases are available [3]. To unblock the bulk upgrades on rust-vmm depdencies, let's use the upstream vhost for now. [1] rust-vmm/vhost#164 [2] rust-vmm/vhost#165 [3] rust-vmm/vhost#166 Signed-off-by: Bo Chen <chen.bo@intel.com>
rbradford
pushed a commit
to cloud-hypervisor/cloud-hypervisor
that referenced
this pull request
Jun 8, 2023
The latest vhost release v0.7.0 has a vDPA regression [1]. It has been fixed in the vhost upstream [2], but no new releases are available [3]. To unblock the bulk upgrades on rust-vmm depdencies, let's use the upstream vhost for now. [1] rust-vmm/vhost#164 [2] rust-vmm/vhost#165 [3] rust-vmm/vhost#166 Signed-off-by: Bo Chen <chen.bo@intel.com>
4 tasks
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.
Summary of the PR
Unlike other vhost backends (e.g. vhost-net and vhost-vsock), vDPA
backends can not work with host virtual address (HVA), instead they
expect I/O virtual address (IOVA). The IOVA can be mapped 1:1 with
guest physical address (GPA) when no IOMMU is involved. This is why
the default implementation of
set_vring_addr()
from TraitVhostBackend
is no longer working with vDPA backends. To solve thisissue, this patch provides a custom
set_vring_addr()
implementationfor Trait
VhostKernVdpa
.Fixes: #164
Requirements
Before submitting your PR, please make sure you addressed the following
requirements:
git commit -s
), and the commitmessage has max 60 characters for the summary and max 75 characters for each
description line.
test.
Release" section of CHANGELOG.md (if no such section exists, please create one).
unsafe
code is properly documented.