Commit 103f7e3
fix(vmm): Changes T2A to set RstrFpErrPtrs bit
[ Upstream commit 50b9fce ]
According to AMD APM, the RstrFpErrPtrs bit (CPUID.0x80000008:EBX[2])
indicates that FXSAVE, XSAVE, FXSAVEOPT, XSAVEC, XSAVES always save
error pointers and FXRSTOR, XRSTOR, XRSTORS always restore error
pointers.
Historically, the error pointers have been saved on Intel CPUs but were
not on old AMD CPUs (called "FXSAVE leak"). To handle this difference,
the linux kernel enables a workaround. See the following commit for more
details.
torvalds/linux@18bd057b1408
Given this sitaution, AMD decided to make their CPUs behave same as
Intel CPUs and also added the CPUID bit to let softwares know this
behavior.
torvalds/linux@f2dbad36c55e
In terms of KVM, KVM forgot to expose bit until kernel 5.4 via
KVM_GET_SUPPORTED_CPUID and has passed through from host since the
following commit.
torvalds/linux@504ce1954fba
As this bit is set on m6a.metal and the T2A template aims to provide
feature parity with guests on Intel Cascade Lake and Ice Lake with the
T2CL template, it would be better to set this bit in the T2A template.
Given the fact that firecracker supports not only kernel 5.10 but also
4.14 (where the pass-through by KVM has not been available), the T2A
template should set the bit to 1 rather than passing through.
Signed-off-by: Takahiro Itazuri <[email protected]>1 parent aa4c929 commit 103f7e3
File tree
4 files changed
+4
-3
lines changed- resources/tests/static_cpu_templates
- src/vmm/src/cpu_config/x86_64/static_cpu_templates
- tests/integration_tests/functional
4 files changed
+4
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
9 | 11 | | |
10 | 12 | | |
11 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
| 85 | + | |
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
125 | | - | |
| 125 | + | |
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
136 | | - | |
137 | 136 | | |
138 | 137 | | |
139 | 138 | | |
| |||
0 commit comments