Received: by 2002:a05:6a10:5594:0:0:0:0 with SMTP id ee20csp233867pxb; Mon, 25 Apr 2022 09:03:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwDisu99fKbDMkCXsziEK2VwF0hs+DNLGfKk7KptFRxnk4OzFRRwKCY4lGt3vJju3bwG33i X-Received: by 2002:a05:6870:1807:b0:d7:2a4c:14bc with SMTP id t7-20020a056870180700b000d72a4c14bcmr7011326oaf.143.1650902597475; Mon, 25 Apr 2022 09:03:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650902597; cv=none; d=google.com; s=arc-20160816; b=ypLVBJjx+BRXDGTLUUMrUsJtwdtcA50PQ49z7tIbdH4XJ0bfiMvS2hos+mz+7qk+6J 6jdJ1KzLZ9kyeJwfoQHWaa+BfgMES9OiopVLmajSGj7Jnb8GtwAr8Zoe/J5uxe/NCRGD QfpFDRfCg7G3knt7wWd4df/synU/MMKi8Dck22aa+kJ1q2b3qbidyrAHvqikfNUcas8o d6NyHCXbpKTGVvTC7HZlkM7lA4ZdvO8Gyj/iixe/RTOTEDUyB78GMxWrLIbPvcIJJa7T lKKYWbSoc9arQ63yzyyGrpKzoQdcbpXfvX336jabe5NFewlNsoGacnSdtcNHPK9UOdJa 8RPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=yJ1zH/5or4oymVpE6MpywAGJV0sLnLwAeYGgNXujOL8=; b=HRp7d1q3uyuc3v2EcSEw5CzE+0Y1IhVtSYhVU8byBhrx6mh45+0OHkVqTotmD7y30l ZVbhlbA0nkJnlDzq+pZezSzWXOXoeWXyxc6Hd+FEBjP5A6qFPmBCqFWu/EM+w2DmNzJj Dyz/t9jQmVchuTdgLtO2L+FLcDEGKg9qzC78QofFrLzwpzaAM1GLh3SJwz+l2tXvzfAv A+S920vBPd34rYvB7/dc2F5XZ+3c4danD1bAXz6uped44pWWFsH30fU8aKI7fYsp3Xqr KaGj29tlAcutM0fHdxoa66WUX8E8fQ7RSsJ/LSMkepq5LSJq0C4fp6szZRQLrQF0n3ef xU1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=dWVxAJAz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m8-20020a056870888800b000e9211615adsi3268390oam.142.2022.04.25.09.02.42; Mon, 25 Apr 2022 09:03:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=dWVxAJAz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240705AbiDYKFo (ORCPT + 99 others); Mon, 25 Apr 2022 06:05:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40114 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240866AbiDYKFI (ORCPT ); Mon, 25 Apr 2022 06:05:08 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B66431121; Mon, 25 Apr 2022 03:02:02 -0700 (PDT) Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 23P8bA8V017221; Mon, 25 Apr 2022 10:01:58 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding; s=pp1; bh=yJ1zH/5or4oymVpE6MpywAGJV0sLnLwAeYGgNXujOL8=; b=dWVxAJAz+HE8ivoCl8W0bOjuORNpod8q4Qkj3TavutRtDVY1XxRbMLUkpG6HDeRZmkSs VrBQcKOF7A6ROkeOuhGQiCe7gbiM8vCBKepsyxTCN4S/ziyKhfKvcJTjR4FNvALYy7dq DoXl9Hea+zosN4de4+vd4Uxgr4f2abmg8miSuBYJrEFf3FXJGoCXSttU8bSj6r56FWan ggUDG5DJETjGhssmEFUmaaqbiHbaYv+bnwB0S98zDfMJrNt2YD/afAyCoAijgrop37BS LpJuRk+BdfXOZ/WjjRMAEHxGmI5RJ9I2aip5ZoB/AJ2nESmnvSXneimp4fBLfArlNVMI eA== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3fmtt75xkj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 25 Apr 2022 10:01:58 +0000 Received: from m0098396.ppops.net (m0098396.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 23P9sQ43010172; Mon, 25 Apr 2022 10:01:58 GMT Received: from ppma03ams.nl.ibm.com (62.31.33a9.ip4.static.sl-reverse.com [169.51.49.98]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3fmtt75xju-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 25 Apr 2022 10:01:57 +0000 Received: from pps.filterd (ppma03ams.nl.ibm.com [127.0.0.1]) by ppma03ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 23P9rKOR010822; Mon, 25 Apr 2022 10:01:55 GMT Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by ppma03ams.nl.ibm.com with ESMTP id 3fm938t5p7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 25 Apr 2022 10:01:55 +0000 Received: from d06av24.portsmouth.uk.ibm.com (d06av24.portsmouth.uk.ibm.com [9.149.105.60]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 23PA1qB746858678 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 25 Apr 2022 10:01:52 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 215764203F; Mon, 25 Apr 2022 10:01:52 +0000 (GMT) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A56F742047; Mon, 25 Apr 2022 10:01:51 +0000 (GMT) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by d06av24.portsmouth.uk.ibm.com (Postfix) with ESMTP; Mon, 25 Apr 2022 10:01:51 +0000 (GMT) From: Janis Schoetterl-Glausch To: Christian Borntraeger , Janosch Frank , Claudio Imbrenda Cc: Janis Schoetterl-Glausch , David Hildenbrand , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Sven Schnelle , Paolo Bonzini , kvm@vger.kernel.org, Shuah Khan , linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org Subject: [PATCH v2 0/2] Dirtying, failing memop: don't indicate suppression Date: Mon, 25 Apr 2022 12:01:45 +0200 Message-Id: <20220425100147.1755340-1-scgl@linux.ibm.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: 4VQjVuQ6EtulenyNeAdKeaZfUj349-xi X-Proofpoint-ORIG-GUID: IplMkzRrx3fmY94QmOmdYV35_zj0R7q5 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.858,Hydra:6.0.486,FMLib:17.11.64.514 definitions=2022-04-25_05,2022-04-22_01,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 malwarescore=0 bulkscore=0 adultscore=0 mlxlogscore=739 mlxscore=0 suspectscore=0 spamscore=0 clxscore=1015 phishscore=0 impostorscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2204250040 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org If a memop fails due to key checked protection, after already having written to the guest, don't indicate suppression to the guest, as that would imply that memory wasn't modified. This could be considered a fix to the code introducing storage key support, however this is a bug in KVM only if we emulate an instructions writing to an operand spanning multiple pages, which I don't believe we do. v1 -> v2 * Reword commit message of patch 1 Janis Schoetterl-Glausch (2): KVM: s390: Don't indicate suppression on dirtying, failing memop KVM: s390: selftest: Test suppression indication on key prot exception arch/s390/kvm/gaccess.c | 47 ++++++++++++++--------- tools/testing/selftests/kvm/s390x/memop.c | 43 ++++++++++++++++++++- 2 files changed, 70 insertions(+), 20 deletions(-) base-commit: af2d861d4cd2a4da5137f795ee3509e6f944a25b -- 2.32.0