<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/virt, branch v3.18.40</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.18.40</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.18.40'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2016-08-22T16:23:09Z</updated>
<entry>
<title>KVM: nVMX: Fix memory corruption when using VMCS shadowing</title>
<updated>2016-08-22T16:23:09Z</updated>
<author>
<name>Jim Mattson</name>
<email>jmattson@google.com</email>
</author>
<published>2016-07-08T22:36:06Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=2aa2e066287e796f1ead8476a0b1306b10777f8f'/>
<id>urn:sha1:2aa2e066287e796f1ead8476a0b1306b10777f8f</id>
<content type='text'>
[ Upstream commit 2f1fe81123f59271bddda673b60116bde9660385 ]

When freeing the nested resources of a vcpu, there is an assumption that
the vcpu's vmcs01 is the current VMCS on the CPU that executes
nested_release_vmcs12(). If this assumption is violated, the vcpu's
vmcs01 may be made active on multiple CPUs at the same time, in
violation of Intel's specification. Moreover, since the vcpu's vmcs01 is
not VMCLEARed on every CPU on which it is active, it can linger in a
CPU's VMCS cache after it has been freed and potentially
repurposed. Subsequent eviction from the CPU's VMCS cache on a capacity
miss can result in memory corruption.

It is not sufficient for vmx_free_vcpu() to call vmx_load_vmcs01(). If
the vcpu in question was last loaded on a different CPU, it must be
migrated to the current CPU before calling vmx_load_vmcs01().

Signed-off-by: Jim Mattson &lt;jmattson@google.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@verizon.com&gt;
</content>
</entry>
<entry>
<title>kvm: Fix irq route entries exceeding KVM_MAX_IRQ_ROUTES</title>
<updated>2016-07-12T12:46:53Z</updated>
<author>
<name>Xiubo Li</name>
<email>lixiubo@cmss.chinamobile.com</email>
</author>
<published>2016-06-15T10:00:33Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=4929b4934f7bf919a97bd8826c929f74915c8e9a'/>
<id>urn:sha1:4929b4934f7bf919a97bd8826c929f74915c8e9a</id>
<content type='text'>
[ Upstream commit caf1ff26e1aa178133df68ac3d40815fed2187d9 ]

These days, we experienced one guest crash with 8 cores and 3 disks,
with qemu error logs as bellow:

