From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [patch 02/12] [PATCH] kvm-s390-ucontrol: per vcpu address spaces Date: Thu, 01 Dec 2011 15:19:33 +0200 Message-ID: <4ED77EE5.3040609@redhat.com> References: <20111201125732.085553111@de.ibm.com> <20111201130409.005720389@de.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Marcelo Tossati , Christian Borntraeger , Heiko Carstens , Martin Schwidefsky , Cornelia Huck , KVM , Joachim von Buttlar , Jens Freimann , Constantin Werner To: Carsten Otte Return-path: Received: from mx1.redhat.com ([209.132.183.28]:11781 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754265Ab1LANTl (ORCPT ); Thu, 1 Dec 2011 08:19:41 -0500 In-Reply-To: <20111201130409.005720389@de.ibm.com> Sender: kvm-owner@vger.kernel.org List-ID: On 12/01/2011 02:57 PM, Carsten Otte wrote: > This patch introduces two ioctls for virtual cpus, that are only > valid for kernel virtual machines that are controlled by userspace. > Each virtual cpu has its individual address space in this mode of > operation, and each address space is backed by the gmap > implementation just like the address space for regular KVM guests. > KVM_S390_UCAS_MAP allows to map a part of the user's virtual address > space to the vcpu. Starting offset and length in both the user and > the vcpu address space need to be aligned to 1M. > KVM_S390_UCAS_UNMAP can be used to unmap a range of memory from a > virtual cpu in a similar way. > } > --- a/include/linux/kvm.h > +++ b/include/linux/kvm.h > @@ -655,7 +655,14 @@ struct kvm_clock_data { > #define KVM_SET_TSS_ADDR _IO(KVMIO, 0x47) > #define KVM_SET_IDENTITY_MAP_ADDR _IOW(KVMIO, 0x48, __u64) > /* enable ucontrol for s390 */ > +struct kvm_s390_ucas_mapping { > + unsigned long user_addr; > + unsigned long vcpu_addr; > + unsigned long length; > +}; Do you have 32/64 issues on s390? This struct changes size with host userspace bitness. > #define KVM_S390_ENABLE_UCONTROL _IO(KVMIO, 0x49) > +#define KVM_S390_UCAS_MAP _IOW(KVMIO, 0x50, struct kvm_s390_ucas_mapping) > +#define KVM_S390_UCAS_UNMAP _IOW(KVMIO, 0x51, struct kvm_s390_ucas_mapping) > > -- error compiling committee.c: too many arguments to function