From patchwork Mon Oct 30 02:55:59 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoffer Dall X-Patchwork-Id: 10031915 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 E48E4603B5 for ; Mon, 30 Oct 2017 02:58:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CE1AD2871D for ; Mon, 30 Oct 2017 02:58:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C10FE28720; Mon, 30 Oct 2017 02:58:20 +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=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 569672871D for ; Mon, 30 Oct 2017 02:58:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=8iC2PuVM8+eUH2f8ABNAb0Rw136CwCZGhgYOrQP3Tyo=; b=VAneVTjXsO9HHOtHu6OItmTSmh J2zRkSYb49BFlV9tyms6UtB3fmnrioSwqcyZKCWy1YVCpE+MiwSXyolxn4E4gv4N9bx1agVzRBSM9 hNqILWe86bxKvd1gWdCkGe+akHej0nNIM/5RxYqqhrBQveEQb3NDKp8LlNH7h4oz7PaAttkj8172v AG7O20miuadG1QhbuE0nMs/H0/RjeKhmzUHcd4GLVLRMEhR4b+WuksubJihNUO2CpUz4DWRLIwEkj pJ0rGU7k69EyueRsVsvf/J7kIrGcg1s6JdjW1J1Z3gNFuUZqYt28Ie3273xxc5kbphnVrwCiBMyKU 2RVa3Xew==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1e90HL-0007DM-LB; Mon, 30 Oct 2017 02:58:19 +0000 Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1e90Fe-0005zx-PL for linux-arm-kernel@lists.infradead.org; Mon, 30 Oct 2017 02:56:38 +0000 Received: by mail-wm0-x243.google.com with SMTP id y83so13373802wmc.4 for ; Sun, 29 Oct 2017 19:56:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=upAAmI4oE5l9hKQz1yeO+Dr6AQ4HS1sput80PIQfJ3k=; b=FQD+4Sz9A5hrRoOgX3Eo/upz51W7z3Bx5O/guJxe+Huzg6foxhNHf2Pi+s+4iL81Jf Pv+XgQ23NnT0tV+DT4v/9zqpVfP3ytHspXyqccKootX8REH8NUVP6uE5Uq0YbZmkx6Hh qLYqCpgVbqSQW8MTyOsdgz4AUMbKHUUVwFj+s= 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=upAAmI4oE5l9hKQz1yeO+Dr6AQ4HS1sput80PIQfJ3k=; b=abdj9p0myvor1moT3HW/woE2Yf+wUHLqPHaUp+scP/GHT48kdDFjPVEKCWHXrYKZJ6 PuiIXfx3RAft+A8+vdhSwQhqiIpFOQztfp37KKJDZFT3nv7182q2XUUh9hHsCBXdYepG +8jVgxv/qBzwSeDejKtrR9B6JthvYO7ADs/CtaG5eVdLykwG4uq5+tC26P0WEhTbCrcV 1RP7aZX5R0Hu46DgPLnGctkLetHQlIo6ybrkKZREVNc/vy+nLGltSeoAM8xiEPO4cVpF 6u+eUUsqdHIBZX0Qrcndzv6kC6TWj6rxo2EbZQ2/DsLT3oXIh7IL2V3qxoPXRZoFL+sk q07A== X-Gm-Message-State: AMCzsaUQLhpE2HXotCsZquYQa4BPiFpmQoXXf85mFQ2wXwDblB8WkNg6 f1ryCbh0QCSx8WzGKTVHPW0dbg== X-Google-Smtp-Source: ABhQp+Stq6hD+7YoWbo/U71bFwLd8j7EJZGyVVBJKwSxjjnXS6nZy6qF49rGCCECnGPLkRo37HHfcA== X-Received: by 10.80.182.35 with SMTP id b32mr10095826ede.205.1509332174142; Sun, 29 Oct 2017 19:56:14 -0700 (PDT) Received: from localhost.localdomain (xd93dd96b.cust.hiper.dk. [217.61.217.107]) by smtp.gmail.com with ESMTPSA id u14sm7856415edd.47.2017.10.29.19.56.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 29 Oct 2017 19:56:13 -0700 (PDT) From: Christoffer Dall To: Paolo Bonzini , =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= Subject: [PULL 4/8] arm/arm64: kvm: Disable branch profiling in HYP code Date: Mon, 30 Oct 2017 03:55:59 +0100 Message-Id: <20171030025603.23550-5-christoffer.dall@linaro.org> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20171030025603.23550-1-christoffer.dall@linaro.org> References: <20171030025603.23550-1-christoffer.dall@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171029_195635_052752_E9E87635 X-CRM114-Status: GOOD ( 10.97 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kvm@vger.kernel.org, Julien Thierry , Marc Zyngier , Catalin Marinas , Will Deacon , Russell King , stable@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, Christoffer Dall MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Julien Thierry When HYP code runs into branch profiling code, it attempts to jump to unmapped memory, causing a HYP Panic. Disable the branch profiling for code designed to run at HYP mode. Signed-off-by: Julien Thierry Acked-by: Marc Zyngier Cc: Christoffer Dall Cc: Catalin Marinas Cc: Will Deacon Cc: Russell King Cc: Signed-off-by: Christoffer Dall --- arch/arm/kvm/hyp/Makefile | 2 +- arch/arm64/kvm/hyp/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/kvm/hyp/Makefile b/arch/arm/kvm/hyp/Makefile index 8679405b0b2b..92eab1d51785 100644 --- a/arch/arm/kvm/hyp/Makefile +++ b/arch/arm/kvm/hyp/Makefile @@ -2,7 +2,7 @@ # Makefile for Kernel-based Virtual Machine module, HYP part # -ccflags-y += -fno-stack-protector +ccflags-y += -fno-stack-protector -DDISABLE_BRANCH_PROFILING KVM=../../../../virt/kvm diff --git a/arch/arm64/kvm/hyp/Makefile b/arch/arm64/kvm/hyp/Makefile index 14c4e3b14bcb..48b03547a969 100644 --- a/arch/arm64/kvm/hyp/Makefile +++ b/arch/arm64/kvm/hyp/Makefile @@ -2,7 +2,7 @@ # Makefile for Kernel-based Virtual Machine module, HYP part # -ccflags-y += -fno-stack-protector +ccflags-y += -fno-stack-protector -DDISABLE_BRANCH_PROFILING KVM=../../../../virt/kvm