From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Otte Subject: Re: [patch 07/11] [PATCH] kvm-s390-ucontrol: interface to inject faults on a vcpu page table Date: Wed, 04 Jan 2012 17:34:28 +0100 Message-ID: <4F047F94.8050000@de.ibm.com> References: <20120104092519.060746143@de.ibm.com> <20120104093602.530415566@de.ibm.com> <4F0467BE.8010908@redhat.com> <4F0479C7.4060500@de.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed 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: Avi Kivity Return-path: Received: from e06smtp16.uk.ibm.com ([195.75.94.112]:35718 "EHLO e06smtp16.uk.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756318Ab2ADQe4 (ORCPT ); Wed, 4 Jan 2012 11:34:56 -0500 Received: from /spool/local by e06smtp16.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 4 Jan 2012 16:34:54 -0000 Received: from d06av09.portsmouth.uk.ibm.com (d06av09.portsmouth.uk.ibm.com [9.149.37.250]) by d06nrmr1307.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q04GYqGR2727952 for ; Wed, 4 Jan 2012 16:34:52 GMT Received: from d06av09.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av09.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q04GYpRW016305 for ; Wed, 4 Jan 2012 09:34:52 -0700 In-Reply-To: <4F0479C7.4060500@de.ibm.com> Sender: kvm-owner@vger.kernel.org List-ID: 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?