From: Cornelia Huck Subject: Re: [PATCH v2] KVM: s390: vsie: use common code functions for pinning Date: Mon, 4 Sep 2017 11:16:50 +0200 Message-ID: <20170904111650.4d7e6dd5.cohuck@redhat.com> References: <20170901151143.22714-1-david@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, Christian Borntraeger , Paolo Bonzini , Radim =?UTF-8?B?S3LEjW3DocWZ?= To: David Hildenbrand Return-path: Received: from mx1.redhat.com ([209.132.183.28]:48774 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753323AbdIDJQ4 (ORCPT ); Mon, 4 Sep 2017 05:16:56 -0400 In-Reply-To: <20170901151143.22714-1-david@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Fri, 1 Sep 2017 17:11:43 +0200 David Hildenbrand wrote: > We will not see -ENOMEM (gfn_to_hva() will return KVM_ERR_PTR_BAD_PAGE > for all errors). So we can also get rid of special handling in the > callers of pin_guest_page() and always assume that it is a g2 error. > > As also kvm_s390_inject_program_int() should never fail, we can > simplify pin_scb(), too. > > Signed-off-by: David Hildenbrand > --- > > Based on: > git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux.git next > > v1- > v2: > - As Christian noticed, gfn_to_page() will never return -ENOMEM. So we > can simplify pin_guest_page() even more and also the callers. > > arch/s390/kvm/vsie.c | 50 +++++++++++++++++------------------------------- > include/linux/kvm_host.h | 1 + > virt/kvm/kvm_main.c | 4 ++-- > 3 files changed, 21 insertions(+), 34 deletions(-) Reviewed-by: Cornelia Huck