<feed xmlns='http://www.w3.org/2005/Atom'>
<title>litmus-rt.git/virt, branch wip-edf-hsb</title>
<subtitle>The LITMUS^RT kernel.</subtitle>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/litmus-rt.git/'/>
<entry>
<title>KVM: Fix reboot on Intel hosts</title>
<updated>2010-09-23T14:31:56+00:00</updated>
<author>
<name>Avi Kivity</name>
<email>avi@redhat.com</email>
</author>
<published>2010-09-21T17:59:43+00:00</published>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/litmus-rt.git/commit/?id=ca242ac9960dc61530e25a2c190e4e13fd5f1ecb'/>
<id>ca242ac9960dc61530e25a2c190e4e13fd5f1ecb</id>
<content type='text'>
When we reboot, we disable vmx extensions or otherwise INIT gets blocked.
If a task on another cpu hits a vmx instruction, it will fault if vmx is
disabled.  We trap that to avoid a nasty oops and spin until the reboot
completes.

Problem is, we sleep with interrupts disabled.  This blocks smp_send_stop()
from running, and the reboot process halts.

Fix by enabling interrupts before spinning.

KVM-Stable-Tag.
Signed-off-by: Avi Kivity &lt;avi@redhat.com&gt;
Signed-off-by: Marcelo Tosatti &lt;mtosatti@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When we reboot, we disable vmx extensions or otherwise INIT gets blocked.
If a task on another cpu hits a vmx instruction, it will fault if vmx is
disabled.  We trap that to avoid a nasty oops and spin until the reboot
completes.

Problem is, we sleep with interrupts disabled.  This blocks smp_send_stop()
from running, and the reboot process halts.

Fix by enabling interrupts before spinning.

KVM-Stable-Tag.
Signed-off-by: Avi Kivity &lt;avi@redhat.com&gt;
Signed-off-by: Marcelo Tosatti &lt;mtosatti@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>KVM: fix irqfd assign/deassign race</title>
<updated>2010-09-23T14:31:51+00:00</updated>
<author>
<name>Michael S. Tsirkin</name>
<email>mst@redhat.com</email>
</author>
<published>2010-09-19T17:02:31+00:00</published>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/litmus-rt.git/commit/?id=6bbfb2653177a00f70e57e53625502d43804fed0'/>
<id>6bbfb2653177a00f70e57e53625502d43804fed0</id>
<content type='text'>
I think I see the following (theoretical) race:

During irqfd assign, we drop irqfds lock before we
schedule inject work. Therefore, deassign running
on another CPU could cause shutdown and flush to run
before inject, causing user after free in inject.

A simple fix it to schedule inject under the lock.

Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Acked-by: Gregory Haskins &lt;ghaskins@novell.com&gt;
Signed-off-by: Marcelo Tosatti &lt;mtosatti@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I think I see the following (theoretical) race:

During irqfd assign, we drop irqfds lock before we
schedule inject work. Therefore, deassign running
on another CPU could cause shutdown and flush to run
before inject, causing user after free in inject.

A simple fix it to schedule inject under the lock.

Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Acked-by: Gregory Haskins &lt;ghaskins@novell.com&gt;
Signed-off-by: Marcelo Tosatti &lt;mtosatti@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>KVM: x86: Perform hardware_enable in CPU_STARTING callback</title>
<updated>2010-09-09T16:48:16+00:00</updated>
<author>
<name>Zachary Amsden</name>
<email>zamsden@redhat.com</email>
</author>
<published>2010-08-20T08:07:27+00:00</published>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/litmus-rt.git/commit/?id=da908f2fb4e783c2a4de751fb90f11a0dd041161'/>
<id>da908f2fb4e783c2a4de751fb90f11a0dd041161</id>
<content type='text'>
The CPU_STARTING callback was added upstream with the intention
of being used for KVM, specifically for the hardware enablement
that must be done before we can run in hardware virt.  It had
bugs on the x86_64 architecture at the time, where it was called
after CPU_ONLINE.  The arches have since merged and the bug is
gone.

It might be noted other features should probably start making
use of this callback; microcode updates in particular which
might be fixing important erratums would be best applied before
beginning to run user tasks.

Signed-off-by: Zachary Amsden &lt;zamsden@redhat.com&gt;
Signed-off-by: Marcelo Tosatti &lt;mtosatti@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The CPU_STARTING callback was added upstream with the intention
of being used for KVM, specifically for the hardware enablement
that must be done before we can run in hardware virt.  It had
bugs on the x86_64 architecture at the time, where it was called
after CPU_ONLINE.  The arches have since merged and the bug is
gone.

