Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1872031imm; Wed, 16 May 2018 04:30:03 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoKMELF14ZBh3b6vNrSFul7K303ygySvMGyEc0vlzgGN44KkT22/o5GwxCDOaEODv6/FOkf X-Received: by 2002:a65:5003:: with SMTP id f3-v6mr401159pgo.433.1526470203209; Wed, 16 May 2018 04:30:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526470203; cv=none; d=google.com; s=arc-20160816; b=K05kZ7wmnDamJIpwP5uHb6hp+bZJguJ8IW4naUvBBFKCUUjYqfSFu6g89hDUnBTSsa kEvGInGJ+wWxjgVqTloXBO4NZgW/Wk77s5bP9n1ap1Ik1Z6MPC5ZdpdIK7Rz5+qpBy1W oPksueZSmB4huFhawKKFsTo5Y/EogvPtWpUdRqfUbJxR+3fdOIZThgov9lr+9TytciQR SbWKIroelW8koHnIxqMSDMt7t4j4HnLyb78mLhE7DRaobILzPhqL+G8rkH+XcdDdtF4m EJO14fPzuv08VP86KaWzU5J+DufbGdoBSGaP2PhR4s3FjBhGALftTK8tJsMIhBMZhV85 2F4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :from:references:cc:to:subject:arc-authentication-results; bh=tD2N0uKY/xAISakHW7IX4B9eVpbovX5qzvqoZcT2tFs=; b=RyNaBLkp1H99ooqaFIo8Iyoj02KxWem7VD3UH6q0alhZ3If0SgF/36U3Omx/s/Mj/7 xoGg+XStncmoS2PZTfmHjB2Br3ULGfJegqV4g+2+ynUep8HPqf+pAFqCZdSIVhCZq5Lu 2PDaFsSEvPgm8ED/ivLwstGIzwRM16VoW/P/yQLm0QZLSWIv1ARWm64bH3KvIJFzObeF itq+ZgEO3QtJ9KtZDS7gvjo6W4Ip0euVCDGTmGrE+vx+xVh0dB1ZzVjJAGw+bYRqCRI4 l72eKJmxzI8HmG1093ugP6JEY2ascFrXWqcz1YdTgjuufLlSH24JuHuCqgeS+9kVVnnB DU8g== 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=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g2-v6si2351090pfh.346.2018.05.16.04.29.48; Wed, 16 May 2018 04:30:03 -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=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752508AbeEPL3Y (ORCPT + 99 others); Wed, 16 May 2018 07:29:24 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:51458 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752101AbeEPL3X (ORCPT ); Wed, 16 May 2018 07:29:23 -0400 Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w4GBOKL3120970 for ; Wed, 16 May 2018 07:29:22 -0400 Received: from e36.co.us.ibm.com (e36.co.us.ibm.com [32.97.110.154]) by mx0a-001b2d01.pphosted.com with ESMTP id 2j0keth0hy-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 16 May 2018 07:29:22 -0400 Received: from localhost by e36.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 16 May 2018 05:29:21 -0600 Received: from b03cxnp08027.gho.boulder.ibm.com (9.17.130.19) by e36.co.us.ibm.com (192.168.1.136) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 16 May 2018 05:29:19 -0600 Received: from b03ledav001.gho.boulder.ibm.com (b03ledav001.gho.boulder.ibm.com [9.17.130.232]) by b03cxnp08027.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w4GBTFl44653464; Wed, 16 May 2018 04:29:17 -0700 Received: from b03ledav001.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 653356E035; Wed, 16 May 2018 05:29:17 -0600 (MDT) Received: from oc8043147753.ibm.com (unknown [9.80.200.126]) by b03ledav001.gho.boulder.ibm.com (Postfix) with ESMTP id 7D7796E041; Wed, 16 May 2018 05:29:14 -0600 (MDT) Subject: Re: [PATCH v5 04/13] s390: vfio-ap: base implementation of VFIO AP device driver To: pmorel@linux.ibm.com, linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org Cc: freude@de.ibm.com, schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com, borntraeger@de.ibm.com, cohuck@redhat.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 References: <1525705912-12815-1-git-send-email-akrowiak@linux.vnet.ibm.com> <1525705912-12815-5-git-send-email-akrowiak@linux.vnet.ibm.com> <9ee148c9-1d3b-860a-32d8-8a1584628233@linux.ibm.com> From: Tony Krowiak Date: Wed, 16 May 2018 07:29:13 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: <9ee148c9-1d3b-860a-32d8-8a1584628233@linux.ibm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-TM-AS-GCONF: 00 x-cbid: 18051611-0020-0000-0000-00000DF18139 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00009034; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000260; SDB=6.01033102; UDB=6.00528215; IPR=6.00812233; MB=3.00021143; MTD=3.00000008; XFM=3.00000015; UTC=2018-05-16 11:29:21 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18051611-0021-0000-0000-00006166B947 Message-Id: <25e6c874-231f-b50b-0389-d76bf44bb40f@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-05-16_05:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1805160117 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/16/2018 04:21 AM, Pierre Morel wrote: > On 07/05/2018 17:11, Tony Krowiak wrote: >> Introduces a new AP device driver. This device driver >> is built on the VFIO mediated device framework. The framework >> provides sysfs interfaces that facilitate passthrough >> access by guests to devices installed on the linux host. > ...snip... >> +static int vfio_ap_queue_dev_probe(struct ap_device *apdev) >> +{ > > You should take care of the ap devices when they are added or removed > from the matrix. > I suggest you add a remove callback to avoid unbinding a queue while > it is assigned to a guest. That makes sense, will do. > > >> + return 0; >> +} >> + >> +static void vfio_ap_matrix_dev_release(struct device *dev) >> +{ >> + struct ap_matrix *ap_matrix = dev_get_drvdata(dev); >> + >> + kfree(ap_matrix); >> +} > ...snip... >