From nobody Sat Feb 7 04:47:30 2026 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 623C7274B5C for ; Mon, 19 Jan 2026 18:26:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768847209; cv=none; b=jBau0HFKrM0tZyuW+AMZNAhiQ5xEWmHpg6QiIxoIwawpIeRQOtyF0FwUM0nC1eEPCIziYlAsXQt7kpvg8I4mz8MGvyKsJVQYK2joS/c6TDUz+vyHT3Dek48a+bZdRMO4WmANr2RhS0F63P45WFIJvp3CNE6zFGgbgyPnVpSFo2M= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768847209; c=relaxed/simple; bh=qfIqeS6lsyN72mgrs7L3DPpgQ0zdZ42Ajvw0bt12Wf8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=J/JkFrpovT+5J6bL+BX16KwkeSJUBsdt+I+w2JquJGjl2p93QWiRsywoDde+MvZ8RNvHmO0gE4Cp0L7pwOYKhG2Cbl7AduWGCVXsTqTpcdAn4TQf+JHoMeW/vyQPvNW+9LC7iYiTD5R+D1ETPn4wl8A+xYniU5SftziRANrJsR8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b=Ane7HIPR; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b=Ane7HIPR; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="Ane7HIPR"; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="Ane7HIPR" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 8F3CE33759; Mon, 19 Jan 2026 18:26:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1768847201; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Qi7wTqE05LxdJUR1JdtpohAe003quG9zbP66y4rM7wM=; b=Ane7HIPRLkjUwVa1Fm1Zp5JHwT3HmlM4kUdLFSBNDLDFuijSAIdLWr6zBpKHC7/oU5Pw2F LfWGJSMoDsIeD5IT5OQh6q7bTLzyGsGczcX7furkX1Mx9aNYw8ly9V/BgFSbdEjRZFyrnm A3O6qRrLvu+IKjaFDW+dpePSxFBrBps= Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.com header.s=susede1 header.b=Ane7HIPR DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1768847201; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Qi7wTqE05LxdJUR1JdtpohAe003quG9zbP66y4rM7wM=; b=Ane7HIPRLkjUwVa1Fm1Zp5JHwT3HmlM4kUdLFSBNDLDFuijSAIdLWr6zBpKHC7/oU5Pw2F LfWGJSMoDsIeD5IT5OQh6q7bTLzyGsGczcX7furkX1Mx9aNYw8ly9V/BgFSbdEjRZFyrnm A3O6qRrLvu+IKjaFDW+dpePSxFBrBps= Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 3E7593EA63; Mon, 19 Jan 2026 18:26:41 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id KabADWF3bmm8aAAAD6G6ig (envelope-from ); Mon, 19 Jan 2026 18:26:41 +0000 From: Juergen Gross To: linux-kernel@vger.kernel.org, x86@kernel.org Cc: Juergen Gross , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , kernel test robot Subject: [PATCH v4 1/6] x86/irqflags: Fix build failure Date: Mon, 19 Jan 2026 19:26:27 +0100 Message-ID: <20260119182632.596369-2-jgross@suse.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260119182632.596369-1-jgross@suse.com> References: <20260119182632.596369-1-jgross@suse.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -3.01 X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[100.00%]; NEURAL_HAM_LONG(-1.00)[-1.000]; MID_CONTAINS_FROM(1.00)[]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.com:s=susede1]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; ARC_NA(0.00)[]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; RCVD_COUNT_TWO(0.00)[2]; MIME_TRACE(0.00)[0:+]; RCVD_VIA_SMTP_AUTH(0.00)[]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; TO_DN_SOME(0.00)[]; FUZZY_RATELIMITED(0.00)[rspamd.com]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_SEVEN(0.00)[9]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.com:dkim,suse.com:mid,suse.com:email]; RCVD_TLS_ALL(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_RATELIMIT(0.00)[to_ip_from(RLkdkdrsxe9hqhhs5ask8616i6)]; DKIM_SIGNED(0.00)[suse.com:s=susede1]; DKIM_TRACE(0.00)[suse.com:+] X-Spam-Level: X-Rspamd-Action: no action X-Rspamd-Queue-Id: 8F3CE33759 X-Rspamd-Server: rspamd1.dmz-prg2.suse.org X-Spam-Flag: NO Content-Type: text/plain; charset="utf-8" Commit 22cc5ca5de52 ("x86/paravirt: Move halt paravirt calls under CONFIG_PARAVIRT") moved some paravirt hooks from the CONFIG_PARAVIRT_XXL umbrella to CONFIG_PARAVIRT, but missed to move the associated "#include " in irqflags.h from CONFIG_PARAVIRT_XXL to CONFIG_PARAVIRT. This hasn't resulted in build failures yet, as all use cases of irqflags.h had paravirt.h included via other header files, even without CONFIG_PARAVIRT_XXL being set. In order to allow changing those other header files, e.g. by no longer including paravirt.h, fix irqflags.h by moving inclusion of paravirt.h under the CONFIG_PARAVIRT umbrella. Fixes: 22cc5ca5de52 ("x86/paravirt: Move halt paravirt calls under CONFIG_P= ARAVIRT") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202601152203.plJOoOEF-lkp@int= el.com/ Signed-off-by: Juergen Gross --- V4: - merge into slow_io series as prereq patch (Boris Petkov) - rewrite commit message (Boris Petkov) --- arch/x86/include/asm/irqflags.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/x86/include/asm/irqflags.h b/arch/x86/include/asm/irqflag= s.h index a1193e9d65f2..4d4d02e31287 100644 --- a/arch/x86/include/asm/irqflags.h +++ b/arch/x86/include/asm/irqflags.h @@ -96,11 +96,11 @@ static __always_inline void halt(void) native_halt(); } #endif /* __ASSEMBLY__ */ +#else +#include #endif /* CONFIG_PARAVIRT */ =20 -#ifdef CONFIG_PARAVIRT_XXL -#include -#else +#ifndef CONFIG_PARAVIRT_XXL #ifndef __ASSEMBLER__ #include =20 --=20 2.52.0 From nobody Sat Feb 7 04:47:30 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; 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=1768847241; cv=none; d=zohomail.com; s=zohoarc; b=GWwXh3SqC9V0vmZYNIb9oIXXMmwfvCyaGZeih7/o97u0JI8CRdxC1rI9YfI0H0f9h9jLLryJjbufg/IPaEU7BYfv3s/E0mqS+yHeC9LbrftUH0dsDUM6YFb2EBoEQpO8BtaHl/IKFae4NsjiblqREdDzbvPEA7SRoHylTtJ3Xxg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1768847241; h=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=AptIhJVLc4BAPjc93uyYDO0mqV71EtV4n2ofFaZETBA=; b=kUDBFsTOOJSGqPtwlg/2orU7BSj7WDflpjQIMYiJMIxgDU4J/ZkgxO4f/rH7f8UPrHiBJYDu0hu1sZPt5IUJ2gQ/ENKP7vPcH75TuDNZePR6IQZe6gzBkSJdXpBhS8kFT70NV6iCFGEWnOpJqweJudW0SYK4kd1g7bkvdUCKTSQ= 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 1768847241859639.4925266370618; Mon, 19 Jan 2026 10:27:21 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.1208251.1520468 (Exim 4.92) (envelope-from ) id 1vhtxi-0006Os-Qm; Mon, 19 Jan 2026 18:26:50 +0000 Received: by outflank-mailman (output) from mailman id 1208251.1520468; Mon, 19 Jan 2026 18:26: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 1vhtxi-0006Ol-OB; Mon, 19 Jan 2026 18:26:50 +0000 Received: by outflank-mailman (input) for mailman id 1208251; Mon, 19 Jan 2026 18:26:49 +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 1vhtxh-00069I-44 for xen-devel@lists.xenproject.org; Mon, 19 Jan 2026 18:26:49 +0000 Received: from smtp-out2.suse.de (smtp-out2.suse.de [2a07:de40:b251:101:10:150:64:2]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 6a4b5054-f564-11f0-b15e-2bf370ae4941; Mon, 19 Jan 2026 19:26:47 +0100 (CET) Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 7F8025BCCF; Mon, 19 Jan 2026 18:26:47 +0000 (UTC) Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id F0E353EA63; Mon, 19 Jan 2026 18:26:46 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id bQUXOWZ3bmlDaQAAD6G6ig (envelope-from ); Mon, 19 Jan 2026 18:26:46 +0000 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: 6a4b5054-f564-11f0-b15e-2bf370ae4941 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1768847207; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=AptIhJVLc4BAPjc93uyYDO0mqV71EtV4n2ofFaZETBA=; b=MHdJ4bZvPaLDXUUOQ3i7gfZ7SaV5KwjmoaFwAn84TqAqysh6unnWea6ggMSDJ/PpHkvkjo I0bcsilVrid3zIhgY/mNdw68yalgrA6NjTLwct4FKvMxS8yXswniUi2Aw805dPA794XFJp PwpYIqSNVMu84lONkQNyMxjfHxIq6NE= Authentication-Results: smtp-out2.suse.de; dkim=pass header.d=suse.com header.s=susede1 header.b=MHdJ4bZv DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1768847207; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=AptIhJVLc4BAPjc93uyYDO0mqV71EtV4n2ofFaZETBA=; b=MHdJ4bZvPaLDXUUOQ3i7gfZ7SaV5KwjmoaFwAn84TqAqysh6unnWea6ggMSDJ/PpHkvkjo I0bcsilVrid3zIhgY/mNdw68yalgrA6NjTLwct4FKvMxS8yXswniUi2Aw805dPA794XFJp PwpYIqSNVMu84lONkQNyMxjfHxIq6NE= From: Juergen Gross To: linux-kernel@vger.kernel.org, x86@kernel.org, virtualization@lists.linux.dev, kvm@vger.kernel.org Cc: Juergen Gross , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , Ajay Kaher , Alexey Makhalov , Broadcom internal kernel review list , Paolo Bonzini , Vitaly Kuznetsov , Boris Ostrovsky , xen-devel@lists.xenproject.org Subject: [PATCH v4 2/6] x86/paravirt: Replace io_delay() hook with a bool Date: Mon, 19 Jan 2026 19:26:28 +0100 Message-ID: <20260119182632.596369-3-jgross@suse.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260119182632.596369-1-jgross@suse.com> References: <20260119182632.596369-1-jgross@suse.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.com:s=susede1]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; FUZZY_RATELIMITED(0.00)[rspamd.com]; ARC_NA(0.00)[]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; MIME_TRACE(0.00)[0:+]; DKIM_SIGNED(0.00)[suse.com:s=susede1]; RCPT_COUNT_TWELVE(0.00)[17]; RCVD_COUNT_TWO(0.00)[2]; URIBL_BLOCKED(0.00)[imap1.dmz-prg2.suse.org:helo,imap1.dmz-prg2.suse.org:rdns,suse.com:mid,suse.com:dkim,suse.com:email]; TO_MATCH_ENVRCPT_ALL(0.00)[]; R_RATELIMIT(0.00)[to_ip_from(RLkdkdrsxe9hqhhs5ask8616i6)]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; DKIM_TRACE(0.00)[suse.com:+]; FROM_HAS_DN(0.00)[]; RCVD_TLS_ALL(0.00)[]; TO_DN_SOME(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.com:mid,suse.com:dkim,suse.com:email] X-Spam-Flag: NO X-Spam-Score: -3.01 X-Rspamd-Queue-Id: 7F8025BCCF X-Rspamd-Action: no action X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Spam-Level: X-ZohoMail-DKIM: pass (identity @suse.com) X-ZM-MESSAGEID: 1768847244378154100 Content-Type: text/plain; charset="utf-8" The io_delay() paravirt hook is in no way performance critical and all users setting it to a different function than native_io_delay() are using an empty function as replacement. This enables to replace the hook with a bool indicating whether native_io_delay() should be called. Signed-off-by: Juergen Gross --- V3: - rebase to tip/master kernel branch --- arch/x86/include/asm/io.h | 9 ++++++--- arch/x86/include/asm/paravirt-base.h | 6 ++++++ arch/x86/include/asm/paravirt.h | 11 ----------- arch/x86/include/asm/paravirt_types.h | 2 -- arch/x86/kernel/cpu/vmware.c | 2 +- arch/x86/kernel/kvm.c | 8 +------- arch/x86/kernel/paravirt.c | 3 +-- arch/x86/xen/enlighten_pv.c | 6 +----- 8 files changed, 16 insertions(+), 31 deletions(-) diff --git a/arch/x86/include/asm/io.h b/arch/x86/include/asm/io.h index ca309a3227c7..8a9292ce7d2d 100644 --- a/arch/x86/include/asm/io.h +++ b/arch/x86/include/asm/io.h @@ -243,11 +243,16 @@ extern int io_delay_type; extern void io_delay_init(void); =20 #if defined(CONFIG_PARAVIRT) -#include +#include #else +#define call_io_delay() true +#endif =20 static inline void slow_down_io(void) { + if (!call_io_delay()) + return; + native_io_delay(); #ifdef REALLY_SLOW_IO native_io_delay(); @@ -256,8 +261,6 @@ static inline void slow_down_io(void) #endif } =20 -#endif - #define BUILDIO(bwl, type) \ static inline void out##bwl##_p(type value, u16 port) \ { \ diff --git a/arch/x86/include/asm/paravirt-base.h b/arch/x86/include/asm/pa= ravirt-base.h index 982a0b93bc76..3b9e7772d196 100644 --- a/arch/x86/include/asm/paravirt-base.h +++ b/arch/x86/include/asm/paravirt-base.h @@ -15,6 +15,8 @@ struct pv_info { #ifdef CONFIG_PARAVIRT_XXL u16 extra_user_64bit_cs; /* __USER_CS if none */ #endif + bool io_delay; + const char *name; }; =20 @@ -26,6 +28,10 @@ u64 _paravirt_ident_64(u64); #endif #define paravirt_nop ((void *)nop_func) =20 +#ifdef CONFIG_PARAVIRT +#define call_io_delay() pv_info.io_delay +#endif + #ifdef CONFIG_PARAVIRT_SPINLOCKS void paravirt_set_cap(void); #else diff --git a/arch/x86/include/asm/paravirt.h b/arch/x86/include/asm/paravir= t.h index b21072af731d..f4885bd98a18 100644 --- a/arch/x86/include/asm/paravirt.h +++ b/arch/x86/include/asm/paravirt.h @@ -19,17 +19,6 @@ #include #include =20 -/* The paravirtualized I/O functions */ -static inline void slow_down_io(void) -{ - PVOP_VCALL0(pv_ops, cpu.io_delay); -#ifdef REALLY_SLOW_IO - PVOP_VCALL0(pv_ops, cpu.io_delay); - PVOP_VCALL0(pv_ops, cpu.io_delay); - PVOP_VCALL0(pv_ops, cpu.io_delay); -#endif -} - void native_flush_tlb_local(void); void native_flush_tlb_global(void); void native_flush_tlb_one_user(unsigned long addr); diff --git a/arch/x86/include/asm/paravirt_types.h b/arch/x86/include/asm/p= aravirt_types.h index 7ccd41628d36..3946d0f69921 100644 --- a/arch/x86/include/asm/paravirt_types.h +++ b/arch/x86/include/asm/paravirt_types.h @@ -30,8 +30,6 @@ struct pv_lazy_ops { =20 struct pv_cpu_ops { /* hooks for various privileged instructions */ - void (*io_delay)(void); - #ifdef CONFIG_PARAVIRT_XXL unsigned long (*get_debugreg)(int regno); void (*set_debugreg)(int regno, unsigned long value); diff --git a/arch/x86/kernel/cpu/vmware.c b/arch/x86/kernel/cpu/vmware.c index a3e6936839b1..eee0d1a48802 100644 --- a/arch/x86/kernel/cpu/vmware.c +++ b/arch/x86/kernel/cpu/vmware.c @@ -339,7 +339,7 @@ arch_initcall(activate_jump_labels); static void __init vmware_paravirt_ops_setup(void) { pv_info.name =3D "VMware hypervisor"; - pv_ops.cpu.io_delay =3D paravirt_nop; + pv_info.io_delay =3D false; =20 if (vmware_tsc_khz =3D=3D 0) return; diff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c index 26ab6f8e36df..911950c9110c 100644 --- a/arch/x86/kernel/kvm.c +++ b/arch/x86/kernel/kvm.c @@ -75,12 +75,6 @@ DEFINE_PER_CPU_DECRYPTED(struct kvm_steal_time, steal_ti= me) __aligned(64) __visi static int has_steal_clock =3D 0; =20 static int has_guest_poll =3D 0; -/* - * No need for any "IO delay" on KVM - */ -static void kvm_io_delay(void) -{ -} =20 #define KVM_TASK_SLEEP_HASHBITS 8 #define KVM_TASK_SLEEP_HASHSIZE (1<; Mon, 19 Jan 2026 18:26:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768847219; cv=none; b=QDLUFkza6dj5j/K5cRpmLEpl8SrDDrSd1ikmncAOe8MDnsWz2cNVHsI1IVpF1IfQiN2Xvov3ynNwQq7J7CNs+cMRdWObQeLuhrkIc5jnCKXXXn7GesNfxkUCpaQyot/7zQsphTTQB4W0TcT4k90w6ByQwAOe0TtUjjWt/mUOWBs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768847219; c=relaxed/simple; bh=oN4Vc+WWGg13cog0JrZa3/y60qOQ3wjh7m2o8Xh1cjk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=WMWKhIAoyli7K192PyMX5QcvaEyVPNUTFN0ARycQl3faW4LB0VxoouC/PAPYcznFUQsgPE2EAUhkPgGHnrGX0Z2jFO1nOmHVOGCK0tpIghcTNIy5eIjE/mZM0ule5pvVy04uoKH1DVbYObsRplQ5D5sRkDDBz/OUlflHHo3SXlc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b=mn6/T6Pc; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b=mn6/T6Pc; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="mn6/T6Pc"; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="mn6/T6Pc" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 4FCE633759; Mon, 19 Jan 2026 18:26:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1768847213; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yo5da4CB1u+Ak7PIMIs7KS17fraXjYMbiuLt7XzwC9E=; b=mn6/T6PcV7P1aQVgMviLM3lY+Ko7ybi8NpvcwVzTT+USfprbit2V3NHqE1W05e/Ifn/Yyu DTJlcWzd/ZRrYHUuGswvNdKyOUBuSIxE2h89IWgmA99LCDwhtoTJn/HOIh+bUjte98kqXq m3q4THds8Dzrvyo7ZdkkFv5XBOXaPGI= Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.com header.s=susede1 header.b="mn6/T6Pc" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1768847213; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yo5da4CB1u+Ak7PIMIs7KS17fraXjYMbiuLt7XzwC9E=; b=mn6/T6PcV7P1aQVgMviLM3lY+Ko7ybi8NpvcwVzTT+USfprbit2V3NHqE1W05e/Ifn/Yyu DTJlcWzd/ZRrYHUuGswvNdKyOUBuSIxE2h89IWgmA99LCDwhtoTJn/HOIh+bUjte98kqXq m3q4THds8Dzrvyo7ZdkkFv5XBOXaPGI= Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id DE36E3EA63; Mon, 19 Jan 2026 18:26:52 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id NJcHNWx3bmlOaQAAD6G6ig (envelope-from ); Mon, 19 Jan 2026 18:26:52 +0000 From: Juergen Gross To: linux-kernel@vger.kernel.org, x86@kernel.org, linux-block@vger.kernel.org Cc: Juergen Gross , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , Denis Efremov , Jens Axboe Subject: [PATCH v4 3/6] block/floppy: Don't use REALLY_SLOW_IO for delays Date: Mon, 19 Jan 2026 19:26:29 +0100 Message-ID: <20260119182632.596369-4-jgross@suse.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260119182632.596369-1-jgross@suse.com> References: <20260119182632.596369-1-jgross@suse.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.com:s=susede1]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; RCVD_COUNT_TWO(0.00)[2]; DKIM_SIGNED(0.00)[suse.com:s=susede1]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; FUZZY_RATELIMITED(0.00)[rspamd.com]; TO_DN_SOME(0.00)[]; URIBL_BLOCKED(0.00)[suse.com:mid,suse.com:dkim,suse.com:email,imap1.dmz-prg2.suse.org:helo,imap1.dmz-prg2.suse.org:rdns]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_SEVEN(0.00)[11]; FROM_EQ_ENVFROM(0.00)[]; R_RATELIMIT(0.00)[to_ip_from(RLkdkdrsxe9hqhhs5ask8616i6)]; RCVD_TLS_ALL(0.00)[]; DKIM_TRACE(0.00)[suse.com:+]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.com:mid,suse.com:dkim,suse.com:email] X-Spam-Flag: NO X-Spam-Score: -3.01 X-Rspamd-Queue-Id: 4FCE633759 X-Rspamd-Action: no action X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Spam-Level: Content-Type: text/plain; charset="utf-8" Instead of defining REALLY_SLOW_IO before including io.h, add the required additional calls of native_io_delay() to the related functions in arch/x86/include/asm/floppy.h. This will remove the last place where REALLY_SLOW_IO is being defined. Signed-off-by: Juergen Gross --- arch/x86/include/asm/floppy.h | 27 ++++++++++++++++++++++----- drivers/block/floppy.c | 2 -- 2 files changed, 22 insertions(+), 7 deletions(-) diff --git a/arch/x86/include/asm/floppy.h b/arch/x86/include/asm/floppy.h index e7a244051c62..8d1e86687b98 100644 --- a/arch/x86/include/asm/floppy.h +++ b/arch/x86/include/asm/floppy.h @@ -29,9 +29,6 @@ #define CSW fd_routine[can_use_virtual_dma & 1] =20 =20 -#define fd_inb(base, reg) inb_p((base) + (reg)) -#define fd_outb(value, base, reg) outb_p(value, (base) + (reg)) - #define fd_request_dma() CSW._request_dma(FLOPPY_DMA, "floppy") #define fd_free_dma() CSW._free_dma(FLOPPY_DMA) #define fd_enable_irq() enable_irq(FLOPPY_IRQ) @@ -49,6 +46,26 @@ static char *virtual_dma_addr; static int virtual_dma_mode; static int doing_pdma; =20 +static inline u8 fd_inb(u16 base, u16 reg) +{ + u8 ret =3D inb_p(base + reg); + + native_io_delay(); + native_io_delay(); + native_io_delay(); + + return ret; +} + +static inline void fd_outb(u8 value, u16 base, u16 reg) +{ + outb_p(value, base + reg); + + native_io_delay(); + native_io_delay(); + native_io_delay(); +} + static irqreturn_t floppy_hardint(int irq, void *dev_id) { unsigned char st; @@ -79,9 +96,9 @@ static irqreturn_t floppy_hardint(int irq, void *dev_id) if (st !=3D (STATUS_DMA | STATUS_READY)) break; if (virtual_dma_mode) - outb_p(*lptr, virtual_dma_port + FD_DATA); + fd_outb(*lptr, virtual_dma_port, FD_DATA); else - *lptr =3D inb_p(virtual_dma_port + FD_DATA); + *lptr =3D fd_inb(virtual_dma_port, FD_DATA); } virtual_dma_count =3D lcount; virtual_dma_addr =3D lptr; diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c index c28786e0fe1c..4422bc57a4f2 100644 --- a/drivers/block/floppy.c +++ b/drivers/block/floppy.c @@ -145,8 +145,6 @@ * Better audit of register_blkdev. */ =20 -#define REALLY_SLOW_IO - #define DEBUGT 2 =20 #define DPRINT(format, args...) \ --=20 2.52.0 From nobody Sat Feb 7 04:47:30 2026 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 26B7C38E120 for ; Mon, 19 Jan 2026 18:27:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768847225; cv=none; b=L4JN1XsoOzhb+cld5cnUUr0wYga2pze2dSaLms92HaNDg4tRpkFl0OpIYPg/hirlBB0BXJMmD3++UUaH9HFGjxkaS3MOQ8l4qnM7u1PzKaUPRgQTrvLqkmxkiC3SQLII8mU8Odvw0CgfzCWGA3o8DNWgdkkaK9HBCRfTEz2Si40= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768847225; c=relaxed/simple; bh=NKnyy+28heQrQVvqFjW4c9Kdt9zVlko//yAXV7+3r5s=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Yuiaiq5wdFRVutzCG3JOUNJdrV1AUNZPLVhAtjfAVTqQkLvMLq8dikss+6ScWSrhSQ6wq7n1IaYUYJDP2+6SLJUMwnYlFwsI9RkELKKV7FE4KX0hvITfFaeItQi12dD1ModRiJoTriSDQZRVzbewWObUpWGWNGWpv1KJFCz/JFQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b=fObPJp4b; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b=fObPJp4b; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="fObPJp4b"; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="fObPJp4b" Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 0C3585BCCE; Mon, 19 Jan 2026 18:26:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1768847219; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yD1auZnKoFH2aJ6RcWQjKdA4hVTEGkXYbSdsfABaj6I=; b=fObPJp4beX7JVacaZDvXUbDc4UBeCk6GunsChfgHjH1dHMKkJUMOql7vhDOj1VmrCK13fP HoGiHXhsDxqU27vcI1HlcnFRlkD6fXBuN4nEM+MItuB4v/MBkWEixkNEMr8BQA6yrbJ9nq 5nTYFT1l6FGhSpUbtj6EXMyqhd2sSEU= Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1768847219; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yD1auZnKoFH2aJ6RcWQjKdA4hVTEGkXYbSdsfABaj6I=; b=fObPJp4beX7JVacaZDvXUbDc4UBeCk6GunsChfgHjH1dHMKkJUMOql7vhDOj1VmrCK13fP HoGiHXhsDxqU27vcI1HlcnFRlkD6fXBuN4nEM+MItuB4v/MBkWEixkNEMr8BQA6yrbJ9nq 5nTYFT1l6FGhSpUbtj6EXMyqhd2sSEU= Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id ADE3B3EA63; Mon, 19 Jan 2026 18:26:58 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id IvR/KHJ3bmlSaQAAD6G6ig (envelope-from ); Mon, 19 Jan 2026 18:26:58 +0000 From: Juergen Gross To: linux-kernel@vger.kernel.org, x86@kernel.org Cc: Juergen Gross , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" Subject: [PATCH v4 4/6] x86/io: Remove REALLY_SLOW_IO handling Date: Mon, 19 Jan 2026 19:26:30 +0100 Message-ID: <20260119182632.596369-5-jgross@suse.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260119182632.596369-1-jgross@suse.com> References: <20260119182632.596369-1-jgross@suse.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Spamd-Result: default: False [-2.80 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; FUZZY_RATELIMITED(0.00)[rspamd.com]; RCPT_COUNT_SEVEN(0.00)[8]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; DKIM_SIGNED(0.00)[suse.com:s=susede1]; URIBL_BLOCKED(0.00)[imap1.dmz-prg2.suse.org:helo,suse.com:mid,suse.com:email]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.com:mid,suse.com:email]; RCVD_TLS_ALL(0.00)[] X-Spam-Flag: NO X-Spam-Score: -2.80 X-Spam-Level: Content-Type: text/plain; charset="utf-8" As there is no user of REALLY_SLOW_IO left, remove the related handling from arch/x86/include/asm/io.h. Signed-off-by: Juergen Gross --- arch/x86/include/asm/io.h | 5 ----- 1 file changed, 5 deletions(-) diff --git a/arch/x86/include/asm/io.h b/arch/x86/include/asm/io.h index 8a9292ce7d2d..843f23044754 100644 --- a/arch/x86/include/asm/io.h +++ b/arch/x86/include/asm/io.h @@ -254,11 +254,6 @@ static inline void slow_down_io(void) return; =20 native_io_delay(); -#ifdef REALLY_SLOW_IO - native_io_delay(); - native_io_delay(); - native_io_delay(); -#endif } =20 #define BUILDIO(bwl, type) \ --=20 2.52.0 From nobody Sat Feb 7 04:47:30 2026 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D9E3232D7FB for ; Mon, 19 Jan 2026 18:27:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768847231; cv=none; b=dh+ZRGAa0GNx40C0pT6P/m0Q2WO7tKDxaxe0jpOPI3ZBy5iNtEFbA1FGYqjI5wgSkCDGO9SLYNEUUKDErnc5ZShJZSM6sEcjpbo9T3/XVBWhhwV0gQQneQ89/j0uG7n+rDRVvK9TWQk7gTauhRsl9AvCVJ/+nmKA2CN6lAJ+JzE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768847231; c=relaxed/simple; bh=ZJVpcJeQoV9U3uHqQhnD5PEYhoWFY7uY79p9Tnku4B4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=WP3VDMebyxALSwrefRrsqgfNjgYnIRZVvN+6fghGCXOG/7iYD5OR4PREq/GFCIsvlLzhG39kCg8g7NnTSBwLntILFvHj3L3GAXVDxihqscodsh6VDENIqymxTKlQReOIV+gAJfZZmeWOSiIoM/PxI5Ayx9dUtZPLVh6vufMocFs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b=u+htYiFs; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b=u+htYiFs; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="u+htYiFs"; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="u+htYiFs" Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id B9E305BCD0; Mon, 19 Jan 2026 18:27:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1768847224; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mpi3GKeACFs/xCcj009EhiLZQrzcqmc1AaBpmyadVAc=; b=u+htYiFs6temhxZIWCGfVrQfqflZj7YA+6Sm7WRilIQ2Tf8xe3q1WdTLdbTXUE/O/XWWNc SOPUmWuQgxFyAFAA/3f8GEtfVuvOHI8gan27cf9VSdFTLqGpRgkhzaRH8UtOKiAxTJZdht GgeMMUBUA0D+TYHsIzisAtgRVVsCNOQ= Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1768847224; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mpi3GKeACFs/xCcj009EhiLZQrzcqmc1AaBpmyadVAc=; b=u+htYiFs6temhxZIWCGfVrQfqflZj7YA+6Sm7WRilIQ2Tf8xe3q1WdTLdbTXUE/O/XWWNc SOPUmWuQgxFyAFAA/3f8GEtfVuvOHI8gan27cf9VSdFTLqGpRgkhzaRH8UtOKiAxTJZdht GgeMMUBUA0D+TYHsIzisAtgRVVsCNOQ= Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 73B573EA63; Mon, 19 Jan 2026 18:27:04 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id vCyoGnh3bmlbaQAAD6G6ig (envelope-from ); Mon, 19 Jan 2026 18:27:04 +0000 From: Juergen Gross To: linux-kernel@vger.kernel.org, x86@kernel.org Cc: Juergen Gross , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" Subject: [PATCH v4 5/6] x86/io_delay: Switch io_delay() default mechanism to "none" Date: Mon, 19 Jan 2026 19:26:31 +0100 Message-ID: <20260119182632.596369-6-jgross@suse.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260119182632.596369-1-jgross@suse.com> References: <20260119182632.596369-1-jgross@suse.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.80 X-Spamd-Result: default: False [-2.80 / 50.00]; BAYES_HAM(-3.00)[100.00%]; NEURAL_HAM_LONG(-1.00)[-1.000]; MID_CONTAINS_FROM(1.00)[]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_ALL(0.00)[]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; MIME_TRACE(0.00)[0:+]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.com:mid,suse.com:email]; FUZZY_RATELIMITED(0.00)[rspamd.com]; RCPT_COUNT_SEVEN(0.00)[8]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; DKIM_SIGNED(0.00)[suse.com:s=susede1]; TO_DN_SOME(0.00)[]; RCVD_TLS_ALL(0.00)[] X-Spam-Level: X-Spam-Flag: NO Content-Type: text/plain; charset="utf-8" The habit to delay some port operations via io_delay() is probably a no longer needed relict from i386 times. Switch the default to no longer do delays for port operations. In case this is breaking some still supported hardware, the default can still be overwritten via boot parameter. Remove the Kconfig options to select the default io_delay() mechanism. This makes io_delay_init() a nop, so it can be removed together with dmi_io_delay_0xed_port() and the associated io_delay_0xed_port_dmi_table(). Signed-off-by: Juergen Gross --- V2: - new patch (kind of suggested by Ingo Molnar) --- arch/x86/Kconfig.debug | 30 -------------- arch/x86/include/asm/io.h | 1 - arch/x86/kernel/io_delay.c | 81 +------------------------------------- arch/x86/kernel/setup.c | 2 - 4 files changed, 1 insertion(+), 113 deletions(-) diff --git a/arch/x86/Kconfig.debug b/arch/x86/Kconfig.debug index c95c3aaadf97..56888156a64b 100644 --- a/arch/x86/Kconfig.debug +++ b/arch/x86/Kconfig.debug @@ -120,36 +120,6 @@ config X86_DECODER_SELFTEST decoder code. If unsure, say "N". =20 -choice - prompt "IO delay type" - default IO_DELAY_0X80 - -config IO_DELAY_0X80 - bool "port 0x80 based port-IO delay [recommended]" - help - This is the traditional Linux IO delay used for in/out_p. - It is the most tested hence safest selection here. - -config IO_DELAY_0XED - bool "port 0xed based port-IO delay" - help - Use port 0xed as the IO delay. This frees up port 0x80 which is - often used as a hardware-debug port. - -config IO_DELAY_UDELAY - bool "udelay based port-IO delay" - help - Use udelay(2) as the IO delay method. This provides the delay - while not having any side-effect on the IO port space. - -config IO_DELAY_NONE - bool "no port-IO delay" - help - No port-IO delay. Will break on old boxes that require port-IO - delay for certain operations. Should work on most new machines. - -endchoice - config DEBUG_BOOT_PARAMS bool "Debug boot parameters" depends on DEBUG_KERNEL diff --git a/arch/x86/include/asm/io.h b/arch/x86/include/asm/io.h index 843f23044754..d50d31023385 100644 --- a/arch/x86/include/asm/io.h +++ b/arch/x86/include/asm/io.h @@ -240,7 +240,6 @@ static inline void __iowrite32_copy(void __iomem *to, c= onst void *from, extern void native_io_delay(void); =20 extern int io_delay_type; -extern void io_delay_init(void); =20 #if defined(CONFIG_PARAVIRT) #include diff --git a/arch/x86/kernel/io_delay.c b/arch/x86/kernel/io_delay.c index fdb6506ceaaa..458e2fd9279b 100644 --- a/arch/x86/kernel/io_delay.c +++ b/arch/x86/kernel/io_delay.c @@ -9,8 +9,6 @@ #include #include #include -#include -#include #include =20 #define IO_DELAY_TYPE_0X80 0 @@ -18,19 +16,7 @@ #define IO_DELAY_TYPE_UDELAY 2 #define IO_DELAY_TYPE_NONE 3 =20 -#if defined(CONFIG_IO_DELAY_0X80) -#define DEFAULT_IO_DELAY_TYPE IO_DELAY_TYPE_0X80 -#elif defined(CONFIG_IO_DELAY_0XED) -#define DEFAULT_IO_DELAY_TYPE IO_DELAY_TYPE_0XED -#elif defined(CONFIG_IO_DELAY_UDELAY) -#define DEFAULT_IO_DELAY_TYPE IO_DELAY_TYPE_UDELAY -#elif defined(CONFIG_IO_DELAY_NONE) -#define DEFAULT_IO_DELAY_TYPE IO_DELAY_TYPE_NONE -#endif - -int io_delay_type __read_mostly =3D DEFAULT_IO_DELAY_TYPE; - -static int __initdata io_delay_override; +int io_delay_type __read_mostly =3D IO_DELAY_TYPE_NONE; =20 /* * Paravirt wants native_io_delay to be a constant. @@ -61,70 +47,6 @@ void native_io_delay(void) } EXPORT_SYMBOL(native_io_delay); =20 -static int __init dmi_io_delay_0xed_port(const struct dmi_system_id *id) -{ - if (io_delay_type =3D=3D IO_DELAY_TYPE_0X80) { - pr_notice("%s: using 0xed I/O delay port\n", id->ident); - io_delay_type =3D IO_DELAY_TYPE_0XED; - } - - return 0; -} - -/* - * Quirk table for systems that misbehave (lock up, etc.) if port - * 0x80 is used: - */ -static const struct dmi_system_id io_delay_0xed_port_dmi_table[] __initcon= st =3D { - { - .callback =3D dmi_io_delay_0xed_port, - .ident =3D "Compaq Presario V6000", - .matches =3D { - DMI_MATCH(DMI_BOARD_VENDOR, "Quanta"), - DMI_MATCH(DMI_BOARD_NAME, "30B7") - } - }, - { - .callback =3D dmi_io_delay_0xed_port, - .ident =3D "HP Pavilion dv9000z", - .matches =3D { - DMI_MATCH(DMI_BOARD_VENDOR, "Quanta"), - DMI_MATCH(DMI_BOARD_NAME, "30B9") - } - }, - { - .callback =3D dmi_io_delay_0xed_port, - .ident =3D "HP Pavilion dv6000", - .matches =3D { - DMI_MATCH(DMI_BOARD_VENDOR, "Quanta"), - DMI_MATCH(DMI_BOARD_NAME, "30B8") - } - }, - { - .callback =3D dmi_io_delay_0xed_port, - .ident =3D "HP Pavilion tx1000", - .matches =3D { - DMI_MATCH(DMI_BOARD_VENDOR, "Quanta"), - DMI_MATCH(DMI_BOARD_NAME, "30BF") - } - }, - { - .callback =3D dmi_io_delay_0xed_port, - .ident =3D "Presario F700", - .matches =3D { - DMI_MATCH(DMI_BOARD_VENDOR, "Quanta"), - DMI_MATCH(DMI_BOARD_NAME, "30D3") - } - }, - { } -}; - -void __init io_delay_init(void) -{ - if (!io_delay_override) - dmi_check_system(io_delay_0xed_port_dmi_table); -} - static int __init io_delay_param(char *s) { if (!s) @@ -141,7 +63,6 @@ static int __init io_delay_param(char *s) else return -EINVAL; =20 - io_delay_override =3D 1; return 0; } =20 diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index 1b2edd07a3e1..8ef29c1ebb8d 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c @@ -1176,8 +1176,6 @@ void __init setup_arch(char **cmdline_p) =20 vsmp_init(); =20 - io_delay_init(); - early_platform_quirks(); =20 /* Some platforms need the APIC registered for NUMA configuration */ --=20 2.52.0 From nobody Sat Feb 7 04:47:30 2026 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 22B6323A9BD for ; Mon, 19 Jan 2026 18:27:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768847249; cv=none; b=XECKSMSAU+vK2u+jalpa6aW16ckxCpliruMOM1zpVl0vk4kY/rP9wCoRZcnPKzHEPTk0TsIlL6Gsi+WNOc6Z+gwV43BF64nFA6rNon8JjYrvPHkSX7BXKelN7UDfWdf5gdXHxqKRbvQ1h6tV/vPN7pKW5K+6xoJzAxJDf7MzzDQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768847249; c=relaxed/simple; bh=clOSkFrjI1c5EpPi6gb6ujO1CP849Z+dE1KgLeVtSNk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=bz8M+6b+dXBL6S2KPGqJYUWEg1aLuHijC+yaxuexZA9d3aerkD5gJ7g0TtvVbbKnctvnAbqzYtHeaA8dapInuwHwSORCqZUZJcyNMjay51pGDbdpzduybhHFhClVNeWnx1AQBFBkmT2Tvskzq7pRJQmfqattTsQU7CNN7kXQR+c= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b=g7gyva9V; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b=g7gyva9V; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="g7gyva9V"; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="g7gyva9V" Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 6BE4F5BCD1; Mon, 19 Jan 2026 18:27:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1768847230; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CBRDYkfV/teGm2PGgoyZ+ks7bIItUBGobBQjwxkXHXU=; b=g7gyva9Vd8Krxf6qUU0zKqR5EYI20fIWm8VNnIIHdNrEG8stDkUapl8YmHT/kVx6DRpk2Y EgA13otJgpcYViP/xam51pER/jwXUNHLCzPbPgAsN+GVRrEVcLwLrqGRS0D/vxKaHLyFbf MwC/ma5mKRLaGM/R+lZ3BmV7ubMLWdI= Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1768847230; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CBRDYkfV/teGm2PGgoyZ+ks7bIItUBGobBQjwxkXHXU=; b=g7gyva9Vd8Krxf6qUU0zKqR5EYI20fIWm8VNnIIHdNrEG8stDkUapl8YmHT/kVx6DRpk2Y EgA13otJgpcYViP/xam51pER/jwXUNHLCzPbPgAsN+GVRrEVcLwLrqGRS0D/vxKaHLyFbf MwC/ma5mKRLaGM/R+lZ3BmV7ubMLWdI= Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 26A343EA63; Mon, 19 Jan 2026 18:27:10 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id pL4uCH53bmliaQAAD6G6ig (envelope-from ); Mon, 19 Jan 2026 18:27:10 +0000 From: Juergen Gross To: linux-kernel@vger.kernel.org, x86@kernel.org Cc: Juergen Gross , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" Subject: [PATCH v4 6/6] x86/io_delay: Add config option for controlling build of io_delay. Date: Mon, 19 Jan 2026 19:26:32 +0100 Message-ID: <20260119182632.596369-7-jgross@suse.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260119182632.596369-1-jgross@suse.com> References: <20260119182632.596369-1-jgross@suse.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Spamd-Result: default: False [-2.80 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; FUZZY_RATELIMITED(0.00)[rspamd.com]; RCPT_COUNT_SEVEN(0.00)[8]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; DKIM_SIGNED(0.00)[suse.com:s=susede1]; URIBL_BLOCKED(0.00)[imap1.dmz-prg2.suse.org:helo,suse.com:mid,suse.com:email]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.com:mid,suse.com:email]; RCVD_TLS_ALL(0.00)[] X-Spam-Flag: NO X-Spam-Score: -2.80 X-Spam-Level: Content-Type: text/plain; charset="utf-8" Prepare phasing out support of io_delay() by adding a config option (default on for now) controlling the build of io_delay.c. Signed-off-by: Juergen Gross --- V2: - new patch (kind of suggested by Ingo Molnar) --- arch/x86/Kconfig | 8 ++++++++ arch/x86/include/asm/floppy.h | 4 ++++ arch/x86/include/asm/io.h | 6 ++++++ arch/x86/kernel/Makefile | 3 ++- arch/x86/kernel/setup.c | 2 ++ 5 files changed, 22 insertions(+), 1 deletion(-) diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 62e11572da27..e93abd2ffeb9 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -3169,6 +3169,14 @@ config HAVE_ATOMIC_IOMAP def_bool y depends on X86_32 =20 +config IO_DELAY + bool "Support delay of I/O-port activities" + default y + help + Include code allowing to delay I/O-port activities. This might be + needed on some rather old hardware. The delay mechanism will still + require to be selected via the "io_delay" boot parameter. + source "arch/x86/kvm/Kconfig" =20 source "arch/x86/Kconfig.cpufeatures" diff --git a/arch/x86/include/asm/floppy.h b/arch/x86/include/asm/floppy.h index 8d1e86687b98..d7df95255761 100644 --- a/arch/x86/include/asm/floppy.h +++ b/arch/x86/include/asm/floppy.h @@ -50,9 +50,11 @@ static inline u8 fd_inb(u16 base, u16 reg) { u8 ret =3D inb_p(base + reg); =20 +#ifdef CONFIG_IO_DELAY native_io_delay(); native_io_delay(); native_io_delay(); +#endif =20 return ret; } @@ -61,9 +63,11 @@ static inline void fd_outb(u8 value, u16 base, u16 reg) { outb_p(value, base + reg); =20 +#ifdef CONFIG_IO_DELAY native_io_delay(); native_io_delay(); native_io_delay(); +#endif } =20 static irqreturn_t floppy_hardint(int irq, void *dev_id) diff --git a/arch/x86/include/asm/io.h b/arch/x86/include/asm/io.h index d50d31023385..4946f870bdb7 100644 --- a/arch/x86/include/asm/io.h +++ b/arch/x86/include/asm/io.h @@ -237,6 +237,7 @@ static inline void __iowrite32_copy(void __iomem *to, c= onst void *from, =20 #endif /* __KERNEL__ */ =20 +#ifdef CONFIG_IO_DELAY extern void native_io_delay(void); =20 extern int io_delay_type; @@ -254,6 +255,11 @@ static inline void slow_down_io(void) =20 native_io_delay(); } +#else +static inline void slow_down_io(void) +{ +} +#endif =20 #define BUILDIO(bwl, type) \ static inline void out##bwl##_p(type value, u16 port) \ diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile index e9aeeeafad17..879c1b7bf7c2 100644 --- a/arch/x86/kernel/Makefile +++ b/arch/x86/kernel/Makefile @@ -66,11 +66,12 @@ obj-$(CONFIG_X86_32) +=3D sys_ia32.o obj-$(CONFIG_IA32_EMULATION) +=3D sys_ia32.o signal_32.o obj-$(CONFIG_X86_64) +=3D sys_x86_64.o obj-$(CONFIG_X86_ESPFIX64) +=3D espfix_64.o +obj-$(CONFIG_IO_DELAY) +=3D io_delay.o obj-$(CONFIG_SYSFS) +=3D ksysfs.o obj-y +=3D bootflag.o e820.o obj-y +=3D pci-dma.o quirks.o kdebugfs.o obj-y +=3D alternative.o i8253.o hw_breakpoint.o -obj-y +=3D tsc.o tsc_msr.o io_delay.o rtc.o +obj-y +=3D tsc.o tsc_msr.o rtc.o obj-y +=3D resource.o obj-y +=3D irqflags.o obj-y +=3D static_call.o diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index 8ef29c1ebb8d..a3fa38a23807 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c @@ -183,6 +183,7 @@ static const struct ctl_table x86_sysctl_table[] =3D { .mode =3D 0444, .proc_handler =3D proc_dointvec, }, +#ifdef CONFIG_IO_DELAY { .procname =3D "io_delay_type", .data =3D &io_delay_type, @@ -190,6 +191,7 @@ static const struct ctl_table x86_sysctl_table[] =3D { .mode =3D 0644, .proc_handler =3D proc_dointvec, }, +#endif #if defined(CONFIG_ACPI_SLEEP) { .procname =3D "acpi_video_flags", --=20 2.52.0