<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/drivers/kvm/lapic.c, branch v2.6.24</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>KVM: Improve local apic timer wraparound handling</title>
<updated>2007-10-22T10:03:29+00:00</updated>
<author>
<name>Kevin Pedretti</name>
<email>kevin.pedretti@gmail.com</email>
</author>
<published>2007-10-21T06:55:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=9da8f4e83a824dabf3fb7ad0890549257ae614a0'/>
<id>9da8f4e83a824dabf3fb7ad0890549257ae614a0</id>
<content type='text'>
Better handle wrap-around cases when reading the APIC CCR
(current count register).  Also, if ICR is 0, CCR should also
be 0... previously reading CCR before setting ICR would result
in a large kinda-random number.

Signed-off-by: Kevin Pedretti &lt;kevin.pedretti@gmail.com&gt;
Signed-off-by: Avi Kivity &lt;avi@qumranet.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Better handle wrap-around cases when reading the APIC CCR
(current count register).  Also, if ICR is 0, CCR should also
be 0... previously reading CCR before setting ICR would result
in a large kinda-random number.

Signed-off-by: Kevin Pedretti &lt;kevin.pedretti@gmail.com&gt;
Signed-off-by: Avi Kivity &lt;avi@qumranet.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>KVM: Fix local apic timer divide by zero</title>
<updated>2007-10-22T10:03:29+00:00</updated>
<author>
<name>Kevin Pedretti</name>
<email>kevin.pedretti@gmail.com</email>
</author>
<published>2007-10-21T06:54:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=b33ac88b4c23330043acad930517282eb486db1d'/>
<id>b33ac88b4c23330043acad930517282eb486db1d</id>
<content type='text'>
kvm_lapic_reset() was initializing apic-&gt;timer.divide_count to 0,
which could potentially lead to a divide by zero error in
apic_get_tmcct().  Any guest that reads the APIC's CCR (current count)
register before setting DCR (divide configuration) would trigger a divide
by zero exception in the host kernel, leading to a host-OS crash.

This patch results in apic-&gt;timer.divide_count being initialized to
2 at reset, eliminating the bug (DCR=0 at reset, meaning divide by 2).

Signed-off-by: Kevin Pedretti &lt;kevin.pedretti@gmail.com&gt;
Signed-off-by: Avi Kivity &lt;avi@qumranet.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
kvm_lapic_reset() was initializing apic-&gt;timer.divide_count to 0,
which could potentially lead to a divide by zero error in
apic_get_tmcct().  Any guest that reads the APIC's CCR (current count)
register before setting DCR (divide configuration) would trigger a divide
by zero exception in the host kernel, leading to a host-OS crash.

This patch results in apic-&gt;timer.divide_count being initialized to
2 at reset, eliminating the bug (DCR=0 at reset, meaning divide by 2).

Signed-off-by: Kevin Pedretti &lt;kevin.pedretti@gmail.com&gt;
Signed-off-by: Avi Kivity &lt;avi@qumranet.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>KVM: enable in-kernel APIC INIT/SIPI handling</title>
<updated>2007-10-13T08:18:26+00:00</updated>
<author>
<name>He, Qing</name>
<email>qing.he@intel.com</email>
</author>
<published>2007-09-03T14:07:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=c5ec153402b6d276fe20029da1059ba42a4b55e5'/>
<id>c5ec153402b6d276fe20029da1059ba42a4b55e5</id>
<content type='text'>
This patch enables INIT/SIPI handling using in-kernel APIC by
introducing a -&gt;mp_state field to emulate the SMP state transition.

[avi: remove smp_processor_id() warning]

Signed-off-by: Qing He &lt;qing.he@intel.com&gt;
Signed-off-by: Xin Li &lt;xin.b.li@intel.com&gt;
Signed-off-by: Avi Kivity &lt;avi@qumranet.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch enables INIT/SIPI handling using in-kernel APIC by
introducing a -&gt;mp_state field to emulate the SMP state transition.

[avi: remove smp_processor_id() warning]

