aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/kvm_host.h
diff options
context:
space:
mode:
authorAlexander Graf <agraf@suse.de>2012-03-13 17:35:01 -0400
committerAvi Kivity <avi@redhat.com>2012-04-08 05:47:49 -0400
commit2246f8b56315befa30f3d3d2800e0734c774f70e (patch)
treedec554ed0a72b9e9485e02153cd1521321a3f26a /include/linux/kvm_host.h
parentb6d33834bd4e8bdf4a199812e31b3e36da53c794 (diff)
KVM: PPC: Rework wqp conditional code
On PowerPC, we sometimes use a waitqueue per core, not per thread, so we can't always use the vcpu internal waitqueue. This code has been generalized by Christoffer Dall recently, but unfortunately broke compilation for PowerPC. At the time the helper function is defined, struct kvm_vcpu is not declared yet, so we can't dereference it. This patch moves all logic into the generic inline function, at which time we have all information necessary. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'include/linux/kvm_host.h')
-rw-r--r--include/linux/kvm_host.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index 5b624e1ff81..5184817e714 100644
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -524,12 +524,14 @@ static inline void kvm_arch_free_vm(struct kvm *kvm)
524} 524}
525#endif 525#endif
526 526
527#ifndef __KVM_HAVE_ARCH_VCPU_GET_WQ
528static inline wait_queue_head_t *kvm_arch_vcpu_wq(struct kvm_vcpu *vcpu) 527static inline wait_queue_head_t *kvm_arch_vcpu_wq(struct kvm_vcpu *vcpu)
529{ 528{
529#ifdef __KVM_HAVE_ARCH_WQP
530 return vcpu->arch.wqp;
531#else
530 return &vcpu->wq; 532 return &vcpu->wq;
531}
532#endif 533#endif
534}
533 535
534int kvm_arch_init_vm(struct kvm *kvm, unsigned long type); 536int kvm_arch_init_vm(struct kvm *kvm, unsigned long type);
535void kvm_arch_destroy_vm(struct kvm *kvm); 537void kvm_arch_destroy_vm(struct kvm *kvm);