qemu-system-x86_64: /build/qemu-2.0.0/kvm-all.c:984:
kvm_irqchip_commit_routes: Assertion `ret == 0' failed.

And then we found one patch(bdf026317d) in qemu tree, which said
could fix this bug.

Execute the following script will reproduce the BUG quickly:

irq_affinity.sh
========================================================================

vda_irq_num=25
vdb_irq_num=27
while [ 1 ]
do
    for irq in {1,2,4,8,10,20,40,80}
        do
            echo $irq &gt; /proc/irq/$vda_irq_num/smp_affinity
            echo $irq &gt; /proc/irq/$vdb_irq_num/smp_affinity
            dd if=/dev/vda of=/dev/zero bs=4K count=100 iflag=direct
            dd if=/dev/vdb of=/dev/zero bs=4K count=100 iflag=direct
        done
done
========================================================================

The following qemu log is added in the qemu code and is displayed when
this bug reproduced:

kvm_irqchip_commit_routes: max gsi: 1008, nr_allocated_irq_routes: 1024,
irq_routes-&gt;nr: 1024, gsi_count: 1024.

That's to say when irq_routes-&gt;nr == 1024, there are 1024 routing entries,
but in the kernel code when routes-&gt;nr &gt;= 1024, will just return -EINVAL;

The nr is the number of the routing entries which is in of
[1 ~ KVM_MAX_IRQ_ROUTES], not the index in [0 ~ KVM_MAX_IRQ_ROUTES - 1].

This patch fix the BUG above.

Cc: stable@vger.kernel.org
Signed-off-by: Xiubo Li &lt;lixiubo@cmss.chinamobile.com&gt;
Signed-off-by: Wei Tang &lt;tangwei@cmss.chinamobile.com&gt;
Signed-off-by: Zhang Zhuoyu &lt;zhangzhuoyu@cmss.chinamobile.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
</content>
</entry>
<entry>
<title>KVM: irqfd: fix NULL pointer dereference in kvm_irq_map_gsi</title>
<updated>2016-06-20T03:47:42Z</updated>
<author>
<name>Paolo Bonzini</name>
<email>pbonzini@redhat.com</email>
</author>
<published>2016-06-01T12:09:21Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=9a579331430c2cebb99488f664a736654988532d'/>
<id>urn:sha1:9a579331430c2cebb99488f664a736654988532d</id>
<content type='text'>
[ Upstream commit c622a3c21ede892e370b56e1ceb9eb28f8bbda6b ]

Found by syzkaller:

    BUG: unable to handle kernel NULL pointer dereference at 0000000000000120
    IP: [&lt;ffffffffa0797202&gt;] kvm_irq_map_gsi+0x12/0x90 [kvm]
    PGD 6f80b067 PUD b6535067 PMD 0
    Oops: 0000 [#1] SMP
    CPU: 3 PID: 4988 Comm: a.out Not tainted 4.4.9-300.fc23.x86_64 #1
    [...]
    Call Trace:
     [&lt;ffffffffa0795f62&gt;] irqfd_update+0x32/0xc0 [kvm]
     [&lt;ffffffffa0796c7c&gt;] kvm_irqfd+0x3dc/0x5b0 [kvm]
     [&lt;ffffffffa07943f4&gt;] kvm_vm_ioctl+0x164/0x6f0 [kvm]
     [&lt;ffffffff81241648&gt;] do_vfs_ioctl+0x298/0x480
     [&lt;ffffffff812418a9&gt;] SyS_ioctl+0x79/0x90
     [&lt;ffffffff817a1062&gt;] tracesys_phase2+0x84/0x89
    Code: b5 71 a7 e0 5b 41 5c 41 5d 5d f3 c3 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 55 48 8b 8f 10 2e 00 00 31 c0 48 89 e5 &lt;39&gt; 91 20 01 00 00 76 6a 48 63 d2 48 8b 94 d1 28 01 00 00 48 85
    RIP  [&lt;ffffffffa0797202&gt;] kvm_irq_map_gsi+0x12/0x90 [kvm]
     RSP &lt;ffff8800926cbca8&gt;
    CR2: 0000000000000120

Testcase:

    #include &lt;unistd.h&gt;
    #include &lt;sys/syscall.h&gt;
    #include &lt;string.h&gt;
    #include &lt;stdint.h&gt;
    #include &lt;linux/kvm.h&gt;
    #include &lt;fcntl.h&gt;
    #include &lt;sys/ioctl.h&gt;

    long r[26];

    int main()
    {
        memset(r, -1, sizeof(r));
        r[2] = open("/dev/kvm", 0);
        r[3] = ioctl(r[2], KVM_CREATE_VM, 0);

        struct kvm_irqfd ifd;
        ifd.fd = syscall(SYS_eventfd2, 5, 0);
        ifd.gsi = 3;
        ifd.flags = 2;
        ifd.resamplefd = ifd.fd;
        r[25] = ioctl(r[3], KVM_IRQFD, &amp;ifd);
        return 0;
    }

Reported-by: Dmitry Vyukov &lt;dvyukov@google.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Signed-off-by: Radim Krčmář &lt;rkrcmar@redhat.com&gt;
Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
</content>
</entry>
<entry>
<title>KVM: fix spin_lock_init order on x86</title>
<updated>2016-04-18T12:49:38Z</updated>
<author>
<name>Paolo Bonzini</name>
<email>pbonzini@redhat.com</email>
</author>
<published>2016-03-21T09:15:25Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=241a9a816bc95d7bbc7c422c60e880491a59ac1b'/>
<id>urn:sha1:241a9a816bc95d7bbc7c422c60e880491a59ac1b</id>
<content type='text'>
[ Upstream commit e9ad4ec8379ad1ba6f68b8ca1c26b50b5ae0a327 ]

Moving the initialization earlier is needed in 4.6 because
kvm_arch_init_vm is now using mmu_lock, causing lockdep to
complain:

[  284.440294] INFO: trying to register non-static key.
[  284.445259] the code is fine but needs lockdep annotation.
[  284.450736] turning off the locking correctness validator.
...
[  284.528318]  [&lt;ffffffff810aecc3&gt;] lock_acquire+0xd3/0x240
[  284.533733]  [&lt;ffffffffa0305aa0&gt;] ? kvm_page_track_register_notifier+0x20/0x60 [kvm]
[  284.541467]  [&lt;ffffffff81715581&gt;] _raw_spin_lock+0x41/0x80
[  284.546960]  [&lt;ffffffffa0305aa0&gt;] ? kvm_page_track_register_notifier+0x20/0x60 [kvm]
[  284.554707]  [&lt;ffffffffa0305aa0&gt;] kvm_page_track_register_notifier+0x20/0x60 [kvm]
[  284.562281]  [&lt;ffffffffa02ece70&gt;] kvm_mmu_init_vm+0x20/0x30 [kvm]
[  284.568381]  [&lt;ffffffffa02dbf7a&gt;] kvm_arch_init_vm+0x1ea/0x200 [kvm]
[  284.574740]  [&lt;ffffffffa02bff3f&gt;] kvm_dev_ioctl+0xbf/0x4d0 [kvm]

However, it also helps fixing a preexisting problem, which is why this
patch is also good for stable kernels: kvm_create_vm was incrementing
current-&gt;mm-&gt;mm_count but not decrementing it at the out_err label (in
case kvm_init_mmu_notifier failed).  The new initialization order makes
it possible to add the required mmdrop without adding a new error label.

Cc: stable@vger.kernel.org
Reported-by: Borislav Petkov &lt;bp@alien8.de&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
</content>
</entry>
<entry>
<title>KVM: async_pf: do not warn on page allocation failures</title>
<updated>2016-03-10T14:43:52Z</updated>
<author>
<name>Christian Borntraeger</name>
<email>borntraeger@de.ibm.com</email>
</author>
<published>2016-02-19T12:11:46Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=e0b898dc779c02cba10eae3c8e6a99cadf0492a9'/>
<id>urn:sha1:e0b898dc779c02cba10eae3c8e6a99cadf0492a9</id>
<content type='text'>
[ Upstream commit d7444794a02ff655eda87e3cc54e86b940e7736f ]

In async_pf we try to allocate with NOWAIT to get an element quickly
or fail. This code also handle failures gracefully. Lets silence
potential page allocation failures under load.

qemu-system-s39: page allocation failure: order:0,mode:0x2200000
[...]
Call Trace:
([&lt;00000000001146b8&gt;] show_trace+0xf8/0x148)
[&lt;000000000011476a&gt;] show_stack+0x62/0xe8
[&lt;00000000004a36b8&gt;] dump_stack+0x70/0x98
[&lt;0000000000272c3a&gt;] warn_alloc_failed+0xd2/0x148
[&lt;000000000027709e&gt;] __alloc_pages_nodemask+0x94e/0xb38
[&lt;00000000002cd36a&gt;] new_slab+0x382/0x400
[&lt;00000000002cf7ac&gt;] ___slab_alloc.constprop.30+0x2dc/0x378
[&lt;00000000002d03d0&gt;] kmem_cache_alloc+0x160/0x1d0
[&lt;0000000000133db4&gt;] kvm_setup_async_pf+0x6c/0x198
[&lt;000000000013dee8&gt;] kvm_arch_vcpu_ioctl_run+0xd48/0xd58
[&lt;000000000012fcaa&gt;] kvm_vcpu_ioctl+0x372/0x690
[&lt;00000000002f66f6&gt;] do_vfs_ioctl+0x3be/0x510
[&lt;00000000002f68ec&gt;] SyS_ioctl+0xa4/0xb8
[&lt;0000000000781c5e&gt;] system_call+0xd6/0x264
[&lt;000003ffa24fa06a&gt;] 0x3ffa24fa06a

Cc: stable@vger.kernel.org
Signed-off-by: Christian Borntraeger &lt;borntraeger@de.ibm.com&gt;
Reviewed-by: Dominik Dingel &lt;dingel@linux.vnet.ibm.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
</content>
</entry>
<entry>
<title>KVM: arm/arm64: vgic: Ensure bitmaps are long enough</title>
<updated>2016-03-08T06:14:11Z</updated>
<author>
<name>Mark Rutland</name>
<email>mark.rutland@arm.com</email>
</author>
<published>2016-02-16T14:47:31Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=e720b3ba019456800fe329bea4eb9f7b1cbdab73'/>
<id>urn:sha1:e720b3ba019456800fe329bea4eb9f7b1cbdab73</id>
<content type='text'>
[ Upstream commit 236cf17c2502007a9d2dda3c39fb0d9a6bd03cc2 ]

When we allocate bitmaps in vgic_vcpu_init_maps, we divide the number of
bits we need by 8 to figure out how many bytes to allocate. However,
bitmap elements are always accessed as unsigned longs, and if we didn't
happen to allocate a size such that size % sizeof(unsigned long) == 0,
bitmap accesses may go past the end of the allocation.

When using KASAN (which does byte-granular access checks), this results
in a continuous stream of BUGs whenever these bitmaps are accessed:

=============================================================================
BUG kmalloc-128 (Tainted: G    B          ): kasan: bad access detected
-----------------------------------------------------------------------------

INFO: Allocated in vgic_init.part.25+0x55c/0x990 age=7493 cpu=3 pid=1730
INFO: Slab 0xffffffbde6d5da40 objects=16 used=15 fp=0xffffffc935769700 flags=0x4000000000000080
INFO: Object 0xffffffc935769500 @offset=1280 fp=0x          (null)

Bytes b4 ffffffc9357694f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
Object ffffffc935769500: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
Object ffffffc935769510: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
Object ffffffc935769520: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
Object ffffffc935769530: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
Object ffffffc935769540: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
Object ffffffc935769550: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
Object ffffffc935769560: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
Object ffffffc935769570: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
Padding ffffffc9357695b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
Padding ffffffc9357695c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
Padding ffffffc9357695d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
Padding ffffffc9357695e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
Padding ffffffc9357695f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
CPU: 3 PID: 1740 Comm: kvm-vcpu-0 Tainted: G    B           4.4.0+ #17
Hardware name: ARM Juno development board (r1) (DT)
Call trace:
[&lt;ffffffc00008e770&gt;] dump_backtrace+0x0/0x280
[&lt;ffffffc00008ea04&gt;] show_stack+0x14/0x20
[&lt;ffffffc000726360&gt;] dump_stack+0x100/0x188
[&lt;ffffffc00030d324&gt;] print_trailer+0xfc/0x168
[&lt;ffffffc000312294&gt;] object_err+0x3c/0x50
[&lt;ffffffc0003140fc&gt;] kasan_report_error+0x244/0x558
[&lt;ffffffc000314548&gt;] __asan_report_load8_noabort+0x48/0x50
[&lt;ffffffc000745688&gt;] __bitmap_or+0xc0/0xc8
[&lt;ffffffc0000d9e44&gt;] kvm_vgic_flush_hwstate+0x1bc/0x650
[&lt;ffffffc0000c514c&gt;] kvm_arch_vcpu_ioctl_run+0x2ec/0xa60
[&lt;ffffffc0000b9a6c&gt;] kvm_vcpu_ioctl+0x474/0xa68
[&lt;ffffffc00036b7b0&gt;] do_vfs_ioctl+0x5b8/0xcb0
[&lt;ffffffc00036bf34&gt;] SyS_ioctl+0x8c/0xa0
[&lt;ffffffc000086cb0&gt;] el0_svc_naked+0x24/0x28
Memory state around the buggy address:
 ffffffc935769400: 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffffffc935769480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
&gt;ffffffc935769500: 04 fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
                   ^
 ffffffc935769580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffffffc935769600: 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================

Fix the issue by always allocating a multiple of sizeof(unsigned long),
as we do elsewhere in the vgic code.

Fixes: c1bfb577a ("arm/arm64: KVM: vgic: switch to dynamic allocation")
Cc: stable@vger.kernel.org
Acked-by: Marc Zyngier &lt;marc.zyngier@arm.com&gt;
Acked-by: Christoffer Dall &lt;christoffer.dall@linaro.org&gt;
Signed-off-by: Mark Rutland &lt;mark.rutland@arm.com&gt;
Signed-off-by: Marc Zyngier &lt;marc.zyngier@arm.com&gt;
Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
</content>
</entry>
<entry>
<title>kvm: fix double free for fast mmio eventfd</title>
<updated>2015-10-28T02:12:51Z</updated>
<author>
<name>Jason Wang</name>
<email>jasowang@redhat.com</email>
</author>
<published>2015-09-15T06:41:56Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=0b5ee81826c2d98d40366c4fa435ebf73cfec8fd'/>
<id>urn:sha1:0b5ee81826c2d98d40366c4fa435ebf73cfec8fd</id>
<content type='text'>
[ Upstream commit eefd6b06b17c5478e7c24bea6f64beaa2c431ca6 ]

We register wildcard mmio eventfd on two buses, once for KVM_MMIO_BUS
and once on KVM_FAST_MMIO_BUS but with a single iodev
instance. This will lead to an issue: kvm_io_bus_destroy() knows
nothing about the devices on two buses pointing to a single dev. Which
will lead to double free[1] during exit. Fix this by allocating two
instances of iodevs then registering one on KVM_MMIO_BUS and another
on KVM_FAST_MMIO_BUS.

CPU: 1 PID: 2894 Comm: qemu-system-x86 Not tainted 3.19.0-26-generic #28-Ubuntu
Hardware name: LENOVO 2356BG6/2356BG6, BIOS G7ET96WW (2.56 ) 09/12/2013
task: ffff88009ae0c4b0 ti: ffff88020e7f0000 task.ti: ffff88020e7f0000
RIP: 0010:[&lt;ffffffffc07e25d8&gt;]  [&lt;ffffffffc07e25d8&gt;] ioeventfd_release+0x28/0x60 [kvm]
RSP: 0018:ffff88020e7f3bc8  EFLAGS: 00010292
RAX: dead000000200200 RBX: ffff8801ec19c900 RCX: 000000018200016d
RDX: ffff8801ec19cf80 RSI: ffffea0008bf1d40 RDI: ffff8801ec19c900
RBP: ffff88020e7f3bd8 R08: 000000002fc75a01 R09: 000000018200016d
R10: ffffffffc07df6ae R11: ffff88022fc75a98 R12: ffff88021e7cc000
R13: ffff88021e7cca48 R14: ffff88021e7cca50 R15: ffff8801ec19c880
FS:  00007fc1ee3e6700(0000) GS:ffff88023e240000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f8f389d8000 CR3: 000000023dc13000 CR4: 00000000001427e0
Stack:
ffff88021e7cc000 0000000000000000 ffff88020e7f3be8 ffffffffc07e2622
ffff88020e7f3c38 ffffffffc07df69a ffff880232524160 ffff88020e792d80
 0000000000000000 ffff880219b78c00 0000000000000008 ffff8802321686a8
Call Trace:
[&lt;ffffffffc07e2622&gt;] ioeventfd_destructor+0x12/0x20 [kvm]
[&lt;ffffffffc07df69a&gt;] kvm_put_kvm+0xca/0x210 [kvm]
[&lt;ffffffffc07df818&gt;] kvm_vcpu_release+0x18/0x20 [kvm]
[&lt;ffffffff811f69f7&gt;] __fput+0xe7/0x250
[&lt;ffffffff811f6bae&gt;] ____fput+0xe/0x10
[&lt;ffffffff81093f04&gt;] task_work_run+0xd4/0xf0
[&lt;ffffffff81079358&gt;] do_exit+0x368/0xa50
[&lt;ffffffff81082c8f&gt;] ? recalc_sigpending+0x1f/0x60
[&lt;ffffffff81079ad5&gt;] do_group_exit+0x45/0xb0
[&lt;ffffffff81085c71&gt;] get_signal+0x291/0x750
[&lt;ffffffff810144d8&gt;] do_signal+0x28/0xab0
[&lt;ffffffff810f3a3b&gt;] ? do_futex+0xdb/0x5d0
[&lt;ffffffff810b7028&gt;] ? __wake_up_locked_key+0x18/0x20
[&lt;ffffffff810f3fa6&gt;] ? SyS_futex+0x76/0x170
[&lt;ffffffff81014fc9&gt;] do_notify_resume+0x69/0xb0
[&lt;ffffffff817cb9af&gt;] int_signal+0x12/0x17
Code: 5d c3 90 0f 1f 44 00 00 55 48 89 e5 53 48 89 fb 48 83 ec 08 48 8b 7f 20 e8 06 d6 a5 c0 48 8b 43 08 48 8b 13 48 89 df 48 89 42 08 &lt;48&gt; 89 10 48 b8 00 01 10 00 00
 RIP  [&lt;ffffffffc07e25d8&gt;] ioeventfd_release+0x28/0x60 [kvm]
 RSP &lt;ffff88020e7f3bc8&gt;

Cc: stable@vger.kernel.org
Cc: Gleb Natapov &lt;gleb@kernel.org&gt;
Cc: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Signed-off-by: Jason Wang &lt;jasowang@redhat.com&gt;
Reviewed-by: Cornelia Huck &lt;cornelia.huck@de.ibm.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
</content>
</entry>
<entry>
<title>kvm: factor out core eventfd assign/deassign logic</title>
<updated>2015-10-28T02:12:50Z</updated>
<author>
<name>Jason Wang</name>
<email>jasowang@redhat.com</email>
</author>
<published>2015-09-15T06:41:55Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=7642b3f109228718f1bf57c35210c9a36696a465'/>
<id>urn:sha1:7642b3f109228718f1bf57c35210c9a36696a465</id>
<content type='text'>
[ Upstream commit 85da11ca587c8eb73993a1b503052391a73586f9 ]

This patch factors out core eventfd assign/deassign logic and leaves
the argument checking and bus index selection to callers.

Cc: stable@vger.kernel.org
Cc: Gleb Natapov &lt;gleb@kernel.org&gt;
Cc: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Signed-off-by: Jason Wang &lt;jasowang@redhat.com&gt;
Reviewed-by: Cornelia Huck &lt;cornelia.huck@de.ibm.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
</content>
</entry>
<entry>
<title>kvm: fix zero length mmio searching</title>
<updated>2015-10-28T02:12:49Z</updated>
<author>
<name>Jason Wang</name>
<email>jasowang@redhat.com</email>
</author>
<published>2015-09-15T06:41:57Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=7d765ce07eff78ab78d09d4acaa3aecb71e322a4'/>
<id>urn:sha1:7d765ce07eff78ab78d09d4acaa3aecb71e322a4</id>
<content type='text'>
[ Upstream commit 8f4216c7d28976f7ec1b2bcbfa0a9f787133c45e ]

Currently, if we had a zero length mmio eventfd assigned on
KVM_MMIO_BUS. It will never be found by kvm_io_bus_cmp() since it
always compares the kvm_io_range() with the length that guest
wrote. This will cause e.g for vhost, kick will be trapped by qemu
userspace instead of vhost. Fixing this by using zero length if an
iodevice is zero length.

Cc: stable@vger.kernel.org
Cc: Gleb Natapov &lt;gleb@kernel.org&gt;
Cc: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Signed-off-by: Jason Wang &lt;jasowang@redhat.com&gt;
Reviewed-by: Cornelia Huck &lt;cornelia.huck@de.ibm.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
</content>
</entry>
<entry>
<title>kvm: don't try to register to KVM_FAST_MMIO_BUS for non mmio eventfd</title>
<updated>2015-10-28T02:12:48Z</updated>
<author>
<name>Jason Wang</name>
<email>jasowang@redhat.com</email>
</author>
<published>2015-09-15T06:41:54Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=d758df24a58e5160270c74b467dfa6453fceb91b'/>
<id>urn:sha1:d758df24a58e5160270c74b467dfa6453fceb91b</id>
<content type='text'>
[ Upstream commit 8453fecbecae26edb3f278627376caab05d9a88d ]

We only want zero length mmio eventfd to be registered on
KVM_FAST_MMIO_BUS. So check this explicitly when arg-&gt;len is zero to
make sure this.

Cc: stable@vger.kernel.org
Cc: Gleb Natapov &lt;gleb@kernel.org&gt;
Cc: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Signed-off-by: Jason Wang &lt;jasowang@redhat.com&gt;
Reviewed-by: Cornelia Huck &lt;cornelia.huck@de.ibm.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
</content>
</entry>
</feed>
