Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1982680pxk; Sat, 19 Sep 2020 08:31:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzbeFnADL0vc37RdWafkACxF5Ybzq68n88ySQu1nJCBLSVbJNZ6OilEjmKaWHw6WOxkxgkU X-Received: by 2002:a17:906:7143:: with SMTP id z3mr40323155ejj.361.1600529488508; Sat, 19 Sep 2020 08:31:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600529488; cv=none; d=google.com; s=arc-20160816; b=IZ3N/vC8AxTtmBtOKYuQ2fxpeELwgzxwJ1ahy/3eWxjY9gC2YbHl0a3GdLTtDBLAJP 6bE0pTZBYl9sYvfP2TzLrHjX01kAQBKwj2ClkJMMYd8KnXjJP/ZqQfSdWtuBunyKlxtS 6K/5gz0Vw/y2Vz36NzWrk/OZoQilPRYzTo4HiJMKO8kRlUWfIST/QY5oeZKx4qPzgL7n SYt+QGFhBbomZ6tzwHJxHNFpEROmEmYR6nC+wO4TJOXwT9i1AYWTeoCIaAHGYfF29r40 gxZEc511PUQvO19Em1UtQEaT7Ss9M9ujFE+IIczqv3pr0CDR+J1/+l6Ct8Jgx6SLzS4h t+GA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dkim-signature; bh=ByMaHlRhfX9UeaPV8oZw1IfYnw59/9a8DmVQ8Wlg9vs=; b=rGnkfs/LxcGJ65kqooOTbiZW9bm4Y6P4M1bA/T0ODdaYlJ6sz56Ta0fHGcJCFVC6lR Tdy0sIL2DIiB7JatjvaVbHbyTIWTQzfJwtZd7DLYuuw4F82+Qk/kpUvBcqkUEAl9BoUl K2ekQK2KMy1ReDpl+0GqSASYm4XplzMFTP0YHPFERGHCLQT9UUtic13rBs71RllQJDKc HnOIY8u/IbsvY5QryWI1zJ/6N1SApXWV0h2ML0h2j4WIV3YJZf1dVucXwCncczkmdnhh dHnlMO/GAKnKfTUIDfJkb0InCM1tFhd3Q2Dxb8sreBGc6leJ8iIXVoJSELjYSvZdOLbP 9CTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=owpktlq7; 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 rp17si4288076ejb.458.2020.09.19.08.31.05; Sat, 19 Sep 2020 08:31:28 -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=@ibm.com header.s=pp1 header.b=owpktlq7; 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 S1726614AbgISP2v (ORCPT + 99 others); Sat, 19 Sep 2020 11:28:51 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:3914 "EHLO mx0b-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726449AbgISP2u (ORCPT ); Sat, 19 Sep 2020 11:28:50 -0400 Received: from pps.filterd (m0127361.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 08JF31Ro057420; Sat, 19 Sep 2020 11:28:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references; s=pp1; bh=ByMaHlRhfX9UeaPV8oZw1IfYnw59/9a8DmVQ8Wlg9vs=; b=owpktlq7Z1x7DlPW7wtmUDgB1E59Qqi/2QvVdNRApDYrHb34NkarX+ztrDjzzaNKvtF2 Hl7dP/WejYHG0MqoIUi+Z80TAqc/LQoX1lNEbpdbI55ccCuzoHri0at3jHQiHs5yn74p CutrK0hgnqa7nXW4xGV+0cvibOpjJYuQ1RFNXt2/2JbE+O55lqlKVMWhvdxg0ekQdehQ OC/Mq5tiaXlcG1wKhSB3CvWi28LLMtZADAEjsvmtOzSd7+H1ZTQ6C7OIu9iG7liE5gva +rz7WNNQr8QsV3OR8Xzgu8VtDsVmeRy0p9iM0bsoNfPXsNOMH/5co54wlZuL5IWKPzPb Kw== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 33nm628gtv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sat, 19 Sep 2020 11:28:48 -0400 Received: from m0127361.ppops.net (m0127361.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 08JF3MbV058102; Sat, 19 Sep 2020 11:28:47 -0400 Received: from ppma02wdc.us.ibm.com (aa.5b.37a9.ip4.static.sl-reverse.com [169.55.91.170]) by mx0a-001b2d01.pphosted.com with ESMTP id 33nm628gtp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sat, 19 Sep 2020 11:28:47 -0400 Received: from pps.filterd (ppma02wdc.us.ibm.com [127.0.0.1]) by ppma02wdc.us.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 08JFQWOR019121; Sat, 19 Sep 2020 15:28:47 GMT Received: from b03cxnp08028.gho.boulder.ibm.com (b03cxnp08028.gho.boulder.ibm.com [9.17.130.20]) by ppma02wdc.us.ibm.com with ESMTP id 33n9m8b6sc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sat, 19 Sep 2020 15:28:47 +0000 Received: from b03ledav005.gho.boulder.ibm.com (b03ledav005.gho.boulder.ibm.com [9.17.130.236]) by b03cxnp08028.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 08JFSiov59507026 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 19 Sep 2020 15:28:44 GMT Received: from b03ledav005.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 43DD2BE054; Sat, 19 Sep 2020 15:28:44 +0000 (GMT) Received: from b03ledav005.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3341FBE053; Sat, 19 Sep 2020 15:28:43 +0000 (GMT) Received: from oc4221205838.ibm.com (unknown [9.211.74.107]) by b03ledav005.gho.boulder.ibm.com (Postfix) with ESMTP; Sat, 19 Sep 2020 15:28:43 +0000 (GMT) From: Matthew Rosato To: alex.williamson@redhat.com, cohuck@redhat.com, schnelle@linux.ibm.com Cc: pmorel@linux.ibm.com, borntraeger@de.ibm.com, hca@linux.ibm.com, gor@linux.ibm.com, gerald.schaefer@linux.ibm.com, linux-s390@vger.kernel.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/4] s390/pci: track whether util_str is valid in the zpci_dev Date: Sat, 19 Sep 2020 11:28:36 -0400 Message-Id: <1600529318-8996-3-git-send-email-mjrosato@linux.ibm.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1600529318-8996-1-git-send-email-mjrosato@linux.ibm.com> References: <1600529318-8996-1-git-send-email-mjrosato@linux.ibm.com> X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235,18.0.687 definitions=2020-09-19_05:2020-09-16,2020-09-19 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 clxscore=1015 bulkscore=0 adultscore=0 impostorscore=0 malwarescore=0 suspectscore=0 lowpriorityscore=0 phishscore=0 mlxscore=0 mlxlogscore=906 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009190131 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We'll need to keep track of whether or not the byte string in util_str is valid and thus needs to be passed to a vfio-pci passthrough device. Signed-off-by: Matthew Rosato --- arch/s390/include/asm/pci.h | 3 ++- arch/s390/pci/pci_clp.c | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/s390/include/asm/pci.h b/arch/s390/include/asm/pci.h index 882e233..32eb975 100644 --- a/arch/s390/include/asm/pci.h +++ b/arch/s390/include/asm/pci.h @@ -132,7 +132,8 @@ struct zpci_dev { u8 rid_available : 1; u8 has_hp_slot : 1; u8 is_physfn : 1; - u8 reserved : 5; + u8 util_avail : 1; + u8 reserved : 4; unsigned int devfn; /* DEVFN part of the RID*/ struct mutex lock; diff --git a/arch/s390/pci/pci_clp.c b/arch/s390/pci/pci_clp.c index 48bf316..d011134 100644 --- a/arch/s390/pci/pci_clp.c +++ b/arch/s390/pci/pci_clp.c @@ -168,6 +168,7 @@ static int clp_store_query_pci_fn(struct zpci_dev *zdev, if (response->util_str_avail) { memcpy(zdev->util_str, response->util_str, sizeof(zdev->util_str)); + zdev->util_avail = 1; } zdev->mio_capable = response->mio_addr_avail; for (i = 0; i < PCI_STD_NUM_BARS; i++) { -- 1.8.3.1