<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/virt, branch v3.4.43</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/virt?h=v3.4.43</id>
<link rel='self' href='https://git.amat.us/linux/atom/virt?h=v3.4.43'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2013-04-26T04:19:55Z</updated>
<entry>
<title>KVM: Allow cross page reads and writes from cached translations.</title>
<updated>2013-04-26T04:19:55Z</updated>
<author>
<name>Andrew Honig</name>
<email>ahonig@google.com</email>
</author>
<published>2013-03-29T16:35:21Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=2a6b0247eee46f424e032fb7431cc4700ad19ea5'/>
<id>urn:sha1:2a6b0247eee46f424e032fb7431cc4700ad19ea5</id>
<content type='text'>
commit 8f964525a121f2ff2df948dac908dcc65be21b5b upstream.

This patch adds support for kvm_gfn_to_hva_cache_init functions for
reads and writes that will cross a page.  If the range falls within
the same memslot, then this will be a fast operation.  If the range
is split between two memslots, then the slower kvm_read_guest and
kvm_write_guest are used.

Tested: Test against kvm_clock unit tests.

Signed-off-by: Andrew Honig &lt;ahonig@google.com&gt;
Signed-off-by: Gleb Natapov &lt;gleb@redhat.com&gt;
Cc: Ben Hutchings &lt;ben@decadent.org.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>KVM: Fix bounds checking in ioapic indirect register reads (CVE-2013-1798)</title>
<updated>2013-04-26T04:19:55Z</updated>
<author>
<name>Andy Honig</name>
<email>ahonig@google.com</email>
</author>
<published>2013-02-20T22:49:16Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f56d137aa68f8edadac247aa48b335f2776954ff'/>
<id>urn:sha1:f56d137aa68f8edadac247aa48b335f2776954ff</id>
<content type='text'>
commit a2c118bfab8bc6b8bb213abfc35201e441693d55 upstream.

If the guest specifies a IOAPIC_REG_SELECT with an invalid value and follows
that with a read of the IOAPIC_REG_WINDOW KVM does not properly validate
that request.  ioapic_read_indirect contains an
ASSERT(redir_index &lt; IOAPIC_NUM_PINS), but the ASSERT has no effect in
non-debug builds.  In recent kernels this allows a guest to cause a kernel
oops by reading invalid memory.  In older kernels (pre-3.3) this allows a
guest to read from large ranges of host memory.

Tested: tested against apic unit tests.

Signed-off-by: Andrew Honig &lt;ahonig@google.com&gt;
Signed-off-by: Marcelo Tosatti &lt;mtosatti@redhat.com&gt;
Cc: Ben Hutchings &lt;ben@decadent.org.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>KVM: Fix user memslot overlap check</title>
<updated>2013-01-17T16:50:42Z</updated>
<author>
<name>Alex Williamson</name>
<email>alex.williamson@redhat.com</email>
</author>
<published>2012-11-29T21:07:59Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=9d4c74b86237ac64376b92c54cf7b471e7e75f76'/>
<id>urn:sha1:9d4c74b86237ac64376b92c54cf7b471e7e75f76</id>
<content type='text'>
commit 5419369ed6bd4cf711fdda5e52a5999b940413f5 upstream.

Prior to memory slot sorting this loop compared all of the user memory
slots for overlap with new entries.  With memory slot sorting, we're
just checking some number of entries in the array that may or may not
be user slots.  Instead, walk all the slots with kvm_for_each_memslot,
which has the added benefit of terminating early when we hit the first
empty slot, and skip comparison to private slots.

Signed-off-by: Alex Williamson &lt;alex.williamson@redhat.com&gt;
Signed-off-by: Marcelo Tosatti &lt;mtosatti@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>KVM: lock slots_lock around device assignment</title>
<updated>2012-04-19T03:04:18Z</updated>
<author>
<name>Alex Williamson</name>
<email>alex.williamson@redhat.com</email>
</author>
<published>2012-04-18T03:46:44Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=21a1416a1c945c5aeaeaf791b63c64926018eb77'/>
<id>urn:sha1:21a1416a1c945c5aeaeaf791b63c64926018eb77</id>
<content type='text'>
As pointed out by Jason Baron, when assigning a device to a guest
we first set the iommu domain pointer, which enables mapping
and unmapping of memory slots to the iommu.  This leaves a window
where this path is enabled, but we haven't synchronized the iommu
mappings to the existing memory slots.  Thus a slot being removed
at that point could send us down unexpected code paths removing
non-existent pinnings and iommu mappings.  Take the slots_lock
around creating the iommu domain and initial mappings as well as
around iommu teardown to avoid this race.

Signed-off-by: Alex Williamson &lt;alex.williamson@redhat.com&gt;
Signed-off-by: Marcelo Tosatti &lt;mtosatti@redhat.com&gt;
</content>
</entry>
<entry>
<title>KVM: unmap pages from the iommu when slots are removed</title>
<updated>2012-04-12T01:55:25Z</updated>
<author>
<name>Alex Williamson</name>
<email>alex.williamson@redhat.com</email>
</author>
<published>2012-04-11T15:51:49Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=32f6daad4651a748a58a3ab6da0611862175722f'/>
<id>urn:sha1:32f6daad4651a748a58a3ab6da0611862175722f</id>
<content type='text'>
We've been adding new mappings, but not destroying old mappings.
This can lead to a page leak as pages are pinned using
get_user_pages, but only unpinned with put_page if they still
exist in the memslots list on vm shutdown.  A memslot that is
destroyed while an iommu domain is enabled for the guest will
therefore result in an elevated page reference count that is
never cleared.

