<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/arch/x86/kernel/kvmclock.c, branch v3.7</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>x86: kvmclock: remove check_and_clear_guest_paused warning</title>
<updated>2012-06-12T02:18:33+00:00</updated>
<author>
<name>Marcelo Tosatti</name>
<email>mtosatti@redhat.com</email>
</author>
<published>2012-06-12T02:18:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=e32025a56403df4386cd61a741c0a36afe79ae8a'/>
<id>e32025a56403df4386cd61a741c0a36afe79ae8a</id>
<content type='text'>
CPU offline path calls the hrtimer interrupt handler with interrupts
disabled, without touching preempt_count, triggering this warning.

Remove the warning since it is supposed to be used from hrtimer
interrupt context only.

Signed-off-by: Marcelo Tosatti &lt;mtosatti@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
CPU offline path calls the hrtimer interrupt handler with interrupts
disabled, without touching preempt_count, triggering this warning.

Remove the warning since it is supposed to be used from hrtimer
interrupt context only.

Signed-off-by: Marcelo Tosatti &lt;mtosatti@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>kvmclock: remove unneeded EXPORT macro</title>
<updated>2012-04-08T09:49:54+00:00</updated>
<author>
<name>Eric B Munson</name>
<email>emunson@mgebm.net</email>
</author>
<published>2012-03-15T22:16:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=248997095d652576f1213028a95ca5fff85d089f'/>
<id>248997095d652576f1213028a95ca5fff85d089f</id>
<content type='text'>
check_and_clear_guest_paused does not need to be exported as it isn't used
by any modules, remove the export.

Signed-off-by: Eric B Munson &lt;emunson@mgebm.net&gt;
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>
check_and_clear_guest_paused does not need to be exported as it isn't used
by any modules, remove the export.

Signed-off-by: Eric B Munson &lt;emunson@mgebm.net&gt;
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>kvmclock: Add functions to check if the host has stopped the vm</title>
<updated>2012-04-08T09:48:59+00:00</updated>
<author>
<name>Eric B Munson</name>
<email>emunson@mgebm.net</email>
</author>
<published>2012-03-10T19:37:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=3b5d56b9317fa7b5407dff1aa7b115bf6cdbd494'/>
<id>3b5d56b9317fa7b5407dff1aa7b115bf6cdbd494</id>
<content type='text'>
When a host stops or suspends a VM it will set a flag to show this.  The
watchdog will use these functions to determine if a softlockup is real, or the
result of a suspended VM.

Signed-off-by: Eric B Munson &lt;emunson@mgebm.net&gt;
asm-generic changes Acked-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
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>
When a host stops or suspends a VM it will set a flag to show this.  The
watchdog will use these functions to determine if a softlockup is real, or the
result of a suspended VM.

Signed-off-by: Eric B Munson &lt;emunson@mgebm.net&gt;
asm-generic changes Acked-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
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>x86: kvmclock: abstract save/restore sched_clock_state</title>
<updated>2012-03-20T10:37:45+00:00</updated>
<author>
<name>Marcelo Tosatti</name>
<email>mtosatti@redhat.com</email>
</author>
<published>2012-02-13T13:07:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=b74f05d61b73af584d0c39121980171389ecfaaa'/>
<id>b74f05d61b73af584d0c39121980171389ecfaaa</id>
<content type='text'>
Upon resume from hibernation, CPU 0's hvclock area contains the old
values for system_time and tsc_timestamp. It is necessary for the
hypervisor to update these values with uptodate ones before the CPU uses
them.

Abstract TSC's save/restore sched_clock_state functions and use
restore_state to write to KVM_SYSTEM_TIME MSR, forcing an update.

Also move restore_sched_clock_state before __restore_processor_state,
since the later calls CONFIG_LOCK_STAT's lockstat_clock (also for TSC).
Thanks to Igor Mammedov for tracking it down.

Fixes suspend-to-disk with kvmclock.

