From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934399AbdKBTxi (ORCPT ); Thu, 2 Nov 2017 15:53:38 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:56038 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932497AbdKBTxg (ORCPT ); Thu, 2 Nov 2017 15:53:36 -0400 Subject: Re: [RFC 01/19] KVM: s390: SIE considerations for AP Queue virtualization To: Christian Borntraeger , 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, 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-2-git-send-email-akrowiak@linux.vnet.ibm.com> <8ff4f519-560b-04a0-2786-27eafcf7463f@de.ibm.com> From: Tony Krowiak Date: Thu, 2 Nov 2017 15:53:26 -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: <8ff4f519-560b-04a0-2786-27eafcf7463f@de.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: 17110219-0020-0000-0000-00000CF09610 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00008000; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000239; SDB=6.00940206; UDB=6.00474089; IPR=6.00720462; BA=6.00005668; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00017838; XFM=3.00000015; UTC=2017-11-02 19:53:33 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17110219-0021-0000-0000-00005EC12C12 Message-Id: <0d0ca269-d4a0-877e-3fd4-3f8c777d9384@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-11-02_07:,, 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-1707230000 definitions=main-1711020242 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/02/2017 07:54 AM, Christian Borntraeger wrote: > To make the whole series smaller I will apply some of these patches > directly (those of which are "obvious" and touch kvm/s390 only) Okay > > > On 10/13/2017 07:38 PM, Tony Krowiak wrote: >> The Crypto Control Block (CRYCB) is referenced by the SIE state >> description and controls KVM guest access to the Adjunct >> Processor (AP) adapters, usage domains and control domains. >> This patch defines the AP control blocks to be used for >> controlling guest access to the AP adapters and domains. >> >> Signed-off-by: Tony Krowiak > thanks applied. >> --- >> arch/s390/include/asm/kvm_host.h | 25 +++++++++++++++++++++---- >> 1 files changed, 21 insertions(+), 4 deletions(-) >> >> diff --git a/arch/s390/include/asm/kvm_host.h b/arch/s390/include/asm/kvm_host.h >> index 51375e7..50a6b25 100644 >> --- a/arch/s390/include/asm/kvm_host.h >> +++ b/arch/s390/include/asm/kvm_host.h >> @@ -685,11 +685,28 @@ struct kvm_s390_crypto { >> __u8 dea_kw; >> }; >> >> +#define APCB0_MASK_SIZE 1 >> +struct kvm_s390_apcb0 { >> + __u64 apm[APCB0_MASK_SIZE]; /* 0x0000 */ >> + __u64 aqm[APCB0_MASK_SIZE]; /* 0x0008 */ >> + __u64 adm[APCB0_MASK_SIZE]; /* 0x0010 */ >> + __u64 reserved18; /* 0x0018 */ >> +}; >> + >> +#define APCB1_MASK_SIZE 4 >> +struct kvm_s390_apcb1 { >> + __u64 apm[APCB1_MASK_SIZE]; /* 0x0000 */ >> + __u64 aqm[APCB1_MASK_SIZE]; /* 0x0020 */ >> + __u64 adm[APCB1_MASK_SIZE]; /* 0x0040 */ >> + __u64 reserved60[4]; /* 0x0060 */ >> +}; >> + >> struct kvm_s390_crypto_cb { >> - __u8 reserved00[72]; /* 0x0000 */ >> - __u8 dea_wrapping_key_mask[24]; /* 0x0048 */ >> - __u8 aes_wrapping_key_mask[32]; /* 0x0060 */ >> - __u8 reserved80[128]; /* 0x0080 */ >> + struct kvm_s390_apcb0 apcb0; /* 0x0000 */ >> + __u8 reserved20[40]; /* 0x0020 */ >> + __u8 dea_wrapping_key_mask[24]; /* 0x0048 */ >> + __u8 aes_wrapping_key_mask[32]; /* 0x0060 */ >> + struct kvm_s390_apcb1 apcb1; /* 0x0080 */ >> }; >> >> /* >>