Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1090491ybz; Thu, 16 Apr 2020 02:40:54 -0700 (PDT) X-Google-Smtp-Source: APiQypLkhH+1+2+Bt5ZS0CAfcS3QQ9GpSYPL7QSXe5/gk9DjvfeGxkVKhFa8USFV0hnLgmm7fwt9 X-Received: by 2002:aa7:d0c7:: with SMTP id u7mr15749496edo.206.1587030054269; Thu, 16 Apr 2020 02:40:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587030054; cv=none; d=google.com; s=arc-20160816; b=rgJYwwU3gft7cVsAbJBIK9XUFztHNVjRE2TsNy8b7V9wNey74IriGAWbmGO0BaLJSK rue3LzpHgI5A8v5iv8pOi5phtDBo1ywXbSe/1o5vJwx6CeFgr1u2El3EZ/z8qjgIwSrh zzVZyx2yfwMlVeP+obeRmWxgvn9H3EFbibPQeckFmFwYrbcuTvMO50D+w5hTlAyOSLuG EEU26USvcyvIFc8rf5ONOxz4cNOqhrA2i58JKFnLSd9KmQZVEljhZxtHFh/c39dg9hI2 ZKHO8NGK3Gut3VLC9Gn1yon5abj+TlLHGQYFBayhpqlxpx/DNA47Z03+vcyQRCKhxTSi EOpA== 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:dkim-signature; bh=Pj2Z5zIfZpfK9yoKUf7nhYIW+i/THuj4xzmXqydWcB0=; b=YXpM6ol5Rg8kKIfeHoGmUxY97QLar5I90syjV/7bkK/Cn+WdapTTfqbSyVpQu4IHT1 SY6EPIOEXTJb5bQej7Xk0J3f2aLGYJ1cAc/zIBTSA9FWq2kTO9R3wf7KuYMnx+8aaTwk RI0KbBue35JnSQrdWC1JQoWjxRveInXDcrb2f3sxktEZ8ksbCEaWwAXZyVli7TqmsqVp WWtCijh1n617+2m1rhBz+XLtrUQfvgzG3/iE3daCZZeNRg63ZNok6WlxB8PpHBXBKUtc CgPeerZb/X28Vo8mMXNiTGwMvI4rL+NzYNBbrM8pxcFmtRQpJSpaeRFJm54yCwtO43Z2 U5gw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=bBqzyFzT; 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l6si12320996ejd.72.2020.04.16.02.40.31; Thu, 16 Apr 2020 02:40:54 -0700 (PDT) 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=@redhat.com header.s=mimecast20190719 header.b=bBqzyFzT; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2503668AbgDPJhk (ORCPT + 99 others); Thu, 16 Apr 2020 05:37:40 -0400 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:44766 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2441114AbgDPJhg (ORCPT ); Thu, 16 Apr 2020 05:37:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1587029855; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Pj2Z5zIfZpfK9yoKUf7nhYIW+i/THuj4xzmXqydWcB0=; b=bBqzyFzTlRBAjA6y+RUkpXOXq9ab7svejpNYFTzsXnBsIuJU8MPnAipfCXiHS5LjHXQhLL tOmQyaRVBB6oedalfdvUM28r0Ix8jn26WjivxmjVB4g/v8m6+0qNPGDUAAESDN0Tt64xkH HYVG0TkmYW3JYt7/YsfwhL1BQ7xdTg0= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-44-yAynds6mNt64OS7LpyoNxA-1; Thu, 16 Apr 2020 05:37:31 -0400 X-MC-Unique: yAynds6mNt64OS7LpyoNxA-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 62F3D18FF665; Thu, 16 Apr 2020 09:37:29 +0000 (UTC) Received: from gondolin (ovpn-112-234.ams2.redhat.com [10.36.112.234]) by smtp.corp.redhat.com (Postfix) with ESMTP id 20307116D94; Thu, 16 Apr 2020 09:37:23 +0000 (UTC) Date: Thu, 16 Apr 2020 11:37:21 +0200 From: Cornelia Huck 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, mjrosato@linux.ibm.com, pmorel@linux.ibm.com, pasic@linux.ibm.com, alex.williamson@redhat.com, kwankhede@nvidia.com, jjherne@linux.ibm.com, fiuczy@linux.ibm.com Subject: Re: [PATCH v7 03/15] s390/zcrypt: driver callback to indicate resource in use Message-ID: <20200416113721.124f9843.cohuck@redhat.com> In-Reply-To: <35d8c3cb-78bb-8f84-41d8-c6e59d201ba0@linux.ibm.com> References: <20200407192015.19887-1-akrowiak@linux.ibm.com> <20200407192015.19887-4-akrowiak@linux.ibm.com> <20200414145851.562867ae.cohuck@redhat.com> <35d8c3cb-78bb-8f84-41d8-c6e59d201ba0@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.5.11.15 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 15 Apr 2020 13:10:10 -0400 Tony Krowiak wrote: > On 4/14/20 8:58 AM, Cornelia Huck wrote: > > On Tue, 7 Apr 2020 15:20:03 -0400 > > Tony Krowiak wrote: > >> + > >> + if (ap_drv->in_use) > >> + if (ap_drv->in_use(newapm, ap_perms.aqm)) > > Can we log the offending apm somewhere, preferably with additional info > > that allows the admin to figure out why an error was returned? > > One of the things on my TODO list is to add logging to the vfio_ap > module which will track all significant activity within the device > driver. I plan to do that with a patch or set of patches specifically > put together for that purpose. Having said that, the best place to > log this would be in the in_use callback in the vfio_ap device driver > (see next patch) where the APQNs that are in use can be identified. > For now, I will log a message to the dmesg log indicating which > APQNs are in use by the matrix mdev. Sounds reasonable. My main issue was what an admin was supposed to do until logging was in place :) > > > > >> + rc = -EADDRINUSE; > >> + > >> + module_put(drv->owner); > >> + > >> + return rc; > >> +}