From: Jan Beulich <jbeulich@suse.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: "Roger Pau Monné" <roger.pau@citrix.com>,
Xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH v2 03/23] x86/traps: Introduce opt_fred
Date: Mon, 1 Sep 2025 15:15:17 +0200 [thread overview]
Message-ID: <dfd60b94-7e20-4ede-8fab-90bf99c19d16@suse.com> (raw)
In-Reply-To: <20250828150409.901315-4-andrew.cooper3@citrix.com>
On 28.08.2025 17:03, Andrew Cooper wrote:
> @@ -20,6 +22,9 @@ unsigned int __ro_after_init ler_msr;
> static bool __initdata opt_ler;
> boolean_param("ler", opt_ler);
>
> +int8_t __ro_after_init opt_fred = 0;
Can't this be __initdata now that we have ...
> @@ -299,6 +304,37 @@ void __init traps_init(void)
> /* Replace early pagefault with real pagefault handler. */
> _update_gate_addr_lower(&bsp_idt[X86_EXC_PF], entry_PF);
>
> + /*
> + * Xen doesn't use GS like most software does, and doesn't need the LKGS
> + * instruction in order to manage PV guests. No need to check for it.
> + */
> + if ( !cpu_has_fred )
> + {
> + if ( opt_fred == 1 )
> + printk(XENLOG_WARNING "FRED not available, ignoring\n");
> + opt_fred = 0;
> + }
> +
> + if ( opt_fred == -1 )
> + opt_fred = !pv_shim;
> +
> + if ( opt_fred )
> + {
> +#ifdef CONFIG_PV32
> + if ( opt_pv32 )
> + {
> + opt_pv32 = 0;
> + printk(XENLOG_INFO "Disabling PV32 due to FRED\n");
> + }
> +#endif
> + setup_force_cpu_cap(X86_FEATURE_XEN_FRED);
... this? All non-__init uses could use the synthetic feature bit.
Jan
next prev parent reply other threads:[~2025-09-01 13:15 UTC|newest]
Thread overview: 56+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-28 15:03 [PATCH v2 00/23] x86: FRED support Andrew Cooper
2025-08-28 15:03 ` [PATCH v2 01/23] x86: FRED enumerations Andrew Cooper
2025-08-28 15:33 ` Andrew Cooper
2025-08-28 15:03 ` [PATCH v2 02/23] x86/traps: Extend struct cpu_user_regs/cpu_info with FRED fields Andrew Cooper
2025-08-28 15:18 ` Jan Beulich
2025-08-28 15:03 ` [PATCH v2 03/23] x86/traps: Introduce opt_fred Andrew Cooper
2025-08-28 15:20 ` Jan Beulich
2025-09-01 13:15 ` Jan Beulich [this message]
2025-08-28 15:03 ` [PATCH v2 04/23] x86/boot: Adjust CR4 handling around percpu_early_traps_init() Andrew Cooper
2025-08-28 15:03 ` [PATCH v2 05/23] x86/S3: Switch to using RSTORSSP to recover SSP on resume Andrew Cooper
2025-08-28 15:03 ` [PATCH v2 06/23] x86/traps: Set MSR_PL0_SSP in load_system_tables() Andrew Cooper
2025-09-01 9:23 ` Jan Beulich
2025-09-01 15:31 ` Andrew Cooper
2025-08-28 15:03 ` [PATCH v2 07/23] x86/boot: Use RSTORSSP to establish SSP Andrew Cooper
2025-09-01 9:28 ` Jan Beulich
2025-09-01 15:33 ` Andrew Cooper
2025-09-01 15:41 ` Jan Beulich
2025-09-01 18:53 ` Andrew Cooper
2025-09-02 6:17 ` Jan Beulich
2025-08-28 15:03 ` [PATCH v2 08/23] x86/traps: Alter switch_stack_and_jump() for FRED mode Andrew Cooper
2025-09-01 9:30 ` Jan Beulich
2025-08-28 15:03 ` [PATCH v2 09/23] x86/traps: Skip Supervisor Shadow Stack tokens in " Andrew Cooper
2025-09-01 9:38 ` Jan Beulich
2025-08-28 15:03 ` [PATCH v2 10/23] x86/traps: Make an IDT-specific #DB helper Andrew Cooper
2025-09-01 9:41 ` Jan Beulich
2025-08-28 15:03 ` [PATCH v2 11/23] x86/traps: Make an IDT-specific #PF helper Andrew Cooper
2025-09-01 9:46 ` Jan Beulich
2025-09-01 15:36 ` Andrew Cooper
2025-09-01 15:42 ` Jan Beulich
2025-08-28 15:03 ` [PATCH v2 12/23] x86/fsgsbase: Make gskern accesses safe under FRED Andrew Cooper
2025-09-01 9:57 ` Jan Beulich
2025-08-28 15:03 ` [PATCH v2 13/23] x86/traps: Introduce FRED entrypoints Andrew Cooper
2025-09-01 10:26 ` Jan Beulich
2025-08-28 15:04 ` [PATCH v2 14/23] x86/traps: Enable FRED when requested Andrew Cooper
2025-09-01 10:50 ` Jan Beulich
2025-08-28 15:04 ` [PATCH v2 15/23] x86/pv: Deduplicate is_canonical_address() in do_set_segment_base() Andrew Cooper
2025-09-01 11:22 ` Jan Beulich
2025-08-28 15:04 ` [PATCH v2 16/23] x86/entry: Alter how IRET faults are recognised Andrew Cooper
2025-09-01 11:41 ` Jan Beulich
2025-08-28 15:04 ` [PATCH v2 17/23] x86/entry: Drop the pre exception table infrastructure Andrew Cooper
2025-09-01 11:45 ` Jan Beulich
2025-08-28 15:04 ` [PATCH v2 18/23] x86/entry: Rework the comment about SYSCALL and DF Andrew Cooper
2025-09-01 11:52 ` Jan Beulich
2025-08-28 15:04 ` [PATCH v2 19/23] x86/pv: Adjust GS handling for FRED mode Andrew Cooper
2025-09-01 12:02 ` Jan Beulich
2025-08-28 15:04 ` [PATCH v2 20/23] x86/pv: Exception handling in " Andrew Cooper
2025-09-01 12:23 ` Jan Beulich
2025-09-01 12:57 ` Jan Beulich
2025-09-01 13:27 ` Andrew Cooper
2025-09-01 13:55 ` Jan Beulich
2025-08-28 15:04 ` [PATCH v2 21/23] x86/pv: ERETU error handling Andrew Cooper
2025-09-01 13:13 ` Jan Beulich
2025-08-28 15:04 ` [PATCH v2 22/23] x86/pv: System call handling in FRED mode Andrew Cooper
2025-09-01 13:49 ` Jan Beulich
2025-08-28 15:04 ` [PATCH v2 23/23] x86/pv: Adjust eflags handling for " Andrew Cooper
2025-09-01 14:17 ` Jan Beulich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=dfd60b94-7e20-4ede-8fab-90bf99c19d16@suse.com \
--to=jbeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=roger.pau@citrix.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.