It might be noted other features should probably start making
use of this callback; microcode updates in particular which
might be fixing important erratums would be best applied before
beginning to run user tasks.

Signed-off-by: Zachary Amsden &lt;zamsden@redhat.com&gt;
Signed-off-by: Marcelo Tosatti &lt;mtosatti@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>KVM: Convert mask notifiers to use irqchip/pin instead of gsi</title>
<updated>2010-08-02T03:40:39+00:00</updated>
<author>
<name>Gleb Natapov</name>
<email>gleb@redhat.com</email>
</author>
<published>2010-07-11T12:32:23+00:00</published>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/litmus-rt.git/commit/?id=4a994358b919c3b14de61be5e30d9edc9089ba3f'/>
<id>4a994358b919c3b14de61be5e30d9edc9089ba3f</id>
<content type='text'>
Devices register mask notifier using gsi, but irqchip knows about
irqchip/pin, so conversion from irqchip/pin to gsi should be done before
looking for mask notifier to call.

Signed-off-by: Gleb Natapov &lt;gleb@redhat.com&gt;
Signed-off-by: Marcelo Tosatti &lt;mtosatti@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Devices register mask notifier using gsi, but irqchip knows about
irqchip/pin, so conversion from irqchip/pin to gsi should be done before
looking for mask notifier to call.

Signed-off-by: Gleb Natapov &lt;gleb@redhat.com&gt;
Signed-off-by: Marcelo Tosatti &lt;mtosatti@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>KVM: Return EFAULT from kvm ioctl when guest accesses bad area</title>
<updated>2010-08-02T03:40:33+00:00</updated>
<author>
<name>Gleb Natapov</name>
<email>gleb@redhat.com</email>
</author>
<published>2010-07-07T17:16:45+00:00</published>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/litmus-rt.git/commit/?id=edba23e51578f7cb6781461568489fc1825db4ac'/>
<id>edba23e51578f7cb6781461568489fc1825db4ac</id>
<content type='text'>
Currently if guest access address that belongs to memory slot but is not
backed up by page or page is read only KVM treats it like MMIO access.
Remove that capability. It was never part of the interface and should
not be relied upon.

Signed-off-by: Gleb Natapov &lt;gleb@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>
Currently if guest access address that belongs to memory slot but is not
backed up by page or page is read only KVM treats it like MMIO access.
Remove that capability. It was never part of the interface and should
not be relied upon.

Signed-off-by: Gleb Natapov &lt;gleb@redhat.com&gt;
Signed-off-by: Avi Kivity &lt;avi@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>KVM: define hwpoison variables static</title>
<updated>2010-08-02T03:40:32+00:00</updated>
<author>
<name>Gleb Natapov</name>
<email>gleb@redhat.com</email>
</author>
<published>2010-07-07T17:16:44+00:00</published>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/litmus-rt.git/commit/?id=fa7bff8f8a7d3de61c0473d0b6dc5a0f4fdc6ac9'/>
<id>fa7bff8f8a7d3de61c0473d0b6dc5a0f4fdc6ac9</id>
<content type='text'>
They are not used outside of the file.

Signed-off-by: Gleb Natapov &lt;gleb@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>
They are not used outside of the file.

Signed-off-by: Gleb Natapov &lt;gleb@redhat.com&gt;
Signed-off-by: Avi Kivity &lt;avi@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>KVM: Use u64 for frame data types</title>
<updated>2010-08-02T03:39:44+00:00</updated>
<author>
<name>Joerg Roedel</name>
<email>joerg.roedel@amd.com</email>
</author>
<published>2010-07-01T14:00:12+00:00</published>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/litmus-rt.git/commit/?id=5689cc53fa9d09b5bf41b1b1a7c90bd6c112ab40'/>
<id>5689cc53fa9d09b5bf41b1b1a7c90bd6c112ab40</id>
<content type='text'>
For 32bit machines where the physical address width is
larger than the virtual address width the frame number types
in KVM may overflow. Fix this by changing them to u64.

[sfr: fix build on 32-bit ppc]

Signed-off-by: Joerg Roedel &lt;joerg.roedel@amd.com&gt;
Signed-off-by: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Signed-off-by: Marcelo Tosatti &lt;mtosatti@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For 32bit machines where the physical address width is
larger than the virtual address width the frame number types
in KVM may overflow. Fix this by changing them to u64.

[sfr: fix build on 32-bit ppc]

