Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp17935209ybl; Thu, 2 Jan 2020 15:07:26 -0800 (PST) X-Google-Smtp-Source: APXvYqzFs2dDE+0lyhkB679qyy8rZ53dErNCNjqlif9F9fc/y3dslz1NRX9/VJ7BqJlRBxj8LFdA X-Received: by 2002:aca:c509:: with SMTP id v9mr3024856oif.151.1578006446172; Thu, 02 Jan 2020 15:07:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578006446; cv=none; d=google.com; s=arc-20160816; b=MciN/ggE29dZvpVvojSAsGzb69DNoVO6SI5CQlxOb5Y0i7ALn+fO9g+O4GpCYVzYDp zEKHfEMxIarsd9uhIUUGLKjsKDqGYzipur7T+eM5qzvVcgMxlBIWLBAjwPN9LWYN200a sCdRiYfpaqq4s9smbflmdqpY1ZDgDG8c3wm2T3ZDxrnR+A9bB1JKINCHuHW7O19Yy3sk ITu3zC4nDr2XlE1YMBbMch8dfOzCIAhDc6bMYedGWsmToDicFGnFxHjQ0CDiDwUIy/Cj axpGUEQYXgyy86e34XrIfaKzV6QxWVrN3NyxUuhjjsTSiBaF+mNKSwaoD0xUn14oP5LH yIDg== 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=1EDr928r6ICPV6GA2silX+LzymUlzKwLZKE3TJEe1GA=; b=kPsANRus8DMz3CnywZtuCpWuqL4NodFj7ylBnpMrt6t0WWbOFgdj1jqhgHw+l1idw+ Pc2MXsWIns1RgWZu5PDGduMei3FTYMzg19iS3nrlrdyDkXQOah9KTjUd2yKHeXfU2gIV DaLOFbGL1bzHvLIpARuIhJMsGjNMr42YtASJXsL0LCmHs6Mysv7ZfZIZZ7kNnAhHUWIn HsLNxHVozk09+sbBaUGR/0lZzWltPmSv7lcdZgwtGE5+dkDqrwQ38oO7D42XCIsJa8Pw xf8pv2/ylluQXqfY1kQOfEQf5JMTNRZeVPAVFkLO9192ptXzTeyuVYxGbvJHZZe9BE4z mhmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=fATuGpeO; 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 17si12557235oix.22.2020.01.02.15.07.14; Thu, 02 Jan 2020 15:07:26 -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=fATuGpeO; 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 S1728552AbgABWVP (ORCPT + 99 others); Thu, 2 Jan 2020 17:21:15 -0500 Received: from mail.kernel.org ([198.145.29.99]:39972 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728957AbgABWVN (ORCPT ); Thu, 2 Jan 2020 17:21:13 -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 856EE21582; Thu, 2 Jan 2020 22:21:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578003673; bh=HGgnOYkB19A8Cw6IPyxZwHC7IDJme7G/UiR6JnagRPE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fATuGpeOZryiEr1Pd76QvzL/ZTj3NwCXqrB0/S1q+9oUSMAy1YG0z6eUmsKuiIn4j 6ND6e8OeG8L08Vw+2hCmnmJA40dfdtxkbxf5LBsOO1B2copP10w1LDCrXf/F6DdpRm 5CDsL09NEIeDpjgPgd2PRX6nNpYLjYj6Ewa5OAp8= 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 4.19 066/114] s390/zcrypt: handle new reply code FILTERED_BY_HYPERVISOR Date: Thu, 2 Jan 2020 23:07:18 +0100 Message-Id: <20200102220035.719088798@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200102220029.183913184@linuxfoundation.org> References: <20200102220029.183913184@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 2e1a27bd97d1..2126f4cc6d37 100644 --- a/drivers/s390/crypto/zcrypt_error.h +++ b/drivers/s390/crypto/zcrypt_error.h @@ -62,6 +62,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 @@ -92,6 +93,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