From patchwork Thu Sep 26 19:56:10 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoffer Dall X-Patchwork-Id: 20645 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ye0-f199.google.com (mail-ye0-f199.google.com [209.85.213.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id AB91424687 for ; Thu, 26 Sep 2013 19:56:51 +0000 (UTC) Received: by mail-ye0-f199.google.com with SMTP id l4sf1417569yen.2 for ; Thu, 26 Sep 2013 12:56:51 -0700 (PDT) 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=ftogvyXQFyiauGsZmsk4Ncc/lMU9muu4rsG3zLUU/To=; b=fAH2X+dhQ1B80Luv8q+OWbniCUPJd+gfZkQhQfKoUdzwpq8G2FxjsH+cH7QsKpueY4 3c65F+8CePxaJ4d94WBIEwMa6KEwYZNejl1QqNB4e/g4UASwtpQ6XfGDFJCtkN6T95tE ZqJMyIi/eo7ZI/VebNi/Q2IGuKvp2qaEUSGzAfhpMHu/ycfyjxp6CTq/0qphnsSqBFbz KEyTH+0SKV/tOWjgCZb4ymG78my7uGEPljYHBXbXSvvlAUeeqVXce7QZfrOkTK/ypYMf ryvDQ7Oe1SPjz9VhZzC1xFNFTPG1nxUPobRVgJmElthPB/QLwdeJTfD3ByZlQno7LBlc UPJQ== X-Gm-Message-State: ALoCoQkcIqrPvj2ADTBHF003RZoKyjSKh1aWrGKJYmhv0iqsQYR9OCGFXuMhgEeaWlb4M8uZoFy5 X-Received: by 10.236.189.37 with SMTP id b25mr549725yhn.48.1380225411350; Thu, 26 Sep 2013 12:56:51 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.121.231 with SMTP id ln7ls1159074qeb.57.gmail; Thu, 26 Sep 2013 12:56:51 -0700 (PDT) X-Received: by 10.52.65.136 with SMTP id x8mr1878659vds.23.1380225411208; Thu, 26 Sep 2013 12:56:51 -0700 (PDT) Received: from mail-vb0-f47.google.com (mail-vb0-f47.google.com [209.85.212.47]) by mx.google.com with ESMTPS id cl2si826457vdc.10.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 26 Sep 2013 12:56:51 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.47 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.47; Received: by mail-vb0-f47.google.com with SMTP id h10so1206624vbh.6 for ; Thu, 26 Sep 2013 12:56:21 -0700 (PDT) X-Received: by 10.220.91.16 with SMTP id k16mr2241902vcm.21.1380225381039; Thu, 26 Sep 2013 12:56:21 -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 u4csp385934vcz; Thu, 26 Sep 2013 12:56:20 -0700 (PDT) X-Received: by 10.66.27.175 with SMTP id u15mr7210940pag.146.1380225380010; Thu, 26 Sep 2013 12:56:20 -0700 (PDT) Received: from mail-pa0-f53.google.com (mail-pa0-f53.google.com [209.85.220.53]) by mx.google.com with ESMTPS id k10si2305910pak.218.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 26 Sep 2013 12:56:19 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.53 is neither permitted nor denied by best guess record for domain of christoffer.dall@linaro.org) client-ip=209.85.220.53; Received: by mail-pa0-f53.google.com with SMTP id kq14so1761563pab.40 for ; Thu, 26 Sep 2013 12:56:19 -0700 (PDT) X-Received: by 10.68.216.132 with SMTP id oq4mr3000121pbc.143.1380225379263; Thu, 26 Sep 2013 12:56:19 -0700 (PDT) Received: from localhost.localdomain (c-67-169-181-221.hsd1.ca.comcast.net. [67.169.181.221]) by mx.google.com with ESMTPSA id l8sm4026272pbl.22.1969.12.31.16.00.00 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 26 Sep 2013 12:56:18 -0700 (PDT) From: Christoffer Dall To: qemu-devel@nongnu.org Cc: kvmarm@lists.cs.columbia.edu, patches@linaro.org, Christoffer Dall Subject: [RFC PATCH v2 1/4] kvm: Update headers for device control api Date: Thu, 26 Sep 2013 12:56:10 -0700 Message-Id: <1380225373-22132-2-git-send-email-christoffer.dall@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1380225373-22132-1-git-send-email-christoffer.dall@linaro.org> References: <1380225373-22132-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.47 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