From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [RFC] KVM: Balloon support for device assignment Date: Sun, 21 Feb 2010 10:53:25 +0200 Message-ID: <4B80F485.50704@redhat.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> <20100217175237.GI11999@il.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Eran Borovik , kvm@vger.kernel.org, Ben-Ami Yassour , Gerd Hoffmann To: Muli Ben-Yehuda Return-path: Received: from mx1.redhat.com ([209.132.183.28]:33664 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752947Ab0BUIx3 (ORCPT ); Sun, 21 Feb 2010 03:53:29 -0500 In-Reply-To: <20100217175237.GI11999@il.ibm.com> Sender: kvm-owner@vger.kernel.org List-ID: On 02/17/2010 07:52 PM, Muli Ben-Yehuda wrote: > 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. > I'm not worried about transition cost (that's for whoever makes the transition to pay) but about how the APIs would translate to the new way of doing things. For example, it might be done using mmu notifiers. We might use the existing madvise(MADV_DONTNEED) as the entry point (though I don't know how we would indicate deflation). -- error compiling committee.c: too many arguments to function