From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christian Borntraeger Subject: Re: [PATCH 1/3] kvm: s390: Per-vm kvm device controls Date: Thu, 10 Apr 2014 13:33:55 +0200 Message-ID: <534681A3.2080408@de.ibm.com> References: <1397128604-50161-1-git-send-email-borntraeger@de.ibm.com> <1397128604-50161-2-git-send-email-borntraeger@de.ibm.com> <534680A7.7090404@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Paolo Bonzini , KVM , linux-s390 , Cornelia Huck , Dominik Dingel To: Alexander Graf , Marcelo Tosatti , Gleb Natapov Return-path: Received: from e06smtp18.uk.ibm.com ([195.75.94.114]:39830 "EHLO e06smtp18.uk.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935476AbaDJLeF (ORCPT ); Thu, 10 Apr 2014 07:34:05 -0400 Received: from /spool/local by e06smtp18.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 10 Apr 2014 12:34:01 +0100 In-Reply-To: <534680A7.7090404@suse.de> Sender: kvm-owner@vger.kernel.org List-ID: On 10/04/14 13:29, Alexander Graf wrote: > > On 10.04.14 13:16, Christian Borntraeger wrote: >> From: Dominik Dingel >> >> We sometimes need to get/set attributes specific to a virtual machine >> and so need something else than ONE_REG. >> >> Let's copy the KVM_DEVICE approach, and define the respective ioctls >> for the vm file descriptor. >> >> Signed-off-by: Dominik Dingel >> Signed-off-by: Christian Borntraeger >> --- >> Documentation/virtual/kvm/api.txt | 8 ++--- >> Documentation/virtual/kvm/devices/vm.txt | 6 ++++ >> arch/s390/kvm/kvm-s390.c | 54 ++++++++++++++++++++++++++++++++ >> include/uapi/linux/kvm.h | 1 + >> 4 files changed, 65 insertions(+), 4 deletions(-) >> create mode 100644 Documentation/virtual/kvm/devices/vm.txt >> >> diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt >> index c24211d..f69731a 100644 >> --- a/Documentation/virtual/kvm/api.txt >> +++ b/Documentation/virtual/kvm/api.txt >> @@ -2314,8 +2314,8 @@ struct kvm_create_device { >> 4.80 KVM_SET_DEVICE_ATTR/KVM_GET_DEVICE_ATTR >> -Capability: KVM_CAP_DEVICE_CTRL >> -Type: device ioctl >> +Capability: KVM_CAP_DEVICE_CTRL, KVM_CAP_VM_ATTRIBUTES for vm device >> +Type: device ioctl, vm ioctl >> Parameters: struct kvm_device_attr >> Returns: 0 on success, -1 on error >> Errors: >> @@ -2340,8 +2340,8 @@ struct kvm_device_attr { >> 4.81 KVM_HAS_DEVICE_ATTR >> -Capability: KVM_CAP_DEVICE_CTRL >> -Type: device ioctl >> +Capability: KVM_CAP_DEVICE_CTRL, KVM_CAP_VM_ATTRIBUTES for vm device >> +Type: device ioctl, vm ioctl >> Parameters: struct kvm_device_attr >> Returns: 0 on success, -1 on error >> Errors: >> diff --git a/Documentation/virtual/kvm/devices/vm.txt b/Documentation/virtual/kvm/devices/vm.txt >> new file mode 100644 >> index 0000000..4fe1532 >> --- /dev/null >> +++ b/Documentation/virtual/kvm/devices/vm.txt >> @@ -0,0 +1,6 @@ >> +Generic vm interface >> +==================================== >> + >> +The interface handles per-vm attributes, such as CMMA status on s390 and is >> +similar in way to ONE_REG, but targeting the whole vm instead of one vcpu >> +alone. It is available with KVM_CAP_VM_ATTRIBUTES. > > This document doesn't sound impressively useful :). Will be filled with patch3. I asked Dominik to split this out into this patch, since we introduce the capability here.