diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-05-26 16:45:15 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-05-26 16:45:15 -0400 |
commit | 862f0a3227b337cea11d0488b0345dc2670fc297 (patch) | |
tree | a3376ede3d214679cbde295f7319f20537accfbc /virt/kvm/eventfd.c | |
parent | 128f2bfafcf2e65504013934202f460a3b2e378c (diff) | |
parent | 66f61c92889ff3ca365161fb29dd36d6354682ba (diff) |
Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm
Pull KVM fixes from Paolo Bonzini:
"The usual smattering of fixes and tunings that came in too late for
the merge window, but should not wait four months before they appear
in a release.
I also travelled a bit more than usual in the first part of May, which
didn't help with picking up patches and reports promptly"
* tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (33 commits)
KVM: x86: fix return value for reserved EFER
tools/kvm_stat: fix fields filter for child events
KVM: selftests: Wrap vcpu_nested_state_get/set functions with x86 guard
kvm: selftests: aarch64: compile with warnings on
kvm: selftests: aarch64: fix default vm mode
kvm: selftests: aarch64: dirty_log_test: fix unaligned memslot size
KVM: s390: fix memory slot handling for KVM_SET_USER_MEMORY_REGION
KVM: x86/pmu: do not mask the value that is written to fixed PMUs
KVM: x86/pmu: mask the result of rdpmc according to the width of the counters
x86/kvm/pmu: Set AMD's virt PMU version to 1
KVM: x86: do not spam dmesg with VMCS/VMCB dumps
kvm: Check irqchip mode before assign irqfd
kvm: svm/avic: fix off-by-one in checking host APIC ID
KVM: selftests: do not blindly clobber registers in guest asm
KVM: selftests: Remove duplicated TEST_ASSERT in hyperv_cpuid.c
KVM: LAPIC: Expose per-vCPU timer_advance_ns to userspace
KVM: LAPIC: Fix lapic_timer_advance_ns parameter overflow
kvm: vmx: Fix -Wmissing-prototypes warnings
KVM: nVMX: Fix using __this_cpu_read() in preemptible context
kvm: fix compilation on s390
...
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 @@ | |||
44 | 44 | ||
45 | static struct workqueue_struct *irqfd_cleanup_wq; | 45 | static struct workqueue_struct *irqfd_cleanup_wq; |
46 | 46 | ||
47 | bool __attribute__((weak)) | ||
48 | kvm_arch_irqfd_allowed(struct kvm *kvm, struct kvm_irqfd *args) | ||
49 | { | ||
50 | return true; | ||
51 | } | ||
52 | |||
47 | static void | 53 | static void |
48 | irqfd_inject(struct work_struct *work) | 54 | irqfd_inject(struct work_struct *work) |
49 | { | 55 | { |
@@ -297,6 +303,9 @@ kvm_irqfd_assign(struct kvm *kvm, struct kvm_irqfd *args) | |||
297 | if (!kvm_arch_intc_initialized(kvm)) | 303 | if (!kvm_arch_intc_initialized(kvm)) |
298 | return -EAGAIN; | 304 | return -EAGAIN; |
299 | 305 | ||
306 | if (!kvm_arch_irqfd_allowed(kvm, args)) | ||
307 | return -EINVAL; | ||
308 | |||
300 | irqfd = kzalloc(sizeof(*irqfd), GFP_KERNEL_ACCOUNT); | 309 | irqfd = kzalloc(sizeof(*irqfd), GFP_KERNEL_ACCOUNT); |
301 | if (!irqfd) | 310 | if (!irqfd) |
302 | return -ENOMEM; | 311 | return -ENOMEM; |