Received: by 2002:a17:90a:9103:0:0:0:0 with SMTP id k3csp11788457pjo; Thu, 2 Jan 2020 14:17:44 -0800 (PST) X-Google-Smtp-Source: APXvYqyFxAmwzLxvhiSBAeLUB5q29RuHvrnaJSLLigWoDwJTZ3vbNZ+l1dE/dB8hQA09kxJCSvn5 X-Received: by 2002:a05:6830:1595:: with SMTP id i21mr96010487otr.29.1578003464561; Thu, 02 Jan 2020 14:17:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578003464; cv=none; d=google.com; s=arc-20160816; b=ZjYOW8CYzcdRQCL6F+BfSDKZQKyzRZm0BirMeuc8/BejQ2L2By3FxrHU8PRJ7j1H2e iBt6kWLOofnEFGQBy8cqjX5kIgzOM1RE+LQ+L/BBGa/6Y9D4EmoD7UQstyX9S6F0VVWq L9dl/fthQ96fGmnDHTxogG9l/hS86ab2QjrRt2YYXP0nbZ1X30MTSmowRimXsQeJdv7X lEm8yr8T5eX9Fp1p7Ialr+5IGuVFT50uEZAnp0NIxO3ROjpjN7lhwuSojB5kkJNO4gZf Do6xh1x1dxqjLH0/+E8DdFPhruKAPWpgVfRpdlGf/P3f+JYhk41eoTwtXc0FcmKV3M7P jOdg== 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=gn8ZK0MxdmnHxEtxw30TePXwQlPssDZlmB0dDDQEq+o=; b=t7U7Ne5Hzu+bVRYeGCu+yVBZUTxK9R6zyQ0AOZpjIgp7mZBTFZLkSMoQuZnWo7BaA9 Fh90yP56DtLDfJrPBz2WAiqOh/5B5TxJ7k6qdIB36jWz1QkBEOV4IAqeo9B1ypndExOI utzvVGg/UDQIfEj5r5LBYZwBeuG8BFtzGN2Oo5CehWJKwthzudfwp7Chmomyl9QMYtVE uPFD9G+DvC1QxHuUoqibTJXmmgrBXsTWEguU8dSeyVN5C7PgpIZDgV+UTIs3vLO32WPq AqsC/8V4SpKnuEk62If0dFakhxOU7IXXMTTkZJYMGQ9SgiBtPJARuFF5xRBhWFCZVKMA toqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=wTAy3ugb; 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 v3si10213195oth.104.2020.01.02.14.17.32; Thu, 02 Jan 2020 14:17:44 -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=wTAy3ugb; 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 S1728280AbgABWQi (ORCPT + 99 others); Thu, 2 Jan 2020 17:16:38 -0500 Received: from mail.kernel.org ([198.145.29.99]:58662 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728273AbgABWQh (ORCPT ); Thu, 2 Jan 2020 17:16:37 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.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 6FD17227BF; Thu, 2 Jan 2020 22:16:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578003396; bh=Xm07mB2Dsc0ytOIQKa0Wk2NIXYvBxnC+hk5c6Mj++e8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wTAy3ugb7mZ5js8ONWbIa2Bgj9DW0Ei6fC7MAFMnMqke666fLJ9xAuvPA/GQyPans t5vjc3qkB/4atUzyIJzlP495VFmn/4AGv1CiFSQEexYJJ05sSDHpRjuuUgh/g+UBXi 8H8lB+2e5JN8EkKn9om4wgQD95SXMd3kX4/7jv9A= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Harald Freudenberger , Vasily Gorbik , Sasha Levin Subject: [PATCH 5.4 118/191] s390/zcrypt: handle new reply code FILTERED_BY_HYPERVISOR Date: Thu, 2 Jan 2020 23:06:40 +0100 Message-Id: <20200102215842.483749743@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200102215829.911231638@linuxfoundation.org> References: <20200102215829.911231638@linuxfoundation.org> User-Agent: quilt/0.66 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 From: Harald Freudenberger [ Upstream commit 6733775a92eacd612ac88afa0fd922e4ffeb2bc7 ] This patch introduces support for a new architectured reply code 0x8B indicating that a hypervisor layer (if any) has rejected an ap message. Linux may run as a guest on top of a hypervisor like zVM or KVM. So the crypto hardware seen by the ap bus may be restricted by the hypervisor for example only a subset like only clear key crypto requests may be supported. Other requests will be filtered out - rejected by the hypervisor. The new reply code 0x8B will appear in such cases and needs to get recognized by the ap bus and zcrypt device driver zoo. Signed-off-by: Harald Freudenberger Signed-off-by: Vasily Gorbik Signed-off-by: Sasha Levin --- drivers/s390/crypto/zcrypt_error.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/s390/crypto/zcrypt_error.h b/drivers/s390/crypto/zcrypt_error.h index f34ee41cbed8..4f4dd9d727c9 100644 --- a/drivers/s390/crypto/zcrypt_error.h +++ b/drivers/s390/crypto/zcrypt_error.h @@ -61,6 +61,7 @@ struct error_hdr { #define REP82_ERROR_EVEN_MOD_IN_OPND 0x85 #define REP82_ERROR_RESERVED_FIELD 0x88 #define REP82_ERROR_INVALID_DOMAIN_PENDING 0x8A +#define REP82_ERROR_FILTERED_BY_HYPERVISOR 0x8B #define REP82_ERROR_TRANSPORT_FAIL 0x90 #define REP82_ERROR_PACKET_TRUNCATED 0xA0 #define REP82_ERROR_ZERO_BUFFER_LEN 0xB0 @@ -91,6 +92,7 @@ static inline int convert_error(struct zcrypt_queue *zq, case REP82_ERROR_INVALID_DOMAIN_PRECHECK: case REP82_ERROR_INVALID_DOMAIN_PENDING: case REP82_ERROR_INVALID_SPECIAL_CMD: + case REP82_ERROR_FILTERED_BY_HYPERVISOR: // REP88_ERROR_INVALID_KEY // '82' CEX2A // REP88_ERROR_OPERAND // '84' CEX2A // REP88_ERROR_OPERAND_EVEN_MOD // '85' CEX2A -- 2.20.1