<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/virt, branch tegra-9.12.7</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>KVM: Fix assigned devices circular locking dependency</title>
<updated>2009-02-15T00:47:39+00:00</updated>
<author>
<name>Mark McLoughlin</name>
<email>markmc@redhat.com</email>
</author>
<published>2009-02-05T18:23:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=682edb4c01e690c7c7cd772dbd6f4e0fd74dc572'/>
<id>682edb4c01e690c7c7cd772dbd6f4e0fd74dc572</id>
<content type='text'>
kvm-&gt;slots_lock is outer to kvm-&gt;lock, so take slots_lock
in kvm_vm_ioctl_assign_device() before taking kvm-&gt;lock,
rather than taking it in kvm_iommu_map_memslots().

Cc: stable@kernel.org
Signed-off-by: Mark McLoughlin &lt;markmc@redhat.com&gt;
Acked-by: Marcelo Tosatti &lt;mtosatti@redhat.com&gt;
Signed-off-by: Avi Kivity &lt;avi@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
kvm-&gt;slots_lock is outer to kvm-&gt;lock, so take slots_lock
in kvm_vm_ioctl_assign_device() before taking kvm-&gt;lock,
rather than taking it in kvm_iommu_map_memslots().

Cc: stable@kernel.org
Signed-off-by: Mark McLoughlin &lt;markmc@redhat.com&gt;
Acked-by: Marcelo Tosatti &lt;mtosatti@redhat.com&gt;
Signed-off-by: Avi Kivity &lt;avi@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>KVM: Fix INTx for device assignment</title>
<updated>2009-02-15T00:47:38+00:00</updated>
<author>
<name>Sheng Yang</name>
<email>sheng@linux.intel.com</email>
</author>
<published>2009-01-06T08:25:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d7cff1c37664971aae32bb0de82231ed34933d8e'/>
<id>d7cff1c37664971aae32bb0de82231ed34933d8e</id>
<content type='text'>
Missing buckets and wrong parameter for free_irq()

Signed-off-by: Sheng Yang &lt;sheng@linux.intel.com&gt;
Signed-off-by: Avi Kivity &lt;avi@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Missing buckets and wrong parameter for free_irq()

Signed-off-by: Sheng Yang &lt;sheng@linux.intel.com&gt;
Signed-off-by: Avi Kivity &lt;avi@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>KVM: Fix racy in kvm_free_assigned_irq</title>
<updated>2009-02-15T00:47:36+00:00</updated>
<author>
<name>Sheng Yang</name>
<email>sheng@linux.intel.com</email>
</author>
<published>2009-01-06T02:03:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ba4cef31d5a397b64ba6d3ff713ce06c62f0c597'/>
<id>ba4cef31d5a397b64ba6d3ff713ce06c62f0c597</id>
<content type='text'>
In the past, kvm_get_kvm() and kvm_put_kvm() was called in assigned device irq
handler and interrupt_work, in order to prevent cancel_work_sync() in
kvm_free_assigned_irq got a illegal state when waiting for interrupt_work done.
But it's tricky and still got two problems:

1. A bug ignored two conditions that cancel_work_sync() would return true result
in a additional kvm_put_kvm().

2. If interrupt type is MSI, we would got a window between cancel_work_sync()
and free_irq(), which interrupt would be injected again...

This patch discard the reference count used for irq handler and interrupt_work,
and ensure the legal state by moving the free function at the very beginning of
kvm_destroy_vm(). And the patch fix the second bug by disable irq before
cancel_work_sync(), which may result in nested disable of irq but OK for we are
going to free it.

Signed-off-by: Sheng Yang &lt;sheng@linux.intel.com&gt;
Signed-off-by: Avi Kivity &lt;avi@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In the past, kvm_get_kvm() and kvm_put_kvm() was called in assigned device irq
handler and interrupt_work, in order to prevent cancel_work_sync() in
kvm_free_assigned_irq got a illegal state when waiting for interrupt_work done.
But it's tricky and still got two problems:

1. A bug ignored two conditions that cancel_work_sync() would return true result
in a additional kvm_put_kvm().

2. If interrupt type is MSI, we would got a window between cancel_work_sync()
and free_irq(), which interrupt would be injected again...

This patch discard the reference count used for irq handler and interrupt_work,
and ensure the legal state by moving the free function at the very beginning of
kvm_destroy_vm(). And the patch fix the second bug by disable irq before
cancel_work_sync(), which may result in nested disable of irq but OK for we are
going to free it.

Signed-off-by: Sheng Yang &lt;sheng@linux.intel.com&gt;
Signed-off-by: Avi Kivity &lt;avi@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>KVM: Add kvm_arch_sync_events to sync with asynchronize events</title>
<updated>2009-02-15T00:47:36+00:00</updated>
<author>
<name>Sheng Yang</name>
<email>sheng@linux.intel.com</email>
</author>
<published>2009-01-06T02:03:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ad8ba2cd44d4d39fb3fe55d5dcc565b19fc3a7fb'/>
<id>ad8ba2cd44d4d39fb3fe55d5dcc565b19fc3a7fb</id>
<content type='text'>
kvm_arch_sync_events is introduced to quiet down all other events may happen
contemporary with VM destroy process, like IRQ handler and work struct for
assigned device.