Signed-off-by: Qing He &lt;qing.he@intel.com&gt;
Signed-off-by: Xin Li &lt;xin.b.li@intel.com&gt;
Signed-off-by: Avi Kivity &lt;avi@qumranet.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>KVM: round robin for APIC lowest priority delivery mode</title>
<updated>2007-10-13T08:18:26+00:00</updated>
<author>
<name>He, Qing</name>
<email>qing.he@intel.com</email>
</author>
<published>2007-09-03T14:01:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=932f72adbe76f098922c746737cb0bd75fc21e27'/>
<id>932f72adbe76f098922c746737cb0bd75fc21e27</id>
<content type='text'>
Signed-off-by: Qing He &lt;qing.he@intel.com&gt;
Signed-off-by: Avi Kivity &lt;avi@qumranet.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Qing He &lt;qing.he@intel.com&gt;
Signed-off-by: Avi Kivity &lt;avi@qumranet.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>KVM: deliver PIC interrupt only to vcpu0</title>
<updated>2007-10-13T08:18:26+00:00</updated>
<author>
<name>Qing He</name>
<email>qing.he@intel.com</email>
</author>
<published>2007-09-17T06:47:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=40487c680d5855459dfdce340df13d40071bb774'/>
<id>40487c680d5855459dfdce340df13d40071bb774</id>
<content type='text'>
This patch changes the PIC interrupts delivery. Now it is only delivered
to vcpu0 when either condition is met (on vcpu0):
  1. local APIC is hardware disabled
  2. LVT0 is unmasked and configured to delivery mode ExtInt

It fixes the 2x faster wall clock on x86_64 and SMP i386 Linux guests

Signed-off-by: Eddie (Yaozu) Dong &lt;eddie.dong@intel.com&gt;
Signed-off-by: Qing He &lt;qing.he@intel.com&gt;
Signed-off-by: Avi Kivity &lt;avi@qumranet.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch changes the PIC interrupts delivery. Now it is only delivered
to vcpu0 when either condition is met (on vcpu0):
  1. local APIC is hardware disabled
  2. LVT0 is unmasked and configured to delivery mode ExtInt

It fixes the 2x faster wall clock on x86_64 and SMP i386 Linux guests

Signed-off-by: Eddie (Yaozu) Dong &lt;eddie.dong@intel.com&gt;
Signed-off-by: Qing He &lt;qing.he@intel.com&gt;
Signed-off-by: Avi Kivity &lt;avi@qumranet.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>KVM: Migrate lapic hrtimer when vcpu moves to another cpu</title>
<updated>2007-10-13T08:18:26+00:00</updated>
<author>
<name>Eddie Dong</name>
<email>eddie.dong@intel.com</email>
</author>
<published>2007-09-03T13:15:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=a3d7f85f471f889e4477863a7ca42828ae74e77d'/>
<id>a3d7f85f471f889e4477863a7ca42828ae74e77d</id>
<content type='text'>
This reduces overhead by accessing cachelines from the wrong node, as well
as simplifying locking.

[Qing: fix for inactive or expired one-shot timer]

Signed-off-by: Yaozu (Eddie) Dong &lt;Eddie.Dong@intel.com&gt;
Signed-off-by: Qing He &lt;qing.he@intel.com&gt;
Signed-off-by: Avi Kivity &lt;avi@qumranet.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reduces overhead by accessing cachelines from the wrong node, as well
as simplifying locking.

[Qing: fix for inactive or expired one-shot timer]

Signed-off-by: Yaozu (Eddie) Dong &lt;Eddie.Dong@intel.com&gt;
Signed-off-by: Qing He &lt;qing.he@intel.com&gt;
Signed-off-by: Avi Kivity &lt;avi@qumranet.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>KVM: Keep track of missed timer irq injections</title>
<updated>2007-10-13T08:18:26+00:00</updated>
<author>
<name>Eddie Dong</name>
<email>eddie.dong@intel.com</email>
</author>
<published>2007-09-03T13:56:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=1b9778dae71dc64d3678d766c0f1fbed79c80f9f'/>
<id>1b9778dae71dc64d3678d766c0f1fbed79c80f9f</id>
<content type='text'>
APIC timer IRQ is set every time when a certain period
expires at host time, but the guest may be descheduled
at that time and thus the irq be overwritten by later fire.
This patch keep track of firing irq numbers and decrease
only when the IRQ is injected to guest or buffered in
APIC.

Signed-off-by: Yaozu (Eddie) Dong &lt;Eddie.Dong@intel.com&gt;
Signed-off-by: Qing He &lt;qing.he@intel.com&gt;
Signed-off-by: Avi Kivity &lt;avi@qumranet.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
APIC timer IRQ is set every time when a certain period
expires at host time, but the guest may be descheduled
at that time and thus the irq be overwritten by later fire.
This patch keep track of firing irq numbers and decrease
only when the IRQ is injected to guest or buffered in
APIC.

