Skip to content

Commit 1d6df8f

Browse files
sipasingvijay-suman
authored andcommitted
KVM: SVM: fix build error when CONFIG_HYPERV is unset
UEK7 build fails when CONFIG_HYPERV is not set Error message: arch/x86/kvm/svm/svm.c: In function ‘svm_hardware_setup’: arch/x86/kvm/svm/svm.c:1156:60: error: ‘svm_x86_ops’ undeclared (first use in this function); did you mean ‘kvm_x86_ops’? 1156 | enable_apicv = avic = avic && avic_hardware_setup(&svm_x86_ops); | ^~~~~~~~~~~ | kvm_x86_ops arch/x86/kvm/svm/svm.c:1156:60: note: each undeclared identifier is reported only once for each function it appears in make[2]: *** [scripts/Makefile.build:288: arch/x86/kvm/svm/svm.o] Error 1 make[1]: *** [scripts/Makefile.build:551: arch/x86/kvm] Error 2 make: *** [Makefile:1988: arch/x86] Error 2 Orabug: 36508934 Fixes: b80fd5a ("KVM: SVM: Detect X2APIC virtualization (x2AVIC) support") Reviewed-by: Boris Ostrovsky <[email protected]> Signed-off-by: Simran Singh <[email protected]> Signed-off-by: Vijayendra Suman <[email protected]>
1 parent c38d169 commit 1d6df8f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

arch/x86/kvm/svm/svm.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,8 @@ module_param(intercept_smi, bool, 0444);
239239
bool vnmi = true;
240240
module_param(vnmi, bool, 0444);
241241

242+
static struct kvm_x86_ops svm_x86_ops;
243+
242244
static bool svm_gp_erratum_intercept = true;
243245

244246
static u8 rsm_ins_bytes[] = "\x0f\xaa";

0 commit comments

Comments
 (0)