Subject: Re: linux-next: manual merge of the kvm-x86 tree with the kvm-fixes tree

From: Paolo Bonzini <[email-masked]>
Date: Thu, 12 Mar 2026 18:54:18 +0100

On 3/12/26 18:21, Mark Brown wrote:
> diff --cc arch/x86/kvm/svm/svm.c
> index e6477affac9a0,3407deac90bd6..0000000000000
> --- a/arch/x86/kvm/svm/svm.c
> +++ b/arch/x86/kvm/svm/svm.c
> @@@ -4880,15 -5030,11 +5030,11 @@@ static int svm_leave_smm(struct kvm_vcp
>    	vmcb12 = map.hva;
>    	nested_copy_vmcb_control_to_cache(svm, &vmcb12->control);
>    	nested_copy_vmcb_save_to_cache(svm, &vmcb12->save);
>   -	ret = enter_svm_guest_mode(vcpu, smram64->svm_guest_vmcb_gpa, false);
>    
> - 	if (nested_svm_check_cached_vmcb12(vcpu) < 0)
> - 		goto unmap_save;

The right resolution is to keep these two lines...

> -
> - 	if (enter_svm_guest_mode(vcpu, smram64->svm_guest_vmcb_gpa,
> - 				 vmcb12, false) != 0)
>   -	if (ret)
> ++	if (enter_svm_guest_mode(vcpu, smram64->svm_guest_vmcb_gpa, false) != 0)

... while of course this part is okay.

Paolo

>    		goto unmap_save;
>    
>   +	ret = 0;
>    	svm->nested.nested_run_pending = 1;
>    
>    unmap_save: