On Mon, Jan 12, 2026, Jim Mattson wrote:
>  /* for KVM_CAP_NESTED_STATE */
> diff --git a/arch/x86/kvm/svm/nested.c b/arch/x86/kvm/svm/nested.c
> index a0e5bf1aba52..ed24e08d2d21 100644
> --- a/arch/x86/kvm/svm/nested.c
> +++ b/arch/x86/kvm/svm/nested.c
> @@ -1769,6 +1769,7 @@ static int svm_get_nested_state(struct kvm_vcpu *vcpu,
>       /* First fill in the header and copy it out.  */
>       if (is_guest_mode(vcpu)) {
>               kvm_state.hdr.svm.vmcb_pa = svm->nested.vmcb12_gpa;
> +             kvm_state.hdr.svm.flags = KVM_STATE_SVM_VALID_GPAT;

Assuming this survives to v2, make this:

                kvm_state.hdr.svm.flags |= KVM_STATE_SVM_VALID_GPAT;

both to communicate that there's no pre-existing bug where KVM doesn't 
initialize
flags, and so that there's less risk of clobbering others flags, e.g. if a new
flag is added in the future and is set before this point.

>               kvm_state.size += KVM_STATE_NESTED_SVM_VMCB_SIZE;
>               kvm_state.flags |= KVM_STATE_NESTED_GUEST_MODE;
>  
> -- 
> 2.52.0.457.g6b5491de43-goog
> 

Reply via email to