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: Fri, 09 Dec 2011 14:37:19 +0100 Message-ID: <4EE20F0F.5000706@de.ibm.com> References: <20111209112326.454852716@de.ibm.com> <20111209112752.097882009@de.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Avi Kivity , borntrae@linux.vnet.ibm.com, Constantin Werner , heicars2@linux.vnet.ibm.com, huckc@linux.vnet.ibm.com, Jens Freimann , KVM , mschwid2@linux.vnet.ibm.com, Marcelo Tossati To: Joachim von Buttlar Return-path: Received: from e06smtp18.uk.ibm.com ([195.75.94.114]:59711 "EHLO e06smtp18.uk.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753402Ab1LINiA (ORCPT ); Fri, 9 Dec 2011 08:38:00 -0500 Received: from /spool/local by e06smtp18.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 9 Dec 2011 13:37:54 -0000 Received: from d06av04.portsmouth.uk.ibm.com (d06av04.portsmouth.uk.ibm.com [9.149.37.216]) by d06nrmr1407.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id pB9Dbjon2101456 for ; Fri, 9 Dec 2011 13:37:45 GMT Received: from d06av04.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av04.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id pB9DbjoF009011 for ; Fri, 9 Dec 2011 06:37:45 -0700 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On 09.12.2011 13:52, Joachim von Buttlar wrote: > Shouldn't it be: page_set_storage_key(pte_val(*ptep), skey | > _PAGE_CHANGED, 1); > > + /* avoid race clobbering changed bit > */ > + pte_val(*ptep) |= _PAGE_SWC; No, the guest GR/GC bits get set to the value userspace wants down below (this is set storage key after all), and for the host we turn on Martins _PAGE_SWC software bit in the pte to make sure we don't underindicate changed. As far as I can tell, this should be just fine. > Typo: /* put acc+f plus guest referenced and changed into the will fix.