Additionally, without this fix, the iommu is only programmed
with the first translation for a gpa.  This can result in
peer-to-peer errors if a mapping is destroyed and replaced by a
new mapping at the same gpa as the iommu will still be pointing
to the original, pinned memory address.

Signed-off-by: Alex Williamson &lt;alex.williamson@redhat.com&gt;
Signed-off-by: Marcelo Tosatti &lt;mtosatti@redhat.com&gt;
</content>
</entry>
<entry>
<title>KVM: Convert intx_mask_lock to spin lock</title>
<updated>2012-03-20T10:41:24Z</updated>
<author>
<name>Jan Kiszka</name>
<email>jan.kiszka@siemens.com</email>
</author>
<published>2012-03-14T10:02:11Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=cf9eeac46350b8b43730b7dc5e999757bed089a4'/>
<id>urn:sha1:cf9eeac46350b8b43730b7dc5e999757bed089a4</id>
<content type='text'>
As kvm_notify_acked_irq calls kvm_assigned_dev_ack_irq under
rcu_read_lock, we cannot use a mutex in the latter function. Switch to a
spin lock to address this.

Signed-off-by: Jan Kiszka &lt;jan.kiszka@siemens.com&gt;
Signed-off-by: Marcelo Tosatti &lt;mtosatti@redhat.com&gt;
Signed-off-by: Avi Kivity &lt;avi@redhat.com&gt;

</content>
</entry>
<entry>
<title>KVM: use correct tlbs dirty type in cmpxchg</title>
<updated>2012-03-08T12:11:44Z</updated>
<author>
<name>Alex Shi</name>
<email>alex.shi@intel.com</email>
</author>
<published>2012-03-04T05:13:38Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=bec87d6e34de459a559fc326aa4e56bee4ba7423'/>
<id>urn:sha1:bec87d6e34de459a559fc326aa4e56bee4ba7423</id>
<content type='text'>
Using 'int' type is not suitable for a 'long' object. So, correct it.

Signed-off-by: Alex Shi &lt;alex.shi@intel.com&gt;
Signed-off-by: Avi Kivity &lt;avi@redhat.com&gt;
</content>
</entry>
<entry>
<title>KVM: Allow host IRQ sharing for assigned PCI 2.3 devices</title>
<updated>2012-03-08T12:11:36Z</updated>
<author>
<name>Jan Kiszka</name>
<email>jan.kiszka@siemens.com</email>
</author>
<published>2012-02-28T13:19:54Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=07700a94b00a4fcbbfb07d1b72dc112a0e036735'/>
<id>urn:sha1:07700a94b00a4fcbbfb07d1b72dc112a0e036735</id>
<content type='text'>
PCI 2.3 allows to generically disable IRQ sources at device level. This
enables us to share legacy IRQs of such devices with other host devices
when passing them to a guest.

The new IRQ sharing feature introduced here is optional, user space has
to request it explicitly. Moreover, user space can inform us about its
view of PCI_COMMAND_INTX_DISABLE so that we can avoid unmasking the
interrupt and signaling it if the guest masked it via the virtualized
PCI config space.

Signed-off-by: Jan Kiszka &lt;jan.kiszka@siemens.com&gt;
Acked-by: Alex Williamson &lt;alex.williamson@redhat.com&gt;
Acked-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Signed-off-by: Avi Kivity &lt;avi@redhat.com&gt;
</content>
</entry>
<entry>
<title>KVM: Ensure all vcpus are consistent with in-kernel irqchip settings</title>
<updated>2012-03-08T12:10:30Z</updated>
<author>
<name>Avi Kivity</name>
<email>avi@redhat.com</email>
</author>
<published>2012-03-05T12:23:29Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3e515705a1f46beb1c942bb8043c16f8ac7b1e9e'/>
<id>urn:sha1:3e515705a1f46beb1c942bb8043c16f8ac7b1e9e</id>
<content type='text'>
If some vcpus are created before KVM_CREATE_IRQCHIP, then
irqchip_in_kernel() and vcpu-&gt;arch.apic will be inconsistent, leading
to potential NULL pointer dereferences.

Fix by:
- ensuring that no vcpus are installed when KVM_CREATE_IRQCHIP is called
- ensuring that a vcpu has an apic if it is installed after KVM_CREATE_IRQCHIP

This is somewhat long winded because vcpu-&gt;arch.apic is created without
kvm-&gt;lock held.

Based on earlier patch by Michael Ellerman.

Signed-off-by: Michael Ellerman &lt;michael@ellerman.id.au&gt;
Signed-off-by: Avi Kivity &lt;avi@redhat.com&gt;
</content>
</entry>
<entry>
<title>KVM: mmu_notifier: Flush TLBs before releasing mmu_lock</title>
<updated>2012-03-08T12:10:23Z</updated>
<author>
<name>Takuya Yoshikawa</name>
<email>yoshikawa.takuya@oss.ntt.co.jp</email>
</author>
<published>2012-02-10T06:28:31Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=565f3be2174611f364405bbea2d86e153c2e7e78'/>
<id>urn:sha1:565f3be2174611f364405bbea2d86e153c2e7e78</id>
<content type='text'>
Other threads may process the same page in that small window and skip
TLB flush and then return before these functions do flush.

Signed-off-by: Takuya Yoshikawa &lt;yoshikawa.takuya@oss.ntt.co.jp&gt;
Signed-off-by: Marcelo Tosatti &lt;mtosatti@redhat.com&gt;
Signed-off-by: Avi Kivity &lt;avi@redhat.com&gt;

</content>
</entry>
</feed>
