From mboxrd@z Thu Jan 1 00:00:00 1970 From: Muli Ben-Yehuda Subject: Re: [RFC] KVM: Balloon support for device assignment Date: Wed, 17 Feb 2010 19:52:37 +0200 Message-ID: <20100217175237.GI11999@il.ibm.com> References: <1266399807-4498-1-git-send-email-borove@il.ibm.com> <1266399807-4498-2-git-send-email-borove@il.ibm.com> <4B7BC47D.4030808@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Eran Borovik , kvm@vger.kernel.org, Ben-Ami Yassour , Gerd Hoffmann To: Avi Kivity Return-path: Received: from mtagate5.uk.ibm.com ([194.196.100.165]:43985 "EHLO mtagate5.uk.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752514Ab0BQRwl (ORCPT ); Wed, 17 Feb 2010 12:52:41 -0500 Received: from d06nrmr1806.portsmouth.uk.ibm.com (d06nrmr1806.portsmouth.uk.ibm.com [9.149.39.193]) by mtagate5.uk.ibm.com (8.13.1/8.13.1) with ESMTP id o1HHqeBc006079 for ; Wed, 17 Feb 2010 17:52:40 GMT Received: from d06av02.portsmouth.uk.ibm.com (d06av02.portsmouth.uk.ibm.com [9.149.37.228]) by d06nrmr1806.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o1HHqelX1179884 for ; Wed, 17 Feb 2010 17:52:40 GMT Received: from d06av02.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av02.portsmouth.uk.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id o1HHqd2Z023142 for ; Wed, 17 Feb 2010 17:52:39 GMT Content-Disposition: inline In-Reply-To: <4B7BC47D.4030808@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Wed, Feb 17, 2010 at 12:27:09PM +0200, Avi Kivity wrote: > On 02/17/2010 11:43 AM, borove@il.ibm.com wrote: > >From: Eran Borovik > > > >This patch adds modifications to allow correct > >balloon operation when a virtual guest uses a direct assigned device. > >The modifications include a new interface between qemu and kvm to allow > >mapping and unmapping the pages from the IOMMU as well as pinning and unpinning as needed. > > The plan for iommu support is to push it into uio. Instead of kvm > managing the iommu directly, I'd like qemu to open a uio device and > set up an iommu mapping there, which will just happen to match the > kvm memory slots. Similarly, interrupts will be forwarded using > irqfds. This will allow using the iommu without kvm, and reduce the > amount of special purpose kvm code. > > These patches make the transition more difficult which worries me. That's a fair point, but they also address a real short-coming of the current device assignment code, which pins all of the guest's memory unconditionally. Unless the uio effort is in progress and expected to complete shortly, I would think the benefit of these simple patches trumps the cost. Cheers, Muli