aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/kvm/kvm_main.c
diff options
context:
space:
mode:
authorZhang Xiantao <xiantao.zhang@intel.com>2007-11-20 15:36:41 -0500
committerAvi Kivity <avi@qumranet.com>2008-01-30 10:53:16 -0500
commitf77bc6a420eba845605ff1d53cadf55f94c5e8b7 (patch)
tree1b393e18aeaeb5c728ec2fd2aa71e6d85139ad26 /drivers/kvm/kvm_main.c
parent018a98db74d4cc8967cfc570197b14bcbdddb579 (diff)
KVM: Portability: Move KVM_INTERRUPT vcpu ioctl to x86.c
Other archs doesn't need it. Signed-off-by: Zhang Xiantao <xiantao.zhang@intel.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'drivers/kvm/kvm_main.c')
-rw-r--r--drivers/kvm/kvm_main.c29
1 files changed, 0 insertions, 29 deletions
diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c
index 721e660023f6..c74fb44dd87b 100644
--- a/drivers/kvm/kvm_main.c
+++ b/drivers/kvm/kvm_main.c
@@ -665,23 +665,6 @@ void kvm_resched(struct kvm_vcpu *vcpu)
665} 665}
666EXPORT_SYMBOL_GPL(kvm_resched); 666EXPORT_SYMBOL_GPL(kvm_resched);
667 667
668static int kvm_vcpu_ioctl_interrupt(struct kvm_vcpu *vcpu,
669 struct kvm_interrupt *irq)
670{
671 if (irq->irq < 0 || irq->irq >= 256)
672 return -EINVAL;
673 if (irqchip_in_kernel(vcpu->kvm))
674 return -ENXIO;
675 vcpu_load(vcpu);
676
677 set_bit(irq->irq, vcpu->irq_pending);
678 set_bit(irq->irq / BITS_PER_LONG, &vcpu->irq_summary);
679
680 vcpu_put(vcpu);
681
682 return 0;
683}
684
685static struct page *kvm_vcpu_nopage(struct vm_area_struct *vma, 668static struct page *kvm_vcpu_nopage(struct vm_area_struct *vma,
686 unsigned long address, 669 unsigned long address,
687 int *type) 670 int *type)
@@ -883,18 +866,6 @@ static long kvm_vcpu_ioctl(struct file *filp,
883 r = 0; 866 r = 0;
884 break; 867 break;
885 } 868 }
886 case KVM_INTERRUPT: {
887 struct kvm_interrupt irq;
888
889 r = -EFAULT;
890 if (copy_from_user(&irq, argp, sizeof irq))
891 goto out;
892 r = kvm_vcpu_ioctl_interrupt(vcpu, &irq);
893 if (r)
894 goto out;
895 r = 0;
896 break;
897 }
898 case KVM_DEBUG_GUEST: { 869 case KVM_DEBUG_GUEST: {
899 struct kvm_debug_guest dbg; 870 struct kvm_debug_guest dbg;
900 871