From patchwork Tue Nov 19 06:16:33 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoffer Dall X-Patchwork-Id: 21592 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f197.google.com (mail-ve0-f197.google.com [209.85.128.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 8FC3720972 for ; Tue, 19 Nov 2013 06:15:28 +0000 (UTC) Received: by mail-ve0-f197.google.com with SMTP id oz11sf116213veb.8 for ; Mon, 18 Nov 2013 22:15:28 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=6ZujeLJ9RlEb9xrlBJVqfEId6+xqvNn4FyXz9qufbLI=; b=ev5A1/bgydD3Fmqz2DFMJYyxASx7ZQ8F1UueFZGGNIAQKhVQRVVBPnZY5ZWyAimzyJ BBZOpZ3+Kbk8nXySHtrqdk690mQ8N5voAGhXKok2/Vvvjw5hiOmtHsi2tWmSqP5oZg8E ZD4MEVwy2L/mRKcYLu3/6bxHhsondvoDWs4wQwW2PYSW0gC563Ac5Se5wEQr7qS4Y2eB a8/sZr8zNk6H/ulHI3UvAD4g3XH7bVp2OxkfACIL99xMu5+y20O5CzNF3guxy7rqFswU DeAsgWpsLlp645o8ITejGwAUaWs2Cw3JR6UKKBxXnHaufhTS/HhxDma+Ppo7+2z4AA+N fnvw== X-Gm-Message-State: ALoCoQkgufWEkjgGBwbCmNyINIXjloBReSU2K/3sf4+bZJLOnjvr89KiwixEVJyaIR/vusfHG4TX X-Received: by 10.236.52.7 with SMTP id d7mr12172464yhc.32.1384841728220; Mon, 18 Nov 2013 22:15:28 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.51.198 with SMTP id m6ls2265919qeo.43.gmail; Mon, 18 Nov 2013 22:15:28 -0800 (PST) X-Received: by 10.52.168.106 with SMTP id zv10mr13941133vdb.21.1384841728161; Mon, 18 Nov 2013 22:15:28 -0800 (PST) Received: from mail-vb0-f51.google.com (mail-vb0-f51.google.com [209.85.212.51]) by mx.google.com with ESMTPS id v5si7917011ves.4.2013.11.18.22.15.28 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 18 Nov 2013 22:15:28 -0800 (PST) Received-SPF: neutral (google.com: 209.85.212.51 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.51; Received: by mail-vb0-f51.google.com with SMTP id m10so81806vbh.24 for ; Mon, 18 Nov 2013 22:15:28 -0800 (PST) X-Received: by 10.58.156.106 with SMTP id wd10mr19684398veb.7.1384841728030; Mon, 18 Nov 2013 22:15:28 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp255285vcz; Mon, 18 Nov 2013 22:15:27 -0800 (PST) X-Received: by 10.66.142.132 with SMTP id rw4mr25287610pab.6.1384841726737; Mon, 18 Nov 2013 22:15:26 -0800 (PST) Received: from mail-pb0-f51.google.com (mail-pb0-f51.google.com [209.85.160.51]) by mx.google.com with ESMTPS id gn4si11190622pbc.351.2013.11.18.22.15.26 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 18 Nov 2013 22:15:26 -0800 (PST) Received-SPF: neutral (google.com: 209.85.160.51 is neither permitted nor denied by best guess record for domain of christoffer.dall@linaro.org) client-ip=209.85.160.51; Received: by mail-pb0-f51.google.com with SMTP id up15so3109346pbc.24 for ; Mon, 18 Nov 2013 22:15:26 -0800 (PST) X-Received: by 10.66.27.138 with SMTP id t10mr3750pag.176.1384841726251; Mon, 18 Nov 2013 22:15:26 -0800 (PST) Received: from localhost.localdomain (c-67-169-181-221.hsd1.ca.comcast.net. [67.169.181.221]) by mx.google.com with ESMTPSA id fk4sm31648068pab.23.2013.11.18.22.15.24 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 18 Nov 2013 22:15:25 -0800 (PST) From: Christoffer Dall To: qemu-devel@nongnu.org Cc: kvmarm@lists.cs.columbia.edu, patches@linaro.org, Christoffer Dall Subject: [RFC PATCH v3 1/4] kvm: Update headers for device control api Date: Mon, 18 Nov 2013 22:16:33 -0800 Message-Id: <1384841796-19437-2-git-send-email-christoffer.dall@linaro.org> X-Mailer: git-send-email 1.8.4.3 In-Reply-To: <1384841796-19437-1-git-send-email-christoffer.dall@linaro.org> References: <1384841796-19437-1-git-send-email-christoffer.dall@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: christoffer.dall@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.51 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Update the KVM kernel headers to add support for the device control API on ARM used to create in-kernel devices and set and get attributes on these. This is needed for VGIC save/restore with KVM ARM targets. Headers are included from: git://git.linaro.org/people/cdall/linux-kvm-arm.git vgic-migrate-v3 Signed-off-by: Christoffer Dall --- linux-headers/asm-arm/kvm.h | 8 ++++++++ linux-headers/linux/kvm.h | 5 +++++ 2 files changed, 13 insertions(+) diff --git a/linux-headers/asm-arm/kvm.h b/linux-headers/asm-arm/kvm.h index c1ee007..587f1ae 100644 --- a/linux-headers/asm-arm/kvm.h +++ b/linux-headers/asm-arm/kvm.h @@ -142,6 +142,14 @@ struct kvm_arch_memory_slot { #define KVM_REG_ARM_VFP_FPINST 0x1009 #define KVM_REG_ARM_VFP_FPINST2 0x100A +/* Device Control API: ARM VGIC */ +#define KVM_DEV_ARM_VGIC_GRP_ADDR 0 +#define KVM_DEV_ARM_VGIC_GRP_DIST_REGS 1 +#define KVM_DEV_ARM_VGIC_GRP_CPU_REGS 2 +#define KVM_DEV_ARM_VGIC_CPUID_SHIFT 32 +#define KVM_DEV_ARM_VGIC_CPUID_MASK (0xffULL << KVM_DEV_ARM_VGIC_CPUID_SHIFT) +#define KVM_DEV_ARM_VGIC_OFFSET_SHIFT 0 +#define KVM_DEV_ARM_VGIC_OFFSET_MASK (0xffffffffULL << KVM_DEV_ARM_VGIC_OFFSET_SHIFT) /* KVM_IRQ_LINE irq field index values */ #define KVM_ARM_IRQ_TYPE_SHIFT 24 diff --git a/linux-headers/linux/kvm.h b/linux-headers/linux/kvm.h index 13e890c..1ae250d 100644 --- a/linux-headers/linux/kvm.h +++ b/linux-headers/linux/kvm.h @@ -843,6 +843,11 @@ struct kvm_device_attr { #define KVM_DEV_TYPE_FSL_MPIC_20 1 #define KVM_DEV_TYPE_FSL_MPIC_42 2 #define KVM_DEV_TYPE_XICS 3 +#define KVM_DEV_TYPE_VFIO 4 +#define KVM_DEV_VFIO_GROUP 1 +#define KVM_DEV_VFIO_GROUP_ADD 1 +#define KVM_DEV_VFIO_GROUP_DEL 2 +#define KVM_DEV_TYPE_ARM_VGIC_V2 5 /* * ioctls for VM fds