Avi Kivity wrote:
> Amit Shah wrote:
>>> That only detects if the headers have the flag, not if the kernel
>>> actually supports it (and whether there is an iommu in the host). 
>>> We need run-time detection. 
>>> 
>> 
>> Which means we expose KVM_CAP_IOMMU only if one was detected?
> 
> Yes.
> 
>> How to do this
>> correctly?
>> 
> 
> I don't know.  Can't the VT-d api tell you if an iommu exists?

I think KVM_CAP_IOMMU is good. At the same time, there is only one iommu
at most, and userspace doesn't care about the iommu model. It's easy to
know whether an iommu exists. There is a VT-d api (intel_iommu_found())
to know if VT-d exists. Other iommu implementation can easily have this
api too.

Randy (Weidong)
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to