From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [patch 07/11] [PATCH] kvm-s390-ucontrol: interface to inject faults on a vcpu page table Date: Wed, 04 Jan 2012 19:25:20 +0200 Message-ID: <4F048B80.40508@redhat.com> References: <20120104092519.060746143@de.ibm.com> <20120104093602.530415566@de.ibm.com> <4F0467BE.8010908@redhat.com> <4F0479C7.4060500@de.ibm.com> <4F047F94.8050000@de.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Marcelo Tossati , borntrae@linux.vnet.ibm.com, heicars2@linux.vnet.ibm.com, mschwid2@linux.vnet.ibm.com, huckc@linux.vnet.ibm.com, KVM , Joachim von Buttlar , Jens Freimann , agraf@suse.de To: Carsten Otte Return-path: Received: from mx1.redhat.com ([209.132.183.28]:45220 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756472Ab2ADRZb (ORCPT ); Wed, 4 Jan 2012 12:25:31 -0500 In-Reply-To: <4F047F94.8050000@de.ibm.com> Sender: kvm-owner@vger.kernel.org List-ID: On 01/04/2012 06:34 PM, Carsten Otte wrote: > Avi wrote: >> There is an alternative, if you can recognize this condition exactly >> from the hardware fault, you can fault the lowcore yourself and retry. >> This eliminates a user interface. Is this workable? > I've read your comment again, and understood it this time. Trouble is > that the kernel cannot handle the situation either: userspace may need > to malloc some memory and call KVM_S390_UCAS_MAP prior to resolving it. > One could avoid the user interface by partially handling it in-kernel > and partially handling it in userspace without handshaking: > - user calls KVM_RUN > - SIE validity intercept > - kernel tries to gmap_fault and recognizes -EFAULT > - kernel returns validity intercept to user > - user does KVM_S390_UCAS_MAP > - user calls KVM_RUN > - SIE validity intercept > - kernel tries to gmap_fault and succeeds > - SIE runs ok > > I guess I prefer to do processing of one operation in one place, and > thus I prefer the user interface over this. But yes, it'd be workable > without this interface. Is this what you want? No, I think your patch as is would be better. Thanks. -- error compiling committee.c: too many arguments to function