>From 904c45acea67d5b18796a2d97bce54097bd440fe Mon Sep 17 00:00:00 2001 From: Stephan Baerwolf Date: Sat, 7 Jan 2012 20:20:43 +0000 Subject: [PATCH 1/2] KVM: move "emul_to_vcpu"-makro to headerfile In order to take advantage of "emul_to_vpu" in other C-files, this makro has been moved to the headerfile. Signed-off-by: Stephan Baerwolf --- arch/x86/kvm/x86.c | 3 --- arch/x86/kvm/x86.h | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 4c938da..ac949ba 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -64,9 +64,6 @@ #define KVM_MAX_MCE_BANKS 32 #define KVM_MCE_CAP_SUPPORTED (MCG_CTL_P | MCG_SER_P) -#define emul_to_vcpu(ctxt) \ - container_of(ctxt, struct kvm_vcpu, arch.emulate_ctxt) - /* EFER defaults: * - enable syscall per default because its emulated by KVM * - enable LME and LMA per default on 64 bit KVM diff --git a/arch/x86/kvm/x86.h b/arch/x86/kvm/x86.h index d36fe23..644c843 100644 --- a/arch/x86/kvm/x86.h +++ b/arch/x86/kvm/x86.h @@ -4,6 +4,9 @@ #include #include "kvm_cache_regs.h" +#define emul_to_vcpu(ctxt) \ + container_of(ctxt, struct kvm_vcpu, arch.emulate_ctxt) + static inline void kvm_clear_exception_queue(struct kvm_vcpu *vcpu) { vcpu->arch.exception.pending = false; -- 1.7.3.4