diff options
author | Maarten Lankhorst <maarten.lankhorst@linux.intel.com> | 2019-05-28 10:38:59 +0300 |
---|---|---|
committer | Maarten Lankhorst <maarten.lankhorst@linux.intel.com> | 2019-05-28 10:39:08 +0300 |
commit | 4672b1d65fc9b5a5ded911fbebb4853b892d5d89 (patch) | |
tree | 4ddeeb9fd195ce85f0f49525b94c39bdee8b94d9 /virt/kvm/eventfd.c | |
parent | cf57fdc8e42bd88dae1213a2bbe683d4b6c2190b (diff) | |
parent | 14ee642c2ab0a3d8a1ded11fade692d8b77172b9 (diff) | |
download | linux-4672b1d65fc9b5a5ded911fbebb4853b892d5d89.tar.xz |
Merge remote-tracking branch 'drm/drm-next' into drm-misc-next
This picks up rc2 for us as well.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Diffstat (limited to 'virt/kvm/eventfd.c')
-rw-r--r-- | virt/kvm/eventfd.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/virt/kvm/eventfd.c b/virt/kvm/eventfd.c index 001aeda4c154..3972a9564c76 100644 --- a/virt/kvm/eventfd.c +++ b/virt/kvm/eventfd.c @@ -44,6 +44,12 @@ static struct workqueue_struct *irqfd_cleanup_wq; +bool __attribute__((weak)) +kvm_arch_irqfd_allowed(struct kvm *kvm, struct kvm_irqfd *args) +{ + return true; +} + static void irqfd_inject(struct work_struct *work) { @@ -297,6 +303,9 @@ kvm_irqfd_assign(struct kvm *kvm, struct kvm_irqfd *args) if (!kvm_arch_intc_initialized(kvm)) return -EAGAIN; + if (!kvm_arch_irqfd_allowed(kvm, args)) + return -EINVAL; + irqfd = kzalloc(sizeof(*irqfd), GFP_KERNEL_ACCOUNT); if (!irqfd) return -ENOMEM; |