aboutsummaryrefslogtreecommitdiff
path: root/arch/powerpc/include/asm/kvm_host.h
diff options
context:
space:
mode:
authorChristoffer Dall <c.dall@virtualopensystems.com>2012-03-08 16:44:24 -0500
committerAvi Kivity <avi@redhat.com>2012-04-08 12:47:47 +0300
commitb6d33834bd4e8bdf4a199812e31b3e36da53c794 (patch)
tree3360ac4b5fa572e3acb21ecdc686c6d941baa2fc /arch/powerpc/include/asm/kvm_host.h
parent66ef89315f121cda9bf5b65a4ef02ad1b4fb16d9 (diff)
KVM: Factor out kvm_vcpu_kick to arch-generic code
The kvm_vcpu_kick function performs roughly the same funcitonality on most all architectures, so we shouldn't have separate copies. PowerPC keeps a pointer to interchanging waitqueues on the vcpu_arch structure and to accomodate this special need a __KVM_HAVE_ARCH_VCPU_GET_WQ define and accompanying function kvm_arch_vcpu_wq have been defined. For all other architectures this is a generic inline that just returns &vcpu->wq; Acked-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Christoffer Dall <c.dall@virtualopensystems.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/powerpc/include/asm/kvm_host.h')
-rw-r--r--arch/powerpc/include/asm/kvm_host.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/kvm_host.h b/arch/powerpc/include/asm/kvm_host.h
index 52eb9c1f4fe..889383735e7 100644
--- a/arch/powerpc/include/asm/kvm_host.h
+++ b/arch/powerpc/include/asm/kvm_host.h
@@ -498,4 +498,10 @@ struct kvm_vcpu_arch {
#define KVM_MMIO_REG_QPR 0x0040
#define KVM_MMIO_REG_FQPR 0x0060
+#define __KVM_HAVE_ARCH_VCPU_GET_WQ 1
+static inline wait_queue_head *kvm_arch_vcpu_wq(struct kvm_vcpu *vcpu)
+{
+ return vcpu->arch.wqp;
+}
+
#endif /* __POWERPC_KVM_HOST_H__ */