Skip to contentSkip to conversation

x86/fred: Enable FRED by default on AMD systems

PATCH In review Andrew Cooper 3 participants 6 messages Jun 2 – Jun 3

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/fred: Enable FRED by default on AMD systems

FRED is now believed to be complete for AMD systems, and has had its tyres kicked by both XenServer and AMD. Enable FRED by default on capable AMD systems (Zen6 and later).

Support on Intel is still not yet complete. Leave it as tech preview and not security supported.

---
CC: Jan Beulich <[email protected]>
CC: Roger Pau Monné <[email protected]>
CC: Teddy Astie <[email protected]>
CC: Oleksii Kurochko <[email protected]>

The issue on Intel is to do with virtualisation of MSR_SPEC_CTRL for PV guests, and is waiting on the resolution of a question I've asked Intel.

---
 docs/misc/xen-command-line.pandoc | 6 +++---
 xen/arch/x86/traps-setup.c        | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)
docs/misc/xen-command-line.pandoc +3 -3
index ef3c7371895b..50c119e5b79f 100644
@@ -1259,12 +1259,12 @@ does not provide `VM_ENTRY_LOAD_GUEST_PAT`.
 ### fred (x86)
 > `= <bool>`
 
-> Default: `false`
+> Default: `true` on AMD, `false` otherwise
 
 Flexible Return and Event Delivery is an overhaul of interrupt, exception and
 system call handling, fixing many corner cases in the x86 architecture, and
-expected in hardware from 2025.  Support in Xen is a work in progress and
-disabled by default.
+expected in hardware from 2026.  FRED is fully supported on AMD hardware.
+Intel hardware is still tech preview and not security supported.
 
 ### gnttab
 > `= List of [ max-ver:<integer>, transitive=<bool>, transfer=<bool> ]`
xen/arch/x86/traps-setup.c +2 -2
index ccbd53fd9db0..a79a3b201389 100644
@@ -22,7 +22,7 @@ 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;
+int8_t __ro_after_init opt_fred = -1;
 boolean_param("fred", opt_fred);
 
 void nocall entry_PF(void);
@@ -392,7 +392,7 @@ void __init traps_init(void)
     }
 
     if ( opt_fred == -1 )
