<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/virt, branch v3.0.62</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/virt?h=v3.0.62</id>
<link rel='self' href='https://git.amat.us/linux/atom/virt?h=v3.0.62'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2012-05-07T15:56:35Z</updated>
<entry>
<title>KVM: unmap pages from the iommu when slots are removed</title>
<updated>2012-05-07T15:56:35Z</updated>
<author>
<name>Alex Williamson</name>
<email>alex.williamson@redhat.com</email>
</author>
<published>2012-04-27T21:54:08Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a674bcab9066a2b2541d8276f5e9ff86f50ce13e'/>
<id>urn:sha1:a674bcab9066a2b2541d8276f5e9ff86f50ce13e</id>
<content type='text'>
commit 32f6daad4651a748a58a3ab6da0611862175722f upstream.

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;
Signed-off-by: Jonathan Nieder &lt;jrnieder@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Merge branch 'kvm-updates/3.0' of git://git.kernel.org/pub/scm/virt/kvm/kvm</title>
<updated>2011-06-08T02:06:28Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2011-06-08T02:06:28Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=58a9a36b5444cbd921cdfc8ddd344d9983cc2c7b'/>
<id>urn:sha1:58a9a36b5444cbd921cdfc8ddd344d9983cc2c7b</id>
<content type='text'>
* 'kvm-updates/3.0' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
  KVM: Initialize kvm before registering the mmu notifier
  KVM: x86: use proper port value when checking io instruction permission
  KVM: add missing void __user * cast to access_ok() call
</content>
</entry>
<entry>
<title>KVM: Initialize kvm before registering the mmu notifier</title>
<updated>2011-06-06T08:27:52Z</updated>
<author>
<name>Mike Waychison</name>
<email>mikew@google.com</email>
</author>
<published>2011-06-03T20:04:53Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=74b5c5bfff429f464c38dd49af41d75cf0e7dc26'/>
<id>urn:sha1:74b5c5bfff429f464c38dd49af41d75cf0e7dc26</id>
<content type='text'>
It doesn't make sense to ever see a half-initialized kvm structure on
mmu notifier callbacks.  Previously, 85722cda changed the ordering to
ensure that the mmu_lock was initialized before mmu notifier
registration, but there is still a race where the mmu notifier could
come in and try accessing other portions of struct kvm before they are
intialized.

Solve this by moving the mmu notifier registration to occur after the
structure is completely initialized.

Google-Bug-Id: 452199
Signed-off-by: Mike Waychison &lt;mikew@google.com&gt;
Signed-off-by: Avi Kivity &lt;avi@redhat.com&gt;
</content>
</entry>
<entry>
<title>KVM: add missing void __user * cast to access_ok() call</title>
<updated>2011-05-26T06:41:44Z</updated>
<author>
<name>Heiko Carstens</name>
<email>heiko.carstens@de.ibm.com</email>
</author>
<published>2011-05-24T05:51:27Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=9e3bb6b6f6a0c535eb053fbf0005a8e79e053374'/>
<id>urn:sha1:9e3bb6b6f6a0c535eb053fbf0005a8e79e053374</id>
<content type='text'>
fa3d315a "KVM: Validate userspace_addr of memslot when registered" introduced
this new warning onn s390:

kvm_main.c: In function '__kvm_set_memory_region':
kvm_main.c:654:7: warning: passing argument 1 of '__access_ok' makes pointer from integer without a cast
arch/s390/include/asm/uaccess.h:53:19: note: expected 'const void *' but argument is of type '__u64'

Add the missing cast to get rid of it again...