For kvm_arch_sync_events is called at the very beginning of kvm_destroy_vm(), so
the state of KVM here is legal and can provide a environment to quiet down other
events.

Signed-off-by: Sheng Yang &lt;sheng@linux.intel.com&gt;
Signed-off-by: Avi Kivity &lt;avi@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
kvm_arch_sync_events is introduced to quiet down all other events may happen
contemporary with VM destroy process, like IRQ handler and work struct for
assigned device.

For kvm_arch_sync_events is called at the very beginning of kvm_destroy_vm(), so
the state of KVM here is legal and can provide a environment to quiet down other
events.

Signed-off-by: Sheng Yang &lt;sheng@linux.intel.com&gt;
Signed-off-by: Avi Kivity &lt;avi@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>KVM: mmu_notifiers release method</title>
<updated>2009-02-15T00:47:35+00:00</updated>
<author>
<name>Marcelo Tosatti</name>
<email>mtosatti@redhat.com</email>
</author>
<published>2008-12-10T20:23:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=85db06e514422ae429b5f85742d8111b70bd56f3'/>
<id>85db06e514422ae429b5f85742d8111b70bd56f3</id>
<content type='text'>
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;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
</pre>
</div>
</content>
</entry>
<entry>
<title>kvm/iommu: fix compile warning</title>
<updated>2009-01-03T15:37:53+00:00</updated>
<author>
<name>Joerg Roedel</name>
<email>joerg.roedel@amd.com</email>
</author>
<published>2009-01-03T15:37:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=7398ca79d227f7cd7f2ce23f08624e30081dcb4e'/>
<id>7398ca79d227f7cd7f2ce23f08624e30081dcb4e</id>
<content type='text'>
This fixes a compile warning about a variable thats maybe used
uninitialized in the function.

Signed-off-by: Joerg Roedel &lt;joerg.roedel@amd.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This fixes a compile warning about a variable thats maybe used
uninitialized in the function.

Signed-off-by: Joerg Roedel &lt;joerg.roedel@amd.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>KVM: change KVM to use IOMMU API</title>
<updated>2009-01-03T13:11:07+00:00</updated>
<author>
<name>Joerg Roedel</name>
<email>joerg.roedel@amd.com</email>
</author>
<published>2008-12-03T13:43:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=19de40a8472fa64693eab844911eec277d489f6c'/>
<id>19de40a8472fa64693eab844911eec277d489f6c</id>
<content type='text'>
Signed-off-by: Joerg Roedel &lt;joerg.roedel@amd.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Joerg Roedel &lt;joerg.roedel@amd.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>KVM: rename vtd.c to iommu.c</title>
<updated>2009-01-03T13:10:09+00:00</updated>
<author>
<name>Joerg Roedel</name>
<email>joerg.roedel@amd.com</email>
</author>
<published>2008-11-26T14:51:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=c4fa3864281c7d88b7262cbc6cbd5c90bb59860e'/>
<id>c4fa3864281c7d88b7262cbc6cbd5c90bb59860e</id>
<content type='text'>
Impact: file renamed

The code in the vtd.c file can be reused for other IOMMUs as well. So
rename it to make it clear that it handle more than VT-d.

Signed-off-by: Joerg Roedel &lt;joerg.roedel@amd.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Impact: file renamed

The code in the vtd.c file can be reused for other IOMMUs as well. So
rename it to make it clear that it handle more than VT-d.

Signed-off-by: Joerg Roedel &lt;joerg.roedel@amd.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Deassign device in kvm_free_assgined_device</title>
<updated>2009-01-03T13:10:08+00:00</updated>
<author>
<name>Weidong Han</name>
<email>weidong.han@intel.com</email>
</author>
<published>2008-12-08T15:29:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b653574a7d14b663cc812cb20be6a114939ba186'/>
<id>b653574a7d14b663cc812cb20be6a114939ba186</id>
<content type='text'>
In kvm_iommu_unmap_memslots(), assigned_dev_head is already empty.

Signed-off-by: Weidong Han &lt;weidong.han@intel.com&gt;
Signed-off-by: Joerg Roedel &lt;joerg.roedel@amd.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In kvm_iommu_unmap_memslots(), assigned_dev_head is already empty.

Signed-off-by: Weidong Han &lt;weidong.han@intel.com&gt;
Signed-off-by: Joerg Roedel &lt;joerg.roedel@amd.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>KVM: support device deassignment</title>
<updated>2009-01-03T13:02:19+00:00</updated>
<author>
<name>Weidong Han</name>
<email>weidong.han@intel.com</email>
</author>
<published>2008-12-02T13:24:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0a920356748df4fb06e86c21c23d2ed6d31d37ad'/>
<id>0a920356748df4fb06e86c21c23d2ed6d31d37ad</id>
<content type='text'>
Support device deassignment, it can be used in device hotplug.

Signed-off-by: Weidong Han &lt;weidong.han@intel.com&gt;
Signed-off-by: Joerg Roedel &lt;joerg.roedel@amd.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Support device deassignment, it can be used in device hotplug.

Signed-off-by: Weidong Han &lt;weidong.han@intel.com&gt;
Signed-off-by: Joerg Roedel &lt;joerg.roedel@amd.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
