Avi Kivity wrote: > Han, Weidong wrote: >>> This is how KVM_CAP_ works: >>> >>> - kvm.h defines KVM_CAP_DEVICE_ASSIGNMENT >>> - userspace compiles device assignment code only if it sees >>> KVM_CAP_DEVICE_ASSIGNMENT in kvm.h >>> - kvm.ko returns nonzero to ioctl(KVM_CHECK_EXTENSION, >>> KVM_CAP_DEVICE_ASSIGNMENT) if it supports device assignment (recent >>> enough module, iommu found) - userspace runs device assignment code >>> only if above ioctl passes >>> >>> We need something similar to deassignment, since it didn't arrive >>> at the same time as assignment. >>> >> >> In my patches, deassignment already does the similar thing as >> assignment. Can you point out where it is missed? >> > > It needs a new KVM_CAP_ symbol. 2.6.28 has KVM_CAP_DEVICE_ASSIGNMENT > defined, but will not have the deassignment code.
In fact, without multiple device assignment, VT-d hotplug cannot be supported cleanly. Given hot add a device under a different iommu, it will be mapped in a wrong iommu, thus it won't work. I will start to implement multiple device assignment first. Regards, 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
