Commit 45d522d
committed
KVM: SVM: Macrofy SEV=n versions of sev_xxx_guest()
Define sev_{,es_,snp_}guest() as "false" when SEV is disabled via Kconfig,
i.e. when CONFIG_KVM_AMD_SEV=n. Despite the helpers being __always_inline,
gcc-12 is somehow incapable of realizing that the return value is a
compile-time constant and generates sub-optimal code.
Opportunistically clump the paths together to reduce the amount of
ifdeffery.
No functional change intended.
Link: https://lore.kernel.org/r/20241127234659.4046347-1-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>1 parent 3522c41 commit 45d522d
1 file changed
Lines changed: 5 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
358 | 358 | | |
359 | 359 | | |
360 | 360 | | |
| 361 | + | |
361 | 362 | | |
362 | 363 | | |
363 | | - | |
364 | 364 | | |
365 | 365 | | |
366 | 366 | | |
367 | | - | |
368 | | - | |
369 | | - | |
370 | 367 | | |
371 | | - | |
372 | 368 | | |
373 | 369 | | |
374 | | - | |
375 | 370 | | |
376 | 371 | | |
377 | 372 | | |
378 | | - | |
379 | | - | |
380 | | - | |
381 | 373 | | |
382 | 374 | | |
383 | 375 | | |
384 | 376 | | |
385 | | - | |
386 | 377 | | |
387 | 378 | | |
388 | 379 | | |
389 | 380 | | |
| 381 | + | |
390 | 382 | | |
391 | | - | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
392 | 386 | | |
393 | | - | |
394 | 387 | | |
395 | 388 | | |
396 | 389 | | |
| |||
0 commit comments