Re: [PATCH 1/4] KVM: support VT-d device hotplug

Avi Kivity
2008-11-17T14:48:43Z

>> 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.