From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexander Graf Subject: Re: [PATCH 3/3] kvm: s390: Exploiting generic userspace interface for cmma\ Date: Wed, 16 Apr 2014 21:47:52 +0200 Message-ID: <534EDE68.5060000@suse.de> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Gleb Natapov , Paolo Bonzini , KVM , linux-s390 , Cornelia Huck , Dominik Dingel To: Marcelo Tosatti , Christian Borntraeger Return-path: Received: from cantor2.suse.de ([195.135.220.15]:54054 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751883AbaDPTrz (ORCPT ); Wed, 16 Apr 2014 15:47:55 -0400 In-Reply-To: <20140416184906.GA8773@amt.cnet> Sender: kvm-owner@vger.kernel.org List-ID: 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. Alex > Other than that (which would be mostly organizational issue) per-vm > attributes seem fine to me. >