From nobody Mon Feb 9 19:07:50 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1637931917; cv=none; d=zohomail.com; s=zohoarc; b=ZTxZfPB4BYaAS+vNKYaMN/S3GsSyatRUk7O/P8Aw32jXoz0nznQMZsr0fCiBDF07x5fspBCj6fSat6DSq9VYdGbF3OZfsqGAr3MrvxZH/NFQ4dMqrbMWum9SWPKUjuvbzafB8PTI6y7BZvRVUzOr5JTzZ3YftqF+3CbtDAgsY7o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1637931917; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=NgzhAGHjmk99UzyqYLh83eA2Uhe9HvgZXB83ZTe8K50=; b=oKO7n4Cf++JkIIt3+A7lh1eQCdTLxei7BfFEdX3BW52Ti5StdfG9aBgJOQMnC79DtPBA/ZhfcNSnrASl80EwMLQTkiDTIGJHVbRmsKfOvd1w/EDNnrRZ5qiAKuqqYggVIBgWvjuwa0PmJFwSD4LRxh6GxdfYKeSeIwFA3Bw8I6Q= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1637931917906869.0799292380407; Fri, 26 Nov 2021 05:05:17 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.232757.403694 (Exim 4.92) (envelope-from ) id 1mqauU-000606-C1; Fri, 26 Nov 2021 13:05:02 +0000 Received: by outflank-mailman (output) from mailman id 232757.403694; Fri, 26 Nov 2021 13:05:02 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mqauU-0005zA-1n; Fri, 26 Nov 2021 13:05:02 +0000 Received: by outflank-mailman (input) for mailman id 232757; Fri, 26 Nov 2021 13:04:59 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mqauR-0002zD-GO for xen-devel@lists.xenproject.org; Fri, 26 Nov 2021 13:04:59 +0000 Received: from esa1.hc3370-68.iphmx.com (esa1.hc3370-68.iphmx.com [216.71.145.142]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 750f485a-4eb9-11ec-9787-a32c541c8605; Fri, 26 Nov 2021 14:04:58 +0100 (CET) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 750f485a-4eb9-11ec-9787-a32c541c8605 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1637931898; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=1m9xOwxe8Ri/U/q6tx5wCyVpE1aVwbjAxBpIt6ZgzWI=; b=LmGn6gUg8ZzrV7/hXfyjVbWQYvWf6UB71QJMCZmh+um8kruuhkzpkoV2 Jz5l1tNUMojmV4K9hXIuINgg+KC+ymp4qUbWRLWnl/dN1SxbsKJ6P24kq +y3nqE2nAcqS1J1ygdUjCxW2J6IA81UZ56W11nlie8WXvV6aZg5mVKdzI g=; Authentication-Results: esa1.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: uhEoPZybOJgCWemvUXicnrQPzSPxjiFlhay76PvHGtGlfRUkPIrbwG9xRGYIx3r/c51cAPKXU6 n4YUzHkeONztXQgdJ+NrQH0leKkXA63/8B2AFMUdObluYbuOtSU6bHW4W0jTK9rWlaxMGEAvbl jMXqJTd/uW/c+zFdcDdWf6IunPNfMJF4yyUG4blthdKqCLWRfmDzdyehbUUVUF54z5kWgNp5gc qy4Gcs2pNR1DvCQc4wIkn4mlMqPnHixrynWq/96tIo5gOub0rcVpQbeN8jxTLRPP9TFsRzJ4FL 5FqqVDGfk8BJy3UUESLdxWz/ X-SBRS: 5.1 X-MesageID: 59063946 X-Ironport-Server: esa1.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:I3tceq4QwI85Mvi30N9NjAxRtPXAchMFZxGqfqrLsTDasY5as4F+v msbWmCCbK3fZGqhKIt0bY/jpkIA6MPczYdnQQZr+SA2Hi5G8cbLO4+Ufxz6V8+wwmwvb67FA +E2MISowBUcFyeEzvuV3zyIQUBUjclkfJKlYAL/En03FVAMpBsJ00o5wrdg2NAw27BVPivW0 T/Mi5yHULOa82Yc3lI8s8pvfzs24ZweEBtB1rAPTagjUG32zhH5P7pGTU2FFFPqQ5E8IwKPb 72rIIdVXI/u10xF5tuNyt4Xe6CRK1LYFVDmZnF+A8BOjvXez8CbP2lS2Pc0MC9qZzu1c99Z9 M9MqqOqdUQQEIKWl8A6VTV0MjBEIvgTkFPHCSDXXc27ykTHdz3nwul0DVFwNoodkgp1KTgQr 7pCcmlLN03dwbLtqF64YrAEasALBc/nJo4A/FpnyinUF60OSpHfWaTao9Rf2V/cg+gTTK6AP JtFN1KDajzvajEUZ3w7FKkZs8iyokfaWDBgsQi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hWCXZxiPKLBE5zCf9byXBQXuIji2hC6mlwRA09TySZ// rBoB19726MtN9xYgBHpTnuAsm9qB/nmaKdpLNhWItKPzOW31dATrsSjrcKqgeIc0aVm9K1l5 0QF5SWYOeAdWSS5vya3ODXKbkdKaG8gcKVuds= X-IronPort-AV: E=Sophos;i="5.87,266,1631592000"; d="scan'208";a="59063946" From: Andrew Cooper To: Xen-devel CC: Andrew Cooper , Jan Beulich , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Wei Liu Subject: [PATCH 34/65] x86/nmi: Annotate fnptr targets Date: Fri, 26 Nov 2021 12:34:15 +0000 Message-ID: <20211126123446.32324-35-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20211126123446.32324-1-andrew.cooper3@citrix.com> References: <20211126123446.32324-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1637931918529100005 Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Roger Pau Monn=C3=A9 CC: Wei Liu --- xen/arch/x86/alternative.c | 4 ++-- xen/arch/x86/cpu/microcode/core.c | 3 ++- xen/arch/x86/crash.c | 3 ++- xen/arch/x86/livepatch.c | 2 +- xen/arch/x86/oprofile/nmi_int.c | 2 +- xen/arch/x86/traps.c | 3 ++- 6 files changed, 10 insertions(+), 7 deletions(-) diff --git a/xen/arch/x86/alternative.c b/xen/arch/x86/alternative.c index 1cb531c9df83..436047abe021 100644 --- a/xen/arch/x86/alternative.c +++ b/xen/arch/x86/alternative.c @@ -324,8 +324,8 @@ static unsigned int __initdata alt_done; * condition where an NMI hits while we are midway though patching some * instructions in the NMI path. */ -static int __init nmi_apply_alternatives(const struct cpu_user_regs *regs, - int cpu) +static int __init cf_check nmi_apply_alternatives( + const struct cpu_user_regs *regs, int cpu) { /* * More than one NMI may occur between the two set_nmi_callback() belo= w. diff --git a/xen/arch/x86/cpu/microcode/core.c b/xen/arch/x86/cpu/microcode= /core.c index c07f68ba350e..f84dafa82693 100644 --- a/xen/arch/x86/cpu/microcode/core.c +++ b/xen/arch/x86/cpu/microcode/core.c @@ -376,7 +376,8 @@ static int primary_thread_work(const struct microcode_p= atch *patch) return ret; } =20 -static int microcode_nmi_callback(const struct cpu_user_regs *regs, int cp= u) +static int cf_check microcode_nmi_callback( + const struct cpu_user_regs *regs, int cpu) { unsigned int primary =3D cpumask_first(this_cpu(cpu_sibling_mask)); int ret; diff --git a/xen/arch/x86/crash.c b/xen/arch/x86/crash.c index f6264946a681..c383f718f5bd 100644 --- a/xen/arch/x86/crash.c +++ b/xen/arch/x86/crash.c @@ -36,7 +36,8 @@ static unsigned int crashing_cpu; static DEFINE_PER_CPU_READ_MOSTLY(bool, crash_save_done); =20 /* This becomes the NMI handler for non-crashing CPUs, when Xen is crashin= g. */ -static int noreturn do_nmi_crash(const struct cpu_user_regs *regs, int cpu) +static int noreturn cf_check do_nmi_crash( + const struct cpu_user_regs *regs, int cpu) { stac(); =20 diff --git a/xen/arch/x86/livepatch.c b/xen/arch/x86/livepatch.c index 49f0d902e5bb..ea5fa832e4a4 100644 --- a/xen/arch/x86/livepatch.c +++ b/xen/arch/x86/livepatch.c @@ -174,7 +174,7 @@ static nmi_callback_t *saved_nmi_callback; * Note that because of this NOP code the do_nmi is not safely patchable. * Also if we do receive 'real' NMIs we have lost them. */ -static int mask_nmi_callback(const struct cpu_user_regs *regs, int cpu) +static int cf_check mask_nmi_callback(const struct cpu_user_regs *regs, in= t cpu) { /* TODO: Handle missing NMI/MCE.*/ return 1; diff --git a/xen/arch/x86/oprofile/nmi_int.c b/xen/arch/x86/oprofile/nmi_in= t.c index 6ebe20bd1d3e..a90b72825818 100644 --- a/xen/arch/x86/oprofile/nmi_int.c +++ b/xen/arch/x86/oprofile/nmi_int.c @@ -95,7 +95,7 @@ bool nmi_oprofile_send_virq(void) return v; } =20 -static int nmi_callback(const struct cpu_user_regs *regs, int cpu) +static int cf_check nmi_callback(const struct cpu_user_regs *regs, int cpu) { int xen_mode, ovf; =20 diff --git a/xen/arch/x86/traps.c b/xen/arch/x86/traps.c index 07981db74cff..76b1b779b33c 100644 --- a/xen/arch/x86/traps.c +++ b/xen/arch/x86/traps.c @@ -741,7 +741,8 @@ static cpumask_t show_state_mask; static bool opt_show_all; boolean_param("async-show-all", opt_show_all); =20 -static int nmi_show_execution_state(const struct cpu_user_regs *regs, int = cpu) +static int cf_check nmi_show_execution_state( + const struct cpu_user_regs *regs, int cpu) { if ( !cpumask_test_cpu(cpu, &show_state_mask) ) return 0; --=20 2.11.0