Received: by 2002:ac0:b08d:0:0:0:0:0 with SMTP id l13csp4918480imc; Mon, 25 Feb 2019 13:37:11 -0800 (PST) X-Google-Smtp-Source: AHgI3IZDUdAlsIvsqPo94VovbA7xgADmRZd7nOmptAkwkNXdiMubNZFYwIKvpuGjLCpiEFYZZUIj X-Received: by 2002:a65:438a:: with SMTP id m10mr8501619pgp.191.1551130631157; Mon, 25 Feb 2019 13:37:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551130631; cv=none; d=google.com; s=arc-20160816; b=TkqHtsu4fYj/KBVIGmPMrLf7+6B3FX94Hl+p0ir02zKcADRp5FumIZkd7qKGSKKREP eydeu3ssA9IUPrQx0ltIpfwIb6QYhh68n0jKJSe1w/hyFRWnwKPWalZ8FnOzMhGCxZ1y LoKABoSi/ychQ3jaPgd+GtmciHOcgjoEp719NJ9r3UjhUboe8V/4aREemDKVOSzi7Xnv aQ2sjcaGfkflsy1+WtH1pGDAvfQlSzb1TZjJfbP+HHR0A9MVUxGElR6oXM3OF4LitsXE 8MtBy3BTIfu21ou+ANQFzfYu+jmyrDGV/c7LCdCyH74t2wlUjOPmE7m7WaUba+iQay2T 57/A== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=pbgP/2GzTWcftrLgthGBiVcVNoTZ1/KystyRtFE+8y8=; b=a56dwvMOTdAU3tFr1+q5BQnbGicLmjhjaq2SDBFD6dKz1YdmyjNfChGj+UC3lKFvpf FpB5kkrawwvSBznzrQWdMPAHSTPDMbMqrdfajZ6wI/QovdaKpSQbHPNuQZFPzKlBsVOy +T93GAm8dJXjHi18deyz8lx/18MJyN3f+5x7zqoxLwziY1z5dp5b7ZZRCwk5gl91Bv5R I4+joEg8pf8HdoskKx8izbOcDYYBxyh1uBb0xVkTkiikXobLj1JnM+zjJRISocHV5NxL JrWpRMYWGCNwz05M5B80sY7lHnFzYZul2ttg0lEewK7lZn0Mi43eMIapk1mJiWF736FD MouA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=HnLwTpSv; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w14si10192767pga.212.2019.02.25.13.36.56; Mon, 25 Feb 2019 13:37:11 -0800 (PST) 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; dkim=pass header.i=@kernel.org header.s=default header.b=HnLwTpSv; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733164AbfBYVgX (ORCPT + 99 others); Mon, 25 Feb 2019 16:36:23 -0500 Received: from mail.kernel.org ([198.145.29.99]:43104 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731551AbfBYVgV (ORCPT ); Mon, 25 Feb 2019 16:36:21 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1058B217F5; Mon, 25 Feb 2019 21:36:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1551130580; bh=v1sokFURBqK+vDZKHhvrxZHjZV+OQwdYcYfMeG1Dj2s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HnLwTpSvC4qmcSkQtGTa6kO6vxhPlcUaXgrwNvgb/9vCPBCjGVO4+wVR+9XUHvL+t nZWmA2hUqfrF5BmMEivH/MWIz/CfLEoRiHWJ3vIybZqXBqEMynMM73iIeoo1l6v9R2 nl26WrTRXhpCSsuxQfBCNlsjtrHGjHPR9fmmaytA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Pierre Morel , Claudio Imbrenda , David Hildenbrand , Cornelia Huck , Christian Borntraeger Subject: [PATCH 4.20 166/183] s390: vsie: Use effective CRYCBD.31 to check CRYCBD validity Date: Mon, 25 Feb 2019 22:12:19 +0100 Message-Id: <20190225195123.115123633@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190225195054.748060397@linuxfoundation.org> References: <20190225195054.748060397@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.20-stable review patch. If anyone has any objections, please let me know. ------------------ From: Pierre Morel commit b10bd9a256aec504c14a7c9b6fccb6301ecf290a upstream. When facility.76 MSAX3 is present for the guest we must issue a validity interception if the CRYCBD is not valid. The bit CRYCBD.31 is an effective field and tested at each guest level and has for effect to mask the facility.76 It follows that if CRYCBD.31 is clear and AP is not in use we do not have to test the CRYCBD validatity even if facility.76 is present in the host. Fixes: 6ee74098201b ("KVM: s390: vsie: allow CRYCB FORMAT-0") Cc: stable@vger.kernel.org Signed-off-by: Pierre Morel Reported-by: Claudio Imbrenda Acked-by: David Hildenbrand Acked-by: Cornelia Huck Reviewed-by: Christian Borntraeger Message-Id: <1549876849-32680-1-git-send-email-pmorel@linux.ibm.com> Signed-off-by: Christian Borntraeger Signed-off-by: Greg Kroah-Hartman --- arch/s390/kvm/vsie.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/arch/s390/kvm/vsie.c +++ b/arch/s390/kvm/vsie.c @@ -297,7 +297,7 @@ static int shadow_crycb(struct kvm_vcpu scb_s->crycbd = 0; apie_h = vcpu->arch.sie_block->eca & ECA_APIE; - if (!apie_h && !key_msk) + if (!apie_h && (!key_msk || fmt_o == CRYCB_FORMAT0)) return 0; if (!crycb_addr)