-
Notifications
You must be signed in to change notification settings - Fork 565
vmm, devices: introduce ivshmem device #6703
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
vmm, devices: introduce ivshmem device #6703
Conversation
ad319d6 to
bf8f368
Compare
|
Sorry, I accidentally deleted the branch. Reopen it now. |
bf8f368 to
73e7199
Compare
|
Could you elaborate some more on the use case for this? |
73e7199 to
6fd68f5
Compare
Thank you for your review. I add a use case to |
6fd68f5 to
fc45ea0
Compare
|
@rbradford PTAL, I'd appreciate you letting me know of any suggestions. |
|
Pinging @cloud-hypervisor/cloud-hypervisor-reviewers - does anybody else that thoughts about this - i'm not sure about whether this fits into the "modern cloud" usescase. Perhaps this could be behind a feature flag? |
up2wing
left a comment
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.
Some comments added, PTAL.
As far as I know, stratovirt uses ivshmem for some kind of sound card[1] and dpdk uses it for zero-copy data sharing. Also, people can easily share memory between guest and host without vm-exit, it's useful for some performance use case.
Well in my opinion as this can toggle using command line or config and no harm to performance, a feature flag maybe |
62941ed to
a7a4efd
Compare
|
@up2wing Thank you for your review. All comments have fixed, PTAL. |
As @up2wing says, ivshmem needs to be enabled by passing a param, I don't think it matters to add a feature flag unless you consider more things? @rbradford |
liuw
left a comment
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.
Sorry for being late to the party. Is there a way to test this in the CI so that it doesn't regress?
To me this enables a few interesting use cases. |
1b699dd to
b1776a0
Compare
I can add a case to test ivshmem device discovery but can't test the device function since our test kernel doesn't have a driver for ivshmem. So I'm not sure if we need to add this test case. |
Is there a plan to upstream the said driver? I think a very basic test case will be to make sure the PCI device shows up correctly in the guest, with the correct BAR configuration. This can be done by checking lspci's output against some expected values. |
01bb577 to
ffcdb4d
Compare
|
Thank you for the fast turn around. With the latest integration test updates, it appears they caught some actual issues: |
c20e697 to
51ef69c
Compare
Signed-off-by: Yi Wang <[email protected]> Signed-off-by: Songqian Li <[email protected]>
Signed-off-by: Songqian Li <[email protected]>
Signed-off-by: Songqian Li <[email protected]>
Signed-off-by: Songqian Li <[email protected]>
Signed-off-by: Songqian Li <[email protected]>
Signed-off-by: Bo Chen <[email protected]> Signed-off-by: Songqian Li <[email protected]>
Signed-off-by: Songqian Li <[email protected]>
51ef69c to
f9220e1
Compare
likebreath
left a comment
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.
@lisongqian Thanks again for the contribution and persistency. I believe we are ready to merge this PR.
Thank you equally for your continued help. ❤️ |
This patch introduces the Inter-VM shared memory(ivshmem) device
to support sharing a memory region between multiple processes running
different guests and the host.
This patch supports the basic ivshmem functions like
ivshmem-plainin QEMU[1].[1] https://www.qemu.org/docs/master/specs/ivshmem-spec.html
Signed-off-by: Yi Wang [email protected]
Signed-off-by: Songqian Li [email protected]