From mboxrd@z Thu Jan 1 00:00:00 1970 From: Muli Ben-Yehuda Subject: Re: [PATCH 5/6] device assignment: support for assigning PCI devices to guests Date: Wed, 29 Oct 2008 12:39:18 +0200 Message-ID: <20081029103918.GR6737@il.ibm.com> References: <1225188410-2222-1-git-send-email-muli@il.ibm.com> <1225188410-2222-2-git-send-email-muli@il.ibm.com> <1225188410-2222-3-git-send-email-muli@il.ibm.com> <1225188410-2222-4-git-send-email-muli@il.ibm.com> <1225188410-2222-5-git-send-email-muli@il.ibm.com> <1225188410-2222-6-git-send-email-muli@il.ibm.com> <490733B5.5010102@codemonkey.ws> <20081028155305.GE6737@il.ibm.com> <20081029102550.GO6737@il.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: avi@redhat.com, kvm@vger.kernel.org, weidong.han@intel.com, Ben-Ami Yassour1 , amit.shah@redhat.com, allen.m.kay@intel.com To: Anthony Liguori Return-path: Received: from mtagate2.uk.ibm.com ([194.196.100.162]:39810 "EHLO mtagate2.uk.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752915AbYJ2KkE (ORCPT ); Wed, 29 Oct 2008 06:40:04 -0400 Received: from d06nrmr1407.portsmouth.uk.ibm.com (d06nrmr1407.portsmouth.uk.ibm.com [9.149.38.185]) by mtagate2.uk.ibm.com (8.13.1/8.13.1) with ESMTP id m9TAe2n5005579 for ; Wed, 29 Oct 2008 10:40:02 GMT Received: from d06av01.portsmouth.uk.ibm.com (d06av01.portsmouth.uk.ibm.com [9.149.37.212]) by d06nrmr1407.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v9.1) with ESMTP id m9TAe2Yb4460618 for ; Wed, 29 Oct 2008 10:40:02 GMT Received: from d06av01.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av01.portsmouth.uk.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id m9TAe1n3002008 for ; Wed, 29 Oct 2008 10:40:02 GMT Content-Disposition: inline In-Reply-To: <20081029102550.GO6737@il.ibm.com> Sender: kvm-owner@vger.kernel.org List-ID: On Wed, Oct 29, 2008 at 12:25:50PM +0200, Muli Ben-Yehuda wrote: > > > You still succeed if KVM_CAP_DEVICE_ASSIGNMENT isn't defined? > > > That means a newer userspace compiled on an older kernel will > > > silently fail if they try to do device assignment. There's > > > probably no reason to build this file if > > > KVM_CAP_DEVICE_ASSIGNMENT isn't defined (see how the in-kernel > > > PIT gets conditionally build depending on whether that cap is > > > available). > > > > Ok, I'll take a look at this. > > I reworked it per your suggestion so that device assignment is a kvm > only feature for now. I am pretty sure Amit intended for the patches > to support device assignment without kvm too, but getting rid of it > did make things simpler. By the way, one thing I ran into here is that we check the PIT and DEVICE_ASSIGNMENT capabilities based on the kernel headers under kernel/ first, and sync the kernel headers from the patched kernel tree into kernel/ second. In other words, if you configure userspace with a patched kernel tree and just edit include/linux/kvm.h to have or not have the capability, the build will use the old copy of the header first, and only pick up the new copy later after it resynch's the header. Seems rather counter-intuitive. Cheers, Muli -- The First Workshop on I/O Virtualization (WIOV '08) Dec 2008, San Diego, CA, http://www.usenix.org/wiov08/ <-> SYSTOR 2009---The Israeli Experimental Systems Conference http://www.haifa.il.ibm.com/conferences/systor2009/