Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp5274339imm; Tue, 21 Aug 2018 09:00:38 -0700 (PDT) X-Google-Smtp-Source: AA+uWPxfzyIJY5zHQYjnuOLXbpEmNTOLWJ6aqP8+Dvi5sULuG2mlaO5YRA7c+F2Hc8Qybx96O1VH X-Received: by 2002:a63:4b5a:: with SMTP id k26-v6mr47170090pgl.384.1534867238384; Tue, 21 Aug 2018 09:00:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534867238; cv=none; d=google.com; s=arc-20160816; b=lgBzdDImY9N6HjTsitd38sfw8bvV0zUb5SPV+M6Vf1Nd56EbN5tlSgup1R6lUaCI0i D2uDNfBvCepwsX54wfZy+lzkrXkW78WRPxuq4Xstpew/DxqhWy/7YQRmK0HvYRy7PqIW mMzHTd+oKmcwEaVgSpCBwbspfld3+gw/exM0Nu4ZAFbrrosTdoJllbPtk0F/4H5v5le4 JRiP1mMY3kw1SpHFkGLPDvrLoTJ6jnb1nWoqYrDlENQscU9ussiiR4qkjLySWIdPhhrj sgMZ49QfmYypZ+6BEy/h2pcqLtw2FbMfoSYMDU0ZklPu9VFgKIFM0XW0jf6n7ByQW5oy s9LA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date:arc-authentication-results; bh=9xinJefWe1vZJoRSm7PkGsm19tropn2ft+NDLDAjNiA=; b=nKbLa3vdcHrTRpqOv+OMikJQ1oxRJN4kLm5cdQG88YN55TX2wlPwvGHrLJHbvWKUp3 5v47A3PgE3Rn1eerDnmDUKk/ajnbTt6PeWTGagvLcjen/kVYpAekIHR/aoM3bFPi0vf7 qiuguJmt+jYzRmjf8N8wfgYkCAiLNA/t3jAcLsx2kaecnkKjmZfg+bpFV+HxdyJNAit8 zdCTVwrfjbhS3FpkDur5CMvgXUTj2vn9iD6+kum5ZZnunek5Ida0QzUYRHLwovTjttX1 QluQX7714iQ+OcmJ63C4rdnLPrGGqM2dLOarE7a5ywam+4gWXjyUDzTEzBsvLawjUKLE tRIg== 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h28-v6si296658pgl.629.2018.08.21.09.00.09; Tue, 21 Aug 2018 09:00:38 -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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727650AbeHURyS (ORCPT + 99 others); Tue, 21 Aug 2018 13:54:18 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:41250 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726876AbeHURyR (ORCPT ); Tue, 21 Aug 2018 13:54:17 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E5D1387A78; Tue, 21 Aug 2018 14:33:53 +0000 (UTC) Received: from gondolin (dhcp-192-222.str.redhat.com [10.33.192.222]) by smtp.corp.redhat.com (Postfix) with ESMTP id B747063F37; Tue, 21 Aug 2018 14:33:50 +0000 (UTC) Date: Tue, 21 Aug 2018 16:33:48 +0200 From: Cornelia Huck To: Pierre Morel Cc: david@redhat.com, linux-kernel@vger.kernel.org, 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: Re: [PATCH] KVM: s390: vsie: BUG correction by shadow_crycb Message-ID: <20180821163348.327ce02d.cohuck@redhat.com> In-Reply-To: <1534861178-30372-1-git-send-email-pmorel@linux.ibm.com> References: <1534861178-30372-1-git-send-email-pmorel@linux.ibm.com> Organization: Red Hat GmbH MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Tue, 21 Aug 2018 14:33:54 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Tue, 21 Aug 2018 14:33:54 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'cohuck@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 21 Aug 2018 16:19:38 +0200 Pierre Morel wrote: > Copy the key mask to the right offset inside the shadow CRYCB > > Signed-off-by: Pierre Morel > --- > 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 63844b9..a2b28cd 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)) Don't you need the address here? > return set_validity_icpt(scb_s, 0x0035U); > > scb_s->ecb3 |= ecb3_flags;