From patchwork Fri Jan 23 16:35:08 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Przywara X-Patchwork-Id: 5696221 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 46D7BC058D for ; Fri, 23 Jan 2015 16:35:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 76CD3202E5 for ; Fri, 23 Jan 2015 16:35:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 971D5202C8 for ; Fri, 23 Jan 2015 16:35:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756071AbbAWQfb (ORCPT ); Fri, 23 Jan 2015 11:35:31 -0500 Received: from cam-admin0.cambridge.arm.com ([217.140.96.50]:40579 "EHLO cam-admin0.cambridge.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755982AbbAWQfa (ORCPT ); Fri, 23 Jan 2015 11:35:30 -0500 Received: from e106785-lin.cambridge.arm.com ([10.1.203.153]) by cam-admin0.cambridge.arm.com (8.12.6/8.12.6) with ESMTP id t0NGZAwx018471; Fri, 23 Jan 2015 16:35:18 GMT From: Andre Przywara To: penberg@kernel.org, will.deacon@arm.com Cc: kvm@vger.kernel.org, kvmarm@lists.cs.columbia.edu, marc.zyngier@arm.com Subject: [PATCH 09/11] kvmtool: add required GICv3 defines also to ARM Date: Fri, 23 Jan 2015 16:35:08 +0000 Message-Id: <1422030910-17881-10-git-send-email-andre.przywara@arm.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1422030910-17881-1-git-send-email-andre.przywara@arm.com> References: <1422030910-17881-1-git-send-email-andre.przywara@arm.com> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The virtual GICv3 support in the kernel is currently for ARM64 only, so the ARM uapi headers lack the defines for the GICv3 KVM device function IDs. However this will break compilation for ARM with GICv3 support later, as the GIC code in kvmtool is shared between ARM and ARM64. Splitting this deliberately makes no sense, also #ifdef-ing GICv3 specific code is messy and serves no purpose other than work around the missing definitions. Since GICv3 emulation may be extended to ARM in the future, let's fix compilation for ARM by providing the two required #define's in a kvmtool local header for the time being. Signed-off-by: Andre Przywara --- tools/kvm/arm/aarch32/include/kvm/kvm-arch.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tools/kvm/arm/aarch32/include/kvm/kvm-arch.h b/tools/kvm/arm/aarch32/include/kvm/kvm-arch.h index 1632e3c..11dc9a6 100644 --- a/tools/kvm/arm/aarch32/include/kvm/kvm-arch.h +++ b/tools/kvm/arm/aarch32/include/kvm/kvm-arch.h @@ -8,6 +8,14 @@ #define ARM_MAX_MEMORY(...) ARM_LOMAP_MAX_MEMORY +/* + * This is here for the time being until KVM/ARM gets virtual GICv3 + * emulation also. The uapi headers provide that definition only + * for ARM64. + */ +#define KVM_VGIC_V3_ADDR_TYPE_DIST 2 +#define KVM_VGIC_V3_ADDR_TYPE_REDIST 3 + #include "arm-common/kvm-arch.h" #endif /* KVM__KVM_ARCH_H */