diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-11-05 17:16:13 +1100 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-11-05 17:16:13 +1100 |
commit | d4e09f8432a428d6a46ca4f3c2b28d0385f5b93d (patch) | |
tree | c5d7ef8e5a9e69e011e6361f076b43d3e3767575 /arch/powerpc/kvm/powerpc.c | |
parent | 41c8c46bfe52488779e227b77222402579573ccf (diff) | |
parent | 544c6761bb05a1dd19a39cb9bed096273f9bdb36 (diff) | |
download | op-kernel-dev-d4e09f8432a428d6a46ca4f3c2b28d0385f5b93d.zip op-kernel-dev-d4e09f8432a428d6a46ca4f3c2b28d0385f5b93d.tar.gz |
Merge branch 'kvm' into next
Diffstat (limited to 'arch/powerpc/kvm/powerpc.c')
-rw-r--r-- | arch/powerpc/kvm/powerpc.c | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c index 2a4551f..692c370 100644 --- a/arch/powerpc/kvm/powerpc.c +++ b/arch/powerpc/kvm/powerpc.c @@ -23,6 +23,7 @@ #include <linux/kvm_host.h> #include <linux/module.h> #include <linux/vmalloc.h> +#include <linux/hrtimer.h> #include <linux/fs.h> #include <asm/cputable.h> #include <asm/uaccess.h> @@ -208,10 +209,25 @@ static void kvmppc_decrementer_func(unsigned long data) } } +/* + * low level hrtimer wake routine. Because this runs in hardirq context + * we schedule a tasklet to do the real work. + */ +enum hrtimer_restart kvmppc_decrementer_wakeup(struct hrtimer *timer) +{ + struct kvm_vcpu *vcpu; + + vcpu = container_of(timer, struct kvm_vcpu, arch.dec_timer); + tasklet_schedule(&vcpu->arch.tasklet); + + return HRTIMER_NORESTART; +} + int kvm_arch_vcpu_init(struct kvm_vcpu *vcpu) { - setup_timer(&vcpu->arch.dec_timer, kvmppc_decrementer_func, - (unsigned long)vcpu); + hrtimer_init(&vcpu->arch.dec_timer, CLOCK_REALTIME, HRTIMER_MODE_ABS); + tasklet_init(&vcpu->arch.tasklet, kvmppc_decrementer_func, (ulong)vcpu); + vcpu->arch.dec_timer.function = kvmppc_decrementer_wakeup; return 0; } @@ -409,11 +425,6 @@ out: return r; } -int kvm_vm_ioctl_get_dirty_log(struct kvm *kvm, struct kvm_dirty_log *log) -{ - return -ENOTSUPP; -} - long kvm_arch_vm_ioctl(struct file *filp, unsigned int ioctl, unsigned long arg) { |