From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] provide a kvm_qemu_memory_alias() function Date: Thu, 02 Oct 2008 14:34:04 +0300 Message-ID: <48E4B1AC.4050803@redhat.com> References: <1222811248-28360-1-git-send-email-glommer@redhat.com> <1222811248-28360-2-git-send-email-glommer@redhat.com> <48E328E7.4050802@redhat.com> <5d6222a80810010655sf452ca4rda02bc5263e92efa@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Glauber Costa , kvm@vger.kernel.org, aliguori@us.ibm.com To: Glauber Costa Return-path: Received: from mx2.redhat.com ([66.187.237.31]:43428 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753030AbYJBLjU (ORCPT ); Thu, 2 Oct 2008 07:39:20 -0400 In-Reply-To: <5d6222a80810010655sf452ca4rda02bc5263e92efa@mail.gmail.com> Sender: kvm-owner@vger.kernel.org List-ID: Glauber Costa wrote: > On Wed, Oct 1, 2008 at 4:38 AM, Avi Kivity wrote: > >> Glauber Costa wrote: >> >>> Following the pattern we already do, provide a qemu_kvm wrapper to >>> the memory aliases x86 functions. Reason is that we don't want to have >>> references to the context spread over qemu. >>> >>> The destroy alias function is completely removed from libkvm/libkvm.c, >>> since no one in the code base uses it directly. >>> >>> -int kvm_destroy_memory_alias(kvm_context_t kvm, uint64_t phys_start) >>> -{ >>> - return kvm_create_memory_alias(kvm, phys_start, 0, 0); >>> -} >>> - >>> >>> >> This exists so that readers don't have to wander why you're calling >> kvm_create_memory_alias when you actually want to destroy one. >> > > So what? I'm replacing it with a kvm_qemu_destroy... that does the > very same thing, in the very same way. > only difference is the presence/absence of context. > libkvm exists to provide a sane API to applications. Using kvm_create_memory_alias() to destroy aliases is not a sane API. -- error compiling committee.c: too many arguments to function