-        opt_fred = !pv_shim;
+        opt_fred = (boot_cpu_data.x86_vendor == X86_VENDOR_AMD) && !pv_shim;
 
     if ( opt_fred )
     {
Signature · 1 line
2.39.5
#1 lore raw
Quoted 7 lines · Andrew Cooper

FRED is now believed to be complete for AMD systems, and has had its tyres kicked by both XenServer and AMD. Enable FRED by default on capable AMD systems (Zen6 and later).

Support on Intel is still not yet complete. Leave it as tech preview and not security supported.

Quoted 6 lines

---
CC: Jan Beulich <[email protected]>
CC: Roger Pau Monné <[email protected]>
CC: Teddy Astie <[email protected]>
CC: Oleksii Kurochko <[email protected]>

Quoted 8 lines

The issue on Intel is to do with virtualisation of MSR_SPEC_CTRL for PV guests, and is waiting on the resolution of a question I've asked Intel.

---
  docs/misc/xen-command-line.pandoc | 6 +++---
  xen/arch/x86/traps-setup.c        | 4 ++--
  2 files changed, 5 insertions(+), 5 deletions(-)

Don't we want than add that to CHANGELOG.md that FRED is now enabled by default?

Thanks.

~ Oleksii

#2 lore raw
Quoted 12 lines · Oleksii Kurochko
Quoted 9 lines · Andrew Cooper

FRED is now believed to be complete for AMD systems, and has had its tyres
kicked by both XenServer and AMD.  Enable FRED by default on capable AMD systems (Zen6 and later).

Support on Intel is still not yet complete.  Leave it as tech preview and not
security supported.

Quoted 9 lines
Quoted 6 lines

---
CC: Jan Beulich <[email protected]>
CC: Roger Pau Monné <[email protected]>
CC: Teddy Astie <[email protected]>
CC: Oleksii Kurochko <[email protected]>

Thanks.

Quoted 11 lines
Quoted 8 lines

The issue on Intel is to do with virtualisation of MSR_SPEC_CTRL for PV guests, and is waiting on the resolution of a question I've asked Intel.
---
  docs/misc/xen-command-line.pandoc | 6 +++--- xen/arch/x86/traps-setup.c        | 4 ++--

  2 files changed, 5 insertions(+), 5 deletions(-)

Don't we want than add that to CHANGELOG.md that FRED is now enabled by default?

I was going to wait until we had sorted Intel before doing that.  But there's no chance of that happening for 4.22 now.

~Andrew

Acked-by on v1 1/1
#3 lore raw
In reply to Andrew Cooper
Quoted 8 lines · Andrew Cooper

FRED is now believed to be complete for AMD systems, and has had its tyres kicked by both XenServer and AMD. Enable FRED by default on capable AMD systems (Zen6 and later).

Support on Intel is still not yet complete. Leave it as tech preview and not security supported.

with one remark:

Quoted 5 lines
docs/misc/xen-command-line.pandoc +0 -0
@@ -1259,12 +1259,12 @@ does not provide `VM_ENTRY_LOAD_GUEST_PAT`.
 ### fred (x86)
 > `= <bool>`

docs/misc/xen-command-line.pandoc does not provide `VM_ENTRY_LOAD_GUEST_PAT`. · line 1267

Quoted 10 lines
docs/misc/xen-command-line.pandoc +3 -3
 
-> Default: `false`
+> Default: `true` on AMD, `false` otherwise
 
 Flexible Return and Event Delivery is an overhaul of interrupt, exception and
 system call handling, fixing many corner cases in the x86 architecture, and
-expected in hardware from 2025.  Support in Xen is a work in progress and
-disabled by default.
+expected in hardware from 2026.  FRED is fully supported on AMD hardware.
+Intel hardware is still tech preview and not security supported.

Is having "security" here really appropriate? There's a functional issue to be sorted. That's expressed by "tech preview", yes, but it still feels somewhat odd. If you want to keep the word, may I suggest to insert "in particular"?

May I further suggest "On Intel hardware it is ..."?

Jan

#4 lore raw
Quoted 18 lines · Jan Beulich
Quoted 8 lines · Andrew Cooper

FRED is now believed to be complete for AMD systems, and has had its tyres kicked by both XenServer and AMD. Enable FRED by default on capable AMD systems (Zen6 and later).

Support on Intel is still not yet complete. Leave it as tech preview and not security supported.

with one remark:

Quoted 6 lines
docs/misc/xen-command-line.pandoc +0 -0
@@ -1259,12 +1259,12 @@ does not provide `VM_ENTRY_LOAD_GUEST_PAT`.
 ### fred (x86)
 > `= <bool>`
 
Quoted 8 lines

docs/misc/xen-command-line.pandoc does not provide `VM_ENTRY_LOAD_GUEST_PAT`. · line 1266

Quoted 8 lines
docs/misc/xen-command-line.pandoc +2 -3
-> Default: `false`
+> Default: `true` on AMD, `false` otherwise
 
 Flexible Return and Event Delivery is an overhaul of interrupt, exception and
 system call handling, fixing many corner cases in the x86 architecture, and
-expected in hardware from 2025.  Support in Xen is a work in progress and
-disabled by default.
+expected in hardware from 2026.  FRED is fully supported on AMD hardware.

Along with the year, I suppose I should name the CPUs specifically now that they're public.

Quoted 4 lines

docs/misc/xen-command-line.pandoc does not provide `VM_ENTRY_LOAD_GUEST_PAT`. · line 1267

Quoted 1 line
docs/misc/xen-command-line.pandoc +1 -0
+Intel hardware is still tech preview and not security supported.

Is having "security" here really appropriate? There's a functional issue to be sorted. That's expressed by "tech preview", yes, but it still feels somewhat odd. If you want to keep the word, may I suggest to insert "in particular"?

I was just trying to make things clearer.  One of the common audience groups for this file is not liable to know Xen's precise definitions of experimental/tech-preview/supported.

Quoted 1 line

May I further suggest "On Intel hardware it is ..."?

How does this look?

docs/misc/xen-command-line.pandoc +0 -0
index ef3c7371895b..ff6d08affb63 100644
@@ -1259,12 +1259,13 @@ does not provide `VM_ENTRY_LOAD_GUEST_PAT`.

 ### fred (x86)
 > = <bool>

-> Default: false
+> Default: true on AMD, false otherwise

 Flexible Return and Event Delivery is an overhaul of interrupt, exception and -system call handling, fixing many corner cases in the x86 architecture, and -expected in hardware from 2025.  Support in Xen is a work in progress and -disabled by default.
+system call handling, fixing many corner cases in the x86 architecture, and is +available on Intel Panther Lake and Diamond Rapids CPUs, and AMD Zen6 CPUs. +FRED is fully supported on AMD hardware.  On Intel hardware it is still tech +preview, and in particular not security supported.

 ### gnttab
 > = List of [ max-ver:<integer>, transitive=<bool>, transfer=<bool> ]

?

~Andrew

#5 lore raw
Quoted 68 lines · Andrew Cooper
Quoted 18 lines · Jan Beulich
Quoted 8 lines · Andrew Cooper

FRED is now believed to be complete for AMD systems, and has had its tyres kicked by both XenServer and AMD. Enable FRED by default on capable AMD systems (Zen6 and later).

Support on Intel is still not yet complete. Leave it as tech preview and not security supported.

with one remark:

Quoted 6 lines
docs/misc/xen-command-line.pandoc +0 -0
@@ -1259,12 +1259,12 @@ does not provide `VM_ENTRY_LOAD_GUEST_PAT`.
 ### fred (x86)
 > `= <bool>`
 
Quoted 8 lines

docs/misc/xen-command-line.pandoc does not provide `VM_ENTRY_LOAD_GUEST_PAT`. · line 1266

Quoted 8 lines
docs/misc/xen-command-line.pandoc +2 -3
-> Default: `false`
+> Default: `true` on AMD, `false` otherwise
 
 Flexible Return and Event Delivery is an overhaul of interrupt, exception and
 system call handling, fixing many corner cases in the x86 architecture, and
-expected in hardware from 2025.  Support in Xen is a work in progress and
-disabled by default.
+expected in hardware from 2026.  FRED is fully supported on AMD hardware.

Along with the year, I suppose I should name the CPUs specifically now that they're public.

Quoted 4 lines

docs/misc/xen-command-line.pandoc does not provide `VM_ENTRY_LOAD_GUEST_PAT`. · line 1267

Quoted 1 line
docs/misc/xen-command-line.pandoc +1 -0
+Intel hardware is still tech preview and not security supported.

Is having "security" here really appropriate? There's a functional issue to be sorted. That's expressed by "tech preview", yes, but it still feels somewhat odd. If you want to keep the word, may I suggest to insert "in particular"?

I was just trying to make things clearer.  One of the common audience groups for this file is not liable to know Xen's precise definitions of experimental/tech-preview/supported.

Quoted 1 line

May I further suggest "On Intel hardware it is ..."?

How does this look?

docs/misc/xen-command-line.pandoc +0 -0
index ef3c7371895b..ff6d08affb63 100644
@@ -1259,12 +1259,13 @@ does not provide `VM_ENTRY_LOAD_GUEST_PAT`.
  ### fred (x86)

 > = <bool>

-> Default: false
+> Default: true on AMD, false otherwise

 Flexible Return and Event Delivery is an overhaul of interrupt, exception and

docs/misc/xen-command-line.pandoc +4 -3
-system call handling, fixing many corner cases in the x86 architecture, and
-expected in hardware from 2025.  Support in Xen is a work in progress and
-disabled by default.
+system call handling, fixing many corner cases in the x86 architecture, and is
+available on Intel Panther Lake and Diamond Rapids CPUs, and AMD Zen6 CPUs.
+FRED is fully supported on AMD hardware.  On Intel hardware it is still tech
+preview, and in particular not security supported.


 ### gnttab
 > = List of [ max-ver:<integer>, transitive=<bool>, transfer=<bool> ]

Quoted 1 line

?

Looks good, thanks.

Jan