Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1256071
| From | Luis Henriques <luis.henriques@canonical.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 3.16.y-ckt 006/104] kvm: don't try to register to KVM_FAST_MMIO_BUS for non mmio eventfd |
| Date | 2015-10-26 15:30 +0100 |
| Message-ID | <qnQWD-Ui-55@gated-at.bofh.it> (permalink) |
| References | <qnQjT-qq-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
3.16.7-ckt19 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Jason Wang <jasowang@redhat.com>
commit 8453fecbecae26edb3f278627376caab05d9a88d upstream.
We only want zero length mmio eventfd to be registered on
KVM_FAST_MMIO_BUS. So check this explicitly when arg->len is zero to
make sure this.
Cc: Gleb Natapov <gleb@kernel.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
virt/kvm/eventfd.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/virt/kvm/eventfd.c b/virt/kvm/eventfd.c
index 20c3af7692c5..47e48e2c7d1a 100644
--- a/virt/kvm/eventfd.c
+++ b/virt/kvm/eventfd.c
@@ -778,7 +778,7 @@ kvm_assign_ioeventfd(struct kvm *kvm, struct kvm_ioeventfd *args)
/* When length is ignored, MMIO is also put on a separate bus, for
* faster lookups.
*/
- if (!args->len && !(args->flags & KVM_IOEVENTFD_FLAG_PIO)) {
+ if (!args->len && bus_idx == KVM_MMIO_BUS) {
ret = kvm_io_bus_register_dev(kvm, KVM_FAST_MMIO_BUS,
p->addr, 0, &p->dev);
if (ret < 0)
@@ -833,7 +833,7 @@ kvm_deassign_ioeventfd(struct kvm *kvm, struct kvm_ioeventfd *args)
continue;
kvm_io_bus_unregister_dev(kvm, bus_idx, &p->dev);
- if (!p->length) {
+ if (!p->length && p->bus_idx == KVM_MMIO_BUS) {
kvm_io_bus_unregister_dev(kvm, KVM_FAST_MMIO_BUS,
&p->dev);
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[3.16.y-ckt stable] Linux 3.16.7-ckt19 stable review Luis Henriques <luis.henriques@canonical.com> - 2015-10-26 15:30 +0100
[PATCH 3.16.y-ckt 005/104] arm64: head.S: initialise mdcr_el2 in el2_setup Luis Henriques <luis.henriques@canonical.com> - 2015-10-26 15:30 +0100
[PATCH 3.16.y-ckt 038/104] usb: xhci: Clear XHCI_STATE_DYING on start Luis Henriques <luis.henriques@canonical.com> - 2015-10-26 15:30 +0100
[PATCH 3.16.y-ckt 006/104] kvm: don't try to register to KVM_FAST_MMIO_BUS for non mmio eventfd Luis Henriques <luis.henriques@canonical.com> - 2015-10-26 15:30 +0100
[PATCH 3.16.y-ckt 027/104] drm/vmwgfx: Fix up user_dmabuf refcounting Luis Henriques <luis.henriques@canonical.com> - 2015-10-26 15:30 +0100
[PATCH 3.16.y-ckt 001/104] ARM: 8429/1: disable GCC SRA optimization Luis Henriques <luis.henriques@canonical.com> - 2015-10-26 15:30 +0100
[PATCH 3.16.y-ckt 015/104] arm64: errata: add module build workaround for erratum #843419 Luis Henriques <luis.henriques@canonical.com> - 2015-10-26 15:30 +0100
[PATCH 3.16.y-ckt 029/104] Btrfs: fix read corruption of compressed and shared extents Luis Henriques <luis.henriques@canonical.com> - 2015-10-26 15:30 +0100
[PATCH 3.16.y-ckt 105/107] KEYS: Fix race between key destruction and finding a keyring by name Luis Henriques <luis.henriques@canonical.com> - 2015-10-26 20:10 +0100
[PATCH 3.16.y-ckt 107/107] KEYS: Don't permit request_key() to construct a new keyring Luis Henriques <luis.henriques@canonical.com> - 2015-10-26 20:10 +0100
Re: [3.16.y-ckt stable] Linux 3.16.7-ckt19 stable review Luis Henriques <luis.henriques@canonical.com> - 2015-10-26 20:10 +0100
Re: [3.16.y-ckt stable] Linux 3.16.7-ckt19 stable review Luis Henriques <luis.henriques@canonical.com> - 2015-10-28 18:00 +0100
[PATCH 3.16.y-ckt 106/107] KEYS: Fix crash when attempt to garbage collect an uninstantiated keyring Luis Henriques <luis.henriques@canonical.com> - 2015-10-26 20:10 +0100
[PATCH 3.16.y-ckt 108/108] Btrfs: update fix for read corruption of compressed and shared extents Luis Henriques <luis.henriques@canonical.com> - 2015-10-28 18:00 +0100
csiph-web