Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1695196imm; Wed, 16 May 2018 01:28:47 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrieNVSP1YGQ0d1Pa8TKVScUEKGcF+i0Spul1jIWa1pqA15yUik3DAYl+LsTYi1F6J6CoKo X-Received: by 2002:a62:d6da:: with SMTP id a87-v6mr18960934pfl.200.1526459327766; Wed, 16 May 2018 01:28:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526459327; cv=none; d=google.com; s=arc-20160816; b=MlrU6FNudIIrY4itg66LOODkIkYYryaEIHhlcGRXql3EokyLUsbNRlffLCSAGoQweq TbfzcBU+Q6WfMA9vw1YbjQUN2JlbKzU6XkQ5/mN4VoGHfe25GWTct7mYhAU3CjVD3hT7 aNypz9h5giSPbb5Tc2ESVXvAAQ5bMnm2kZi2BashasRq7DECoy5zYbZVOGaZ9QtucP84 Nt5SGgqYBbaCxrzAiGBWOcM4orw7AMeWCSKYx4GXjggUDW1wWUdrPIIwbr3PkuYtgytV xXdEMOjGP3mwGqevsTVUcMQmLBzMKb628ShbkbQgyzlczz/z0VcO1EvSMTZUI+KlMWho hFmw== 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:reply-to:arc-authentication-results; bh=Crn93LRZfB25lvBzn+WjAgShy64Rnia4h1JypOZSs+I=; b=UCctWJ4iIn6ICS6GT8RXnuvmoEWkhYeV+1tzP6p+jCg6bP+dB9pcTblsutO6b2yo7Q UnQTsYiCOO6rMTW9fMLX9CpXA3+XPvVlq3swQqi8lwyk9ca/oYtjUY6sK8IYYNGQ4fwF ee8OD9OnWguV8SnOuFRqg8DYoEgTLOJ3uqrkul6wJScBr53DiuGLZz6uFGSPWbaMEQy4 Kp+w6j9bSdomqZVJn3WdZVo78UCm20fb7r40aR2hflYDqUADGLLUvewSdwVKjpf6ai4N CFLLZ8JxDmnl1xUDLrPAfATxJ0Y2spstSHVjQkHz9TF6I74dSXq0k7ib7E71Jed5g85s Rd6g== 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 z6-v6si2143813pfk.194.2018.05.16.01.28.33; Wed, 16 May 2018 01:28:47 -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 S1753188AbeEPI1k (ORCPT + 99 others); Wed, 16 May 2018 04:27:40 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:37646 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752978AbeEPIWD (ORCPT ); Wed, 16 May 2018 04:22:03 -0400 Received: from pps.filterd (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w4G8EheO118240 for ; Wed, 16 May 2018 04:22:03 -0400 Received: from e06smtp12.uk.ibm.com (e06smtp12.uk.ibm.com [195.75.94.108]) by mx0a-001b2d01.pphosted.com with ESMTP id 2j0f6g5kha-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 16 May 2018 04:22:03 -0400 Received: from localhost by e06smtp12.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 16 May 2018 09:22:00 +0100 Received: from b06cxnps4074.portsmouth.uk.ibm.com (9.149.109.196) by e06smtp12.uk.ibm.com (192.168.101.142) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 16 May 2018 09:21:58 +0100 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w4G8Lu9F65798376; Wed, 16 May 2018 08:21:56 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A772211C050; Wed, 16 May 2018 09:13:12 +0100 (BST) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 016BB11C052; Wed, 16 May 2018 09:13:12 +0100 (BST) Received: from [9.152.224.33] (unknown [9.152.224.33]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 16 May 2018 09:13:11 +0100 (BST) Reply-To: pmorel@linux.ibm.com Subject: Re: [PATCH v5 04/13] s390: vfio-ap: base implementation of VFIO AP device driver To: Tony Krowiak , 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> From: Pierre Morel Date: Wed, 16 May 2018 10:21:55 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <1525705912-12815-5-git-send-email-akrowiak@linux.vnet.ibm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-TM-AS-GCONF: 00 x-cbid: 18051608-0008-0000-0000-000004F6FB70 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18051608-0009-0000-0000-00001E8B676F Message-Id: <9ee148c9-1d3b-860a-32d8-8a1584628233@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-05-16_04:,, 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-1805160084 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. > + 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... -- Pierre Morel Linux/KVM/QEMU in Böblingen - Germany