[PATCH] Build fix for #define KVM_DEBUG

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Build fix for #define KVM_DEBUG

If KVM_DEBUG is defined, the build for kvm_kmod is failed because :

1. is_long_mode() has moved to x86.h.
2. shadow_efer no longer exists.
3. The registers R8 - R15 don't exist on i386 architecture.

This patch fix this problem.

From: Tsuyoshi Ozawa <ozawa@xxxxxxxxx>
Date: Tue, 9 Feb 2010 15:32:51 +0900
Subject: [PATCH] Build fix for #define KVM_DEBUG


Signed-off-by: Tsuyoshi Ozawa <ozawa@xxxxxxxxx>
---
 x86/vmx-debug.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/x86/vmx-debug.c b/x86/vmx-debug.c
index d466f03..468b85a 100644
--- a/x86/vmx-debug.c
+++ b/x86/vmx-debug.c
@@ -22,6 +22,7 @@
 #include "mmu.h"
 #include "lapic.h"
 #include "debug.h"
+#include "x86.h"

 #ifdef KVM_DEBUG

@@ -1064,6 +1065,7 @@ void regs_dump(struct kvm_vcpu *vcpu)
        REG_DUMP(RBP);
        REG_DUMP(RSI);
        REG_DUMP(RDI);
+#ifdef CONFIG_X86_64
        REG_DUMP(R8);
        REG_DUMP(R9);
        REG_DUMP(R10);
@@ -1072,6 +1074,7 @@ void regs_dump(struct kvm_vcpu *vcpu)
        REG_DUMP(R13);
        REG_DUMP(R14);
        REG_DUMP(R15);
+#endif

        VMCS_REG_DUMP(RSP);
        VMCS_REG_DUMP(RIP);
@@ -1088,7 +1091,6 @@ void sregs_dump(struct kvm_vcpu *vcpu)
        vcpu_printf(vcpu, "cr3 = 0x%lx\n", vcpu->arch.cr3);
        vcpu_printf(vcpu, "cr4 = 0x%lx\n", vcpu->arch.cr4);
        vcpu_printf(vcpu, "cr8 = 0x%lx\n", vcpu->arch.cr8);
-       vcpu_printf(vcpu, "shadow_efer = 0x%llx\n", vcpu->arch.shadow_efer);
        vcpu_printf(vcpu,
"***********************************************************\n");
 }

-- 
1.6.0.4
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux