From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Chen, Tiejun" Subject: Re: A question about "CONFIG_KVM_DEVICE_ASSIGNMENT" configuration Date: Fri, 11 Sep 2015 08:55:37 +0800 Message-ID: <55F22689.5060005@intel.com> References: <1441897716.20355.565.camel@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: Alex Williamson , Nan Xiao Return-path: Received: from mga02.intel.com ([134.134.136.20]:55354 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751064AbbIKAzj (ORCPT ); Thu, 10 Sep 2015 20:55:39 -0400 In-Reply-To: <1441897716.20355.565.camel@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 9/10/2015 11:08 PM, Alex Williamson wrote: > On Thu, 2015-09-10 at 18:22 +0800, Nan Xiao wrote: >> Hi all, >> >> When building kernel, it prompts "CONFIG_KVM_DEVICE_ASSIGNMENT" is "deprecated". >> But it is still used in kernel code. E.g.: >> "kvm_vm_ioctl_check_extension" function: >> { >> ... >> #ifdef CONFIG_KVM_DEVICE_ASSIGNMENT >> case KVM_CAP_ASSIGN_DEV_IRQ: >> case KVM_CAP_PCI_2_3: >> #endif >> r = 1; >> break; >> ... >> #ifdef CONFIG_KVM_DEVICE_ASSIGNMENT >> case KVM_CAP_IOMMU: >> r = iommu_present(&pci_bus_type); >> break; >> #endif >> ... >> } >> >> If not configure this option, the following code will execute failed: >> >> ret = ioctl(dev, KVM_CHECK_EXTENSION, KVM_CAP_IOMMU); >> >> So does it mean to use KVM assigned device feature, the >> "CONFIG_KVM_DEVICE_ASSIGNMENT" >> is not "deprecated"? > > Legacy KVM device assignment is deprecated, it is fully replaced by Why do we remove this legacy assignment completely? Its always leading to this confusion :) Thanks Tiejun > VFIO-based device assignment. The intention is to deprecate legacy KVM > device assignment now, so all users can transition away from it and at > some point remove it from the kernel. When using QEMU and libvirt, the > default is already to use VFIO instead of legacy KVM device assignment. > Thanks, > > Alex