Signed-off-by: Yaozu (Eddie) Dong &lt;Eddie.Dong@intel.com&gt;
Signed-off-by: Qing He &lt;qing.he@intel.com&gt;
Signed-off-by: Avi Kivity &lt;avi@qumranet.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>KVM: VMX: Use shadow TPR/cr8 for 64-bits guests</title>
<updated>2007-10-13T08:18:26+00:00</updated>
<author>
<name>Yang, Sheng</name>
<email>sheng.yang@intel.com</email>
</author>
<published>2007-09-12T10:03:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=6e5d865c0b9679b00b5e5f0754c9fc2b6b9894d6'/>
<id>6e5d865c0b9679b00b5e5f0754c9fc2b6b9894d6</id>
<content type='text'>
This patch enables TPR shadow of VMX on CR8 access. 64bit Windows using
CR8 access TPR frequently. The TPR shadow can improve the performance of
access TPR by not causing vmexit.

Signed-off-by: Sheng Yang &lt;sheng.yang@intel.com&gt;
Signed-off-by: Yaozu (Eddie) Dong &lt;eddie.dong@intel.com&gt;
Signed-off-by: Qing He &lt;qing.he@intel.com&gt;
Signed-off-by: Avi Kivity &lt;avi@qumranet.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch enables TPR shadow of VMX on CR8 access. 64bit Windows using
CR8 access TPR frequently. The TPR shadow can improve the performance of
access TPR by not causing vmexit.

Signed-off-by: Sheng Yang &lt;sheng.yang@intel.com&gt;
Signed-off-by: Yaozu (Eddie) Dong &lt;eddie.dong@intel.com&gt;
Signed-off-by: Qing He &lt;qing.he@intel.com&gt;
Signed-off-by: Avi Kivity &lt;avi@qumranet.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>KVM: in-kernel LAPIC save and restore support</title>
<updated>2007-10-13T08:18:25+00:00</updated>
<author>
<name>Eddie Dong</name>
<email>eddie.dong@intel.com</email>
</author>
<published>2007-09-06T09:22:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=96ad2cc6132479aa0aea485d0838a13fda765bd5'/>
<id>96ad2cc6132479aa0aea485d0838a13fda765bd5</id>
<content type='text'>
This patch adds a new vcpu-based IOCTL to save and restore the local
apic registers for a single vcpu. The kernel only copies the apic page as
a whole, extraction of registers is left to userspace side. On restore, the
APIC timer is restarted from the initial count, this introduces a little
delay, but works fine.

Signed-off-by: Yaozu (Eddie) Dong &lt;eddie.dong@intel.com&gt;
Signed-off-by: Qing He &lt;qing.he@intel.com&gt;
Signed-off-by: Avi Kivity &lt;avi@qumranet.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch adds a new vcpu-based IOCTL to save and restore the local
apic registers for a single vcpu. The kernel only copies the apic page as
a whole, extraction of registers is left to userspace side. On restore, the
APIC timer is restarted from the initial count, this introduces a little
delay, but works fine.

Signed-off-by: Yaozu (Eddie) Dong &lt;eddie.dong@intel.com&gt;
Signed-off-by: Qing He &lt;qing.he@intel.com&gt;
Signed-off-by: Avi Kivity &lt;avi@qumranet.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>KVM: Emulate local APIC in kernel</title>
<updated>2007-10-13T08:18:25+00:00</updated>
<author>
<name>Eddie Dong</name>
<email>eddie.dong@intel.com</email>
</author>
<published>2007-09-12T07:58:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=97222cc8316328965851ed28d23f6b64b4c912d2'/>
<id>97222cc8316328965851ed28d23f6b64b4c912d2</id>
<content type='text'>
Because lightweight exits (exits which don't involve userspace) are many
times faster than heavyweight exits, it makes sense to emulate high usage
devices in the kernel.  The local APIC is one such device, especially for
Windows and for SMP, so we add an APIC model to kvm.

It also allows in-kernel host-side drivers to inject interrupts without
going through userspace.

[compile fix on i386 from Jindrich Makovicka]

Signed-off-by: Yaozu (Eddie) Dong &lt;Eddie.Dong@intel.com&gt;
Signed-off-by: Qing He &lt;qing.he@intel.com&gt;
Signed-off-by: Avi Kivity &lt;avi@qumranet.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Because lightweight exits (exits which don't involve userspace) are many
times faster than heavyweight exits, it makes sense to emulate high usage
devices in the kernel.  The local APIC is one such device, especially for
Windows and for SMP, so we add an APIC model to kvm.

It also allows in-kernel host-side drivers to inject interrupts without
going through userspace.

[compile fix on i386 from Jindrich Makovicka]

Signed-off-by: Yaozu (Eddie) Dong &lt;Eddie.Dong@intel.com&gt;
Signed-off-by: Qing He &lt;qing.he@intel.com&gt;
Signed-off-by: Avi Kivity &lt;avi@qumranet.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
