From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Tosatti Subject: Re: [PATCH 3/3] kvm: s390: Exploiting generic userspace interface for cmma\ Date: Mon, 21 Apr 2014 17:48:00 -0300 Message-ID: <20140421204800.GA5186@amt.cnet> References: <1397128604-50161-1-git-send-email-borntraeger@de.ibm.com> <1397128604-50161-4-git-send-email-borntraeger@de.ibm.com> <20140416184906.GA8773@amt.cnet> <534EDE68.5060000@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Christian Borntraeger , Gleb Natapov , Paolo Bonzini , KVM , linux-s390 , Cornelia Huck , Dominik Dingel To: Alexander Graf Return-path: Received: from mx1.redhat.com ([209.132.183.28]:49144 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754502AbaDUVBX (ORCPT ); Mon, 21 Apr 2014 17:01:23 -0400 Content-Disposition: inline In-Reply-To: <534EDE68.5060000@suse.de> Sender: kvm-owner@vger.kernel.org List-ID: On Wed, Apr 16, 2014 at 09:47:52PM +0200, Alexander Graf wrote: > > On 16.04.14 20:49, Marcelo Tosatti wrote: > >On Thu, Apr 10, 2014 at 01:16:44PM +0200, Christian Borntraeger wrote: > >>From: Dominik Dingel > >> > >>To enable CMMA and to reset its state we use the vm kvm_device ioctls, > >>encapsulating attributes within the KVM_S390_VM_MEM_CTRL group. > >> > >>Signed-off-by: Dominik Dingel > >>Signed-off-by: Christian Borntraeger > >>--- > >> Documentation/virtual/kvm/devices/vm.txt | 18 ++++++++++++++ > >> arch/s390/include/uapi/asm/kvm.h | 7 ++++++ > >> arch/s390/kvm/kvm-s390.c | 42 ++++++++++++++++++++++++++++++++ > >> 3 files changed, 67 insertions(+) > >Sounds awkward to use these three ioctls for something not > >returned by KVM_CREATE_DEVICE. > > > >/* ioctls for fds returned by KVM_CREATE_DEVICE */ > >#define KVM_SET_DEVICE_ATTR _IOW(KVMIO, 0xe1, struct kvm_device_attr) > >#define KVM_GET_DEVICE_ATTR _IOW(KVMIO, 0xe2, struct kvm_device_attr) > >#define KVM_HAS_DEVICE_ATTR _IOW(KVMIO, 0xe3, struct kvm_device_attr) > > > >Is that much of a problem to introduce > > > >struct kvm_vm_attr and > > > >/* ioctls for fds returned by KVM_CREATE_VM */ > >#define KVM_SET_VM_ATTR _IOW(KVMIO, 0xa, struct kvm_vm_attr) > >#define KVM_GET_VM_ATTR _IOW(KVMIO, 0xb, struct kvm_vm_attr) > >#define KVM_HAS_VM_ATTR _IOW(KVMIO, 0xc, struct kvm_vm_attr) > > > >? > > We could just alias them, no? > > #define KVM_SET_VM_ATTR KVM_SET_DEVICE_ATTR > > But I don't feel strongly either way. Ok not a huge deal. Assuming the series will be resubmitted with improved virtual/kvm/devices/vm.txt.