KVM: Fix some obsolete comments
Quoted 33 lines · Vitaly Kuznetsov
Quoted 2 lines · linmiaohe
From: Miaohe Lin <[email protected]>
Thank you for the cleanup, I looked at
nested_svm_intercept()and I see room for improvement, e.g. (completely untested!)arch/x86/kvm/svm.c +6
-7@@ -3280,42 +3280,36 @@ static int nested_svm_intercept(struct vcpu_svm *svm)case SVM_EXIT_IOIO : vmexit =nested_svm_intercept_ioio (svm);break ; - case SVM_EXIT_READ_CR0 ... SVM_EXIT_WRITE_CR8: { -u32 bit =1U << (exit_code -SVM_EXIT_READ_CR0 ); -if (svm->nested.intercept_cr & bit) + case SVM_EXIT_READ_CR0 ... SVM_EXIT_WRITE_CR8: +if (svm->nested.intercept_cr & +BIT (exit_code -SVM_EXIT_READ_CR0 )) -default : { -u64 exit_bits =1ULL << (exit_code -SVM_EXIT_INTR ); -if (svm->nested.intercept & exit_bits) +default : +if (svm->nested.intercept &BIT_ULL (exit_code - +SVM_EXIT_INTR )) vmexit =NESTED_EXIT_DONE ; } - }return vmexit; }
Quoted 1 line
Feel free to pick stuff you like and split your changes to this function in a separate patch.
Sounds good, many thanks for your improvement suggestion. Will do in a separate patch.
Quoted 6 lines
Quoted 4 lines
u32
exit_code=svm->vmcb->control.exit_code; diff --git
throws
- * #UD or #GP.
+ * #UD, #GP or #SS.Oxford comma, anyone? :-)))
I have no strong preference. ^_^
Quoted 7 lines
Quoted 2 lines
*/
int get_vmx_mem_address(structkvm_vcpu*vcpu, unsigned longexit_qualification,All your changes look correct, so
Reviewed-by Vitaly Kuznetsov <[email protected]>
Many thanks for your review, and nice suggestion again!
Quoted 9 lines · linmiaohe
Quoted 6 lines · Vitaly Kuznetsov
Quoted 3 lines · linmiaohe
throws
- * #UD or #GP.
+ * #UD, #GP or #SS.Oxford comma, anyone? :-)))
I have no strong preference. ^_^
I'm also a fan of the Oxford comma when it comes to describing code.