<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/virt/kvm, branch linux-2.6.28.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-2.6.28.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-2.6.28.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2009-05-02T17:57:11Z</updated>
<entry>
<title>KVM: mmu_notifiers release method</title>
<updated>2009-05-02T17:57:11Z</updated>
<author>
<name>Marcelo Tosatti</name>
<email>mtosatti@redhat.com</email>
</author>
<published>2009-03-23T20:51:34Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=2aa2267cc3836db2680d99e1c5da08af6a7243bd'/>
<id>urn:sha1:2aa2267cc3836db2680d99e1c5da08af6a7243bd</id>
<content type='text'>
(cherry picked from 85db06e514422ae429b5f85742d8111b70bd56f3)

The destructor for huge pages uses the backing inode for adjusting
hugetlbfs accounting.

Hugepage mappings are destroyed by exit_mmap, after
mmu_notifier_release, so there are no notifications through
unmap_hugepage_range at this point.

The hugetlbfs inode can be freed with pages backed by it referenced
by the shadow. When the shadow releases its reference, the huge page
destructor will access a now freed inode.

Implement the release operation for kvm mmu notifiers to release page
refs before the hugetlbfs inode is gone.

Signed-off-by: Marcelo Tosatti &lt;mtosatti@redhat.com&gt;
Signed-off-by: Avi Kivity &lt;avi@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>KVM: Advertise the bug in memory region destruction as fixed</title>
<updated>2009-05-02T17:57:09Z</updated>
<author>
<name>Avi Kivity</name>
<email>avi@redhat.com</email>
</author>
<published>2009-03-23T20:51:31Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=14e360ee2c711a4ce10d90389773cadea30c54f6'/>
<id>urn:sha1:14e360ee2c711a4ce10d90389773cadea30c54f6</id>
<content type='text'>
(cherry picked from 1a811b6167089bcdb84284f2dc9fd0b4d0f1899d)

Userspace might need to act differently.

Signed-off-by: Avi Kivity &lt;avi@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>KVM: set owner of cpu and vm file operations</title>
<updated>2009-05-02T17:57:09Z</updated>
<author>
<name>Christian Borntraeger</name>
<email>borntraeger@de.ibm.com</email>
</author>
<published>2009-03-23T20:51:30Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=622d662934afe335af62dd8a0e9e64a39e8372dc'/>
<id>urn:sha1:622d662934afe335af62dd8a0e9e64a39e8372dc</id>
<content type='text'>
(cherry picked from 3d3aab1b973b01bd2a1aa46307e94a1380b1d802)

There is a race between a "close of the file descriptors" and module
unload in the kvm module.

