<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/virt, branch linux-4.2.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-4.2.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-4.2.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2015-11-09T22:37:39Z</updated>
<entry>
<title>kvm: irqchip: fix memory leak</title>
<updated>2015-11-09T22:37:39Z</updated>
<author>
<name>Sudip Mukherjee</name>
<email>sudipm.mukherjee@gmail.com</email>
</author>
<published>2015-09-02T07:03:53Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=1ce8b6bd3f9f77c49908e9391ebc72114a65fc97'/>
<id>urn:sha1:1ce8b6bd3f9f77c49908e9391ebc72114a65fc97</id>
<content type='text'>
commit ba60c41ae392b473a1897faa0b8739fcb8759d69 upstream.

We were taking the exit path after checking ue-&gt;flags and return value
of setup_routing_entry(), but 'e' was not freed incase of a failure.

Signed-off-by: Sudip Mukherjee &lt;sudip@vectorindia.org&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Cc: William Dauchy &lt;william@gandi.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>kvm: fix double free for fast mmio eventfd</title>
<updated>2015-10-22T21:49:13Z</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://universe.0xinfinity.dev/distro/kernel/commit/?id=2ab32d6d34b15a6e058507ec387b3435774258ed'/>
<id>urn:sha1:2ab32d6d34b15a6e058507ec387b3435774258ed</id>
<content type='text'>
commit eefd6b06b17c5478e7c24bea6f64beaa2c431ca6 upstream.

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: 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: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>kvm: factor out core eventfd assign/deassign logic</title>
<updated>2015-10-22T21:49:13Z</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://universe.0xinfinity.dev/distro/kernel/commit/?id=141bdd6ab3f68dee0941979765a698e6a9971111'/>
<id>urn:sha1:141bdd6ab3f68dee0941979765a698e6a9971111</id>
<content type='text'>
commit 85da11ca587c8eb73993a1b503052391a73586f9 upstream.

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

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: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>kvm: fix zero length mmio searching</title>
<updated>2015-10-22T21:49:12Z</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://universe.0xinfinity.dev/distro/kernel/commit/?id=9efaf0e7a4c97320044a4fa43b411e269bb2a78f'/>
<id>urn:sha1:9efaf0e7a4c97320044a4fa43b411e269bb2a78f</id>
<content type='text'>
commit 8f4216c7d28976f7ec1b2bcbfa0a9f787133c45e upstream.

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: 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: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>kvm: don't try to register to KVM_FAST_MMIO_BUS for non mmio eventfd</title>
<updated>2015-10-22T21:49:12Z</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://universe.0xinfinity.dev/distro/kernel/commit/?id=0986ae9a1160edb74b0b75f591296f508e44f8e0'/>
<id>urn:sha1:0986ae9a1160edb74b0b75f591296f508e44f8e0</id>
<content type='text'>
commit 8453fecbecae26edb3f278627376caab05d9a88d upstream.

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: 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: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>KVM: count number of assigned devices</title>
<updated>2015-07-10T11:25:26Z</updated>
<author>
<name>Paolo Bonzini</name>
<email>pbonzini@redhat.com</email>
</author>
<published>2015-07-07T13:41:58Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=5544eb9b81940647b8fad1f251b37cbe2819ce44'/>
<id>urn:sha1:5544eb9b81940647b8fad1f251b37cbe2819ce44</id>
<content type='text'>
If there are no assigned devices, the guest PAT are not providing
any useful information and can be overridden to writeback; VMX
always does this because it has the "IPAT" bit in its extended
page table entries, but SVM does not have anything similar.
Hook into VFIO and legacy device assignment so that they
provide this information to KVM.

Reviewed-by: Alex Williamson &lt;alex.williamson@redhat.com&gt;
Tested-by: Joerg Roedel &lt;jroedel@suse.de&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>sched, preempt_notifier: separate notifier registration from static_key inc/dec</title>
<updated>2015-07-03T16:55:00Z</updated>
<author>
<name>Peter Zijlstra</name>
<email>peterz@infradead.org</email>
</author>
<published>2015-07-03T16:53:58Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=2ecd9d29abb171d6e97a4f3eb29d7456a11401b7'/>
<id>urn:sha1:2ecd9d29abb171d6e97a4f3eb29d7456a11401b7</id>
<content type='text'>
Commit 1cde2930e154 ("sched/preempt: Add static_key() to preempt_notifiers")
had two problems.  First, the preempt-notifier API needs to sleep with the
addition of the static_key, we do however need to hold off preemption
while modifying the preempt notifier list, otherwise a preemption could
observe an inconsistent list state.  KVM correctly registers and
unregisters preempt notifiers with preemption disabled, so the sleep
caused dmesg splats.

