]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86: Always set kvm_run->if_flag
authorMarc Orr <marcorr@google.com>
Thu, 9 Dec 2021 15:52:57 +0000 (07:52 -0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 20 Dec 2021 13:06:53 +0000 (08:06 -0500)
commit89307626a5bb4321ed0652eeb378856b64199f65
tree3b0c148a37c7b5230548ca6df0322d5c5d0ea97a
parent780ff1799bc07dc80c17223bd85cdb61ae3ecc62
KVM: x86: Always set kvm_run->if_flag

The kvm_run struct's if_flag is a part of the userspace/kernel API. The
SEV-ES patches failed to set this flag because it's no longer needed by
QEMU (according to the comment in the source code). However, other
hypervisors may make use of this flag. Therefore, set the flag for
guests with encrypted registers (i.e., with guest_state_protected set).

Fixes: 1eef9a70a655 ("KVM: SVM: Add required changes to support intercepts under SEV-ES")
Signed-off-by: Marc Orr <marcorr@google.com>
Message-Id: <20211209155257.128747-1-marcorr@google.com>
Cc: stable@vger.kernel.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com>
arch/x86/include/asm/kvm-x86-ops.h
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/svm/svm.c
arch/x86/kvm/vmx/vmx.c
arch/x86/kvm/x86.c