From patchwork Mon Jul 10 21:22:33 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gleb Fotengauer-Malinovskiy X-Patchwork-Id: 9833807 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 37F5D602A0 for ; Mon, 10 Jul 2017 21:23:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 248212847D for ; Mon, 10 Jul 2017 21:23:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 17FBD284C7; Mon, 10 Jul 2017 21:23:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A013A2847D for ; Mon, 10 Jul 2017 21:23:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754059AbdGJVWu (ORCPT ); Mon, 10 Jul 2017 17:22:50 -0400 Received: from vmicros1.altlinux.org ([194.107.17.57]:40828 "EHLO vmicros1.altlinux.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752191AbdGJVWt (ORCPT ); Mon, 10 Jul 2017 17:22:49 -0400 Received: from imap.altlinux.org (imap.altlinux.org [194.107.17.38]) by vmicros1.altlinux.org (Postfix) with ESMTP id DC4D972F1F1; Tue, 11 Jul 2017 00:22:46 +0300 (MSK) Received: from glebfm.cloud.tilaa.com (glebfm.cloud.tilaa.com [84.22.98.219]) by imap.altlinux.org (Postfix) with ESMTPSA id 4DFDA4A4AED; Tue, 11 Jul 2017 00:22:46 +0300 (MSK) Date: Tue, 11 Jul 2017 00:22:33 +0300 From: Gleb Fotengauer-Malinovskiy To: Christian Borntraeger Cc: Paolo Bonzini , Radim =?utf-8?B?S3LEjW3DocWZ?= , Claudio Imbrenda , "Dmitry V. Levin" , kvm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2] KVM: s390: Fix KVM_S390_GET_CMMA_BITS ioctl definition Message-ID: <20170710212228.GA11249@glebfm.cloud.tilaa.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <09c0760e-729d-548a-c3c4-b3afd9e67225@de.ibm.com> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP In case of KVM_S390_GET_CMMA_BITS, the kernel does not only read struct kvm_s390_cmma_log passed from userspace (which constitutes _IOC_WRITE), it also writes back a return value (which constitutes _IOC_READ) making this an _IOWR ioctl 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 --- 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)