Message ID | 20210415144416.482759709@linuxfoundation.org |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a02:6a6f:0:0:0:0:0 with SMTP id m47csp553228jaf; Thu, 15 Apr 2021 08:01:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJySGiu19EO1WiJshP+vX/11J7gGw8SEjiwKZV0pKMybARW7y+UT2skdkk3C566Wqfaflh8F X-Received: by 2002:a17:906:e5a:: with SMTP id q26mr3830461eji.263.1618498880381; Thu, 15 Apr 2021 08:01:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618498880; cv=none; d=google.com; s=arc-20160816; b=LCAq9J3jkB/cbP54NjweC5UxttVvriFgyxsrIXXaxDViC5//IRbIJVS1/28C33uutT H/nyukiOZmOA6cH/46M0PmrXhpa2aqDte1VYwteKTSCPnl8PIycPBpZaR/FOnQka5m2R axWIxyX2++Ba4FiIjoyv7pxgfioofbpFNZoLK6OpABZJqNIfz7LCA31Dmw3FnEnaxtsi kTr5maAhoKJyosOHaox7jFREmadt88XhB3NYN5wCYuiM3/n8TWjZK2CMfZ0ZUSZ4SmQq 2D+RcsZr0vhsjhCnN++Ck8yvgvaimGGLrz40ZVDboMxrq7BAlwxMDZoIQ7NDEuaawyXI 6uug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=eB6SXglckB7voPQMpM7sVINgLddj19dvYXvEx3PAHnk=; b=H48FP5nPkSaJ0a2iPwCaijf89JGUEcUsxGOK47us0g8T9U0Y6+wAefIOYDvlu/8QB9 Axh7IA38P57+Bk1Ib23r5NPd5SmJ+zr8PCevfO1ix0uXGucdbvRFhuY/XrZHng638BQE cRn7awa0jbHjheWL0bHAPNkNdOcQliqd6WPEoKACIdNgBWHr+navUzAljSyVe8HxaufO 8faO2YFOzOAI6x5vvBvdXnQQBDIVwY8iEyDsPNfM5bmpW4mZaouDV2qsZzvmk7XBsaRo H4MOM6pG9cgiDfFLzn9WscgjBO0vFLsQ+FlrHfrjpLmfQ/tmdstWNDPhx0UZBDK5A6kA 9ujw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=OoZazco+; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: <stable-owner@vger.kernel.org> Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k7si2442560eji.230.2021.04.15.08.01.20; Thu, 15 Apr 2021 08:01:20 -0700 (PDT) Received-SPF: pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=OoZazco+; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233592AbhDOPBk (ORCPT <rfc822;semen.protsenko@linaro.org> + 12 others); Thu, 15 Apr 2021 11:01:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:44862 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233631AbhDOO6q (ORCPT <rfc822;stable@vger.kernel.org>); Thu, 15 Apr 2021 10:58:46 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 86087613E0; Thu, 15 Apr 2021 14:55:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1618498503; bh=6upIme9NTn4kmRIF1WoJlNw5F51QogKQSHyzMkHD3m4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OoZazco+ka9+WCTYcwTh7CeR9AlSpp/vcaLgOztDCMLxIxBZaCrc/1Oq9DU0/cDbo GP2hZTEeT9deB0FQ3vphgT3MxlMpsN491cfacwjtywqZHU0hNYL45JQMVVRkDXj5DM /iH4TRCQKSLurTVO/VANf9LT72mmtcSBpMVofJdM= From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, stable@vger.kernel.org, Marc Zyngier <maz@kernel.org>, Will Deacon <will@kernel.org>, Mark Rutland <mark.rutland@arm.com>, Catalin Marinas <catalin.marinas@arm.com>, Suzuki K Poulose <suzuki.poulose@arm.com>, Sasha Levin <sashal@kernel.org> Subject: [PATCH 4.14 61/68] KVM: arm64: Disable guest access to trace filter controls Date: Thu, 15 Apr 2021 16:47:42 +0200 Message-Id: <20210415144416.482759709@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210415144414.464797272@linuxfoundation.org> References: <20210415144414.464797272@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: <stable.vger.kernel.org> X-Mailing-List: stable@vger.kernel.org |
Series |
None
|
expand
|
diff --git a/arch/arm64/include/asm/kvm_arm.h b/arch/arm64/include/asm/kvm_arm.h index f88611e241f0..72ed11292df3 100644 --- a/arch/arm64/include/asm/kvm_arm.h +++ b/arch/arm64/include/asm/kvm_arm.h @@ -191,6 +191,7 @@ #define CPTR_EL2_DEFAULT 0x000033ff /* Hyp Debug Configuration Register bits */ +#define MDCR_EL2_TTRF (1 << 19) #define MDCR_EL2_TPMS (1 << 14) #define MDCR_EL2_E2PB_MASK (UL(0x3)) #define MDCR_EL2_E2PB_SHIFT (UL(12)) diff --git a/arch/arm64/kvm/debug.c b/arch/arm64/kvm/debug.c index dbadfaf850a7..2da4f45ab0bb 100644 --- a/arch/arm64/kvm/debug.c +++ b/arch/arm64/kvm/debug.c @@ -96,6 +96,7 @@ void kvm_arm_reset_debug_ptr(struct kvm_vcpu *vcpu) * - Debug ROM Address (MDCR_EL2_TDRA) * - OS related registers (MDCR_EL2_TDOSA) * - Statistical profiler (MDCR_EL2_TPMS/MDCR_EL2_E2PB) + * - Self-hosted Trace Filter controls (MDCR_EL2_TTRF) * * Additionally, KVM only traps guest accesses to the debug registers if * the guest is not actively using them (see the KVM_ARM64_DEBUG_DIRTY @@ -118,6 +119,7 @@ void kvm_arm_setup_debug(struct kvm_vcpu *vcpu) vcpu->arch.mdcr_el2 = __this_cpu_read(mdcr_el2) & MDCR_EL2_HPMN_MASK; vcpu->arch.mdcr_el2 |= (MDCR_EL2_TPM | MDCR_EL2_TPMS | + MDCR_EL2_TTRF | MDCR_EL2_TPMCR | MDCR_EL2_TDRA | MDCR_EL2_TDOSA);