Cc: Takuya Yoshikawa &lt;yoshikawa.takuya@oss.ntt.co.jp&gt;
Signed-off-by: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
Signed-off-by: Avi Kivity &lt;avi@redhat.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6</title>
<updated>2011-05-23T22:39:34Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2011-05-23T22:39:34Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5e152b4c9e0fce6149c74406346a7ae7e7a17727'/>
<id>urn:sha1:5e152b4c9e0fce6149c74406346a7ae7e7a17727</id>
<content type='text'>
* 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6: (27 commits)
  PCI: Don't use dmi_name_in_vendors in quirk
  PCI: remove unused AER functions
  PCI/sysfs: move bus cpuaffinity to class dev_attrs
  PCI: add rescan to /sys/.../pci_bus/.../
  PCI: update bridge resources to get more big ranges when allocating space (again)
  KVM: Use pci_store/load_saved_state() around VM device usage
  PCI: Add interfaces to store and load the device saved state
  PCI: Track the size of each saved capability data area
  PCI/e1000e: Add and use pci_disable_link_state_locked()
  x86/PCI: derive pcibios_last_bus from ACPI MCFG
  PCI: add latency tolerance reporting enable/disable support
  PCI: add OBFF enable/disable support
  PCI: add ID-based ordering enable/disable support
  PCI hotplug: acpiphp: assume device is in state D0 after powering on a slot.
  PCI: Set PCIE maxpayload for card during hotplug insertion
  PCI/ACPI: Report _OSC control mask returned on failure to get control
  x86/PCI: irq and pci_ids patch for Intel Panther Point DeviceIDs
  PCI: handle positive error codes
  PCI: check pci_vpd_pci22_wait() return
  PCI: Use ICH6_GPIO_EN in ich6_lpc_acpi_gpio
  ...

Fix up trivial conflicts in include/linux/pci_ids.h: commit a6e5e2be4461
moved the intel SMBUS ID definitons to the i2c-i801.c driver.
</content>
</entry>
<entry>
<title>KVM: Fix kvm mmu_notifier initialization order</title>
<updated>2011-05-22T12:48:12Z</updated>
<author>
<name>OGAWA Hirofumi</name>
<email>hirofumi@mail.parknet.co.jp</email>
</author>
<published>2011-05-11T00:28:28Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=85722cda308c0ad7390dc910139b2ce58c11b9c4'/>
<id>urn:sha1:85722cda308c0ad7390dc910139b2ce58c11b9c4</id>
<content type='text'>
Like the following, mmu_notifier can be called after registering
immediately. So, kvm have to initialize kvm-&gt;mmu_lock before it.

BUG: spinlock bad magic on CPU#0, kswapd0/342
 lock: ffff8800af8c4000, .magic: 00000000, .owner: &lt;none&gt;/-1, .owner_cpu: 0
Pid: 342, comm: kswapd0 Not tainted 2.6.39-rc5+ #1
Call Trace:
 [&lt;ffffffff8118ce61&gt;] spin_bug+0x9c/0xa3
 [&lt;ffffffff8118ce91&gt;] do_raw_spin_lock+0x29/0x13c
 [&lt;ffffffff81024923&gt;] ? flush_tlb_others_ipi+0xaf/0xfd
 [&lt;ffffffff812e22f3&gt;] _raw_spin_lock+0x9/0xb
 [&lt;ffffffffa0582325&gt;] kvm_mmu_notifier_clear_flush_young+0x2c/0x66 [kvm]
 [&lt;ffffffff810d3ff3&gt;] __mmu_notifier_clear_flush_young+0x2b/0x57
 [&lt;ffffffff810c8761&gt;] page_referenced_one+0x88/0xea
 [&lt;ffffffff810c89bf&gt;] page_referenced+0x1fc/0x256
 [&lt;ffffffff810b2771&gt;] shrink_page_list+0x187/0x53a
 [&lt;ffffffff810b2ed7&gt;] shrink_inactive_list+0x1e0/0x33d
 [&lt;ffffffff810acf95&gt;] ? determine_dirtyable_memory+0x15/0x27
 [&lt;ffffffff812e90ee&gt;] ? call_function_single_interrupt+0xe/0x20
 [&lt;ffffffff810b3356&gt;] shrink_zone+0x322/0x3de
 [&lt;ffffffff810a9587&gt;] ? zone_watermark_ok_safe+0xe2/0xf1
 [&lt;ffffffff810b3928&gt;] kswapd+0x516/0x818
 [&lt;ffffffff810b3412&gt;] ? shrink_zone+0x3de/0x3de
 [&lt;ffffffff81053d17&gt;] kthread+0x7d/0x85
 [&lt;ffffffff812e9394&gt;] kernel_thread_helper+0x4/0x10
 [&lt;ffffffff81053c9a&gt;] ? __init_kthread_worker+0x37/0x37
 [&lt;ffffffff812e9390&gt;] ? gs_change+0xb/0xb

