Commit 0b28f21
KVM: x86: Add a helper to dedup loading guest/host XCR0 and XSS
Add and use a helper, kvm_load_xfeatures(), to dedup the code that loads
guest/host xfeatures.
Opportunistically return early if X86_CR4_OSXSAVE is not set to reduce
indentations.
No functional change intended.
Suggested-by: Chao Gao <chao.gao@intel.com>
Reviewed-by: Chao Gao <chao.gao@intel.com>
Signed-off-by: Binbin Wu <binbin.wu@linux.intel.com>
Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com>
Link: https://patch.msgid.link/20251110050539.3398759-1-binbin.wu@linux.intel.com
Signed-off-by: Sean Christopherson <seanjc@google.com>1 parent 7649412 commit 0b28f21
1 file changed
+10
-23
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1205 | 1205 | | |
1206 | 1206 | | |
1207 | 1207 | | |
1208 | | - | |
| 1208 | + | |
1209 | 1209 | | |
1210 | 1210 | | |
1211 | 1211 | | |
1212 | 1212 | | |
1213 | | - | |
1214 | | - | |
1215 | | - | |
1216 | | - | |
1217 | | - | |
1218 | | - | |
1219 | | - | |
1220 | | - | |
1221 | | - | |
1222 | | - | |
1223 | | - | |
1224 | | - | |
1225 | | - | |
| 1213 | + | |
1226 | 1214 | | |
1227 | 1215 | | |
1228 | | - | |
1229 | | - | |
1230 | | - | |
| 1216 | + | |
| 1217 | + | |
| 1218 | + | |
1231 | 1219 | | |
1232 | | - | |
1233 | | - | |
1234 | | - | |
1235 | | - | |
| 1220 | + | |
| 1221 | + | |
| 1222 | + | |
1236 | 1223 | | |
1237 | 1224 | | |
1238 | 1225 | | |
| |||
11271 | 11258 | | |
11272 | 11259 | | |
11273 | 11260 | | |
11274 | | - | |
| 11261 | + | |
11275 | 11262 | | |
11276 | 11263 | | |
11277 | 11264 | | |
| |||
11367 | 11354 | | |
11368 | 11355 | | |
11369 | 11356 | | |
11370 | | - | |
| 11357 | + | |
11371 | 11358 | | |
11372 | 11359 | | |
11373 | 11360 | | |
| |||
0 commit comments