From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-20.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 14C44C433B4 for ; Thu, 6 May 2021 12:14:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DA55D61177 for ; Thu, 6 May 2021 12:14:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233483AbhEFMPX (ORCPT ); Thu, 6 May 2021 08:15:23 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:38664 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232871AbhEFMPF (ORCPT ); Thu, 6 May 2021 08:15:05 -0400 Date: Thu, 06 May 2021 12:14:05 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1620303246; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=s9P2kEhmr0i0YWJR71NrYPfolA7iSiSQtq+MyDZhViQ=; b=r74zZXWCgoMvofpAByx0O7Laah6ZPPYd0VWDKLGluVnS/Gv58v3WXl3rZBx8Qp8yghOglF L+hPQR8Ce3FU9kjREY2ejmOiNEtH/8V2t7WW/UQATsEKbDK0ARFFHa7C5ZqLiqGBKOe2Xy dsXoZdxk5h19uqTVCmXhIiDDtYwvFUgL2fbl6TZfqLqB0qtRz//nLBbRgn10DK3wecKL2h 13tojyAbQkBW0GjVgHjVvKi+hIf6XCg/QqXJQ2OOrsQVpYgvQDDUNhJRR8ahMkI/CjY09O kM+5yTaLbLYsyw5/sV3g8jH+24+mizrvCEPprHEOx9qZf2WcjB3Q9KqPEmeR2Q== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1620303246; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=s9P2kEhmr0i0YWJR71NrYPfolA7iSiSQtq+MyDZhViQ=; b=kIMs0rCkHtoKQu5ImlpKRk0UhAINa+PN8lz7PptEMZxgXcBBazJ+ThEBCfhMAKxNIZ9k4j IS825AIU+L4aT6Cw== From: "tip-bot2 for Wanpeng Li" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/urgent] context_tracking: Move guest exit context tracking to separate helpers Cc: Thomas Gleixner , Wanpeng Li , Sean Christopherson , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20210505002735.1684165-2-seanjc@google.com> References: <20210505002735.1684165-2-seanjc@google.com> MIME-Version: 1.0 Message-ID: <162030324563.29796.16229600493289889787.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the x86/urgent branch of tip: Commit-ID: 866a6dadbb027b2955a7ae00bab9705d382def12 Gitweb: https://git.kernel.org/tip/866a6dadbb027b2955a7ae00bab9705d382def12 Author: Wanpeng Li AuthorDate: Tue, 04 May 2021 17:27:28 -07:00 Committer: Thomas Gleixner CommitterDate: Wed, 05 May 2021 22:54:10 +02:00 context_tracking: Move guest exit context tracking to separate helpers Provide separate context tracking helpers for guest exit, the standalone helpers will be called separately by KVM x86 in later patches to fix tick-based accounting. Suggested-by: Thomas Gleixner Signed-off-by: Wanpeng Li Co-developed-by: Sean Christopherson Signed-off-by: Sean Christopherson Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20210505002735.1684165-2-seanjc@google.com --- include/linux/context_tracking.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/include/linux/context_tracking.h b/include/linux/context_tracking.h index bceb064..b8c7313 100644 --- a/include/linux/context_tracking.h +++ b/include/linux/context_tracking.h @@ -131,10 +131,15 @@ static __always_inline void guest_enter_irqoff(void) } } -static __always_inline void guest_exit_irqoff(void) +static __always_inline void context_tracking_guest_exit(void) { if (context_tracking_enabled()) __context_tracking_exit(CONTEXT_GUEST); +} + +static __always_inline void guest_exit_irqoff(void) +{ + context_tracking_guest_exit(); instrumentation_begin(); if (vtime_accounting_enabled_this_cpu()) @@ -159,6 +164,8 @@ static __always_inline void guest_enter_irqoff(void) instrumentation_end(); } +static __always_inline void context_tracking_guest_exit(void) { } + static __always_inline void guest_exit_irqoff(void) { instrumentation_begin();