qemu: Add support for paravirtual spinlocks in the guest

The linux kernel recently added support for paravirtual spinlock
handling to avoid performance regressions on overcomitted hosts. This
feature needs to be turned in the hypervisor so that the guest OS is
notified about the possible support.

This patch adds a new feature "paravirt-spinlock" to the XML and
supporting code to enable the "kvm_pv_unhalt" pseudo CPU feature in
qemu.

https://bugzilla.redhat.com/show_bug.cgi?id=1008989
This commit is contained in:
Peter Krempa
2013-09-23 18:32:11 +02:00
parent de7b5faf43
commit e0dc851164
11 changed files with 132 additions and 2 deletions

View File

@@ -1193,6 +1193,7 @@
<vapic state='on'/>
<spinlocks state='on' retries='4096'/>
</hyperv>
<pvspinlock/>
</features>
...</pre>
@@ -1264,6 +1265,13 @@
</tr>
</table>
</dd>
<dt><code>pvspinlock</code></dt>
<dd>Notify the guest that the host supports paravirtual spinlocks
for example by exposing the pvticketlocks mechanism. This feature
can be explicitly disabled by using <code>state='off'</code>
attribute.
</dd>
</dl>
<h3><a name="elementsTime">Time keeping</a></h3>