Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1804073imm; Thu, 23 Aug 2018 09:01:37 -0700 (PDT) X-Google-Smtp-Source: AA+uWPwPSGb2n0vrEy4WZmuphPyPtiDxrlzHkrhK1h1mkOF9dR70HVraJYgKl292AgagYeK8XF9M X-Received: by 2002:a17:902:2e83:: with SMTP id r3-v6mr59172978plb.80.1535040097340; Thu, 23 Aug 2018 09:01:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535040097; cv=none; d=google.com; s=arc-20160816; b=lnDY21Ejda7j2KaadllI47RVmNeqSr4n/qY/wo/vNxaNWxl7j62UlOw0AwjiYtMXoK 6Aw89eg0cJesngStp1YdQ1qESmKgsRv2FGQx+tpkIkYvubo22O3si0lQVbKEYZfxnAbr enx7nenE4JFD0+p00E/thEgn2HSZymYd+MCo7srPRxxg5BsslICqph7KlH/niRRxhq1l 9wlJRlSKWbcSr7NqyoZVkmL1Jp4Ib7OCwdKFLepLjTwW1b8BIEHqXiznKZwcbMYIqGsT GJAanQSZVVoA7KNptugunoAQvCP1KznxXQBy0A6Cw2finnDRVFESWBzYfL/9SWcc2inX BekQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:references:in-reply-to:date :subject:cc:to:from:arc-authentication-results; bh=rJpuH6bDG4Trzjs4dcBOoTzQe78WpjxlbL3yV3aMb84=; b=VFeDY/IPw7ODNaIJ+7yodyvt7sSlOp/kDT31c6GodmWFrXLG53oUz1mvKfl8Eru8Pb /DICrJiUUiVqR+Mlditz9rb1NmAiKnNv5i9wKCzEbbeuZ86EUAX41xNIU1PX/YFf3jsE evQ7EKB3orKWIPBlCC7ZplQDnIuasQqtn/OUx6YzjO/MxhxqtYQ7GYKKY+CvHFlMGa1y 7pk378dylIXVtNRNSqMdZ5jsF4obnANZra74Q+vH4sg1s26qkX+tguCU+Zo7ctUKXoBy KNYlc0igsxHG84MSBpnwle2JFBHB8r6lBY9GiTUYYlSpduHA6Ubw/dfzjGi0jp0WhOWF HNGw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 69-v6si4493642plc.388.2018.08.23.09.01.22; Thu, 23 Aug 2018 09:01:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730306AbeHWNzI (ORCPT + 99 others); Thu, 23 Aug 2018 09:55:08 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:50132 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726522AbeHWNzH (ORCPT ); Thu, 23 Aug 2018 09:55:07 -0400 Received: from pps.filterd (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w7NAJEs5014499 for ; Thu, 23 Aug 2018 06:26:05 -0400 Received: from e06smtp01.uk.ibm.com (e06smtp01.uk.ibm.com [195.75.94.97]) by mx0a-001b2d01.pphosted.com with ESMTP id 2m1r7wqj6u-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 23 Aug 2018 06:26:05 -0400 Received: from localhost by e06smtp01.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 23 Aug 2018 11:26:03 +0100 Received: from b06cxnps4075.portsmouth.uk.ibm.com (9.149.109.197) by e06smtp01.uk.ibm.com (192.168.101.131) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Thu, 23 Aug 2018 11:26:00 +0100 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w7NAPxx919398786 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 23 Aug 2018 10:25:59 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7124CA404D; Thu, 23 Aug 2018 13:25:58 +0100 (BST) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1BC4DA4040; Thu, 23 Aug 2018 13:25:58 +0100 (BST) Received: from morel-ThinkPad-W530.boeblingen.de.ibm.com (unknown [9.152.224.92]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 23 Aug 2018 13:25:58 +0100 (BST) From: Pierre Morel To: david@redhat.com Cc: linux-kernel@vger.kernel.org, cohuck@redhat.com, linux-s390@vger.kernel.org, kvm@vger.kernel.org, frankja@linux.ibm.com, akrowiak@linux.ibm.com, borntraeger@de.ibm.com, schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com Subject: [PATCH v3 1/3] KVM: s390: vsie: copy wrapping keys to right place Date: Thu, 23 Aug 2018 12:25:54 +0200 X-Mailer: git-send-email 2.7.4 In-Reply-To: <1535019956-23539-1-git-send-email-pmorel@linux.ibm.com> References: <1535019956-23539-1-git-send-email-pmorel@linux.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18082310-4275-0000-0000-000002AE19B9 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18082310-4276-0000-0000-000037B7224A Message-Id: <1535019956-23539-2-git-send-email-pmorel@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-08-23_05:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=889 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1808230111 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Copy the key mask to the right offset inside the shadow CRYCB Signed-off-by: Pierre Morel Reviewed-by: David Hildenbrand Reviewed-by: Cornelia Huck Reviewed-by: Janosch Frank --- arch/s390/kvm/vsie.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/s390/kvm/vsie.c b/arch/s390/kvm/vsie.c index 9175518..12b9707 100644 --- a/arch/s390/kvm/vsie.c +++ b/arch/s390/kvm/vsie.c @@ -173,7 +173,8 @@ static int shadow_crycb(struct kvm_vcpu *vcpu, struct vsie_page *vsie_page) return set_validity_icpt(scb_s, 0x0039U); /* copy only the wrapping keys */ - if (read_guest_real(vcpu, crycb_addr + 72, &vsie_page->crycb, 56)) + if (read_guest_real(vcpu, crycb_addr + 72, + vsie_page->crycb.dea_wrapping_key_mask, 56)) return set_validity_icpt(scb_s, 0x0035U); scb_s->ecb3 |= ecb3_flags; -- 2.7.4