From patchwork Wed Aug 9 20:36:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 133513 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:6358:9d8d:b0:139:fa0d:b2d with SMTP id d13csp143157rwo; Wed, 9 Aug 2023 14:04:39 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGCI/dKKgytk/z0jIh9grle1hdEE6Few66alTuK+7AeFR0nYb4ilYOqbAwZN4HwUliW2Yk8 X-Received: by 2002:a05:6a00:2d19:b0:681:d247:8987 with SMTP id fa25-20020a056a002d1900b00681d2478987mr388701pfb.17.1691615078729; Wed, 09 Aug 2023 14:04:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691615078; cv=none; d=google.com; s=arc-20160816; b=PJRcJCNqOOHZYrR9xStjlwhKBNXlv9dH/xJUJhPHuQjvNfwyBmTjxCYOVbaJRsoak8 Ea2lZdAehUejReEOyuyVO5Fay3xrpjf9rfmnFRwnE3CMTiZ+oEUJzYheNGhNyy42Iijr se3tZ48eR975viM/68pirdftanNl4EMx5gd1Rx7M1GBNQmLrwQBc+2lUvmEcKU/s9jnY 0lieef53JI7BHlmuJslQ/gS131vx6jni7d8EAm4/ubECrFrPCgNRzlG3VnHIpX6yZ85Y F+bKEIV1Cg8/emJZFfonteUbPTXZUX9ktJOh0A33IIf/kMm5q+i+KlxIl7dpQMjA9yhK RhTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:cc:subject:to:reply-to:sender:from :dkim-signature:dkim-signature:date; bh=fAx6/DBTqZ9b24JRB23n48mMO1c95bbtwnPOhGCQBWE=; fh=jBwjuriIPWA1lnCf5oMMiNAPpgGE0iGPmBzZMsd85oQ=; b=wY/1L7WjRz5HyUCCaF6OLbfSnT8odbs0orEm4Wg5xXtHPZjROiQ2u9vgK9yyUMBgfa FlRx83RuesrLzBHUKHdgjVCOA1J7IpDwmKYNdy1HyS8vdua68svekrCn8mBUw2GA5bLb HUjLcp0CLobXwu5GTEOeAMqKHfFuS0NszX4aL9N3Niz5dD/re0He5lRO2hmReqt3pwBO pjjcp9vPSuSg18rvzipzQvestuepgEvPPDJ0X04EBnRdAbBaJ5jCyS7jH1MRW5ZrvSjc fMn0GlR+NoF+7U5vaSolyBlTfqbZOcGWD77mBip1/AXmYfFwwwA6lu0cbia0m2FUNyWq ss4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=0zFuGbie; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b="/2fvOVkO"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m11-20020a056a00080b00b006871817f76dsi60056pfk.202.2023.08.09.14.04.23; Wed, 09 Aug 2023 14:04:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=0zFuGbie; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b="/2fvOVkO"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234650AbjHIUgc (ORCPT + 99 others); Wed, 9 Aug 2023 16:36:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54424 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234561AbjHIUgR (ORCPT ); Wed, 9 Aug 2023 16:36:17 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 584D7211D; Wed, 9 Aug 2023 13:36:10 -0700 (PDT) Date: Wed, 09 Aug 2023 20:36:08 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1691613369; 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; bh=fAx6/DBTqZ9b24JRB23n48mMO1c95bbtwnPOhGCQBWE=; b=0zFuGbieuiXa8Dgs6zQL2AIWvLqvleMqGJdW+gjc1D2LbjvqfEsW0xiXYCz4vIXTQjFHAb JWMDnVcV3ftw+zOmAsVHnCUzYVoIsEI/aM4jBLgXjF9rU+5396fBH2+cdgPtJ/IM4UqUXK zPc3NyNaMHSSxiBxhqQLLhTN3nTq/Jze13PPutP75ANwnkQmRz7Hw33u/FiADwcEstPJwQ 5rZb3IhsyvDWXwz/bNTgeiNGrhlt/tJITu7KZLwQ25UkgBm6oMWauYXHH50CH86ZrUjb9+ LODbfbM88odP+Q7m9ukABUPHRRA0+oJ+iAKrU3pHvn+Aw1MfdVuacrJ25i4raQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1691613369; 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; bh=fAx6/DBTqZ9b24JRB23n48mMO1c95bbtwnPOhGCQBWE=; b=/2fvOVkONyPuD/e4WQ0tnaiDsZk6zwUhHC640wQHzZ4wmvdpTmRoqzkswyDP7QVeaUtwgq UhGo8Gav4EydQ8BQ== From: "tip-bot2 for Thomas Gleixner" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/apic] x86/apic: Wrap apic->native_eoi() into a helper Cc: Thomas Gleixner , Dave Hansen , "Peter Zijlstra (Intel)" , Michael Kelley , Sohil Mehta , Juergen Gross , x86@kernel.org, linux-kernel@vger.kernel.org MIME-Version: 1.0 Message-ID: <169161336854.27769.11656148486231578593.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773786972813891477 X-GMAIL-MSGID: 1773786972813891477 The following commit has been merged into the x86/apic branch of tip: Commit-ID: 0fa075769cd4af9c568044973e7bdf430cc7c158 Gitweb: https://git.kernel.org/tip/0fa075769cd4af9c568044973e7bdf430cc7c158 Author: Thomas Gleixner AuthorDate: Tue, 08 Aug 2023 15:04:17 -07:00 Committer: Dave Hansen CommitterDate: Wed, 09 Aug 2023 11:58:34 -07:00 x86/apic: Wrap apic->native_eoi() into a helper Prepare for converting the hotpath APIC callbacks to static calls. Signed-off-by: Thomas Gleixner Signed-off-by: Dave Hansen Acked-by: Peter Zijlstra (Intel) Tested-by: Michael Kelley Tested-by: Sohil Mehta Tested-by: Juergen Gross # Xen PV (dom0 and unpriv. guest) --- arch/x86/include/asm/apic.h | 6 ++++++ arch/x86/kernel/kvm.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/arch/x86/include/asm/apic.h b/arch/x86/include/asm/apic.h index 6ad3574..5d98c4b 100644 --- a/arch/x86/include/asm/apic.h +++ b/arch/x86/include/asm/apic.h @@ -359,6 +359,11 @@ static inline void apic_eoi(void) apic->eoi(); } +static inline void apic_native_eoi(void) +{ + apic->native_eoi(); +} + static inline u64 apic_icr_read(void) { return apic->icr_read(); @@ -397,6 +402,7 @@ static inline void apic_icr_write(u32 low, u32 high) { } static inline void apic_wait_icr_idle(void) { } static inline u32 safe_apic_wait_icr_idle(void) { return 0; } static inline void apic_set_eoi_cb(void (*eoi)(void)) {} +static inline void apic_native_eoi(void) { WARN_ON_ONCE(1); } #endif /* CONFIG_X86_LOCAL_APIC */ diff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c index f5339e3..54625a4 100644 --- a/arch/x86/kernel/kvm.c +++ b/arch/x86/kernel/kvm.c @@ -343,7 +343,7 @@ static notrace void kvm_guest_apic_eoi_write(void) */ if (__test_and_clear_bit(KVM_PV_EOI_BIT, this_cpu_ptr(&kvm_apic_eoi))) return; - apic->native_eoi(); + apic_native_eoi(); } static void kvm_guest_cpu_init(void)