Commit 400d213
KVM: SVM: Return the local "r" variable from svm_set_msr()
Rename "r" to "ret" and actually return it from svm_set_msr() to reduce
the probability of repeating the mistake of commit 723d5fb ("kvm:
svm: Add IA32_FLUSH_CMD guest support"), which set "r" thinking that it
would be propagated to the caller.
Alternatively, the declaration of "r" could be moved into the handling of
MSR_TSC_AUX, but that risks variable shadowing in the future. A wrapper
for kvm_set_user_return_msr() would allow eliding a local variable, but
that feels like delaying the inevitable.
No functional change intended.
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20230322011440.2195485-7-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>1 parent da3db16 commit 400d213
1 file changed
Lines changed: 5 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2873 | 2873 | | |
2874 | 2874 | | |
2875 | 2875 | | |
2876 | | - | |
| 2876 | + | |
2877 | 2877 | | |
2878 | 2878 | | |
2879 | 2879 | | |
| |||
2995 | 2995 | | |
2996 | 2996 | | |
2997 | 2997 | | |
2998 | | - | |
| 2998 | + | |
2999 | 2999 | | |
3000 | | - | |
3001 | | - | |
| 3000 | + | |
| 3001 | + | |
3002 | 3002 | | |
3003 | 3003 | | |
3004 | 3004 | | |
| |||
3056 | 3056 | | |
3057 | 3057 | | |
3058 | 3058 | | |
3059 | | - | |
| 3059 | + | |
3060 | 3060 | | |
3061 | 3061 | | |
3062 | 3062 | | |
| |||
0 commit comments