From patchwork Tue Jan 31 16:22:58 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijay Kilari X-Patchwork-Id: 9547795 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 94F0A60415 for ; Tue, 31 Jan 2017 17:10:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 867A520008 for ; Tue, 31 Jan 2017 17:10:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 79F50281E1; Tue, 31 Jan 2017 17:10:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, UPPERCASE_50_75 autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8365F20008 for ; Tue, 31 Jan 2017 17:10:57 +0000 (UTC) Received: from localhost ([::1]:39584 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cYbxI-0003gP-KG for patchwork-qemu-devel@patchwork.kernel.org; Tue, 31 Jan 2017 12:10:56 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46106) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cYbDG-0001Aj-OG for qemu-devel@nongnu.org; Tue, 31 Jan 2017 11:23:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cYbDF-0001FU-QP for qemu-devel@nongnu.org; Tue, 31 Jan 2017 11:23:22 -0500 Received: from mail-pf0-x243.google.com ([2607:f8b0:400e:c00::243]:34551) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cYbDD-0001ED-HU; Tue, 31 Jan 2017 11:23:19 -0500 Received: by mail-pf0-x243.google.com with SMTP id y143so28599467pfb.1; Tue, 31 Jan 2017 08:23:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=iBT9zuyn/kNZjgFy8yYpgtAxHW+IJGZEdDqlXic81Ac=; b=UxkPC67H9t4j2cWW1stPzp3KsSwKzfuVkte4ZYh75IYu1bgJd2yJwzNWvNxqQVdTyx P9RPXVfIUplHndRDeoU4EbJc8h/XEAnt2c6ddNLJXpyrwanvMuCLUbr8pgBPKuaaaDm/ d6g3nZB5QSButs15fhUedQIvWqyf23ss9Ih7CPm6CGgXjxc2HPG52kYQteJTU5ueJvG/ Ktgqp1d3j+hIkHDZYIUkQ8Wbq3SxgibdcijEunXlUoTQgbX8hBKQxicDoz8agfzMX87p 33kKe5udHLNNYmgiepDKDlnHVbs9qEGs0P7sEH5Tn/GY/QWyJ9wL25akZAJ0GvgDpv/V Xnvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=iBT9zuyn/kNZjgFy8yYpgtAxHW+IJGZEdDqlXic81Ac=; b=gy9pH7Tj0jsdj11/EZGg9XppT0rkyYtPQqTtjUzwl0JJz/zUVbfSjakReg/Lmp/GeS QSISzd5OsVdBvyxFzeR1LGyYeZ463UQdjTVb8/Uzoiu4lJeNvVbf4+F2RBBkoqR7QW75 oEBOR8xAhU4F1CJfV5zE+HMkOy1BhGEu6gLLDakHSdB9kNdABIUr6azqoXpL74snetSp if4oHcqoYc0dH19seFeYvn/LhO3+0HjrsJATQnt7UakGmJxrpoUVrlpWQuCGjjjK1/sV +WnSeaO0GUrY0TYUuTlJN9OtQGnIXtP2sQhEjDNYzZzUxTJTZMcoUBTbJp0aF0r+ffNI QZOg== X-Gm-Message-State: AIkVDXI2v1XMeCtWd2yhPAwvGfVCQeK0m1IoFgQojwvplZhW/lq5SMYOMtCC3CDO2V6ulw== X-Received: by 10.99.51.76 with SMTP id z73mr31644588pgz.137.1485879798763; Tue, 31 Jan 2017 08:23:18 -0800 (PST) Received: from localhost.localdomain ([14.140.2.178]) by smtp.gmail.com with ESMTPSA id z70sm42377261pff.26.2017.01.31.08.23.15 (version=TLS1_1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 31 Jan 2017 08:23:18 -0800 (PST) From: vijay.kilari@gmail.com To: qemu-arm@nongnu.org, peter.maydell@linaro.org, christoffer.dall@linaro.org, eric.auger@redhat.com Date: Tue, 31 Jan 2017 21:52:58 +0530 Message-Id: <1485879782-6075-2-git-send-email-vijay.kilari@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1485879782-6075-1-git-send-email-vijay.kilari@gmail.com> References: <1485879782-6075-1-git-send-email-vijay.kilari@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400e:c00::243 Subject: [Qemu-devel] [PATCH v7 RESEND 1/5] kernel: Add definitions for GICv3 attributes X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: marc.zyngier@arm.com, p.fedin@samsung.com, qemu-devel@nongnu.org, Vijaya Kumar K Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Vijaya Kumar K This temporary patch adds kernel API definitions. Use proper header update procedure after these features are released. Signed-off-by: Pavel Fedin Signed-off-by: Vijaya Kumar K --- linux-headers/asm-arm/kvm.h | 12 ++++++++++++ linux-headers/asm-arm64/kvm.h | 12 ++++++++++++ 2 files changed, 24 insertions(+) diff --git a/linux-headers/asm-arm/kvm.h b/linux-headers/asm-arm/kvm.h index 541268c..1ba7d8d 100644 --- a/linux-headers/asm-arm/kvm.h +++ b/linux-headers/asm-arm/kvm.h @@ -172,10 +172,22 @@ struct kvm_arch_memory_slot { #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_V3_MPIDR_SHIFT 32 +#define KVM_DEV_ARM_VGIC_V3_MPIDR_MASK \ + (0xffffffffULL << KVM_DEV_ARM_VGIC_V3_MPIDR_SHIFT) #define KVM_DEV_ARM_VGIC_OFFSET_SHIFT 0 #define KVM_DEV_ARM_VGIC_OFFSET_MASK (0xffffffffULL << KVM_DEV_ARM_VGIC_OFFSET_SHIFT) +#define KVM_DEV_ARM_VGIC_SYSREG_INSTR_MASK (0xffff) #define KVM_DEV_ARM_VGIC_GRP_NR_IRQS 3 #define KVM_DEV_ARM_VGIC_GRP_CTRL 4 +#define KVM_DEV_ARM_VGIC_GRP_REDIST_REGS 5 +#define KVM_DEV_ARM_VGIC_GRP_CPU_SYSREGS 6 +#define KVM_DEV_ARM_VGIC_GRP_LEVEL_INFO 7 +#define KVM_DEV_ARM_VGIC_LINE_LEVEL_INFO_SHIFT 10 +#define KVM_DEV_ARM_VGIC_LINE_LEVEL_INFO_MASK \ + (0x3fffffULL << KVM_DEV_ARM_VGIC_LINE_LEVEL_INFO_SHIFT) +#define KVM_DEV_ARM_VGIC_LINE_LEVEL_INTID_MASK 0x3ff +#define VGIC_LEVEL_INFO_LINE_LEVEL 0 #define KVM_DEV_ARM_VGIC_CTRL_INIT 0 /* KVM_IRQ_LINE irq field index values */ diff --git a/linux-headers/asm-arm64/kvm.h b/linux-headers/asm-arm64/kvm.h index fd5a276..b3f02ce 100644 --- a/linux-headers/asm-arm64/kvm.h +++ b/linux-headers/asm-arm64/kvm.h @@ -201,10 +201,22 @@ struct kvm_arch_memory_slot { #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_V3_MPIDR_SHIFT 32 +#define KVM_DEV_ARM_VGIC_V3_MPIDR_MASK \ + (0xffffffffULL << KVM_DEV_ARM_VGIC_V3_MPIDR_SHIFT) #define KVM_DEV_ARM_VGIC_OFFSET_SHIFT 0 #define KVM_DEV_ARM_VGIC_OFFSET_MASK (0xffffffffULL << KVM_DEV_ARM_VGIC_OFFSET_SHIFT) +#define KVM_DEV_ARM_VGIC_SYSREG_INSTR_MASK (0xffff) #define KVM_DEV_ARM_VGIC_GRP_NR_IRQS 3 #define KVM_DEV_ARM_VGIC_GRP_CTRL 4 +#define KVM_DEV_ARM_VGIC_GRP_REDIST_REGS 5 +#define KVM_DEV_ARM_VGIC_GRP_CPU_SYSREGS 6 +#define KVM_DEV_ARM_VGIC_GRP_LEVEL_INFO 7 +#define KVM_DEV_ARM_VGIC_LINE_LEVEL_INFO_SHIFT 10 +#define KVM_DEV_ARM_VGIC_LINE_LEVEL_INFO_MASK \ + (0x3fffffULL << KVM_DEV_ARM_VGIC_LINE_LEVEL_INFO_SHIFT) +#define KVM_DEV_ARM_VGIC_LINE_LEVEL_INTID_MASK 0x3ff +#define VGIC_LEVEL_INFO_LINE_LEVEL 0 #define KVM_DEV_ARM_VGIC_CTRL_INIT 0 /* Device Control API on vcpu fd */