From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [patch 3/3] KVM: propagate fault r/w information to gup(), allow read-only mappings Date: Wed, 20 Oct 2010 12:36:34 +0200 Message-ID: <4CBEC632.8090600@redhat.com> References: <20101019162613.278902252@redhat.com> <20101019162726.570196410@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, aarcange@redhat.com To: Marcelo Tosatti Return-path: Received: from mx1.redhat.com ([209.132.183.28]:39064 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751894Ab0JTKgi (ORCPT ); Wed, 20 Oct 2010 06:36:38 -0400 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o9KAab4H024969 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 20 Oct 2010 06:36:38 -0400 In-Reply-To: <20101019162726.570196410@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 10/19/2010 06:26 PM, Marcelo Tosatti wrote: > As suggested by Andrea, pass r/w error code to gup(), upgrading read fault > to writable if host pte allows it. > Looks good. > > static pfn_t hva_to_pfn(struct kvm *kvm, unsigned long addr, bool atomic, > - bool *async) > + bool *async, bool write_fault, bool *writable) These sort of changes make reading the callers impossible, lots of true/false and NULL parameters which we have no idea what they mean. We should (later) change the functions to accept a structure with named fields for these parameters instead. -- error compiling committee.c: too many arguments to function