Reviewed-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
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>
Upon resume from hibernation, CPU 0's hvclock area contains the old
values for system_time and tsc_timestamp. It is necessary for the
hypervisor to update these values with uptodate ones before the CPU uses
them.

Abstract TSC's save/restore sched_clock_state functions and use
restore_state to write to KVM_SYSTEM_TIME MSR, forcing an update.

Also move restore_sched_clock_state before __restore_processor_state,
since the later calls CONFIG_LOCK_STAT's lockstat_clock (also for TSC).
Thanks to Igor Mammedov for tracking it down.

Fixes suspend-to-disk with kvmclock.

Reviewed-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
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>x86: Introduce x86_cpuinit.early_percpu_clock_init hook</title>
<updated>2012-03-05T12:57:32+00:00</updated>
<author>
<name>Igor Mammedov</name>
<email>imammedo@redhat.com</email>
</author>
<published>2012-02-07T14:52:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=df156f90a0f90649dd38b7667901ef85478f3d2b'/>
<id>df156f90a0f90649dd38b7667901ef85478f3d2b</id>
<content type='text'>
When kvm guest uses kvmclock, it may hang on vcpu hot-plug.
This is caused by an overflow in pvclock_get_nsec_offset,

    u64 delta = tsc - shadow-&gt;tsc_timestamp;

which in turn is caused by an undefined values from percpu
hv_clock that hasn't been initialized yet.
Uninitialized clock on being booted cpu is accessed from
   start_secondary
    -&gt; smp_callin
      -&gt;  smp_store_cpu_info
        -&gt; identify_secondary_cpu
          -&gt; mtrr_ap_init
            -&gt; mtrr_restore
              -&gt; stop_machine_from_inactive_cpu
                -&gt; queue_stop_cpus_work
                  ...
                    -&gt; sched_clock
                      -&gt; kvm_clock_read
which is well before x86_cpuinit.setup_percpu_clockev call in
start_secondary, where percpu clock is initialized.

This patch introduces a hook that allows to setup/initialize
per_cpu clock early and avoid overflow due to reading
  - undefined values
  - old values if cpu was offlined and then onlined again

Another possible early user of this clock source is ftrace that
accesses it to get timestamps for ring buffer entries. So if
mtrr_ap_init is moved from identify_secondary_cpu to past
x86_cpuinit.setup_percpu_clockev in start_secondary, ftrace
may cause the same overflow/hang on cpu hot-plug anyway.

More complete description of the problem:
  https://lkml.org/lkml/2012/2/2/101

Credits to Marcelo Tosatti &lt;mtosatti@redhat.com&gt; for hook idea.

Acked-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Igor Mammedov &lt;imammedo@redhat.com&gt;
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>
When kvm guest uses kvmclock, it may hang on vcpu hot-plug.
This is caused by an overflow in pvclock_get_nsec_offset,

    u64 delta = tsc - shadow-&gt;tsc_timestamp;

which in turn is caused by an undefined values from percpu
hv_clock that hasn't been initialized yet.
Uninitialized clock on being booted cpu is accessed from
   start_secondary
    -&gt; smp_callin
      -&gt;  smp_store_cpu_info
        -&gt; identify_secondary_cpu
          -&gt; mtrr_ap_init
            -&gt; mtrr_restore
              -&gt; stop_machine_from_inactive_cpu
                -&gt; queue_stop_cpus_work
                  ...
                    -&gt; sched_clock
                      -&gt; kvm_clock_read
which is well before x86_cpuinit.setup_percpu_clockev call in
start_secondary, where percpu clock is initialized.

This patch introduces a hook that allows to setup/initialize
per_cpu clock early and avoid overflow due to reading
  - undefined values
  - old values if cpu was offlined and then onlined again

Another possible early user of this clock source is ftrace that
accesses it to get timestamps for ring buffer entries. So if
mtrr_ap_init is moved from identify_secondary_cpu to past
x86_cpuinit.setup_percpu_clockev in start_secondary, ftrace
may cause the same overflow/hang on cpu hot-plug anyway.

