Re: [PATCH v3 1/4] KVM: SVM: nested: Don't allocate VMCB structures on stack

From: Sean Christopherson
Date: Mon Aug 03 2020 - 14:04:15 EST


On Mon, Aug 03, 2020 at 02:27:05PM +0200, Joerg Roedel wrote:
> From: Joerg Roedel <jroedel@xxxxxxx>
>
> Do not allocate a vmcb_control_area and a vmcb_save_area on the stack,
> as these structures will become larger with future extenstions of
> SVM and thus the svm_set_nested_state() function will become a too large
> stack frame.
>
> Signed-off-by: Joerg Roedel <jroedel@xxxxxxx>
> ---
> @@ -1110,15 +1123,15 @@ static int svm_set_nested_state(struct kvm_vcpu *vcpu,
> */
> cr0 = kvm_read_cr0(vcpu);
> if (((cr0 & X86_CR0_CD) == 0) && (cr0 & X86_CR0_NW))
> - return -EINVAL;
> + goto out_free;

Pre-existing issue, but this could opportunistically fix a spaces vs. tabs
issue.

ERROR: code indent should use tabs where possible
#71: FILE: arch/x86/kvm/svm/nested.c:1126:
+ goto out_free;$

WARNING: please, no spaces at the start of a line
#71: FILE: arch/x86/kvm/svm/nested.c:1126:
+ goto out_free;$