From patchwork Fri Jan 23 10:02:50 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoffer Dall X-Patchwork-Id: 43592 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f198.google.com (mail-wi0-f198.google.com [209.85.212.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 6C320218DB for ; Fri, 23 Jan 2015 10:21:59 +0000 (UTC) Received: by mail-wi0-f198.google.com with SMTP id bs8sf894942wib.1 for ; Fri, 23 Jan 2015 02:21:58 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:subject:date:message-id :in-reply-to:references:cc:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:mime-version :content-type:content-transfer-encoding:sender:errors-to :x-original-sender:x-original-authentication-results:mailing-list; bh=ucNMgEnT5Otf0youa2kI5V4D/asVaWEA5VRftZ+XoOc=; b=IWPZ7ni1IgIlhVT8+drhmk5g8dYWvtMv5xIc1vhVsDko4VZbN1kAEnxsefRQYGFb5p t+mXVfeBrrokZGn9ImugD7jxbRhPACY3flTKWm6Qd2KL6Z7PUFikIl+Vn0qRx0cZv1Kt 0VFf9s0Po68cWC2lBlwxnBDtc4kwPpCPvgEUVwQSE6f+Yt9wgWPo+Lbn7GY9PkFkJoDp WLB6L7/xq51BZ8uX0WCaIJSSmWTTsAICLmbMVtR+itZPBzJuRLvGh53Uwt+sw6nr+3d/ nsvFGvenw/rhU4SUQiKZJez+jHHDW6tdlnv4fKvkKQUAY5CX0zPvQyF+jJTk58/zbQxW v/Gg== X-Gm-Message-State: ALoCoQmIEjVB8CenG06Pn7VNJQTh4HH/ZExIt/LwuVJfOPBcPwbT0zU5n896rffDKrRfg9pMH2si X-Received: by 10.194.86.1 with SMTP id l1mr896395wjz.0.1422008518753; Fri, 23 Jan 2015 02:21:58 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.245.43 with SMTP id xl11ls285985lac.54.gmail; Fri, 23 Jan 2015 02:21:58 -0800 (PST) X-Received: by 10.112.150.194 with SMTP id uk2mr6515321lbb.84.1422008518431; Fri, 23 Jan 2015 02:21:58 -0800 (PST) Received: from mail-la0-f53.google.com (mail-la0-f53.google.com. [209.85.215.53]) by mx.google.com with ESMTPS id f10si911206lbs.123.2015.01.23.02.21.58 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Jan 2015 02:21:58 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.53 as permitted sender) client-ip=209.85.215.53; Received: by mail-la0-f53.google.com with SMTP id gq15so6462439lab.12 for ; Fri, 23 Jan 2015 02:21:58 -0800 (PST) X-Received: by 10.152.43.103 with SMTP id v7mr6431419lal.29.1422008518270; Fri, 23 Jan 2015 02:21:58 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.9.200 with SMTP id c8csp198239lbb; Fri, 23 Jan 2015 02:21:57 -0800 (PST) X-Received: by 10.68.226.166 with SMTP id rt6mr9940792pbc.120.1422008516254; Fri, 23 Jan 2015 02:21:56 -0800 (PST) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id ri11si1486827pbb.33.2015.01.23.02.21.55 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Jan 2015 02:21:56 -0800 (PST) Received-SPF: none (google.com: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org does not designate permitted sender hosts) client-ip=2001:1868:205::9; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YEbLY-0003Oa-QR; Fri, 23 Jan 2015 10:20:12 +0000 Received: from mail-la0-f47.google.com ([209.85.215.47]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YEb5x-00040B-Tt for linux-arm-kernel@lists.infradead.org; Fri, 23 Jan 2015 10:04:06 +0000 Received: by mail-la0-f47.google.com with SMTP id hz20so6387562lab.6 for ; Fri, 23 Jan 2015 02:03:43 -0800 (PST) X-Received: by 10.112.8.41 with SMTP id o9mr6312311lba.40.1422007423532; Fri, 23 Jan 2015 02:03:43 -0800 (PST) Received: from localhost.localdomain (188-178-240-98-static.dk.customer.tdc.net. [188.178.240.98]) by mx.google.com with ESMTPSA id pg3sm331848lbb.8.2015.01.23.02.03.41 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 23 Jan 2015 02:03:42 -0800 (PST) From: Christoffer Dall To: Paolo Bonzini , kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org Subject: [GIT PULL 21/36] arm/arm64: KVM: dont rely on a valid GICH base address Date: Fri, 23 Jan 2015 11:02:50 +0100 Message-Id: <1422007385-14730-22-git-send-email-christoffer.dall@linaro.org> X-Mailer: git-send-email 2.1.2.330.g565301e.dirty In-Reply-To: <1422007385-14730-1-git-send-email-christoffer.dall@linaro.org> References: <1422007385-14730-1-git-send-email-christoffer.dall@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150123_020406_203135_E5B6A704 X-CRM114-Status: UNSURE ( 9.31 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.215.47 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.215.47 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders Cc: Marc Zyngier , Andre Przywara , Christoffer Dall , kvm@vger.kernel.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: christoffer.dall@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.53 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 From: Andre Przywara To check whether the vGIC was already initialized, we currently check the GICH base address for not being NULL. Since with GICv3 we may get along without this address, lets use the irqchip_in_kernel() function to detect an already initialized vGIC. Signed-off-by: Andre Przywara Acked-by: Christoffer Dall Acked-by: Marc Zyngier Signed-off-by: Christoffer Dall --- virt/kvm/arm/vgic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/virt/kvm/arm/vgic.c b/virt/kvm/arm/vgic.c index 69f6e7a..1c3b75e 100644 --- a/virt/kvm/arm/vgic.c +++ b/virt/kvm/arm/vgic.c @@ -2094,7 +2094,7 @@ int kvm_vgic_create(struct kvm *kvm, u32 type) mutex_lock(&kvm->lock); - if (kvm->arch.vgic.vctrl_base) { + if (irqchip_in_kernel(kvm)) { ret = -EEXIST; goto out; }