More complete description of the problem:
  https://lkml.org/lkml/2012/2/2/101

Credits to Marcelo Tosatti &lt;mtosatti@redhat.com&gt; for hook idea.

Acked-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Igor Mammedov &lt;imammedo@redhat.com&gt;
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 guest: prevent tracing recursion with kvmclock</title>
<updated>2011-11-20T08:53:48+00:00</updated>
<author>
<name>Avi Kivity</name>
<email>avi@redhat.com</email>
</author>
<published>2011-11-15T12:59:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=95ef1e52922cf75b1ea2eae54ef886f2cc47eecb'/>
<id>95ef1e52922cf75b1ea2eae54ef886f2cc47eecb</id>
<content type='text'>
Prevent tracing of preempt_disable() in get_cpu_var() in
kvm_clock_read(). When CONFIG_DEBUG_PREEMPT is enabled,
preempt_disable/enable() are traced and this causes the function_graph
tracer to go into an infinite recursion. By open coding the
preempt_disable() around the get_cpu_var(), we can use the notrace
version which prevents preempt_disable/enable() from being traced and
prevents the recursion.

Based on a similar patch for Xen from Jeremy Fitzhardinge.

Tested-by: Gleb Natapov &lt;gleb@redhat.com&gt;
Acked-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Signed-off-by: Avi Kivity &lt;avi@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Prevent tracing of preempt_disable() in get_cpu_var() in
kvm_clock_read(). When CONFIG_DEBUG_PREEMPT is enabled,
preempt_disable/enable() are traced and this causes the function_graph
tracer to go into an infinite recursion. By open coding the
preempt_disable() around the get_cpu_var(), we can use the notrace
version which prevents preempt_disable/enable() from being traced and
prevents the recursion.

Based on a similar patch for Xen from Jeremy Fitzhardinge.

Tested-by: Gleb Natapov &lt;gleb@redhat.com&gt;
Acked-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Signed-off-by: Avi Kivity &lt;avi@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>KVM guest: KVM Steal time registration</title>
<updated>2011-07-24T08:49:36+00:00</updated>
<author>
<name>Glauber Costa</name>
<email>glommer@redhat.com</email>
</author>
<published>2011-07-11T19:28:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=d910f5c1064d7ff09c31b0191564f9f99e210f91'/>
<id>d910f5c1064d7ff09c31b0191564f9f99e210f91</id>
<content type='text'>
This patch implements the kvm bits of the steal time infrastructure.
The most important part of it, is the steal time clock. It is an
continuous clock that shows the accumulated amount of steal time
since vcpu creation. It is supposed to survive cpu offlining/onlining.

[marcelo: fix build with CONFIG_KVM_GUEST=n]

Signed-off-by: Glauber Costa &lt;glommer@redhat.com&gt;
Acked-by: Rik van Riel &lt;riel@redhat.com&gt;
Tested-by: Eric B Munson &lt;emunson@mgebm.net&gt;
CC: Jeremy Fitzhardinge &lt;jeremy.fitzhardinge@citrix.com&gt;
CC: Peter Zijlstra &lt;peterz@infradead.org&gt;
CC: Avi Kivity &lt;avi@redhat.com&gt;
CC: Anthony Liguori &lt;aliguori@us.ibm.com&gt;
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>
This patch implements the kvm bits of the steal time infrastructure.
The most important part of it, is the steal time clock. It is an
continuous clock that shows the accumulated amount of steal time
since vcpu creation. It is supposed to survive cpu offlining/onlining.

[marcelo: fix build with CONFIG_KVM_GUEST=n]

