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: 2008861 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id A36B1DF2A1 for ; Sun, 20 Jan 2013 23:22:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752342Ab3ATXWd (ORCPT ); Sun, 20 Jan 2013 18:22:33 -0500 Received: from mail-ia0-f182.google.com ([209.85.210.182]:38149 "EHLO mail-ia0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752039Ab3ATXWc (ORCPT ); Sun, 20 Jan 2013 18:22:32 -0500 Received: by mail-ia0-f182.google.com with SMTP id w33so2412365iag.13 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=lJve5iJRmPhc1v3jBXsWoVD6ZNaMXw/VcgJlH0UNa0K7vp7dJsU/SZsh36l0MZ3LE+ oFtj8KVOUIR79AU08dSz/xFHu6ZEoeQPBVmiXFZxhI06hw8RJ1c3xn6BtQbvSNCPTdm8 od0QrD/U+Z/U1weCDkK71tZlWAN7W38f5NcTHyetTcoxtmZy8b/17366/o87FgVZ0G9H by2oM97KrY8Vf6AbQkcfc3Y0tvwo8/UL97hVsmA1d0H/GVFqLS6c3Up9sPKWeflBXWXc JkS6fgQSOKZ/IOVWDef2tdnsDF+GLzIqjaGvJd2y37JRFFZae8OCV5iolsvgf7dkINt5 H5Jg== 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 Cc: kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, Will Deacon X-Gm-Message-State: ALoCoQmZbNT8kgqrSakvKTCq1WF+yISdZOcxV4itIDQtsGqp2CxU447+c9eg2sWH1B2AopB+d+6M Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.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 -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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)