You can easily trigger this problem by applying this debug patch:
&gt;--- kvm.orig/virt/kvm/kvm_main.c
&gt;+++ kvm/virt/kvm/kvm_main.c
&gt;@@ -648,10 +648,14 @@ void kvm_free_physmem(struct kvm *kvm)
&gt;                kvm_free_physmem_slot(&amp;kvm-&gt;memslots[i], NULL);
&gt; }
&gt;
&gt;+#include &lt;linux/delay.h&gt;
&gt; static void kvm_destroy_vm(struct kvm *kvm)
&gt; {
&gt;        struct mm_struct *mm = kvm-&gt;mm;
&gt;
&gt;+       printk("off1\n");
&gt;+       msleep(5000);
&gt;+       printk("off2\n");
&gt;        spin_lock(&amp;kvm_lock);
&gt;        list_del(&amp;kvm-&gt;vm_list);
&gt;        spin_unlock(&amp;kvm_lock);

and killing the userspace, followed by an rmmod.

The problem is that kvm_destroy_vm can run while the module count
is 0. That means, you can remove the module while kvm_destroy_vm
is running. But kvm_destroy_vm is part of the module text. This
causes a kerneloops. The race exists without the msleep but is much
harder to trigger.

This patch requires the fix for anon_inodes (anon_inodes: use fops-&gt;owner
for module refcount).
With this patch, we can set the owner of all anonymous KVM inodes file
operations. The VFS will then control the KVM module refcount as long as there
is an open file. kvm_destroy_vm will be called by the release function of the
last closed file - before the VFS drops the module refcount.

Signed-off-by: Christian Borntraeger &lt;borntraeger@de.ibm.com&gt;
Signed-off-by: Avi Kivity &lt;avi@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>KVM: Really remove a slot when a user ask us so</title>
<updated>2009-05-02T17:57:08Z</updated>
<author>
<name>Glauber Costa</name>
<email>glommer@redhat.com</email>
</author>
<published>2009-03-23T20:51:28Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=6ccf86c186a8c02b7d30015145259b65d92972cd'/>
<id>urn:sha1:6ccf86c186a8c02b7d30015145259b65d92972cd</id>
<content type='text'>
(cherry picked from 6f89724829cfd4ad6771a92fd4b8d59c90c7220c)

Right now, KVM does not remove a slot when we do a
register ioctl for size 0 (would be the expected behaviour).

Instead, we only mark it as empty, but keep all bitmaps
and allocated data structures present. It completely
nullifies our chances of reusing that same slot again
for mapping a different piece of memory.

In this patch, we destroy rmaps, and vfree() the
pointers that used to hold the dirty bitmap, rmap
and lpage_info structures.

Signed-off-by: Glauber Costa &lt;glommer@redhat.com&gt;
Signed-off-by: Avi Kivity &lt;avi@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>KVM: Prevent trace call into unloaded module text</title>
<updated>2009-05-02T17:57:08Z</updated>
<author>
<name>Wu Fengguang</name>
<email>fengguang.wu@intel.com</email>
</author>
<published>2009-03-23T20:51:27Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=3b3d3c98c95ea353d95299016973b99f569f6c64'/>
<id>urn:sha1:3b3d3c98c95ea353d95299016973b99f569f6c64</id>
<content type='text'>
(cherry picked from b82091824ee4970adf92d5cd6d57b12273171625)

Add marker_synchronize_unregister() before module unloading.
This prevents possible trace calls into unloaded module text.

Signed-off-by: Wu Fengguang &lt;wfg@linux.intel.com&gt;
Signed-off-by: Avi Kivity &lt;avi@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>KVM: MMU: Fix aliased gfns treated as unaliased</title>
<updated>2009-05-02T17:57:07Z</updated>
<author>
<name>Izik Eidus</name>
<email>ieidus@redhat.com</email>
</author>
<published>2009-03-23T20:51:24Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=e93d4df4cf013df5ab84c4967b9bfeecbb0f8c0d'/>
<id>urn:sha1:e93d4df4cf013df5ab84c4967b9bfeecbb0f8c0d</id>
<content type='text'>
(cherry picked from 2843099fee32a6020e1caa95c6026f28b5d43bff)

Some areas of kvm x86 mmu are using gfn offset inside a slot without
unaliasing the gfn first.  This patch makes sure that the gfn will be
unaliased and add gfn_to_memslot_unaliased() to save the calculating
of the gfn unaliasing in case we have it unaliased already.

Signed-off-by: Izik Eidus &lt;ieidus@redhat.com&gt;
Acked-by: Marcelo Tosatti &lt;mtosatti@redhat.com&gt;
Signed-off-by: Avi Kivity &lt;avi@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>KVM: Fix guest shared interrupt with in-kernel irqchip</title>
<updated>2008-10-28T12:21:34Z</updated>
<author>
<name>Sheng Yang</name>
<email>sheng@linux.intel.com</email>
</author>
<published>2008-10-15T12:15:06Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=5550af4df179e52753d3a43a788a113ad8cd95cd'/>
<id>urn:sha1:5550af4df179e52753d3a43a788a113ad8cd95cd</id>
<content type='text'>
Every call of kvm_set_irq() should offer an irq_source_id, which is
allocated by kvm_request_irq_source_id(). Based on irq_source_id, we
identify the irq source and implement logical OR for shared level
interrupts.

The allocated irq_source_id can be freed by kvm_free_irq_source_id().

Currently, we support at most sizeof(unsigned long) different irq sources.

[Amit: - rebase to kvm.git HEAD
       - move definition of KVM_USERSPACE_IRQ_SOURCE_ID to common file
       - move kvm_request_irq_source_id to the update_irq ioctl]

[Xiantao: - Add kvm/ia64 stuff and make it work for kvm/ia64 guests]

Signed-off-by: Sheng Yang &lt;sheng@linux.intel.com&gt;
Signed-off-by: Amit Shah &lt;amit.shah@redhat.com&gt;
Signed-off-by: Xiantao Zhang &lt;xiantao.zhang@intel.com&gt;
Signed-off-by: Avi Kivity &lt;avi@redhat.com&gt;
</content>
</entry>
<entry>
<title>KVM: Move irqchip_in_kernel() from ioapic.h to irq.h</title>
<updated>2008-10-15T12:25:36Z</updated>
<author>
<name>Xiantao Zhang</name>
<email>xiantao.zhang@intel.com</email>
</author>
<published>2008-09-27T03:46:36Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=2f7497719179a9f3270b05434be989d21f9fdc09'/>
<id>urn:sha1:2f7497719179a9f3270b05434be989d21f9fdc09</id>
<content type='text'>
Moving irqchip_in_kernel() from ioapic.h to irq.h.

Signed-off-by: Xiantao Zhang &lt;xiantao.zhang@intel.com&gt;
Signed-off-by: Avi Kivity &lt;avi@qumranet.com&gt;
</content>
</entry>
<entry>
<title>KVM: Separate irq ack notification out of arch/x86/kvm/irq.c</title>
<updated>2008-10-15T12:25:35Z</updated>
<author>
<name>Xiantao Zhang</name>
<email>xiantao.zhang@intel.com</email>
</author>
<published>2008-10-06T05:48:45Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=3de42dc094ecd313dc7d551e007a134b52f8663d'/>
<id>urn:sha1:3de42dc094ecd313dc7d551e007a134b52f8663d</id>
<content type='text'>
Moving irq ack notification logic as common, and make
it shared with ia64 side.

Signed-off-by: Xiantao Zhang &lt;xiantao.zhang@intel.com&gt;
Signed-off-by: Avi Kivity &lt;avi@qumranet.com&gt;
</content>
</entry>
<entry>
<title>KVM: Change is_mmio_pfn to kvm_is_mmio_pfn, and make it common for all archs</title>
<updated>2008-10-15T12:25:34Z</updated>
<author>
<name>Xiantao Zhang</name>
<email>xiantao.zhang@intel.com</email>
</author>
<published>2008-09-27T02:55:40Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=c77fb9dc7a0383c86eabef30272a763a482403e1'/>
<id>urn:sha1:c77fb9dc7a0383c86eabef30272a763a482403e1</id>
<content type='text'>
Add a kvm_ prefix to avoid polluting kernel's name space.

Signed-off-by: Xiantao Zhang &lt;xiantao.zhang@intel.com&gt;
Signed-off-by: Avi Kivity &lt;avi@qumranet.com&gt;
</content>
</entry>
</feed>
