From patchwork Sun Jan 20 23:22:31 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoffer Dall X-Patchwork-Id: 2008871 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 25831DF2A1 for ; Sun, 20 Jan 2013 23:26:40 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1Tx4Dn-0005o5-ND; Sun, 20 Jan 2013 23:22:39 +0000 Received: from mail-ie0-f177.google.com ([209.85.223.177]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1Tx4Dl-0005nh-8p for linux-arm-kernel@lists.infradead.org; Sun, 20 Jan 2013 23:22:37 +0000 Received: by mail-ie0-f177.google.com with SMTP id k13so8964565iea.36 for ; Sun, 20 Jan 2013 15:22:32 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-received:x-originating-ip:in-reply-to:references :date:message-id:subject:from:to:cc:content-type:x-gm-message-state; bh=/QQptx1LKbsNYv3z0c357QKXbjr64mfihB0g/5lxe0Y=; b=OhAdcma0K3UjLjGBld/pCGh05y6jAOrr6VXphqa1WvLgcgvzn4oDvOfomW6IptAEDf 69UjIJ+BGqMgzhuV81UfzxFEE8Mm5zITESi0qc203GgE1h8DbkMtp7o/NUCpNO7MH/vX eXBKr0yr8KXO/HCbF7/yx13hJq42gdbcsbITSh3GqZDi5voZR0G+ufPcYYkYCegDfHmA ea6GeWvhsZBcuLFv9+zC9806KzKxng3M/mKrS8nslyUI+IttTXBqiBDUlNJJw9e0T48E 96+MHYiH8fXUNDT3nG2WsB9gKfwY9WQORUUD5jEE6f36JCQ0ON9tE5B1K5Dsv6qWwJLW 0oOg== MIME-Version: 1.0 X-Received: by 10.50.33.173 with SMTP id s13mr7623045igi.23.1358724151886; Sun, 20 Jan 2013 15:22:31 -0800 (PST) Received: by 10.64.37.70 with HTTP; Sun, 20 Jan 2013 15:22:31 -0800 (PST) X-Originating-IP: [72.80.83.148] In-Reply-To: References: <20130116180013.29393.49165.stgit@ubuntu> <20130116180028.29393.62418.stgit@ubuntu> Date: Sun, 20 Jan 2013 18:22:31 -0500 Message-ID: Subject: Re: [kvmarm] [PATCH v6 02/13] KVM: ARM: Introduce KVM_SET_DEVICE_ADDRESS ioctl From: Christoffer Dall To: Peter Maydell X-Gm-Message-State: ALoCoQkQeDLf1rEvXbYmpbejL4uMPjO/GQlpBCGVwWxg0+xdQVNohiUQvbIRICPinGR8OlI6goaE X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130120_182237_357591_98F479FE X-CRM114-Status: GOOD ( 13.26 ) X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.223.177 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Will Deacon , linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org, kvmarm@lists.cs.columbia.edu X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org On Thu, Jan 17, 2013 at 12:37 PM, Peter Maydell wrote: > On 16 January 2013 18:00, Christoffer Dall > wrote: >> KVM: ARM: Introduce KVM_SET_DEVICE_ADDRESS ioctl > > Patch subject needs updating with new name of this ioctl > (KVM_ARM_SET_DEVICE_ADDR)... > >> On ARM (and possibly other architectures) some bits are specific to the >> model being emulated for the guest and user space needs a way to tell >> the kernel about those bits. An example is mmio device base addresses, >> where KVM must know the base address for a given device to properly >> emulate mmio accesses within a certain address range or directly map a >> device with virtualiation extensions into the guest address space. > > "virtualization", while I'm here. > >> --- a/arch/arm/include/uapi/asm/kvm.h >> +++ b/arch/arm/include/uapi/asm/kvm.h >> @@ -65,6 +65,19 @@ struct kvm_regs { >> #define KVM_ARM_TARGET_CORTEX_A15 0 >> #define KVM_ARM_NUM_TARGETS 1 >> >> +/* KVM_SET_DEVICE_ADDRESS ioctl id encoding */ >> +#define KVM_DEVICE_TYPE_SHIFT 0 >> +#define KVM_DEVICE_TYPE_MASK (0xffff << KVM_DEVICE_TYPE_SHIFT) >> +#define KVM_DEVICE_ID_SHIFT 16 >> +#define KVM_DEVICE_ID_MASK (0xffff << KVM_DEVICE_ID_SHIFT) > > ...and this comment and I guess these constant names presumably > should have "ARM" in them? > >> +/* Available with KVM_CAP_SET_DEVICE_ADDR */ > > KVM_CAP_ARM_SET_DEVICE_ADDR. > right, thanks: commit 92c7530ddee0d1e1a0b5c3fbd01aa05457812030 Author: Christoffer Dall Date: Sun Jan 20 18:20:52 2013 -0500 KVM: ARM: Update comments and defines for KVM_ARM_SET_DEVICE_ADDR Update comments and defines to reflect the name change of KVM_SET_DEVICE_ADDRESS to KVM_ARM_SET_DEVICE_ADDR. Signed-off-by: Christoffer Dall /* --- -Christoffer diff --git a/arch/arm/include/uapi/asm/kvm.h b/arch/arm/include/uapi/asm/kvm.h index 236f528..023bfeb 100644 --- a/arch/arm/include/uapi/asm/kvm.h +++ b/arch/arm/include/uapi/asm/kvm.h @@ -65,11 +65,11 @@ struct kvm_regs { #define KVM_ARM_TARGET_CORTEX_A15 0 #define KVM_ARM_NUM_TARGETS 1 -/* KVM_SET_DEVICE_ADDRESS ioctl id encoding */ -#define KVM_DEVICE_TYPE_SHIFT 0 -#define KVM_DEVICE_TYPE_MASK (0xffff << KVM_DEVICE_TYPE_SHIFT) -#define KVM_DEVICE_ID_SHIFT 16 -#define KVM_DEVICE_ID_MASK (0xffff << KVM_DEVICE_ID_SHIFT) +/* KVM_ARM_SET_DEVICE_ADDR ioctl id encoding */ +#define KVM_ARM_DEVICE_TYPE_SHIFT 0 +#define KVM_ARM_DEVICE_TYPE_MASK (0xffff << KVM_ARM_DEVICE_TYPE_SHIFT) +#define KVM_ARM_DEVICE_ID_SHIFT 16 +#define KVM_ARM_DEVICE_ID_MASK (0xffff << KVM_ARM_DEVICE_ID_SHIFT) /* Supported device IDs */ #define KVM_ARM_DEVICE_VGIC_V2 0 diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h index 9ff7f70..33887e7 100644 --- a/include/uapi/linux/kvm.h +++ b/include/uapi/linux/kvm.h @@ -875,7 +875,7 @@ struct kvm_s390_ucas_mapping { #define KVM_ALLOCATE_RMA _IOR(KVMIO, 0xa9, struct kvm_allocate_rma) /* Available with KVM_CAP_PPC_HTAB_FD */ #define KVM_PPC_GET_HTAB_FD _IOW(KVMIO, 0xaa, struct kvm_get_htab_fd) -/* Available with KVM_CAP_SET_DEVICE_ADDR */ +/* Available with KVM_CAP_ARM_SET_DEVICE_ADDR */ #define KVM_ARM_SET_DEVICE_ADDR _IOW(KVMIO, 0xab, struct kvm_arm_device_addr)