-
Notifications
You must be signed in to change notification settings - Fork 70
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
Vring addresses are not inside guest memory range if placed behind a vIOMMU #108
Comments
That's because we have a mechanism to handle IOMMU. We have some draft proposal to extend |
When I was designing the vm-memory crate, I proposed to add an |
And this is a prerequisite to support our |
I understand and hopefully the improvements that are needed in vm-memory will eventually get accepted, but in the meantime, we need some alternative solution since the upstream |
Yes, I was thinking of doing the same thing. I'm currently implementing a driver in the host so I was going to redefine Then Jiang suggested how to set a
I'm in favor of a temporary solution until we have the final one (Jiang's one) accepted. |
@jiangliu are you okay with a temporary solution for vDPA? |
@sboeuf If you have time, please go ahead, I'm a little busy this week :-) |
Sounds good, I'll try to submit something tomorrow. |
Fixed by #109 |
I think there's a limitation for supporting vIOMMU use case because of the following lines:
When an IOTLB is involved, vhost in the kernel considers
desc_table_addr
,used_ring_addr
andavail_ring_addr
as IOVAs. That means it could be either a GPA or a GVA. In case it's a GPA, that's fine to check if the address is in range, but if that's a GVA, it doesn't make any sense.Could we introduce a boolean or flag to let
VhostKernBackend
know about this use case, which would avoid the incorrect check?@stefano-garzarella I've identified this issue while implementing vDPA for Cloud Hypervisor, so I was thinking maybe an alternative would be to implement
is_valid()
fromVhostKernVdpa
, which would override the default implementation. WDYT?/cc @jiangliu
The text was updated successfully, but these errors were encountered: