summaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/irq.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2019-06-18 20:12:47 +0200
committerMark Brown <broonie@kernel.org>2019-06-18 20:12:47 +0200
commite1d700f7c94e755106749411706a38e39a93404b (patch)
treeb1230cb7eba5a4ef28ed2cd2527d9ac78f06cc00 /arch/x86/kvm/irq.c
parentregulator: qcom_spmi: Refactor get_mode/set_mode (diff)
parentLinux 5.2-rc4 (diff)
downloadlinux-e1d700f7c94e755106749411706a38e39a93404b.tar.xz
linux-e1d700f7c94e755106749411706a38e39a93404b.zip
Merge tag 'v5.2-rc4' into regulator-5.3
Linux 5.2-rc4
Diffstat (limited to 'arch/x86/kvm/irq.c')
-rw-r--r--arch/x86/kvm/irq.c21
1 files changed, 8 insertions, 13 deletions
diff --git a/arch/x86/kvm/irq.c b/arch/x86/kvm/irq.c
index faa264822cee..e330e7d125f7 100644
--- a/arch/x86/kvm/irq.c
+++ b/arch/x86/kvm/irq.c
@@ -1,23 +1,11 @@
+// SPDX-License-Identifier: GPL-2.0-only
/*
* irq.c: API for in kernel interrupt controller
* Copyright (c) 2007, Intel Corporation.
* Copyright 2009 Red Hat, Inc. and/or its affiliates.
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms and conditions of the GNU General Public License,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place - Suite 330, Boston, MA 02111-1307 USA.
* Authors:
* Yaozu (Eddie) Dong <Eddie.dong@intel.com>
- *
*/
#include <linux/export.h>
@@ -172,3 +160,10 @@ void __kvm_migrate_timers(struct kvm_vcpu *vcpu)
__kvm_migrate_apic_timer(vcpu);
__kvm_migrate_pit_timer(vcpu);
}
+
+bool kvm_arch_irqfd_allowed(struct kvm *kvm, struct kvm_irqfd *args)
+{
+ bool resample = args->flags & KVM_IRQFD_FLAG_RESAMPLE;
+
+ return resample ? irqchip_kernel(kvm) : irqchip_in_kernel(kvm);
+}