From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Otte Subject: Re: [patch 10/12] [PATCH] kvm-s390: storage key interface Date: Sat, 10 Dec 2011 12:36:58 +0100 Message-ID: <4EE3445A.3050001@de.ibm.com> References: <20111209124925.174365304@de.ibm.com> <20111209124952.391227086@de.ibm.com> <20111209134627.GB2333@osiris.boeblingen.de.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Avi Kivity , Marcelo Tossati , borntrae@linux.vnet.ibm.com, mschwid2@linux.vnet.ibm.com, huckc@linux.vnet.ibm.com, KVM , Joachim von Buttlar , Jens Freimann , Constantin Werner To: heicars2@linux.vnet.ibm.com Return-path: Received: from e06smtp15.uk.ibm.com ([195.75.94.111]:38172 "EHLO e06smtp15.uk.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750836Ab1LJLh3 (ORCPT ); Sat, 10 Dec 2011 06:37:29 -0500 Received: from /spool/local by e06smtp15.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Sat, 10 Dec 2011 11:37:27 -0000 Received: from d06av11.portsmouth.uk.ibm.com (d06av11.portsmouth.uk.ibm.com [9.149.37.252]) by d06nrmr1307.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id pBABbOBE2044134 for ; Sat, 10 Dec 2011 11:37:25 GMT Received: from d06av11.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av11.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id pBABbOsH001507 for ; Sat, 10 Dec 2011 04:37:24 -0700 In-Reply-To: <20111209134627.GB2333@osiris.boeblingen.de.ibm.com> Sender: kvm-owner@vger.kernel.org List-ID: On 09.12.2011 14:46, heicars2@linux.vnet.ibm.com wrote: > On Fri, Dec 09, 2011 at 01:49:35PM +0100, Carsten Otte wrote: >> This patch introduces an interface to access the guest visible >> storage keys. It supports three operations that model the behavior >> that SSKE/ISKE/RRBE instructions would have if they were issued by >> the guest. These instructions are all documented in the z architecture >> principles of operation book. >> >> Signed-off-by: Carsten Otte >> --- > > [...] > >> + spin_lock(¤t->mm->page_table_lock); >> + ptep = ptep_for_addr(addr); >> + if (!ptep) >> + goto out_unlock; > > FWIW, this is also a bit odd: if the guest would perform a storage key > operation on such an address it would succeed. If the host will do it, > it will fail (which doesn't match your description above). > No? Good catch, will fix.