From patchwork Fri Aug 23 19:40:59 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoffer Dall X-Patchwork-Id: 19508 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-gh0-f198.google.com (mail-gh0-f198.google.com [209.85.160.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 8F116248E6 for ; Fri, 23 Aug 2013 19:41:14 +0000 (UTC) Received: by mail-gh0-f198.google.com with SMTP id r13sf802734ghr.5 for ; Fri, 23 Aug 2013 12:41:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-gm-message-state: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=ftogvyXQFyiauGsZmsk4Ncc/lMU9muu4rsG3zLUU/To=; b=gPhTUYEsVnS2/BQLFoZgYFEkstAep7bvb/ThSQWqU5IGnGcIzZdeGiRvZxhbxMWEM6 fDEM+erIAsBGf3GhhOvp7RnHy/Ft3HkJReTKk+QfWfmxCnMNrmc9XJvOBJf7huPyqt6H Uf51DqPqNSwR31eitcus/MvZv2l6dIw/XYKlUzmtLR1PHqjnzH+c63eIdE07PjkkyePP Wlrlx8yGyhpx9ysoilhBA33IsJ9BQkgIiz9gpz4To5qh9NoWpdjJbem1I9F+TD78tRJ/ jvvDYk8rSw22DeID45u25wpQw5YytLRrwe4/auDkqlF4z+/93L/iGWaw/M/IipGhLTYO 2vXQ== X-Received: by 10.236.163.67 with SMTP id z43mr420690yhk.27.1377286874348; Fri, 23 Aug 2013 12:41:14 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.94.71 with SMTP id da7ls1159238qeb.49.gmail; Fri, 23 Aug 2013 12:41:14 -0700 (PDT) X-Received: by 10.52.229.73 with SMTP id so9mr725468vdc.27.1377286874256; Fri, 23 Aug 2013 12:41:14 -0700 (PDT) Received: from mail-vc0-f174.google.com (mail-vc0-f174.google.com [209.85.220.174]) by mx.google.com with ESMTPS id xe6si423174vdb.87.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 23 Aug 2013 12:41:14 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.174 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.174; Received: by mail-vc0-f174.google.com with SMTP id gd11so713418vcb.5 for ; Fri, 23 Aug 2013 12:41:14 -0700 (PDT) X-Gm-Message-State: ALoCoQmdKZee0pN7EAJqAV4lgH6djFkPnWX+wdtHt7+0XbSz8ZJwLTsqnh2Lr8zn0emk0mPeG79d X-Received: by 10.58.246.8 with SMTP id xs8mr885947vec.9.1377286874173; Fri, 23 Aug 2013 12:41:14 -0700 (PDT) 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 u4csp112007vcz; Fri, 23 Aug 2013 12:41:13 -0700 (PDT) X-Received: by 10.66.186.204 with SMTP id fm12mr519507pac.189.1377286873129; Fri, 23 Aug 2013 12:41:13 -0700 (PDT) Received: from mail-pb0-f42.google.com (mail-pb0-f42.google.com [209.85.160.42]) by mx.google.com with ESMTPS id ua7si1316098pac.1.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 23 Aug 2013 12:41:13 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.42 is neither permitted nor denied by best guess record for domain of christoffer.dall@linaro.org) client-ip=209.85.160.42; Received: by mail-pb0-f42.google.com with SMTP id un15so1053744pbc.15 for ; Fri, 23 Aug 2013 12:41:12 -0700 (PDT) X-Received: by 10.66.170.138 with SMTP id am10mr703919pac.51.1377286872620; Fri, 23 Aug 2013 12:41:12 -0700 (PDT) Received: from localhost.localdomain (c-67-169-183-77.hsd1.ca.comcast.net. [67.169.183.77]) by mx.google.com with ESMTPSA id ib9sm1446453pbc.43.1969.12.31.16.00.00 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 23 Aug 2013 12:41:11 -0700 (PDT) From: Christoffer Dall To: qemu-devel@nongnu.org Cc: linaro-kernel@lists.linaro.org, patches@linaro.org, kvmarm@lists.cs.columbia.edu, Christoffer Dall Subject: [PATCH 1/4] kvm: Update headers for device control api Date: Fri, 23 Aug 2013 12:40:59 -0700 Message-Id: <1377286862-5879-2-git-send-email-christoffer.dall@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1377286862-5879-1-git-send-email-christoffer.dall@linaro.org> References: <1377286862-5879-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.220.174 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 Signed-off-by: Christoffer Dall --- linux-headers/asm-arm/kvm.h | 8 ++++++++ linux-headers/linux/kvm.h | 1 + 2 files changed, 9 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 c614070..7f66a4f 100644 --- a/linux-headers/linux/kvm.h +++ b/linux-headers/linux/kvm.h @@ -839,6 +839,7 @@ 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_ARM_VGIC_V2 4 /* * ioctls for VM fds