Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp4004817imm; Mon, 20 Aug 2018 08:15:02 -0700 (PDT) X-Google-Smtp-Source: AA+uWPx7ZdqAN6LjC/b0ZsJuS7Dlq3VF/XJ/A159I61IPQN1PANlUubUIOGZjdZEFwOeJeoZaBJt X-Received: by 2002:a17:902:bb98:: with SMTP id m24-v6mr5780970pls.170.1534778102863; Mon, 20 Aug 2018 08:15:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534778102; cv=none; d=google.com; s=arc-20160816; b=e+xepw9ONrU3ZURmIk4oNBR2M9Ybnrgv0KNNqrXyMMP6+AOnhNwjugkjhNYsR70OBl rLHNjrUorN+ysO/KHTfy56oQG6JlI1wD2P5QmpFiMoPSbMyYT35SC6dZm1qQJCx4O/P2 azPKK23+v7F1IRp5b1opxaUmxmUEH9cUJoA3aqUeHO0a3YjfMZPqku9C5H7FbCB1JYmo j2kvZXD+FBWBiraQwzUKiOj2bKQZBlq53TgsN23Sq9l7PaLOfezTEHsV2N9agcgjdA/X YiaRoCC8a1r6U2qxyk0dJYtWZRfaLe0xIp6CZ3vzvR+azp+Gbj/Fwgs4OFZZXx1a/LvL F79g== 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:arc-authentication-results; bh=Tvqp3GD2fncLn+9bfa73mAqglOw77tyuwndJDh3XnMA=; b=dfKTzptZ+/YRWeqPn0ywqHJId/M9x++ojS8quD3gj2MAWLvNMos6zz4uzhI8IT740P O7gy0G2j1d0BYl50sRPDfeRUCJGyeI6qMSPyiFvFTG3av84uS+K/WQMRpq62qneV/k9O sbyzs2wnCiSvWKsCDeeue9dnfMKTwnzN2R9takbLVuK1SrkMh4H1+eCNjvsqL1eHTwDH ajhX5wAKgayrs7QDrr7sbJljuwDe9F3lZBAxG25bXj12GarzgYBZbvDKftA9ShODq4Tg Pcr7vEIJUZVQ5zRQvNYVr5ZMeH17AmMBLLHft8DBxNj+XCXi8dkPYMSHB2LDUWLqs4pq +F0Q== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d8-v6si1896364pgt.42.2018.08.20.08.14.45; Mon, 20 Aug 2018 08:15:02 -0700 (PDT) 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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726498AbeHTRX6 convert rfc822-to-8bit (ORCPT + 99 others); Mon, 20 Aug 2018 13:23:58 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:46254 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726119AbeHTRX6 (ORCPT ); Mon, 20 Aug 2018 13:23:58 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0FF0E8780F; Mon, 20 Aug 2018 14:08:10 +0000 (UTC) Received: from gondolin (dhcp-192-222.str.redhat.com [10.33.192.222]) by smtp.corp.redhat.com (Postfix) with ESMTP id 90ABF2026D66; Mon, 20 Aug 2018 14:08:04 +0000 (UTC) Date: Mon, 20 Aug 2018 16:08:02 +0200 From: Cornelia Huck To: Tony Krowiak Cc: linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, freude@de.ibm.com, schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com, borntraeger@de.ibm.com, kwankhede@nvidia.com, bjsdjshi@linux.vnet.ibm.com, pbonzini@redhat.com, alex.williamson@redhat.com, pmorel@linux.vnet.ibm.com, alifm@linux.vnet.ibm.com, mjrosato@linux.vnet.ibm.com, jjherne@linux.vnet.ibm.com, thuth@redhat.com, pasic@linux.vnet.ibm.com, berrange@redhat.com, fiuczy@linux.vnet.ibm.com, buendgen@de.ibm.com, frankja@linux.ibm.com, Tony Krowiak Subject: Re: [PATCH v9 13/22] s390: vfio-ap: sysfs interface to view matrix mdev matrix Message-ID: <20180820160802.1fe8f704.cohuck@redhat.com> In-Reply-To: <1534196899-16987-14-git-send-email-akrowiak@linux.vnet.ibm.com> References: <1534196899-16987-1-git-send-email-akrowiak@linux.vnet.ibm.com> <1534196899-16987-14-git-send-email-akrowiak@linux.vnet.ibm.com> Organization: Red Hat GmbH MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8BIT X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Mon, 20 Aug 2018 14:08:10 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Mon, 20 Aug 2018 14:08:10 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'cohuck@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 13 Aug 2018 17:48:10 -0400 Tony Krowiak wrote: > From: Tony Krowiak > > Provides a sysfs interface to view the AP matrix configured for the > mediated matrix device. > > The relevant sysfs structures are: > > /sys/devices/vfio_ap/matrix/ > ...... [mdev_supported_types] > ......... [vfio_ap-passthrough] > ............ [devices] > ...............[$uuid] > .................. matrix > > To view the matrix configured for the mediated matrix device, > print the matrix file: > > cat matrix > > Below are examples of the output from the above command: > > Example 1: Adapters and domains assigned > Assignments: > Adapters 5 and 6 > Domains 4 and 71 (0x47) > > Output > 05.0004 > 05.0047 > 06.0004 > 06.0047 > > Examples 2: Only adapters assigned > Assignments: > Adapters 5 and 6 > > Output: > 05. > 06. > > Examples 3: Only domains assigned > Assignments: > Domains 4 and 71 (0x47) > > Output: > .0004 > .0047 I find this output to be a bit confusing; but OTOH, I'm probably not the person to parse it :) Still, some comments. From previous discussions, ISTR that this is mainly supposed to be a debugging/administration aid. Of course, this generates some questions: - Should this be in sysfs (sysfs attributes are supposed to follow the "one value per file" rule, at least for the most part), or would debugfs be a better fit? - Should userspace code be able to introspect the current configuration? If yes, it might be better to have some not-so-nice-but-easily-parsable output, possibly one attribute for the assigned adapters and one for the assigned domains, and a tool which distills that into a nice "matrix" with labeled rows and columns for human consumption. That said, I don't really have major objections to that interface. > > Signed-off-by: Tony Krowiak > Reviewed-by: Halil Pasic > Tested-by: Michael Mueller > Tested-by: Farhan Ali > Tested-by: Pierre Morel > Signed-off-by: Christian Borntraeger > --- > drivers/s390/crypto/vfio_ap_ops.c | 52 +++++++++++++++++++++++++++++++++++++ > 1 files changed, 52 insertions(+), 0 deletions(-)