aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64/kvm/kvm-ia64.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/ia64/kvm/kvm-ia64.c')
-rw-r--r--arch/ia64/kvm/kvm-ia64.c41
1 files changed, 17 insertions, 24 deletions
diff --git a/arch/ia64/kvm/kvm-ia64.c b/arch/ia64/kvm/kvm-ia64.c
index bd77cb507c1c..8b3a9c0e771d 100644
--- a/arch/ia64/kvm/kvm-ia64.c
+++ b/arch/ia64/kvm/kvm-ia64.c
@@ -924,6 +924,16 @@ int kvm_arch_vcpu_ioctl_set_regs(struct kvm_vcpu *vcpu, struct kvm_regs *regs)
924 return 0; 924 return 0;
925} 925}
926 926
927int kvm_vm_ioctl_irq_line(struct kvm *kvm, struct kvm_irq_level *irq_event)
928{
929 if (!irqchip_in_kernel(kvm))
930 return -ENXIO;
931
932 irq_event->status = kvm_set_irq(kvm, KVM_USERSPACE_IRQ_SOURCE_ID,
933 irq_event->irq, irq_event->level);
934 return 0;
935}
936
927long kvm_arch_vm_ioctl(struct file *filp, 937long kvm_arch_vm_ioctl(struct file *filp,
928 unsigned int ioctl, unsigned long arg) 938 unsigned int ioctl, unsigned long arg)
929{ 939{
@@ -963,29 +973,6 @@ long kvm_arch_vm_ioctl(struct file *filp,
963 goto out; 973 goto out;
964 } 974 }
965 break; 975 break;
966 case KVM_IRQ_LINE_STATUS:
967 case KVM_IRQ_LINE: {
968 struct kvm_irq_level irq_event;
969
970 r = -EFAULT;
971 if (copy_from_user(&irq_event, argp, sizeof irq_event))
972 goto out;
973 r = -ENXIO;
974 if (irqchip_in_kernel(kvm)) {
975 __s32 status;
976 status = kvm_set_irq(kvm, KVM_USERSPACE_IRQ_SOURCE_ID,
977 irq_event.irq, irq_event.level);
978 if (ioctl == KVM_IRQ_LINE_STATUS) {
979 r = -EFAULT;
980 irq_event.status = status;
981 if (copy_to_user(argp, &irq_event,
982 sizeof irq_event))
983 goto out;
984 }
985 r = 0;
986 }
987 break;
988 }
989 case KVM_GET_IRQCHIP: { 976 case KVM_GET_IRQCHIP: {
990 /* 0: PIC master, 1: PIC slave, 2: IOAPIC */ 977 /* 0: PIC master, 1: PIC slave, 2: IOAPIC */
991 struct kvm_irqchip chip; 978 struct kvm_irqchip chip;
@@ -1626,11 +1613,17 @@ void kvm_arch_commit_memory_region(struct kvm *kvm,
1626 return; 1613 return;
1627} 1614}
1628 1615
1629void kvm_arch_flush_shadow(struct kvm *kvm) 1616void kvm_arch_flush_shadow_all(struct kvm *kvm)
1630{ 1617{
1631 kvm_flush_remote_tlbs(kvm); 1618 kvm_flush_remote_tlbs(kvm);
1632} 1619}
1633 1620
1621void kvm_arch_flush_shadow_memslot(struct kvm *kvm,
1622 struct kvm_memory_slot *slot)
1623{
1624 kvm_arch_flush_shadow_all();
1625}
1626
1634long kvm_arch_dev_ioctl(struct file *filp, 1627long kvm_arch_dev_ioctl(struct file *filp,
1635 unsigned int ioctl, unsigned long arg) 1628 unsigned int ioctl, unsigned long arg)
1636{ 1629{