Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754780AbdGJSnV (ORCPT ); Mon, 10 Jul 2017 14:43:21 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:46186 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754749AbdGJSnT (ORCPT ); Mon, 10 Jul 2017 14:43:19 -0400 Subject: Re: [PATCH] KVM: s390: Fix KVM_S390_GET_CMMA_BITS ioctl definition To: Gleb Fotengauer-Malinovskiy , Paolo Bonzini , =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , Claudio Imbrenda Cc: "Dmitry V. Levin" , kvm@vger.kernel.org, linux-kernel@vger.kernel.org References: <20170710144410.GA10359@glebfm.cloud.tilaa.com> From: Christian Borntraeger Date: Mon, 10 Jul 2017 20:43:12 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 MIME-Version: 1.0 In-Reply-To: <20170710144410.GA10359@glebfm.cloud.tilaa.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-IE Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 x-cbid: 17071018-0024-0000-0000-000002AC1914 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00007344; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000214; SDB=6.00885653; UDB=6.00442010; IPR=6.00665803; BA=6.00005464; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00016161; XFM=3.00000015; UTC=2017-07-10 18:43:16 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17071018-0025-0000-0000-000044B43E99 Message-Id: <09c0760e-729d-548a-c3c4-b3afd9e67225@de.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-07-10_08:,, 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-1703280000 definitions=main-1707100328 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1302 Lines: 33 On 07/10/2017 04:44 PM, Gleb Fotengauer-Malinovskiy wrote: > This ioctl actually writes to parameter too. Maybe rephrase that to: The kernel does not only read struct kvm_s390_cmma_log for KVM_S390_GET_CMMA_BITS, it also writes back a return value making this _IOWR instead of _IOW. > Fixes: 4036e387 ("KVM: s390: ioctls to get and set guest storage attributes") > Signed-off-by: Gleb Fotengauer-Malinovskiy Acked-by: Christian Borntraeger Out of curiosity, how did you notice that? > --- > include/uapi/linux/kvm.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h > index c0b6dfe..ebd604c 100644 > --- a/include/uapi/linux/kvm.h > +++ b/include/uapi/linux/kvm.h > @@ -1351,7 +1351,7 @@ struct kvm_s390_ucas_mapping { > /* Available with KVM_CAP_X86_SMM */ > #define KVM_SMI _IO(KVMIO, 0xb7) > /* Available with KVM_CAP_S390_CMMA_MIGRATION */ > -#define KVM_S390_GET_CMMA_BITS _IOW(KVMIO, 0xb8, struct kvm_s390_cmma_log) > +#define KVM_S390_GET_CMMA_BITS _IOWR(KVMIO, 0xb8, struct kvm_s390_cmma_log) > #define KVM_S390_SET_CMMA_BITS _IOW(KVMIO, 0xb9, struct kvm_s390_cmma_log) > > #define KVM_DEV_ASSIGN_ENABLE_IOMMU (1 << 0) >