From nobody Sat Dec 14 18:54:26 2024 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=quarantine dis=none) header.from=suse.com ARC-Seal: i=1; a=rsa-sha256; t=1707139922; cv=none; d=zohomail.com; s=zohoarc; b=m2hrHWRvZNLOvNvP/kq2CTHvCFotsd6065jJ83UXSmWPpk3h8r2dZi0jB5Mcdh6vQ/sQKDAn+Wwa31oj7EIgyqNsDI9SsOUqL4uIJxgM8x7LfjGeLJvN+qhvpt2QsWfFXTKpBtJ/x19VI372jHVuaegUA/HI8FlJqwckoChJue0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1707139922; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=gEqRJt64VcumCTtnR8WkrhpV/gUr3OF3qVsMsouyC7A=; b=WmmvosjUs6EMFfkCK1e9e+7vrrjNHX6P5MjYWgLPV6huKQr0hi6nt6lQE1C+pErRLlbJdq0yLdAv8maASCfm1ULMumfyX0DhI+eP0dkzpKTmMXxXq3vjLa9p8p3bf/U79FNK12e/DNo+QgJ5/HxNfGN63MxDye+Qn2ROjXRRmb0= 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=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1707139922656995.0907579747064; Mon, 5 Feb 2024 05:32:02 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.676060.1051853 (Exim 4.92) (envelope-from ) id 1rWz4g-0006Sc-51; Mon, 05 Feb 2024 13:31:50 +0000 Received: by outflank-mailman (output) from mailman id 676060.1051853; Mon, 05 Feb 2024 13:31:50 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rWz4g-0006SV-1T; Mon, 05 Feb 2024 13:31:50 +0000 Received: by outflank-mailman (input) for mailman id 676060; Mon, 05 Feb 2024 13:31:48 +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 1rWz4e-0004HJ-O2 for xen-devel@lists.xenproject.org; Mon, 05 Feb 2024 13:31:48 +0000 Received: from mail-lf1-x132.google.com (mail-lf1-x132.google.com [2a00:1450:4864:20::132]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id e984baf9-c42a-11ee-8a45-1f161083a0e0; Mon, 05 Feb 2024 14:31:48 +0100 (CET) Received: by mail-lf1-x132.google.com with SMTP id 2adb3069b0e04-5100cb238bcso7942285e87.3 for ; Mon, 05 Feb 2024 05:31:48 -0800 (PST) Received: from [10.156.60.236] (ip-037-024-206-209.um08.pools.vodafone-ip.de. [37.24.206.209]) by smtp.gmail.com with ESMTPSA id n10-20020a5d67ca000000b0033b3cf1ff09sm2278382wrw.29.2024.02.05.05.31.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 05 Feb 2024 05:31:47 -0800 (PST) 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: e984baf9-c42a-11ee-8a45-1f161083a0e0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1707139907; x=1707744707; darn=lists.xenproject.org; h=content-transfer-encoding:in-reply-to:autocrypt:references:cc:to :from:content-language:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=gEqRJt64VcumCTtnR8WkrhpV/gUr3OF3qVsMsouyC7A=; b=VawSKcJgQXK21l1YXTA5hk0LH8xnlRqfvMRRoNjFPkc37gYrkRUACWLaweYpNhSh16 DctfDcsLwpu4360lWSYwwSLgjxXxYoMMJbvMK6Aydx1GeavKjBjota3gGeRbRMurDFTa Kv7kUcK6m4lfiP0TDx3nRusxd9RmvII1sKf/135+EJAnhcN1i8fldSakpPpXPsXQ4aQm MTtl0AwPfh1XQzHXyJK50KDXLW12y6wuLIa4cUZqiG7D/GPq1jvOEYiu1Z9H3430RL0F 9V1TMvD9AJf6sh3GAO+EGhkfsyNnyCOX/cwlnG7hqwkypPSgNFTvfFwfweV2QgwItlR/ 6/pw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707139907; x=1707744707; h=content-transfer-encoding:in-reply-to:autocrypt:references:cc:to :from:content-language:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=gEqRJt64VcumCTtnR8WkrhpV/gUr3OF3qVsMsouyC7A=; b=otNwWGLSvS+lmX9dB4UFbS6B+Xcyg67x82K2yrtTszyNj7T9KDmWnKi9eGPpntUoQA RrsG9HpWO7Px4Yj/E0JTjI1WYJeVWoThpHGLzDa67o/kd7mHzQeNQ85KHk8A+Lw+z0Nk YqzAAL0gdQ/Xio+caSvz83ZajfHOb391+/9Y5bijw2Glrzhyopj2Xye4A6VdWEEya36L m3T39kLz7yJmWoeiIHD6WJmXt1yuANcloUSHUZSu4DiPAQ87GJ6wxWLWbG1IWi2A/Gl5 vrjLy/8TslSxXA1WzrStLHpltEZG5KmzXTEDo8+mqeSgorOYcLMKx99NjBHO51/2UIbe T2uA== X-Gm-Message-State: AOJu0YyJl1Gjn2kKTza8fTyOrHxFU6lHBlXUp9nfXVpWfwiJoREMD4Jc Urm94eB1AGRvmGV8ySAAvpCwbsQnZ/AdhyyY1x81Rt6/cE9bRKR3G+i1wDAq1DKr2KXjmuvsIQM = X-Google-Smtp-Source: AGHT+IFrFVP3TfIbgIMT87bMnfEeRRPkJ7aKkrdXuEKYf5lnr2tL3R7tzhfm5/tp2tedPXGNUgc8ag== X-Received: by 2002:a05:6512:1289:b0:511:5385:595d with SMTP id u9-20020a056512128900b005115385595dmr1473621lfs.41.1707139907575; Mon, 05 Feb 2024 05:31:47 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCWdxlNgwzzOZXU8TNg2tyMXtWd0Pidw4BilmsICRarkIGrec4jvn4gCavIxalaAY7DXQkQqhAIJtNvRpnlcahl7akcDyRxq1caEIGnk1CbKimOnm4IHCvN0jzO/oobMf26WvepPfI6hCPQC5GgK6GUcZXVV2YEttFh24XHg+CzZrcjbWrmMZCNhqBjk0kpn12ocIPpGg39JNw== Message-ID: Date: Mon, 5 Feb 2024 14:31:47 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: [PATCH v3 7/8] x86/APIC: drop regs parameter from direct vector handler functions Content-Language: en-US From: Jan Beulich To: "xen-devel@lists.xenproject.org" Cc: Andrew Cooper , George Dunlap , Wei Liu , =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= , Kevin Tian , Jun Nakajima References: Autocrypt: addr=jbeulich@suse.com; keydata= xsDiBFk3nEQRBADAEaSw6zC/EJkiwGPXbWtPxl2xCdSoeepS07jW8UgcHNurfHvUzogEq5xk hu507c3BarVjyWCJOylMNR98Yd8VqD9UfmX0Hb8/BrA+Hl6/DB/eqGptrf4BSRwcZQM32aZK 7Pj2XbGWIUrZrd70x1eAP9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s7MPMu8YQRFVdUvtSpaAs8OFfGQ0ia3LGZcjA6Ik2+xcqscEJzNH+qh8V m5jjp28yZgaqTaRbg3M/+MTbMpicpZuqF4rnB0AQD12/3BNWDR6bmh+EkYSMcEIpQmBM51qM EKYTQGybRCjpnKHGOxG0rfFY1085mBDZCH5Kx0cl0HVJuQKC+dV2ZY5AqjcKwAxpE75MLFkr wkkEGBECAAkFAlk3nEQCGwwACgkQoDSui/t3IH7nnwCfcJWUDUFKdCsBH/E5d+0ZnMQi+G0A nAuWpQkjM1ASeQwSHEeAWPgskBQL In-Reply-To: Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @suse.com) X-ZM-MESSAGEID: 1707139923874100001 Content-Type: text/plain; charset="utf-8" The only place it was needed is in the spurious handler, and there we can use get_irq_regs() instead. Signed-off-by: Jan Beulich Reviewed-by: Andrew Cooper --- a/xen/arch/x86/apic.c +++ b/xen/arch/x86/apic.c @@ -1322,7 +1322,7 @@ int reprogram_timer(s_time_t timeout) return apic_tmict || !timeout; } =20 -static void cf_check apic_timer_interrupt(struct cpu_user_regs *regs) +static void cf_check apic_timer_interrupt(void) { ack_APIC_irq(); perfc_incr(apic_timer); @@ -1341,7 +1341,7 @@ void smp_send_state_dump(unsigned int cp /* * Spurious interrupts should _never_ happen with our APIC/SMP architectur= e. */ -static void cf_check spurious_interrupt(struct cpu_user_regs *regs) +static void cf_check spurious_interrupt(void) { /* * Check if this is a vectored interrupt (most likely, as this is prob= ably @@ -1355,7 +1355,7 @@ static void cf_check spurious_interrupt( is_spurious =3D !nmi_check_continuation(); if (this_cpu(state_dump_pending)) { this_cpu(state_dump_pending) =3D false; - dump_execstate(regs); + dump_execstate(get_irq_regs()); is_spurious =3D false; } =20 @@ -1372,7 +1372,7 @@ static void cf_check spurious_interrupt( * This interrupt should never happen with our APIC/SMP architecture */ =20 -static void cf_check error_interrupt(struct cpu_user_regs *regs) +static void cf_check error_interrupt(void) { static const char *const esr_fields[] =3D { ", Send CS error", @@ -1407,7 +1407,7 @@ static void cf_check error_interrupt(str * This interrupt handles performance counters interrupt */ =20 -static void cf_check pmu_interrupt(struct cpu_user_regs *regs) +static void cf_check pmu_interrupt(void) { ack_APIC_irq(); vpmu_do_interrupt(); --- a/xen/arch/x86/cpu/mcheck/mce_intel.c +++ b/xen/arch/x86/cpu/mcheck/mce_intel.c @@ -58,7 +58,7 @@ bool __read_mostly lmce_support; #define MCE_RING 0x1 static DEFINE_PER_CPU(int, last_state); =20 -static void cf_check intel_thermal_interrupt(struct cpu_user_regs *regs) +static void cf_check intel_thermal_interrupt(void) { uint64_t msr_content; unsigned int cpu =3D smp_processor_id(); @@ -642,7 +642,7 @@ static void cpu_mcheck_disable(void) clear_cmci(); } =20 -static void cf_check cmci_interrupt(struct cpu_user_regs *regs) +static void cf_check cmci_interrupt(void) { mctelem_cookie_t mctc; struct mca_summary bs; --- a/xen/arch/x86/guest/xen/xen.c +++ b/xen/arch/x86/guest/xen/xen.c @@ -158,7 +158,7 @@ static void __init init_memmap(void) } } =20 -static void cf_check xen_evtchn_upcall(struct cpu_user_regs *regs) +static void cf_check xen_evtchn_upcall(void) { struct vcpu_info *vcpu_info =3D this_cpu(vcpu_info); unsigned long pending; --- a/xen/arch/x86/hvm/vmx/vmx.c +++ b/xen/arch/x86/hvm/vmx/vmx.c @@ -2776,7 +2776,7 @@ static struct hvm_function_table __initd }; =20 /* Handle VT-d posted-interrupt when VCPU is blocked. */ -static void cf_check pi_wakeup_interrupt(struct cpu_user_regs *regs) +static void cf_check pi_wakeup_interrupt(void) { struct vmx_vcpu *vmx, *tmp; spinlock_t *lock =3D &per_cpu(vmx_pi_blocking, smp_processor_id()).loc= k; @@ -2808,7 +2808,7 @@ static void cf_check pi_wakeup_interrupt } =20 /* Handle VT-d posted-interrupt when VCPU is running. */ -static void cf_check pi_notification_interrupt(struct cpu_user_regs *regs) +static void cf_check pi_notification_interrupt(void) { ack_APIC_irq(); this_cpu(irq_count)++; --- a/xen/arch/x86/include/asm/irq.h +++ b/xen/arch/x86/include/asm/irq.h @@ -72,17 +72,15 @@ extern int opt_irq_vector_map; =20 #define platform_legacy_irq(irq) ((irq) < 16) =20 -void cf_check event_check_interrupt(struct cpu_user_regs *regs); -void cf_check invalidate_interrupt(struct cpu_user_regs *regs); -void cf_check call_function_interrupt(struct cpu_user_regs *regs); -void cf_check irq_move_cleanup_interrupt(struct cpu_user_regs *regs); +void cf_check event_check_interrupt(void); +void cf_check invalidate_interrupt(void); +void cf_check call_function_interrupt(void); +void cf_check irq_move_cleanup_interrupt(void); =20 uint8_t alloc_hipriority_vector(void); =20 -void set_direct_apic_vector( - uint8_t vector, void (*handler)(struct cpu_user_regs *regs)); -void alloc_direct_apic_vector( - uint8_t *vector, void (*handler)(struct cpu_user_regs *regs)); +void set_direct_apic_vector(uint8_t vector, void (*handler)(void)); +void alloc_direct_apic_vector(uint8_t *vector, void (*handler)(void)); =20 void do_IRQ(struct cpu_user_regs *regs); =20 --- a/xen/arch/x86/irq.c +++ b/xen/arch/x86/irq.c @@ -743,7 +743,7 @@ void move_native_irq(struct irq_desc *de desc->handler->enable(desc); } =20 -void cf_check irq_move_cleanup_interrupt(struct cpu_user_regs *regs) +void cf_check irq_move_cleanup_interrupt(void) { unsigned vector, me; =20 @@ -913,16 +913,14 @@ uint8_t alloc_hipriority_vector(void) return next++; } =20 -static void (*direct_apic_vector[X86_NR_VECTORS])(struct cpu_user_regs *re= gs); -void set_direct_apic_vector( - uint8_t vector, void (*handler)(struct cpu_user_regs *regs)) +static void (*direct_apic_vector[X86_NR_VECTORS])(void); +void set_direct_apic_vector(uint8_t vector, void (*handler)(void)) { BUG_ON(direct_apic_vector[vector] !=3D NULL); direct_apic_vector[vector] =3D handler; } =20 -void alloc_direct_apic_vector( - uint8_t *vector, void (*handler)(struct cpu_user_regs *regs)) +void alloc_direct_apic_vector(uint8_t *vector, void (*handler)(void)) { static DEFINE_SPINLOCK(lock); =20 @@ -1907,7 +1905,7 @@ void do_IRQ(struct cpu_user_regs *regs) if ( irq < 0 ) { if ( direct_apic_vector[vector] ) - direct_apic_vector[vector](regs); + direct_apic_vector[vector](); else { const char *kind =3D ", LAPIC"; --- a/xen/arch/x86/smp.c +++ b/xen/arch/x86/smp.c @@ -245,7 +245,7 @@ static cpumask_t flush_cpumask; static const void *flush_va; static unsigned int flush_flags; =20 -void cf_check invalidate_interrupt(struct cpu_user_regs *regs) +void cf_check invalidate_interrupt(void) { unsigned int flags =3D flush_flags; ack_APIC_irq(); @@ -387,14 +387,14 @@ void smp_send_nmi_allbutself(void) send_IPI_mask(&cpu_online_map, APIC_DM_NMI); } =20 -void cf_check event_check_interrupt(struct cpu_user_regs *regs) +void cf_check event_check_interrupt(void) { ack_APIC_irq(); perfc_incr(ipis); this_cpu(irq_count)++; } =20 -void cf_check call_function_interrupt(struct cpu_user_regs *regs) +void cf_check call_function_interrupt(void) { ack_APIC_irq(); perfc_incr(ipis);