Commit be5fa87
committed
KVM: SVM: check validity of VMCB controls when returning from SMM
The VMCB12 is stored in guest memory and can be mangled while in SMM; it
is then reloaded by svm_leave_smm(), but it is not checked again for
validity.
Move the cached vmcb12 control and save consistency checks out of
svm_set_nested_state() and into a helper, and reuse it in
svm_leave_smm().
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>1 parent 5a30e8a commit be5fa87
3 files changed
Lines changed: 15 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
418 | 418 | | |
419 | 419 | | |
420 | 420 | | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
421 | 430 | | |
422 | 431 | | |
423 | 432 | | |
| |||
1028 | 1037 | | |
1029 | 1038 | | |
1030 | 1039 | | |
1031 | | - | |
1032 | | - | |
| 1040 | + | |
1033 | 1041 | | |
1034 | 1042 | | |
1035 | 1043 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4880 | 4880 | | |
4881 | 4881 | | |
4882 | 4882 | | |
| 4883 | + | |
| 4884 | + | |
| 4885 | + | |
| 4886 | + | |
4883 | 4887 | | |
4884 | 4888 | | |
4885 | 4889 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
797 | 797 | | |
798 | 798 | | |
799 | 799 | | |
| 800 | + | |
800 | 801 | | |
801 | 802 | | |
802 | 803 | | |
| |||
0 commit comments