Signed-off-by: Glauber Costa &lt;glommer@redhat.com&gt;
Acked-by: Rik van Riel &lt;riel@redhat.com&gt;
Tested-by: Eric B Munson &lt;emunson@mgebm.net&gt;
CC: Jeremy Fitzhardinge &lt;jeremy.fitzhardinge@citrix.com&gt;
CC: Peter Zijlstra &lt;peterz@infradead.org&gt;
CC: Avi Kivity &lt;avi@redhat.com&gt;
CC: Anthony Liguori &lt;aliguori@us.ibm.com&gt;
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>x86: Convert remaining x86 clocksources to clocksource_register_hz/khz</title>
<updated>2011-02-21T21:33:33+00:00</updated>
<author>
<name>John Stultz</name>
<email>johnstul@us.ibm.com</email>
</author>
<published>2010-04-27T02:03:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=b01cc1b0eae0dea19257b29347116505fbedf679'/>
<id>b01cc1b0eae0dea19257b29347116505fbedf679</id>
<content type='text'>
This converts the remaining x86 clocksources to use
clocksource_register_hz/khz.

CC: jacob.jun.pan@intel.com
CC: Glauber Costa &lt;glommer@redhat.com&gt;
CC: Dimitri Sivanich &lt;sivanich@sgi.com&gt;
CC: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
CC: Jeremy Fitzhardinge &lt;jeremy@xensource.com&gt;
CC: Chris McDermott &lt;lcm@us.ibm.com&gt;
CC: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Tested-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt; [xen]
Signed-off-by: John Stultz &lt;johnstul@us.ibm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This converts the remaining x86 clocksources to use
clocksource_register_hz/khz.

CC: jacob.jun.pan@intel.com
CC: Glauber Costa &lt;glommer@redhat.com&gt;
CC: Dimitri Sivanich &lt;sivanich@sgi.com&gt;
CC: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
CC: Jeremy Fitzhardinge &lt;jeremy@xensource.com&gt;
CC: Chris McDermott &lt;lcm@us.ibm.com&gt;
CC: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Tested-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt; [xen]
Signed-off-by: John Stultz &lt;johnstul@us.ibm.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>KVM paravirt: Move kvm_smp_prepare_boot_cpu() from kvmclock.c to kvm.c.</title>
<updated>2011-01-12T09:23:10+00:00</updated>
<author>
<name>Gleb Natapov</name>
<email>gleb@redhat.com</email>
</author>
<published>2010-10-14T09:22:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=ca3f10172eea9b95bbb66487656f3c3e93855702'/>
<id>ca3f10172eea9b95bbb66487656f3c3e93855702</id>
<content type='text'>
Async PF also needs to hook into smp_prepare_boot_cpu so move the hook
into generic code.

Acked-by: Rik van Riel &lt;riel@redhat.com&gt;
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>
Async PF also needs to hook into smp_prepare_boot_cpu so move the hook
into generic code.

Acked-by: Rik van Riel &lt;riel@redhat.com&gt;
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 guest: Move a printk that's using the clock before it's ready</title>
<updated>2010-10-24T08:53:06+00:00</updated>
<author>
<name>Arjan Koers</name>
<email>0h61vkll2ly8@xutrox.com</email>
</author>
<published>2010-08-02T21:35:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=19b6a85b78a5d4b466c537bdbf0eaecae5e2c4e2'/>
<id>19b6a85b78a5d4b466c537bdbf0eaecae5e2c4e2</id>
<content type='text'>
Fix a hang during SMP kernel boot on KVM that showed up
after commit 489fb490dbf8dab0249ad82b56688ae3842a79e8
(2.6.35) and 59aab522154a2f17b25335b63c1cf68a51fb6ae0
(2.6.34.1). The problem only occurs when
CONFIG_PRINTK_TIME is set.

KVM-Stable-Tag.
Signed-off-by: Arjan Koers &lt;0h61vkll2ly8@xutrox.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>
Fix a hang during SMP kernel boot on KVM that showed up
after commit 489fb490dbf8dab0249ad82b56688ae3842a79e8
(2.6.35) and 59aab522154a2f17b25335b63c1cf68a51fb6ae0
(2.6.34.1). The problem only occurs when
CONFIG_PRINTK_TIME is set.

KVM-Stable-Tag.
Signed-off-by: Arjan Koers &lt;0h61vkll2ly8@xutrox.com&gt;
Signed-off-by: Avi Kivity &lt;avi@redhat.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
