Commit 0c4ff08
committed
KVM: VMX: Set MSR index auto-load entry if and only if entry is "new"
When adding an MSR to the auto-load lists, update the MSR index in the
list entry if and only if a new entry is being inserted, as 'i' can only
be non-negative if vmx_find_loadstore_msr_slot() found an entry with the
MSR's index. Unnecessarily setting the index is benign, but it makes it
harder to see that updating the value is necessary even when an existing
entry for the MSR was found.
No functional change intended.
Reviewed-by: Dapeng Mi <dapeng1.mi@linux.intel.com>
Tested-by: Manali Shukla <manali.shukla@amd.com>
Link: https://patch.msgid.link/20251206001720.468579-41-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>1 parent 2ed57bb commit 0c4ff08
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1141 | 1141 | | |
1142 | 1142 | | |
1143 | 1143 | | |
| 1144 | + | |
1144 | 1145 | | |
1145 | 1146 | | |
1146 | | - | |
1147 | 1147 | | |
1148 | 1148 | | |
1149 | 1149 | | |
1150 | 1150 | | |
| 1151 | + | |
1151 | 1152 | | |
1152 | 1153 | | |
1153 | | - | |
1154 | 1154 | | |
1155 | 1155 | | |
1156 | 1156 | | |
| |||
0 commit comments