Second, KVM registers and unregisters preemption notifiers very often
(in vcpu_load/vcpu_put).  With a single uniprocessor guest the static key
would move between 0 and 1 continuously, hitting the slow path on every
userspace exit.

To fix this, wrap the static_key inc/dec in a new API, and call it from
KVM.

Fixes: 1cde2930e154 ("sched/preempt: Add static_key() to preempt_notifiers")
Reported-by: Pontus Fuchs &lt;pontus.fuchs@gmail.com&gt;
Reported-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Tested-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux</title>
<updated>2015-06-24T17:02:15Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2015-06-24T17:02:15Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=e3d8238d7f5c3f539a29f5ac596cd342d847e099'/>
<id>urn:sha1:e3d8238d7f5c3f539a29f5ac596cd342d847e099</id>
<content type='text'>
Pull arm64 updates from Catalin Marinas:
 "Mostly refactoring/clean-up:

   - CPU ops and PSCI (Power State Coordination Interface) refactoring
     following the merging of the arm64 ACPI support, together with
     handling of Trusted (secure) OS instances

   - Using fixmap for permanent FDT mapping, removing the initial dtb
     placement requirements (within 512MB from the start of the kernel
     image).  This required moving the FDT self reservation out of the
     memreserve processing

   - Idmap (1:1 mapping used for MMU on/off) handling clean-up

   - Removing flush_cache_all() - not safe on ARM unless the MMU is off.
     Last stages of CPU power down/up are handled by firmware already

   - "Alternatives" (run-time code patching) refactoring and support for
     immediate branch patching, GICv3 CPU interface access

   - User faults handling clean-up

  And some fixes:

   - Fix for VDSO building with broken ELF toolchains

   - Fix another case of init_mm.pgd usage for user mappings (during
     ASID roll-over broadcasting)

   - Fix for FPSIMD reloading after CPU hotplug

   - Fix for missing syscall trace exit

   - Workaround for .inst asm bug

   - Compat fix for switching the user tls tpidr_el0 register"

* tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: (42 commits)
  arm64: use private ratelimit state along with show_unhandled_signals
  arm64: show unhandled SP/PC alignment faults
  arm64: vdso: work-around broken ELF toolchains in Makefile
  arm64: kernel: rename __cpu_suspend to keep it aligned with arm
  arm64: compat: print compat_sp instead of sp
  arm64: mm: Fix freeing of the wrong memmap entries with !SPARSEMEM_VMEMMAP
  arm64: entry: fix context tracking for el0_sp_pc
  arm64: defconfig: enable memtest
  arm64: mm: remove reference to tlb.S from comment block
  arm64: Do not attempt to use init_mm in reset_context()
  arm64: KVM: Switch vgic save/restore to alternative_insn
  arm64: alternative: Introduce feature for GICv3 CPU interface
  arm64: psci: fix !CONFIG_HOTPLUG_CPU build warning
  arm64: fix bug for reloading FPSIMD state after CPU hotplug.
  arm64: kernel thread don't need to save fpsimd context.
  arm64: fix missing syscall trace exit
  arm64: alternative: Work around .inst assembler bugs
  arm64: alternative: Merge alternative-asm.h into alternative.h
  arm64: alternative: Allow immediate branch as alternative instruction
  arm64: Rework alternate sequence for ARM erratum 845719
  ...
</content>
</entry>
<entry>
<title>KVM: fix checkpatch.pl errors in kvm/coalesced_mmio.h</title>
<updated>2015-06-19T15:16:26Z</updated>
<author>
<name>Kevin Mulvey</name>
<email>kevin@kevinmulvey.net</email>
</author>
<published>2015-06-16T11:34:00Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=0b8ba4a2b65860ac1fcd5be6cfca5d3b27a5b170'/>
<id>urn:sha1:0b8ba4a2b65860ac1fcd5be6cfca5d3b27a5b170</id>
<content type='text'>
Tabs rather than spaces

Signed-off-by: Kevin Mulvey &lt;kmulvey@linux.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>KVM: fix checkpatch.pl errors in kvm/async_pf.h</title>
<updated>2015-06-19T15:16:25Z</updated>
<author>
<name>Kevin Mulvey</name>
<email>kevin@kevinmulvey.net</email>
</author>
<published>2015-06-16T11:33:59Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=d626f3d5b39e0fc8908fa044fa08cbbc4daeffce'/>
<id>urn:sha1:d626f3d5b39e0fc8908fa044fa08cbbc4daeffce</id>
<content type='text'>
fix brace spacing

Signed-off-by: Kevin Mulvey &lt;kmulvey@linux.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
</feed>
