Commit 59a217c
committed
KVM: SVM: Initialize per-CPU svm_data at the end of hardware setup
Setup the per-CPU SVM data structures at the very end of hardware setup so
that svm_hardware_unsetup() can be used in svm_hardware_setup() to unwind
AVIC setup (for the GALog notifier). Alternatively, the error path could
do an explicit, manual unwind, e.g. by adding a helper to free the per-CPU
structures. But the per-CPU allocations have no interactions or
dependencies, i.e. can comfortably live at the end, and so converting to
a manual unwind would introduce churn and code without providing any
immediate advantage.
Link: https://patch.msgid.link/20251016190643.80529-2-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>1 parent cab4098 commit 59a217c
1 file changed
Lines changed: 7 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5386 | 5386 | | |
5387 | 5387 | | |
5388 | 5388 | | |
5389 | | - | |
5390 | | - | |
5391 | | - | |
5392 | | - | |
5393 | | - | |
5394 | | - | |
5395 | 5389 | | |
5396 | 5390 | | |
5397 | 5391 | | |
| |||
5435 | 5429 | | |
5436 | 5430 | | |
5437 | 5431 | | |
| 5432 | + | |
| 5433 | + | |
| 5434 | + | |
| 5435 | + | |
| 5436 | + | |
| 5437 | + | |
| 5438 | + | |
5438 | 5439 | | |
5439 | 5440 | | |
5440 | 5441 | | |
| |||
0 commit comments