Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp3209389pxb; Tue, 12 Jan 2021 08:55:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJzBXJXdtHkDRBX0LUHp0TJUg8GqRdZ+jftRGrD/j02tdmN2saRN4J+0OUcuHI89/B45CYgE X-Received: by 2002:aa7:dd4b:: with SMTP id o11mr35394edw.303.1610470534332; Tue, 12 Jan 2021 08:55:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610470534; cv=none; d=google.com; s=arc-20160816; b=Qb393INjBP9XIQaCDw2AJwvqHYsn6iy77lLeg1oDRXuLk9RWeHb9Z/36TqM01CtCFe ojSwIp0ckraLbTicTAwbHh2m8AJnC/ilYONlffttZ70YyotxzNOxo7BOawkjOb0T+T57 JEWFJObVZKiEe2gIi7qqxbOjTGmpUFsVFsaPt9BQmO8zzH/NpqbzYgK2HQMJSa5f87Vc KjF3kxegL2AJfw+gnH25+r3OCyuoUXxPCW8JFWHxGp0oQoM8dCgx3peXQtRVhnwR4pSr J1KaaRp+L9VnJ4ZlAM+MHbPcRM5im+RYXjYX7QI/Y+7sq6E6q9sjKw362M6C8HLJh4kg hH1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date:dkim-signature; bh=+xDJ/GwXzqZnZwWAa2hTpBrf6xeezV+MBDuicE0JjlQ=; b=rLrmZNgxf0NtljZEYBiUhbzc14REYgft7T2tZFIvXTA40284LHy68dOUv4y2dv8Yen OZyirxZbEu7j+NyWYtCZGhQU2a2Pd0pa5vq5Wta5d2WCNg15X5cUAW0Ju7QI1yoWPlHD ZjZ5iv581EhcyCGTsJGHpK1PRbdqTMBdyCG7K++hqhFAm4DKZoNOVT40ePG1HieVvADf rxPPt4At5eq5zoJ+8piAAtIjp5iUEQJeVaNCgiupqxlNeGFDoPK+MppnjlLQ9zHlGVaY NIvRF7OQamTaPNPgqcaKll9rs7JINcEeIpNXX5MK8mBq/T/Gn4qkztIi9HHBSO5pDFse hf6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=JPuFuNr8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d16si1339959ejz.96.2021.01.12.08.55.10; Tue, 12 Jan 2021 08:55:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=JPuFuNr8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404188AbhALQvJ (ORCPT + 99 others); Tue, 12 Jan 2021 11:51:09 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:9532 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729923AbhALQvI (ORCPT ); Tue, 12 Jan 2021 11:51:08 -0500 Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 10CGjLKb116183; Tue, 12 Jan 2021 11:50:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=date : from : to : cc : subject : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=pp1; bh=+xDJ/GwXzqZnZwWAa2hTpBrf6xeezV+MBDuicE0JjlQ=; b=JPuFuNr8vASY2+cmA/WpN4fKyt9oTubScEL07X58eYPhHl4WDNx1R6cAnzO5X0p+2pYf Rs4MvFQDfdzUHyIPAEjbqxBByVBB6HgTYYvq1q89JY5tchuLrn2+Ez2nubsqqSgGQ6jw FlwFz7iD4ET4rG5pnIGsGsUqWQynLys6dvZmo7Cqu+e8K95bSsu02naueBNDBCcI5zsD R/Gc85ns3T8X9ICMOh4L4CfY9CbIteRt87a0pda21fbGbT2+ZlyLMGRSYpKudu0noIhA CcTu5K1FHotXujSeOWaeQSXruquNYwN63ScZlQQ5AcZzx2JW035zs9sMpHSf6b4vSmjp qg== Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 361fjp03bh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 12 Jan 2021 11:50:26 -0500 Received: from m0098419.ppops.net (m0098419.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 10CGm0n4121443; Tue, 12 Jan 2021 11:50:26 -0500 Received: from ppma06ams.nl.ibm.com (66.31.33a9.ip4.static.sl-reverse.com [169.51.49.102]) by mx0b-001b2d01.pphosted.com with ESMTP id 361fjp03ag-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 12 Jan 2021 11:50:26 -0500 Received: from pps.filterd (ppma06ams.nl.ibm.com [127.0.0.1]) by ppma06ams.nl.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 10CGmCDY019800; Tue, 12 Jan 2021 16:50:24 GMT Received: from b06avi18878370.portsmouth.uk.ibm.com (b06avi18878370.portsmouth.uk.ibm.com [9.149.26.194]) by ppma06ams.nl.ibm.com with ESMTP id 35ydrdbgc8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 12 Jan 2021 16:50:24 +0000 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06avi18878370.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 10CGoGF731588636 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 12 Jan 2021 16:50:16 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7FC805204F; Tue, 12 Jan 2021 16:50:21 +0000 (GMT) Received: from li-e979b1cc-23ba-11b2-a85c-dfd230f6cf82 (unknown [9.171.60.135]) by d06av21.portsmouth.uk.ibm.com (Postfix) with SMTP id BF42852052; Tue, 12 Jan 2021 16:50:20 +0000 (GMT) Date: Tue, 12 Jan 2021 17:50:19 +0100 From: Halil Pasic To: Tony Krowiak Cc: linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, freude@linux.ibm.com, borntraeger@de.ibm.com, cohuck@redhat.com, mjrosato@linux.ibm.com, alex.williamson@redhat.com, kwankhede@nvidia.com, fiuczy@linux.ibm.com, frankja@linux.ibm.com, david@redhat.com, hca@linux.ibm.com, gor@linux.ibm.com Subject: Re: [PATCH v13 10/15] s390/zcrypt: driver callback to indicate resource in use Message-ID: <20210112175019.3e8de88c.pasic@linux.ibm.com> In-Reply-To: <20201223011606.5265-11-akrowiak@linux.ibm.com> References: <20201223011606.5265-1-akrowiak@linux.ibm.com> <20201223011606.5265-11-akrowiak@linux.ibm.com> Organization: IBM X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.32; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.343,18.0.737 definitions=2021-01-12_12:2021-01-12,2021-01-12 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 adultscore=0 mlxscore=0 suspectscore=0 phishscore=0 mlxlogscore=999 priorityscore=1501 malwarescore=0 spamscore=0 bulkscore=0 lowpriorityscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101120091 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 22 Dec 2020 20:16:01 -0500 Tony Krowiak wrote: > Introduces a new driver callback to prevent a root user from unbinding > an AP queue from its device driver if the queue is in use. The callback > will be invoked whenever a change to the AP bus's sysfs apmask or aqmask > attributes would result in one or more AP queues being removed from its > driver. If the callback responds in the affirmative for any driver > queried, the change to the apmask or aqmask will be rejected with a device > busy error. > > For this patch, only non-default drivers will be queried. Currently, > there is only one non-default driver, the vfio_ap device driver. The > vfio_ap device driver facilitates pass-through of an AP queue to a > guest. The idea here is that a guest may be administered by a different > sysadmin than the host and we don't want AP resources to unexpectedly > disappear from a guest's AP configuration (i.e., adapters and domains > assigned to the matrix mdev). This will enforce the proper procedure for > removing AP resources intended for guest usage which is to > first unassign them from the matrix mdev, then unbind them from the > vfio_ap device driver. > > Signed-off-by: Tony Krowiak > Reviewed-by: Harald Freudenberger Reviewed-by: Halil Pasic