Signed-off-by: Joerg Roedel &lt;joerg.roedel@amd.com&gt;
Signed-off-by: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Signed-off-by: Marcelo Tosatti &lt;mtosatti@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>KVM: Remove unnecessary divide operations</title>
<updated>2010-08-01T07:47:30+00:00</updated>
<author>
<name>Joerg Roedel</name>
<email>joerg.roedel@amd.com</email>
</author>
<published>2010-07-01T14:00:11+00:00</published>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/litmus-rt.git/commit/?id=828554136bbacae6e39fc31b9cd7e7c660ad7530'/>
<id>828554136bbacae6e39fc31b9cd7e7c660ad7530</id>
<content type='text'>
This patch converts unnecessary divide and modulo operations
in the KVM large page related code into logical operations.
This allows to convert gfn_t to u64 while not breaking 32
bit builds.

Signed-off-by: Joerg Roedel &lt;joerg.roedel@amd.com&gt;
Signed-off-by: Marcelo Tosatti &lt;mtosatti@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch converts unnecessary divide and modulo operations
in the KVM large page related code into logical operations.
This allows to convert gfn_t to u64 while not breaking 32
bit builds.

Signed-off-by: Joerg Roedel &lt;joerg.roedel@amd.com&gt;
Signed-off-by: Marcelo Tosatti &lt;mtosatti@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>KVM: Fix IOMMU memslot reference warning</title>
<updated>2010-08-01T07:47:29+00:00</updated>
<author>
<name>Sheng Yang</name>
<email>sheng@linux.intel.com</email>
</author>
<published>2010-07-01T07:00:50+00:00</published>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/litmus-rt.git/commit/?id=95c87e2b4460a488ec7ce42f273893e410ab385a'/>
<id>95c87e2b4460a488ec7ce42f273893e410ab385a</id>
<content type='text'>
This patch fixes the following warning.

===================================================
[ INFO: suspicious rcu_dereference_check() usage. ]
---------------------------------------------------
include/linux/kvm_host.h:259 invoked rcu_dereference_check() without
protection!

other info that might help us debug this:

rcu_scheduler_active = 1, debug_locks = 0
no locks held by qemu-system-x86/29679.

stack backtrace:
Pid: 29679, comm: qemu-system-x86 Not tainted 2.6.35-rc3+ #200
Call Trace:
 [&lt;ffffffff810a224e&gt;] lockdep_rcu_dereference+0xa8/0xb1
 [&lt;ffffffffa018a06f&gt;] kvm_iommu_unmap_memslots+0xc9/0xde [kvm]
 [&lt;ffffffffa018a0c4&gt;] kvm_iommu_unmap_guest+0x40/0x4e [kvm]
 [&lt;ffffffffa018f772&gt;] kvm_arch_destroy_vm+0x1a/0x186 [kvm]
 [&lt;ffffffffa01800d0&gt;] kvm_put_kvm+0x110/0x167 [kvm]
 [&lt;ffffffffa0180ecc&gt;] kvm_vcpu_release+0x18/0x1c [kvm]
 [&lt;ffffffff81156f5d&gt;] fput+0x22a/0x3a0
 [&lt;ffffffff81152288&gt;] filp_close+0xb4/0xcd
 [&lt;ffffffff8106599f&gt;] put_files_struct+0x1b7/0x36b
 [&lt;ffffffff81065830&gt;] ? put_files_struct+0x48/0x36b
 [&lt;ffffffff8131ee59&gt;] ? do_raw_spin_unlock+0x118/0x160
 [&lt;ffffffff81065bc0&gt;] exit_files+0x6d/0x75
 [&lt;ffffffff81068348&gt;] do_exit+0x47d/0xc60
 [&lt;ffffffff8177e7b5&gt;] ? _raw_spin_unlock_irq+0x30/0x36
 [&lt;ffffffff81068bfa&gt;] do_group_exit+0xcf/0x134
 [&lt;ffffffff81080790&gt;] get_signal_to_deliver+0x732/0x81d
 [&lt;ffffffff81095996&gt;] ? cpu_clock+0x4e/0x60
 [&lt;ffffffff81002082&gt;] do_notify_resume+0x117/0xc43
 [&lt;ffffffff810a2fa3&gt;] ? trace_hardirqs_on+0xd/0xf
 [&lt;ffffffff81080d79&gt;] ? sys_rt_sigtimedwait+0x2b5/0x3bf
 [&lt;ffffffff8177d9f2&gt;] ? trace_hardirqs_off_thunk+0x3a/0x3c
 [&lt;ffffffff81003221&gt;] ? sysret_signal+0x5/0x3d
 [&lt;ffffffff8100343b&gt;] int_signal+0x12/0x17