Signed-off-by: OGAWA Hirofumi &lt;hirofumi@mail.parknet.co.jp&gt;
Signed-off-by: Avi Kivity &lt;avi@redhat.com&gt;
</content>
</entry>
<entry>
<title>KVM: Validate userspace_addr of memslot when registered</title>
<updated>2011-05-22T12:47:56Z</updated>
<author>
<name>Takuya Yoshikawa</name>
<email>yoshikawa.takuya@oss.ntt.co.jp</email>
</author>
<published>2011-05-07T07:35:38Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=fa3d315a4ce2c0891cdde262562e710d95fba19e'/>
<id>urn:sha1:fa3d315a4ce2c0891cdde262562e710d95fba19e</id>
<content type='text'>
This way, we can avoid checking the user space address many times when
we read the guest memory.

Although we can do the same for write if we check which slots are
writable, we do not care write now: reading the guest memory happens
more often than writing.

[avi: change VERIFY_READ to VERIFY_WRITE]

Signed-off-by: Takuya Yoshikawa &lt;yoshikawa.takuya@oss.ntt.co.jp&gt;
Signed-off-by: Avi Kivity &lt;avi@redhat.com&gt;
</content>
</entry>
<entry>
<title>KVM: ioapic: Fix an error field reference</title>
<updated>2011-05-22T12:39:27Z</updated>
<author>
<name>Liu Yuan</name>
<email>tailai.ly@taobao.com</email>
</author>
<published>2011-04-21T06:53:57Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a38f84ca8c6991925cb8bb6371ade8df9d3cc1e6'/>
<id>urn:sha1:a38f84ca8c6991925cb8bb6371ade8df9d3cc1e6</id>
<content type='text'>
Function ioapic_debug() in the ioapic_deliver() misnames
one filed by reference. This patch correct it.

Signed-off-by: Liu Yuan &lt;tailai.ly@taobao.com&gt;
Signed-off-by: Avi Kivity &lt;avi@redhat.com&gt;
</content>
</entry>
<entry>
<title>KVM: Use pci_store/load_saved_state() around VM device usage</title>
<updated>2011-05-21T19:17:10Z</updated>
<author>
<name>Alex Williamson</name>
<email>alex.williamson@redhat.com</email>
</author>
<published>2011-05-10T16:02:39Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f8fcfd775523347afe460dc3a0f45d0479e784a2'/>
<id>urn:sha1:f8fcfd775523347afe460dc3a0f45d0479e784a2</id>
<content type='text'>
Store the device saved state so that we can reload the device back
to the original state when it's unassigned.  This has the benefit
that the state survives across pci_reset_function() calls via
the PCI sysfs reset interface while the VM is using the device.

Signed-off-by: Alex Williamson &lt;alex.williamson@redhat.com&gt;
Acked-by: Avi Kivity &lt;avi@redhat.com&gt;
Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
</content>
</entry>
<entry>
<title>KVM: cleanup memslot_id function</title>
<updated>2011-05-11T11:56:53Z</updated>
<author>
<name>Xiao Guangrong</name>
<email>xiaoguangrong@cn.fujitsu.com</email>
</author>
<published>2011-03-09T07:41:59Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=0ee8dcb87e403397e575674d0e79272b06dea12e'/>
<id>urn:sha1:0ee8dcb87e403397e575674d0e79272b06dea12e</id>
<content type='text'>
We can get memslot id from memslot-&gt;id directly

Signed-off-by: Xiao Guangrong &lt;xiaoguangrong@cn.fujitsu.com&gt;
Signed-off-by: Avi Kivity &lt;avi@redhat.com&gt;
</content>
</entry>
</feed>
