Message ID | 20250103153814.73903-1-gaoshiyuan@baidu.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [1/1] KVM: VMX: Fix comment of handle_vmx_instruction | expand |
On Fri, 03 Jan 2025 23:38:14 +0800, Gao Shiyuan wrote: > There is no nested_vmx_setup function. When referencing function, add parantheses, e.g. nested_vmx_setup(), so that it's super obvious that you're talking about a function. > It should be nested_vmx_hardware_setup overwrite the VMX emulate handler > when nested=1. Embarassingly, the comment was always wrong. I added a paragraph to the changelog to explain as much, e.g. so that we aren't as tempted to try and reword the comment to avoid explicitly referencing function names so that it can't become stale. Applied to kvm-x86 vmx, thanks! [1/1] KVM: VMX: Fix comment of handle_vmx_instruction https://github.com/kvm-x86/linux/commit/4d141e444e26 -- https://github.com/kvm-x86/linux/tree/next
diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c index 893366e53732..871670eb4994 100644 --- a/arch/x86/kvm/vmx/vmx.c +++ b/arch/x86/kvm/vmx/vmx.c @@ -6049,7 +6049,7 @@ static int handle_preemption_timer(struct kvm_vcpu *vcpu) /* * When nested=0, all VMX instruction VM Exits filter here. The handlers - * are overwritten by nested_vmx_setup() when nested=1. + * are overwritten by nested_vmx_hardware_setup() when nested=1. */ static int handle_vmx_instruction(struct kvm_vcpu *vcpu) {
There is no nested_vmx_setup function. It should be nested_vmx_hardware_setup overwrite the VMX emulate handler when nested=1. Signed-off-by: Gao Shiyuan <gaoshiyuan@baidu.com> --- arch/x86/kvm/vmx/vmx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)