Signed-off-by: Sheng Yang &lt;sheng@linux.intel.com&gt;
Signed-off-by: Marcelo Tosatti &lt;mtosatti@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch fixes the following warning.

===================================================
[ INFO: suspicious rcu_dereference_check() usage. ]
---------------------------------------------------
include/linux/kvm_host.h:259 invoked rcu_dereference_check() without
protection!

other info that might help us debug this:

rcu_scheduler_active = 1, debug_locks = 0
no locks held by qemu-system-x86/29679.

stack backtrace:
Pid: 29679, comm: qemu-system-x86 Not tainted 2.6.35-rc3+ #200
Call Trace:
 [&lt;ffffffff810a224e&gt;] lockdep_rcu_dereference+0xa8/0xb1
 [&lt;ffffffffa018a06f&gt;] kvm_iommu_unmap_memslots+0xc9/0xde [kvm]
 [&lt;ffffffffa018a0c4&gt;] kvm_iommu_unmap_guest+0x40/0x4e [kvm]
 [&lt;ffffffffa018f772&gt;] kvm_arch_destroy_vm+0x1a/0x186 [kvm]
 [&lt;ffffffffa01800d0&gt;] kvm_put_kvm+0x110/0x167 [kvm]
 [&lt;ffffffffa0180ecc&gt;] kvm_vcpu_release+0x18/0x1c [kvm]
 [&lt;ffffffff81156f5d&gt;] fput+0x22a/0x3a0
 [&lt;ffffffff81152288&gt;] filp_close+0xb4/0xcd
 [&lt;ffffffff8106599f&gt;] put_files_struct+0x1b7/0x36b
 [&lt;ffffffff81065830&gt;] ? put_files_struct+0x48/0x36b
 [&lt;ffffffff8131ee59&gt;] ? do_raw_spin_unlock+0x118/0x160
 [&lt;ffffffff81065bc0&gt;] exit_files+0x6d/0x75
 [&lt;ffffffff81068348&gt;] do_exit+0x47d/0xc60
 [&lt;ffffffff8177e7b5&gt;] ? _raw_spin_unlock_irq+0x30/0x36
 [&lt;ffffffff81068bfa&gt;] do_group_exit+0xcf/0x134
 [&lt;ffffffff81080790&gt;] get_signal_to_deliver+0x732/0x81d
 [&lt;ffffffff81095996&gt;] ? cpu_clock+0x4e/0x60
 [&lt;ffffffff81002082&gt;] do_notify_resume+0x117/0xc43
 [&lt;ffffffff810a2fa3&gt;] ? trace_hardirqs_on+0xd/0xf
 [&lt;ffffffff81080d79&gt;] ? sys_rt_sigtimedwait+0x2b5/0x3bf
 [&lt;ffffffff8177d9f2&gt;] ? trace_hardirqs_off_thunk+0x3a/0x3c
 [&lt;ffffffff81003221&gt;] ? sysret_signal+0x5/0x3d
 [&lt;ffffffff8100343b&gt;] int_signal+0x12/0x17

Signed-off-by: Sheng Yang &lt;sheng@linux.intel.com&gt;
Signed-off-by: Marcelo Tosatti &lt;mtosatti@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>KVM: Fix a race condition for usage of is_hwpoison_address()</title>
<updated>2010-08-01T07:47:11+00:00</updated>
<author>
<name>Huang Ying</name>
<email>ying.huang@intel.com</email>
</author>
<published>2010-06-22T06:23:11+00:00</published>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/litmus-rt.git/commit/?id=bbeb34062fbad287c949a945a516a0c15b179993'/>
<id>bbeb34062fbad287c949a945a516a0c15b179993</id>
<content type='text'>
is_hwpoison_address accesses the page table, so the caller must hold
current-&gt;mm-&gt;mmap_sem in read mode. So fix its usage in hva_to_pfn of
kvm accordingly.

Comment is_hwpoison_address to remind other users.

Reported-by: Avi Kivity &lt;avi@redhat.com&gt;
Signed-off-by: Huang Ying &lt;ying.huang@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>
is_hwpoison_address accesses the page table, so the caller must hold
current-&gt;mm-&gt;mmap_sem in read mode. So fix its usage in hva_to_pfn of
kvm accordingly.

Comment is_hwpoison_address to remind other users.

Reported-by: Avi Kivity &lt;avi@redhat.com&gt;
Signed-off-by: Huang Ying &lt;ying.huang@intel.com&gt;
Signed-off-by: Avi Kivity &lt;avi@redhat.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
