Commit 605bbdc
committed
KVM: SEV: store VMSA features in kvm_sev_info
Right now, the set of features that are stored in the VMSA upon
initialization is fixed and depends on the module parameters for
kvm-amd.ko. However, the hypervisor cannot really change it at will
because the feature word has to match between the hypervisor and whatever
computes a measurement of the VMSA for attestation purposes.
Add a field to kvm_sev_info that holds the set of features to be stored
in the VMSA; and query it instead of referring to the module parameters.
Because KVM_SEV_INIT and KVM_SEV_ES_INIT accept no parameters, this
does not yet introduce any functional change, but it paves the way for
an API that allows customization of the features per-VM.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20240209183743.22030-6-pbonzini@redhat.com>
Reviewed-by: Michael Roth <michael.roth@amd.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-ID: <20240404121327.3107131-7-pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>1 parent ac5c480 commit 605bbdc
3 files changed
Lines changed: 24 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
102 | 110 | | |
103 | 111 | | |
104 | 112 | | |
| |||
248 | 256 | | |
249 | 257 | | |
250 | 258 | | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
251 | 264 | | |
252 | 265 | | |
253 | 266 | | |
| |||
269 | 282 | | |
270 | 283 | | |
271 | 284 | | |
| 285 | + | |
272 | 286 | | |
273 | 287 | | |
274 | 288 | | |
| |||
563 | 577 | | |
564 | 578 | | |
565 | 579 | | |
| 580 | + | |
| 581 | + | |
566 | 582 | | |
567 | 583 | | |
568 | 584 | | |
| |||
604 | 620 | | |
605 | 621 | | |
606 | 622 | | |
607 | | - | |
608 | | - | |
609 | | - | |
610 | | - | |
611 | | - | |
| 623 | + | |
612 | 624 | | |
613 | 625 | | |
614 | 626 | | |
| |||
1688 | 1700 | | |
1689 | 1701 | | |
1690 | 1702 | | |
| 1703 | + | |
1691 | 1704 | | |
1692 | 1705 | | |
1693 | 1706 | | |
| |||
3063 | 3076 | | |
3064 | 3077 | | |
3065 | 3078 | | |
3066 | | - | |
| 3079 | + | |
3067 | 3080 | | |
3068 | 3081 | | |
3069 | 3082 | | |
| |||
3118 | 3131 | | |
3119 | 3132 | | |
3120 | 3133 | | |
3121 | | - | |
| 3134 | + | |
3122 | 3135 | | |
3123 | 3136 | | |
3124 | 3137 | | |
| |||
3146 | 3159 | | |
3147 | 3160 | | |
3148 | 3161 | | |
3149 | | - | |
| 3162 | + | |
3150 | 3163 | | |
3151 | 3164 | | |
3152 | 3165 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1523 | 1523 | | |
1524 | 1524 | | |
1525 | 1525 | | |
1526 | | - | |
| 1526 | + | |
1527 | 1527 | | |
1528 | 1528 | | |
1529 | 1529 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| 88 | + | |
88 | 89 | | |
89 | 90 | | |
90 | 91 | | |
| |||
670 | 671 | | |
671 | 672 | | |
672 | 673 | | |
673 | | - | |
| 674 | + | |
674 | 675 | | |
675 | 676 | | |
676 | 677 | | |
| |||
0 commit comments