- add interrupts (KVM_DEV_FLIC_ENQUEUE)
 - inspect currently pending interrupts (KVM_FLIC_GET_ALL_IRQS)
 - purge all pending floating interrupts (KVM_DEV_FLIC_CLEAR_IRQS)
+- purge one pending floating I/O interrupt (KVM_DEV_FLIC_CLEAR_IO_IRQ)
 - enable/disable for the guest transparent async page faults
 - register and modify adapter interrupt sources (KVM_DEV_FLIC_ADAPTER_*)
 
     Simply deletes all elements from the list of currently pending floating
     interrupts.  No interrupts are injected into the guest.
 
+  KVM_DEV_FLIC_CLEAR_IO_IRQ
+    Deletes one (if any) I/O interrupt for a subchannel identified by the
+    subsystem identification word passed via the buffer specified by
+    attr->addr (address) and attr->attr (length).
+
   KVM_DEV_FLIC_APF_ENABLE
     Enables async page faults for the guest. So in case of a major page fault
     the host is allowed to handle this async and continues the guest.
 
 #define KVM_DEV_FLIC_APF_DISABLE_WAIT  5
 #define KVM_DEV_FLIC_ADAPTER_REGISTER  6
 #define KVM_DEV_FLIC_ADAPTER_MODIFY    7
+#define KVM_DEV_FLIC_CLEAR_IO_IRQ      8
 /*
  * We can have up to 4*64k pending subchannels + 8 adapter interrupts,
  * as well as up  to ASYNC_PF_PER_VCPU*KVM_MAX_VCPUS pfault done interrupts.
 
        return ret;
 }
 
+static int clear_io_irq(struct kvm *kvm, struct kvm_device_attr *attr)
+
+{
+       const u64 isc_mask = 0xffUL << 24; /* all iscs set */
+       u32 schid;
+
+       if (attr->flags)
+               return -EINVAL;
+       if (attr->attr != sizeof(schid))
+               return -EINVAL;
+       if (copy_from_user(&schid, (void __user *) attr->addr, sizeof(schid)))
+               return -EFAULT;
+       kfree(kvm_s390_get_io_int(kvm, isc_mask, schid));
+       /*
+        * If userspace is conforming to the architecture, we can have at most
+        * one pending I/O interrupt per subchannel, so this is effectively a
+        * clear all.
+        */
+       return 0;
+}
+
 static int flic_set_attr(struct kvm_device *dev, struct kvm_device_attr *attr)
 {
        int r = 0;
        case KVM_DEV_FLIC_ADAPTER_MODIFY:
                r = modify_io_adapter(dev, attr);
                break;
+       case KVM_DEV_FLIC_CLEAR_IO_IRQ:
+               r = clear_io_irq(dev->kvm, attr);
+               break;
        default:
                r = -EINVAL;
        }
        case KVM_DEV_FLIC_APF_DISABLE_WAIT:
        case KVM_DEV_FLIC_ADAPTER_REGISTER:
        case KVM_DEV_FLIC_ADAPTER_MODIFY:
+       case KVM_DEV_FLIC_CLEAR_IO_IRQ:
                return 0;
        }
        return -ENXIO;