From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754351AbdJPQJR (ORCPT ); Mon, 16 Oct 2017 12:09:17 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:36444 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752977AbdJPQJP (ORCPT ); Mon, 16 Oct 2017 12:09:15 -0400 Subject: Re: [RFC 06/19] s390/zcrypt: register matrix device with VFIO mediated device framework To: Martin Schwidefsky Cc: linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, freude@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, qemu-s390x@nongnu.org, jjherne@linux.vnet.ibm.com, thuth@redhat.com, pasic@linux.vnet.ibm.com References: <1507916344-3896-1-git-send-email-akrowiak@linux.vnet.ibm.com> <1507916344-3896-7-git-send-email-akrowiak@linux.vnet.ibm.com> <20171016110329.234c9adb@mschwideX1> From: Tony Krowiak Date: Mon, 16 Oct 2017 12:09:07 -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: <20171016110329.234c9adb@mschwideX1> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-TM-AS-GCONF: 00 x-cbid: 17101616-0044-0000-0000-000003A08D72 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00007899; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000236; SDB=6.00932005; UDB=6.00469298; IPR=6.00712295; BA=6.00005641; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00017560; XFM=3.00000015; UTC=2017-10-16 16:09:13 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17101616-0045-0000-0000-000007CF92F0 Message-Id: <17ca0940-e6eb-f810-b51b-b4d008b7b471@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-10-16_05:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000 definitions=main-1710160224 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/16/2017 05:03 AM, Martin Schwidefsky wrote: > On Fri, 13 Oct 2017 13:38:51 -0400 > Tony Krowiak wrote: > >> diff --git a/drivers/s390/crypto/ap_matrix_bus.c b/drivers/s390/crypto/ap_matrix_bus.c >> index 66bfa54..418c23b 100644 >> --- a/drivers/s390/crypto/ap_matrix_bus.c >> +++ b/drivers/s390/crypto/ap_matrix_bus.c >> @@ -61,6 +61,7 @@ static int ap_matrix_dev_create(void) >> matrix->device.bus = &ap_matrix_bus_type; >> matrix->device.parent = ap_matrix_root_device; >> matrix->device.release = ap_matrix_dev_release; >> + INIT_LIST_HEAD(&matrix->queues); >> >> ret = device_register(&matrix->device); >> if (ret) { >> diff --git a/drivers/s390/crypto/ap_matrix_bus.h b/drivers/s390/crypto/ap_matrix_bus.h >> index c2aff23..3eccc36 100644 >> --- a/drivers/s390/crypto/ap_matrix_bus.h >> +++ b/drivers/s390/crypto/ap_matrix_bus.h >> @@ -12,8 +12,12 @@ >> >> #include >> >> +#include "ap_bus.h" >> + >> struct ap_matrix { >> struct device device; >> + spinlock_t qlock; >> + struct list_head queues; >> }; >> >> struct ap_matrix *ap_matrix_get_device(void); > Move these two hunks into patch #5 please. Yes, strictly speaking the two elements > in the struct ap_matrix are needed only with patch #6, but it is fine to introduce > an element with a new driver that is only exploited with a later patch. Will do. >