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: 117437 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp2059429qgn; Sun, 29 Oct 2017 19:56:22 -0700 (PDT) X-Google-Smtp-Source: ABhQp+QeCTIqvoc0weL8qkEtgT/WdX04woE/2I2qOYyW582ju15fhoCjzGuCOpBie6IA8Q9/eNSu X-Received: by 10.99.114.5 with SMTP id n5mr6304500pgc.296.1509332182055; Sun, 29 Oct 2017 19:56:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509332182; cv=none; d=google.com; s=arc-20160816; b=CRvmGlDQkdA03gBsm84WM/WcNRw2zIt7zo827pRQXl8YqZOLu2B1H3dwlFyxDnbpb6 ZqcbdbhvNVRx0IglT0xB2Gb4/JM2ClYqJcq7rBNn2GJ02ov/jFXrUPB/z3AlXV3VYgYY pDaVA+dhifbqoXzUwToaJXYzaxIYB6t1+xKv+y5TJy2vASj0TTWt+sTnlyE3CQxij34n bRzw1iC9BNG+IPrliWK7BObfCBLbk61guvgqWLD4s3h/1biDyBuOXoUNW4kOaWI7byVe SQX021u+nzrYuiBid4TIZwYXl/eBsXIn0Jqw94pzqVONvyIc+bgqHW6G8Su4njRMNpvs GqNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=upAAmI4oE5l9hKQz1yeO+Dr6AQ4HS1sput80PIQfJ3k=; b=vVE7iZJZ/PST8V+Ro1B1pxHJWE/ld1hUVGeCYCu6m6V152yY0073PHK3ccyAk2ugac LOA0145cWopnQRGvLUUmbg5ZJ5MM7pjwjEwAfPR75/0XRtFw62rDluJ7Z9CARdgvlLzk +5u0KcGNg5o7Ie0E5rUAbSa3hP61S/BXzMBJq8eA+r7+MsM71Dd5EftYKCb6ZEQtqiar /lzbj3oq+lUmgib1tGNX/cML6V83iIMT7ZtyWpjf6YLsMmn+faAFTix68OHARUwVAswC 3C6QAHYeei4kwPL0NHgQVjPrvemiM4wBOLENN+B/KRtwP9WcIVPwnDmmIwNTeYjNm9JT fFVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FQD+4Sz9; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 85si9736578pfz.417.2017.10.29.19.56.21; Sun, 29 Oct 2017 19:56:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FQD+4Sz9; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752052AbdJ3C4R (ORCPT + 9 others); Sun, 29 Oct 2017 22:56:17 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:55083 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752043AbdJ3C4P (ORCPT ); Sun, 29 Oct 2017 22:56:15 -0400 Received: by mail-wm0-f66.google.com with SMTP id r68so13466545wmr.3 for ; Sun, 29 Oct 2017 19:56:14 -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=dlVpHjtZ5z1up5CBwL53lDE96PPZN7piRciRVZlGxRAYvtGG8tTYZj9mLsYW72GZRl iIdxIF6sT5IYsBvZrygk0945Ki0IXiFMa9lV6O+0n5C6g+bcJMAFdtAYcOAbA5v/97Ry rlh7kanhL/8pfQjZg/UOo9Hyp0qoXwiMRj8sdk1SI5GQlMbiaTDulBMMVV53QOy+qggt rpqM/y8F5hB4mqyJCX9dcopdvIHdytglnD+pTZnp/F9kOj8kiSpzikD9jHdTTg4ic2SY vko/qtExxiEyp0x/05OhtXwjDga1xOFo5bPmIQ58F0Tkibf+Mwz2JOdfDltwx/UcDp37 8EWQ== X-Gm-Message-State: AMCzsaVgMwtgwuHwnwDJzxN+t2k38/WwnaT0Fl347HAWz3UqF/QZ47Vc TPRKX+xJ1/yvMZIOrk4DH2MgfA== 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?b?UmFkaW0gS3LEjW3DocWZ?= Cc: Marc Zyngier , kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Julien Thierry , Christoffer Dall , Catalin Marinas , Will Deacon , Russell King , stable@vger.kernel.org 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> Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org 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(-) -- 2.14.2 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