From patchwork Mon Feb 6 16:45:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janis Schoetterl-Glausch X-Patchwork-Id: 53439 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2340582wrn; Mon, 6 Feb 2023 08:53:09 -0800 (PST) X-Google-Smtp-Source: AK7set/Mq14wu/cObPYs9xF9KvcT8KwI17Jhswx08LQzjSlKtYB4idzgN9u/ouRd+i5R+JX1IpCF X-Received: by 2002:a17:906:8da:b0:87b:db53:3829 with SMTP id o26-20020a17090608da00b0087bdb533829mr20177116eje.46.1675702389556; Mon, 06 Feb 2023 08:53:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675702389; cv=none; d=google.com; s=arc-20160816; b=q57DJ7Jw5eFavWNHFMLUCxop1+SNhszhkKmMeBrdEKfnyIwVpval9jhqFMjaMhmAye TgUTMH7DgOILiQ1I6Zm9rhV+LUc0cBdJXbPJKrYsaJwQmqejm/cP6gHULGc7fq0qEdqr AC0pXEqZEwkchALWJwnmlAafKmHePaQN4XoligEE7BsyVpPWxoIzTWO6vS5gdmNIkJog 8Gqesn9Td0iHBjM8ZVErlA/2cIeHRFuZ75/1JJNDtsdmXVTrJVDKEsaYStKHR7GEIFkK Db2s6zdF8QIKVdD6WfPTvcxGWrVKsn4GYR5jRlaKyx0sXzL+X+2l9MgnONZIT9Q2I9Qg jgQg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=WjhByBg2KOi/yDgilkZ9dXymYLIVfqaoq3FE1wy/xeY=; b=Ko+7i005OLZZmH16dyU/YJvhtWk/voQ8Fx/mKYUckpsxpYAWh43vQKGXVU9KjT1T6s bsj+7krfOzTQ36Pku6ZKlYoTnbeh9d9fIkehol7sUwM9T6aCIcqhMvQ4ypEnuF4qt7NV eWgEpQ4ENAjVO589JHHXWUVH9TjZMuG+U95utli83vapMwKFs25aQlZANyPIzVWGmi36 EZ3CCYe5mbMfZ4ddSFpBPvkKxiy8+LmZdL3/u2VIdnJa+TIBoiRlyJICa7SPS5TfeurD N6me6h0BFhqllQ13R3yUagfMMc22zlQpH2C142IGMNJ3PFRsWcCqJw1dheRRfY8oRIfO fauQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=EHPsKjNV; 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=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l6-20020a170907914600b0088adcfbd9basi10360339ejs.988.2023.02.06.08.52.43; Mon, 06 Feb 2023 08:53:09 -0800 (PST) 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=EHPsKjNV; 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=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231136AbjBFQvx (ORCPT + 99 others); Mon, 6 Feb 2023 11:51:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59622 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230033AbjBFQvu (ORCPT ); Mon, 6 Feb 2023 11:51:50 -0500 Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7DCBD28D21; Mon, 6 Feb 2023 08:51:29 -0800 (PST) Received: from pps.filterd (m0127361.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 316Gjf0H029652; Mon, 6 Feb 2023 16:51:14 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=WjhByBg2KOi/yDgilkZ9dXymYLIVfqaoq3FE1wy/xeY=; b=EHPsKjNVubXtAynVcC3WyTEeu6M/1+BwjtEBDDSH8PbEGtvM7NEcz1U8FTnGrRRfDr0K +n8hFRXg92lmPmjqRKUwCNf0Yt5wGG8v39HWKXECnWp4RJyQFIM3YLet2yNXApso6jFZ WuoZdsY4v/qnJI0e8jWCvqQtidGbeyp0OfpKUKJafrbV4MAE4xkMIGcA/0L1s69POFvS iu0wcPjeNwq56yt02dHl+aPtHX+lb7TtSjNPQ6WAe12bBEltNVUWVXY/SnX8uqGmE/xN qXDE3ZbdXAWgmp2F0zeBlXb7oBf8wFlYPXubaD49m00c+Y4BaktT/PNW1uh5sSlLWb8O zg== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3nk51jgrk2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 06 Feb 2023 16:51:13 +0000 Received: from m0127361.ppops.net (m0127361.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 316GjgFn029746; Mon, 6 Feb 2023 16:51:13 GMT Received: from ppma01fra.de.ibm.com (46.49.7a9f.ip4.static.sl-reverse.com [159.122.73.70]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3nk51jgrj6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 06 Feb 2023 16:51:13 +0000 Received: from pps.filterd (ppma01fra.de.ibm.com [127.0.0.1]) by ppma01fra.de.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 316Ei0pR001412; Mon, 6 Feb 2023 16:46:11 GMT Received: from smtprelay03.fra02v.mail.ibm.com ([9.218.2.224]) by ppma01fra.de.ibm.com (PPS) with ESMTPS id 3nhf06hva7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 06 Feb 2023 16:46:11 +0000 Received: from smtpav01.fra02v.mail.ibm.com (smtpav01.fra02v.mail.ibm.com [10.20.54.100]) by smtprelay03.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 316Gk7eJ44957972 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 6 Feb 2023 16:46:07 GMT Received: from smtpav01.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 821142004B; Mon, 6 Feb 2023 16:46:07 +0000 (GMT) Received: from smtpav01.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 05E6E20043; Mon, 6 Feb 2023 16:46:07 +0000 (GMT) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by smtpav01.fra02v.mail.ibm.com (Postfix) with ESMTP; Mon, 6 Feb 2023 16:46:06 +0000 (GMT) From: Janis Schoetterl-Glausch To: Christian Borntraeger , Janosch Frank , Claudio Imbrenda , Heiko Carstens , Vasily Gorbik , Alexander Gordeev Cc: Janis Schoetterl-Glausch , David Hildenbrand , Jonathan Corbet , kvm@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-s390@vger.kernel.org, Paolo Bonzini , Shuah Khan , Sven Schnelle , Nico Boehr Subject: [PATCH v7 06/14] KVM: s390: selftest: memop: Fix wrong address being used in test Date: Mon, 6 Feb 2023 17:45:54 +0100 Message-Id: <20230206164602.138068-7-scgl@linux.ibm.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230206164602.138068-1-scgl@linux.ibm.com> References: <20230206164602.138068-1-scgl@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: NLLjc3mg75oQFyJ83caaWuTGMmRVAVRU X-Proofpoint-ORIG-GUID: ukDrcJ6h10Uf2gtP2xiLX8vyEKQGbH46 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.930,Hydra:6.0.562,FMLib:17.11.122.1 definitions=2023-02-06_07,2023-02-06_03,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 mlxscore=0 phishscore=0 spamscore=0 impostorscore=0 lowpriorityscore=0 adultscore=0 bulkscore=0 priorityscore=1501 mlxlogscore=990 malwarescore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2302060144 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,RCVD_IN_MSPIKE_H2,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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757101308759181040?= X-GMAIL-MSGID: =?utf-8?q?1757101308759181040?= The guest code sets the key for mem1 only. In order to provoke a protection exception the test codes needs to address mem1. Signed-off-by: Janis Schoetterl-Glausch Reviewed-by: Nico Boehr --- tools/testing/selftests/kvm/s390x/memop.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/kvm/s390x/memop.c b/tools/testing/selftests/kvm/s390x/memop.c index 033a8603a096..1ae5c01f9904 100644 --- a/tools/testing/selftests/kvm/s390x/memop.c +++ b/tools/testing/selftests/kvm/s390x/memop.c @@ -450,9 +450,9 @@ static void test_errors_key(void) /* vm/vcpu, mismatching keys, fetch protection in effect */ CHECK_N_DO(ERR_PROT_MOP, t.vcpu, LOGICAL, WRITE, mem1, t.size, GADDR_V(mem1), KEY(2)); - CHECK_N_DO(ERR_PROT_MOP, t.vcpu, LOGICAL, READ, mem2, t.size, GADDR_V(mem2), KEY(2)); + CHECK_N_DO(ERR_PROT_MOP, t.vcpu, LOGICAL, READ, mem2, t.size, GADDR_V(mem1), KEY(2)); CHECK_N_DO(ERR_PROT_MOP, t.vm, ABSOLUTE, WRITE, mem1, t.size, GADDR_V(mem1), KEY(2)); - CHECK_N_DO(ERR_PROT_MOP, t.vm, ABSOLUTE, READ, mem2, t.size, GADDR_V(mem2), KEY(2)); + CHECK_N_DO(ERR_PROT_MOP, t.vm, ABSOLUTE, READ, mem2, t.size, GADDR_V(mem1), KEY(2)); kvm_vm_free(t.kvm_vm); }