Skip to contentSkip to conversation

KVM: SVM: Fix kvm_cache_regs.h inclusions for is_guest_mode()

PATCH Applied Peter Gonda 2 participants 2 messages Mar 4, 2022 – Mar 8, 2022

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 KVM: SVM: Fix kvm_cache_regs.h inclusions for is_guest_mode()

Include kvm_cache_regs.h to pick up the definition of is_guest_mode(), which is referenced by nested_svm_virtualize_tpr() in svm.h. Remove include from svm_onhpyerv.c which was done only because of lack of include in svm.h.

Fixes 883b0a91f41ab ("KVM: SVM: Move Nested SVM Implementation to nested.c")

---
Just compile tested.

---
 arch/x86/kvm/svm/svm.h          | 2 ++
 arch/x86/kvm/svm/svm_onhyperv.c | 1 -
 2 files changed, 2 insertions(+), 1 deletion(-)
arch/x86/kvm/svm/svm.h +2 -0
index e45b5645d5e0..396d60e36b82 100644
@@ -22,6 +22,8 @@
 #include <asm/svm.h>
 #include <asm/sev-common.h>
 
+#include "kvm_cache_regs.h"
+
 #define __sme_page_pa(x) __sme_set(page_to_pfn(x) << PAGE_SHIFT)
 
 #define	IOPM_SIZE PAGE_SIZE * 3
arch/x86/kvm/svm/svm_onhyperv.c +0 -1
index 98aa981c04ec..8cdc62c74a96 100644
@@ -4,7 +4,6 @@
  */
 
 #include <linux/kvm_host.h>
-#include "kvm_cache_regs.h"
 
 #include <asm/mshyperv.h>
 
Signature · 1 line
2.35.1.574.g5d30c73bfb-goog