summaryrefslogtreecommitdiff
path: root/arch/x86/include/asm/kvm-x86-ops.h
diff options
context:
space:
mode:
authorMarc Orr <marcorr@google.com>2021-12-09 07:52:57 -0800
committerPaolo Bonzini <pbonzini@redhat.com>2021-12-20 08:06:53 -0500
commitc5063551bfcae4e48fec890b7bf369598b77526b (patch)
tree3b0c148a37c7b5230548ca6df0322d5c5d0ea97a /arch/x86/include/asm/kvm-x86-ops.h
parent3a0f64de479cae75effb630a2e0a237ca0d0623c (diff)
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: f1c6366e3043 ("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>
Diffstat (limited to 'arch/x86/include/asm/kvm-x86-ops.h')
-rw-r--r--arch/x86/include/asm/kvm-x86-ops.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/include/asm/kvm-x86-ops.h b/arch/x86/include/asm/kvm-x86-ops.h
index cefe1d81e2e8..9e50da3ed01a 100644
--- a/arch/x86/include/asm/kvm-x86-ops.h
+++ b/arch/x86/include/asm/kvm-x86-ops.h
@@ -47,6 +47,7 @@ KVM_X86_OP(set_dr7)
KVM_X86_OP(cache_reg)
KVM_X86_OP(get_rflags)
KVM_X86_OP(set_rflags)
+KVM_X86_OP(get_if_flag)
KVM_X86_OP(tlb_flush_all)
KVM_X86_OP(tlb_flush_current)
KVM_X86_OP_NULL(tlb_remote_flush)