<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/arch/x86/kernel/kvmclock.c, branch linux-4.7.y</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>x86: Fix misspellings in comments</title>
<updated>2016-02-24T07:44:58+00:00</updated>
<author>
<name>Adam Buchbinder</name>
<email>adam.buchbinder@gmail.com</email>
</author>
<published>2016-02-23T23:34:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=6a6256f9e0ebaabf7ded1fef8977a4352dbe7784'/>
<id>6a6256f9e0ebaabf7ded1fef8977a4352dbe7784</id>
<content type='text'>
Signed-off-by: Adam Buchbinder &lt;adam.buchbinder@gmail.com&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: trivial@kernel.org
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Adam Buchbinder &lt;adam.buchbinder@gmail.com&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: trivial@kernel.org
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>x86/vdso: Remove pvclock fixmap machinery</title>
<updated>2015-12-11T07:56:03+00:00</updated>
<author>
<name>Andy Lutomirski</name>
<email>luto@kernel.org</email>
</author>
<published>2015-12-11T03:20:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=cc1e24fdb064d3126a494716f22ad4fc39306742'/>
<id>cc1e24fdb064d3126a494716f22ad4fc39306742</id>
<content type='text'>
Signed-off-by: Andy Lutomirski &lt;luto@kernel.org&gt;
Reviewed-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Cc: Andy Lutomirski &lt;luto@amacapital.net&gt;
Cc: Borislav Petkov &lt;bp@alien8.de&gt;
Cc: Brian Gerst &lt;brgerst@gmail.com&gt;
Cc: Denys Vlasenko &lt;dvlasenk@redhat.com&gt;
Cc: H. Peter Anvin &lt;hpa@zytor.com&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: linux-mm@kvack.org
Link: http://lkml.kernel.org/r/4933029991103ae44672c82b97a20035f5c1fe4f.1449702533.git.luto@kernel.org
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Andy Lutomirski &lt;luto@kernel.org&gt;
Reviewed-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Cc: Andy Lutomirski &lt;luto@amacapital.net&gt;
Cc: Borislav Petkov &lt;bp@alien8.de&gt;
Cc: Brian Gerst &lt;brgerst@gmail.com&gt;
Cc: Denys Vlasenko &lt;dvlasenk@redhat.com&gt;
Cc: H. Peter Anvin &lt;hpa@zytor.com&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: linux-mm@kvack.org
Link: http://lkml.kernel.org/r/4933029991103ae44672c82b97a20035f5c1fe4f.1449702533.git.luto@kernel.org
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>x86/vdso: Get pvclock data from the vvar VMA instead of the fixmap</title>
<updated>2015-12-11T07:56:03+00:00</updated>
<author>
<name>Andy Lutomirski</name>
<email>luto@kernel.org</email>
</author>
<published>2015-12-11T03:20:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=dac16fba6fc590fa7239676b35ed75dae4c4cd2b'/>
<id>dac16fba6fc590fa7239676b35ed75dae4c4cd2b</id>
<content type='text'>
Signed-off-by: Andy Lutomirski &lt;luto@kernel.org&gt;
Reviewed-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Cc: Andy Lutomirski &lt;luto@amacapital.net&gt;
Cc: Borislav Petkov &lt;bp@alien8.de&gt;
Cc: Brian Gerst &lt;brgerst@gmail.com&gt;
Cc: Denys Vlasenko &lt;dvlasenk@redhat.com&gt;
Cc: H. Peter Anvin &lt;hpa@zytor.com&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: linux-mm@kvack.org
Link: http://lkml.kernel.org/r/9d37826fdc7e2d2809efe31d5345f97186859284.1449702533.git.luto@kernel.org
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Andy Lutomirski &lt;luto@kernel.org&gt;
Reviewed-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Cc: Andy Lutomirski &lt;luto@amacapital.net&gt;
Cc: Borislav Petkov &lt;bp@alien8.de&gt;
Cc: Brian Gerst &lt;brgerst@gmail.com&gt;
Cc: Denys Vlasenko &lt;dvlasenk@redhat.com&gt;
Cc: H. Peter Anvin &lt;hpa@zytor.com&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: linux-mm@kvack.org
Link: http://lkml.kernel.org/r/9d37826fdc7e2d2809efe31d5345f97186859284.1449702533.git.luto@kernel.org
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>x86: kvmclock: abolish PVCLOCK_COUNTS_FROM_ZERO</title>
<updated>2015-10-01T13:06:42+00:00</updated>
<author>
<name>Radim Krčmář</name>
<email>rkrcmar@redhat.com</email>
</author>
<published>2015-09-18T15:54:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=72c930dcfc2b49404ee9e20f6c868402e9c71166'/>
<id>72c930dcfc2b49404ee9e20f6c868402e9c71166</id>
<content type='text'>
Newer KVM won't be exposing PVCLOCK_COUNTS_FROM_ZERO anymore.
The purpose of that flags was to start counting system time from 0 when
the KVM clock has been initialized.
We can achieve the same by selecting one read as the initial point.

A simple subtraction will work unless the KVM clock count overflows
earlier (has smaller width) than scheduler's cycle count.  We should be
safe till x86_128.

Because PVCLOCK_COUNTS_FROM_ZERO was enabled only on new hypervisors,
setting sched clock as stable based on PVCLOCK_TSC_STABLE_BIT might
regress on older ones.

I presume we don't need to change kvm_clock_read instead of introducing
kvm_sched_clock_read.  A problem could arise in case sched_clock is
expected to return the same value as get_cycles, but we should have
merged those clocks in that case.

Signed-off-by: Radim Krčmář &lt;rkrcmar@redhat.com&gt;
Acked-by: Marcelo Tosatti &lt;mtosatti@redhat.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Newer KVM won't be exposing PVCLOCK_COUNTS_FROM_ZERO anymore.
The purpose of that flags was to start counting system time from 0 when
the KVM clock has been initialized.
We can achieve the same by selecting one read as the initial point.

A simple subtraction will work unless the KVM clock count overflows
earlier (has smaller width) than scheduler's cycle count.  We should be
safe till x86_128.

Because PVCLOCK_COUNTS_FROM_ZERO was enabled only on new hypervisors,
setting sched clock as stable based on PVCLOCK_TSC_STABLE_BIT might
regress on older ones.

I presume we don't need to change kvm_clock_read instead of introducing
kvm_sched_clock_read.  A problem could arise in case sched_clock is
expected to return the same value as get_cycles, but we should have
merged those clocks in that case.

Signed-off-by: Radim Krčmář &lt;rkrcmar@redhat.com&gt;
Acked-by: Marcelo Tosatti &lt;mtosatti@redhat.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>kexec: split kexec_load syscall from kexec core code</title>
<updated>2015-09-10T20:29:01+00:00</updated>
<author>
<name>Dave Young</name>
<email>dyoung@redhat.com</email>
</author>
<published>2015-09-09T22:38:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=2965faa5e03d1e71e9ff9aa143fff39e0a77543a'/>
<id>2965faa5e03d1e71e9ff9aa143fff39e0a77543a</id>
<content type='text'>
There are two kexec load syscalls, kexec_load another and kexec_file_load.
 kexec_file_load has been splited as kernel/kexec_file.c.  In this patch I
split kexec_load syscall code to kernel/kexec.c.

And add a new kconfig option KEXEC_CORE, so we can disable kexec_load and
use kexec_file_load only, or vice verse.

The original requirement is from Ted Ts'o, he want kexec kernel signature
being checked with CONFIG_KEXEC_VERIFY_SIG enabled.  But kexec-tools use
kexec_load syscall can bypass the checking.

Vivek Goyal proposed to create a common kconfig option so user can compile
in only one syscall for loading kexec kernel.  KEXEC/KEXEC_FILE selects
KEXEC_CORE so that old config files still work.

Because there's general code need CONFIG_KEXEC_CORE, so I updated all the
architecture Kconfig with a new option KEXEC_CORE, and let KEXEC selects
KEXEC_CORE in arch Kconfig.  Also updated general kernel code with to
kexec_load syscall.

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Dave Young &lt;dyoung@redhat.com&gt;
Cc: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
Cc: Vivek Goyal &lt;vgoyal@redhat.com&gt;
Cc: Petr Tesarik &lt;ptesarik@suse.cz&gt;
Cc: Theodore Ts'o &lt;tytso@mit.edu&gt;
Cc: Josh Boyer &lt;jwboyer@fedoraproject.org&gt;
Cc: David Howells &lt;dhowells@redhat.com&gt;
Cc: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There are two kexec load syscalls, kexec_load another and kexec_file_load.
 kexec_file_load has been splited as kernel/kexec_file.c.  In this patch I
split kexec_load syscall code to kernel/kexec.c.

And add a new kconfig option KEXEC_CORE, so we can disable kexec_load and
use kexec_file_load only, or vice verse.

The original requirement is from Ted Ts'o, he want kexec kernel signature
being checked with CONFIG_KEXEC_VERIFY_SIG enabled.  But kexec-tools use
kexec_load syscall can bypass the checking.

Vivek Goyal proposed to create a common kconfig option so user can compile
in only one syscall for loading kexec kernel.  KEXEC/KEXEC_FILE selects
KEXEC_CORE so that old config files still work.

Because there's general code need CONFIG_KEXEC_CORE, so I updated all the
architecture Kconfig with a new option KEXEC_CORE, and let KEXEC selects
KEXEC_CORE in arch Kconfig.  Also updated general kernel code with to
kexec_load syscall.

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Dave Young &lt;dyoung@redhat.com&gt;
Cc: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
Cc: Vivek Goyal &lt;vgoyal@redhat.com&gt;
Cc: Petr Tesarik &lt;ptesarik@suse.cz&gt;
Cc: Theodore Ts'o &lt;tytso@mit.edu&gt;
Cc: Josh Boyer &lt;jwboyer@fedoraproject.org&gt;
Cc: David Howells &lt;dhowells@redhat.com&gt;
Cc: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>x86: kvmclock: set scheduler clock stable</title>
<updated>2015-05-29T12:01:52+00:00</updated>
<author>
<name>Luiz Capitulino</name>
<email>lcapitulino@redhat.com</email>
</author>
<published>2015-05-28T23:20:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=0ad83caa21bff9f383c10e73b452425709573042'/>
<id>0ad83caa21bff9f383c10e73b452425709573042</id>
<content type='text'>
If you try to enable NOHZ_FULL on a guest today, you'll get
the following error when the guest tries to deactivate the
scheduler tick:

 WARNING: CPU: 3 PID: 2182 at kernel/time/tick-sched.c:192 can_stop_full_tick+0xb9/0x290()
 NO_HZ FULL will not work with unstable sched clock
 CPU: 3 PID: 2182 Comm: kworker/3:1 Not tainted 4.0.0-10545-gb9bb6fb #204
 Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
 Workqueue: events flush_to_ldisc
  ffffffff8162a0c7 ffff88011f583e88 ffffffff814e6ba0 0000000000000002
  ffff88011f583ed8 ffff88011f583ec8 ffffffff8104d095 ffff88011f583eb8
  0000000000000000 0000000000000003 0000000000000001 0000000000000001
 Call Trace:
  &lt;IRQ&gt;  [&lt;ffffffff814e6ba0&gt;] dump_stack+0x4f/0x7b
  [&lt;ffffffff8104d095&gt;] warn_slowpath_common+0x85/0xc0
  [&lt;ffffffff8104d146&gt;] warn_slowpath_fmt+0x46/0x50
  [&lt;ffffffff810bd2a9&gt;] can_stop_full_tick+0xb9/0x290
  [&lt;ffffffff810bd9ed&gt;] tick_nohz_irq_exit+0x8d/0xb0
  [&lt;ffffffff810511c5&gt;] irq_exit+0xc5/0x130
  [&lt;ffffffff814f180a&gt;] smp_apic_timer_interrupt+0x4a/0x60
  [&lt;ffffffff814eff5e&gt;] apic_timer_interrupt+0x6e/0x80
  &lt;EOI&gt;  [&lt;ffffffff814ee5d1&gt;] ? _raw_spin_unlock_irqrestore+0x31/0x60
  [&lt;ffffffff8108bbc8&gt;] __wake_up+0x48/0x60
  [&lt;ffffffff8134836c&gt;] n_tty_receive_buf_common+0x49c/0xba0
  [&lt;ffffffff8134a6bf&gt;] ? tty_ldisc_ref+0x1f/0x70
  [&lt;ffffffff81348a84&gt;] n_tty_receive_buf2+0x14/0x20
  [&lt;ffffffff8134b390&gt;] flush_to_ldisc+0xe0/0x120
  [&lt;ffffffff81064d05&gt;] process_one_work+0x1d5/0x540
  [&lt;ffffffff81064c81&gt;] ? process_one_work+0x151/0x540
  [&lt;ffffffff81065191&gt;] worker_thread+0x121/0x470
  [&lt;ffffffff81065070&gt;] ? process_one_work+0x540/0x540
  [&lt;ffffffff8106b4df&gt;] kthread+0xef/0x110
  [&lt;ffffffff8106b3f0&gt;] ? __kthread_parkme+0xa0/0xa0
  [&lt;ffffffff814ef4f2&gt;] ret_from_fork+0x42/0x70
  [&lt;ffffffff8106b3f0&gt;] ? __kthread_parkme+0xa0/0xa0
 ---[ end trace 06e3507544a38866 ]---

However, it turns out that kvmclock does provide a stable
sched_clock callback. So, let the scheduler know this which
in turn makes NOHZ_FULL work in the guest.

Signed-off-by: Marcelo Tosatti &lt;mtosatti@redhat.com&gt;
Signed-off-by: Luiz Capitulino &lt;lcapitulino@redhat.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If you try to enable NOHZ_FULL on a guest today, you'll get
the following error when the guest tries to deactivate the
scheduler tick:

 WARNING: CPU: 3 PID: 2182 at kernel/time/tick-sched.c:192 can_stop_full_tick+0xb9/0x290()
 NO_HZ FULL will not work with unstable sched clock
 CPU: 3 PID: 2182 Comm: kworker/3:1 Not tainted 4.0.0-10545-gb9bb6fb #204
 Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
 Workqueue: events flush_to_ldisc
  ffffffff8162a0c7 ffff88011f583e88 ffffffff814e6ba0 0000000000000002
  ffff88011f583ed8 ffff88011f583ec8 ffffffff8104d095 ffff88011f583eb8
  0000000000000000 0000000000000003 0000000000000001 0000000000000001
 Call Trace:
  &lt;IRQ&gt;  [&lt;ffffffff814e6ba0&gt;] dump_stack+0x4f/0x7b
  [&lt;ffffffff8104d095&gt;] warn_slowpath_common+0x85/0xc0
  [&lt;ffffffff8104d146&gt;] warn_slowpath_fmt+0x46/0x50
  [&lt;ffffffff810bd2a9&gt;] can_stop_full_tick+0xb9/0x290
  [&lt;ffffffff810bd9ed&gt;] tick_nohz_irq_exit+0x8d/0xb0
  [&lt;ffffffff810511c5&gt;] irq_exit+0xc5/0x130
  [&lt;ffffffff814f180a&gt;] smp_apic_timer_interrupt+0x4a/0x60
  [&lt;ffffffff814eff5e&gt;] apic_timer_interrupt+0x6e/0x80
  &lt;EOI&gt;  [&lt;ffffffff814ee5d1&gt;] ? _raw_spin_unlock_irqrestore+0x31/0x60
  [&lt;ffffffff8108bbc8&gt;] __wake_up+0x48/0x60
  [&lt;ffffffff8134836c&gt;] n_tty_receive_buf_common+0x49c/0xba0
  [&lt;ffffffff8134a6bf&gt;] ? tty_ldisc_ref+0x1f/0x70
  [&lt;ffffffff81348a84&gt;] n_tty_receive_buf2+0x14/0x20
  [&lt;ffffffff8134b390&gt;] flush_to_ldisc+0xe0/0x120
  [&lt;ffffffff81064d05&gt;] process_one_work+0x1d5/0x540
  [&lt;ffffffff81064c81&gt;] ? process_one_work+0x151/0x540
  [&lt;ffffffff81065191&gt;] worker_thread+0x121/0x470
  [&lt;ffffffff81065070&gt;] ? process_one_work+0x540/0x540
  [&lt;ffffffff8106b4df&gt;] kthread+0xef/0x110
  [&lt;ffffffff8106b3f0&gt;] ? __kthread_parkme+0xa0/0xa0
  [&lt;ffffffff814ef4f2&gt;] ret_from_fork+0x42/0x70
  [&lt;ffffffff8106b3f0&gt;] ? __kthread_parkme+0xa0/0xa0
 ---[ end trace 06e3507544a38866 ]---

However, it turns out that kvmclock does provide a stable
sched_clock callback. So, let the scheduler know this which
in turn makes NOHZ_FULL work in the guest.

Signed-off-by: Marcelo Tosatti &lt;mtosatti@redhat.com&gt;
Signed-off-by: Luiz Capitulino &lt;lcapitulino@redhat.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "kvmclock: set scheduler clock stable"</title>
<updated>2015-05-19T18:52:37+00:00</updated>
<author>
<name>Paolo Bonzini</name>
<email>pbonzini@redhat.com</email>
</author>
<published>2015-05-13T13:59:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=c35ebbeade127e7bca1f21ef5bf1a39deffba9de'/>
<id>c35ebbeade127e7bca1f21ef5bf1a39deffba9de</id>
<content type='text'>
This reverts commit ff7bbb9c6ab6e6620429daeff39424bbde1a94b4.
Sasha Levin is seeing odd jump in time values during boot of a KVM guest:

[...]
[    0.000000] tsc: Detected 2260.998 MHz processor
[3376355.247558] Calibrating delay loop (skipped) preset value..
[...]

and bisected them to this commit.

Reported-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit ff7bbb9c6ab6e6620429daeff39424bbde1a94b4.
Sasha Levin is seeing odd jump in time values during boot of a KVM guest:

[...]
[    0.000000] tsc: Detected 2260.998 MHz processor
[3376355.247558] Calibrating delay loop (skipped) preset value..
[...]

and bisected them to this commit.

Reported-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>kvmclock: set scheduler clock stable</title>
<updated>2015-05-07T09:28:20+00:00</updated>
<author>
<name>Luiz Capitulino</name>
<email>lcapitulino@redhat.com</email>
</author>
<published>2015-04-23T21:12:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=ff7bbb9c6ab6e6620429daeff39424bbde1a94b4'/>
<id>ff7bbb9c6ab6e6620429daeff39424bbde1a94b4</id>
<content type='text'>
If you try to enable NOHZ_FULL on a guest today, you'll get
the following error when the guest tries to deactivate the
scheduler tick:

 WARNING: CPU: 3 PID: 2182 at kernel/time/tick-sched.c:192 can_stop_full_tick+0xb9/0x290()
 NO_HZ FULL will not work with unstable sched clock
 CPU: 3 PID: 2182 Comm: kworker/3:1 Not tainted 4.0.0-10545-gb9bb6fb #204
 Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
 Workqueue: events flush_to_ldisc
  ffffffff8162a0c7 ffff88011f583e88 ffffffff814e6ba0 0000000000000002
  ffff88011f583ed8 ffff88011f583ec8 ffffffff8104d095 ffff88011f583eb8
  0000000000000000 0000000000000003 0000000000000001 0000000000000001
 Call Trace:
  &lt;IRQ&gt;  [&lt;ffffffff814e6ba0&gt;] dump_stack+0x4f/0x7b
  [&lt;ffffffff8104d095&gt;] warn_slowpath_common+0x85/0xc0
  [&lt;ffffffff8104d146&gt;] warn_slowpath_fmt+0x46/0x50
  [&lt;ffffffff810bd2a9&gt;] can_stop_full_tick+0xb9/0x290
  [&lt;ffffffff810bd9ed&gt;] tick_nohz_irq_exit+0x8d/0xb0
  [&lt;ffffffff810511c5&gt;] irq_exit+0xc5/0x130
  [&lt;ffffffff814f180a&gt;] smp_apic_timer_interrupt+0x4a/0x60
  [&lt;ffffffff814eff5e&gt;] apic_timer_interrupt+0x6e/0x80
  &lt;EOI&gt;  [&lt;ffffffff814ee5d1&gt;] ? _raw_spin_unlock_irqrestore+0x31/0x60
  [&lt;ffffffff8108bbc8&gt;] __wake_up+0x48/0x60
  [&lt;ffffffff8134836c&gt;] n_tty_receive_buf_common+0x49c/0xba0
  [&lt;ffffffff8134a6bf&gt;] ? tty_ldisc_ref+0x1f/0x70
  [&lt;ffffffff81348a84&gt;] n_tty_receive_buf2+0x14/0x20
  [&lt;ffffffff8134b390&gt;] flush_to_ldisc+0xe0/0x120
  [&lt;ffffffff81064d05&gt;] process_one_work+0x1d5/0x540
  [&lt;ffffffff81064c81&gt;] ? process_one_work+0x151/0x540
  [&lt;ffffffff81065191&gt;] worker_thread+0x121/0x470
  [&lt;ffffffff81065070&gt;] ? process_one_work+0x540/0x540
  [&lt;ffffffff8106b4df&gt;] kthread+0xef/0x110
  [&lt;ffffffff8106b3f0&gt;] ? __kthread_parkme+0xa0/0xa0
  [&lt;ffffffff814ef4f2&gt;] ret_from_fork+0x42/0x70
  [&lt;ffffffff8106b3f0&gt;] ? __kthread_parkme+0xa0/0xa0
 ---[ end trace 06e3507544a38866 ]---

However, it turns out that kvmclock does provide a stable
sched_clock callback. So, let the scheduler know this which
in turn makes NOHZ_FULL work in the guest.

Signed-off-by: Marcelo Tosatti &lt;mtosatti@redhat.com&gt;
Signed-off-by: Luiz Capitulino &lt;lcapitulino@redhat.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If you try to enable NOHZ_FULL on a guest today, you'll get
the following error when the guest tries to deactivate the
scheduler tick:

 WARNING: CPU: 3 PID: 2182 at kernel/time/tick-sched.c:192 can_stop_full_tick+0xb9/0x290()
 NO_HZ FULL will not work with unstable sched clock
 CPU: 3 PID: 2182 Comm: kworker/3:1 Not tainted 4.0.0-10545-gb9bb6fb #204
 Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
 Workqueue: events flush_to_ldisc
  ffffffff8162a0c7 ffff88011f583e88 ffffffff814e6ba0 0000000000000002
  ffff88011f583ed8 ffff88011f583ec8 ffffffff8104d095 ffff88011f583eb8
  0000000000000000 0000000000000003 0000000000000001 0000000000000001
 Call Trace:
  &lt;IRQ&gt;  [&lt;ffffffff814e6ba0&gt;] dump_stack+0x4f/0x7b
  [&lt;ffffffff8104d095&gt;] warn_slowpath_common+0x85/0xc0
  [&lt;ffffffff8104d146&gt;] warn_slowpath_fmt+0x46/0x50
  [&lt;ffffffff810bd2a9&gt;] can_stop_full_tick+0xb9/0x290
  [&lt;ffffffff810bd9ed&gt;] tick_nohz_irq_exit+0x8d/0xb0
  [&lt;ffffffff810511c5&gt;] irq_exit+0xc5/0x130
  [&lt;ffffffff814f180a&gt;] smp_apic_timer_interrupt+0x4a/0x60
  [&lt;ffffffff814eff5e&gt;] apic_timer_interrupt+0x6e/0x80
  &lt;EOI&gt;  [&lt;ffffffff814ee5d1&gt;] ? _raw_spin_unlock_irqrestore+0x31/0x60
  [&lt;ffffffff8108bbc8&gt;] __wake_up+0x48/0x60
  [&lt;ffffffff8134836c&gt;] n_tty_receive_buf_common+0x49c/0xba0
  [&lt;ffffffff8134a6bf&gt;] ? tty_ldisc_ref+0x1f/0x70
  [&lt;ffffffff81348a84&gt;] n_tty_receive_buf2+0x14/0x20
  [&lt;ffffffff8134b390&gt;] flush_to_ldisc+0xe0/0x120
  [&lt;ffffffff81064d05&gt;] process_one_work+0x1d5/0x540
  [&lt;ffffffff81064c81&gt;] ? process_one_work+0x151/0x540
  [&lt;ffffffff81065191&gt;] worker_thread+0x121/0x470
  [&lt;ffffffff81065070&gt;] ? process_one_work+0x540/0x540
  [&lt;ffffffff8106b4df&gt;] kthread+0xef/0x110
  [&lt;ffffffff8106b3f0&gt;] ? __kthread_parkme+0xa0/0xa0
  [&lt;ffffffff814ef4f2&gt;] ret_from_fork+0x42/0x70
  [&lt;ffffffff8106b3f0&gt;] ? __kthread_parkme+0xa0/0xa0
 ---[ end trace 06e3507544a38866 ]---

However, it turns out that kvmclock does provide a stable
sched_clock callback. So, let the scheduler know this which
in turn makes NOHZ_FULL work in the guest.

Signed-off-by: Marcelo Tosatti &lt;mtosatti@redhat.com&gt;
Signed-off-by: Luiz Capitulino &lt;lcapitulino@redhat.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>x86, kvm: Clear paravirt_enabled on KVM guests for espfix32's benefit</title>
<updated>2014-12-10T11:49:39+00:00</updated>
<author>
<name>Andy Lutomirski</name>
<email>luto@amacapital.net</email>
</author>
<published>2014-12-06T03:03:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=29fa6825463c97e5157284db80107d1bfac5d77b'/>
<id>29fa6825463c97e5157284db80107d1bfac5d77b</id>
<content type='text'>
paravirt_enabled has the following effects:

 - Disables the F00F bug workaround warning.  There is no F00F bug
   workaround any more because Linux's standard IDT handling already
   works around the F00F bug, but the warning still exists.  This
   is only cosmetic, and, in any event, there is no such thing as
   KVM on a CPU with the F00F bug.

 - Disables 32-bit APM BIOS detection.  On a KVM paravirt system,
   there should be no APM BIOS anyway.

 - Disables tboot.  I think that the tboot code should check the
   CPUID hypervisor bit directly if it matters.

 - paravirt_enabled disables espfix32.  espfix32 should *not* be
   disabled under KVM paravirt.

The last point is the purpose of this patch.  It fixes a leak of the
high 16 bits of the kernel stack address on 32-bit KVM paravirt
guests.  Fixes CVE-2014-8134.

Cc: stable@vger.kernel.org
Suggested-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
Signed-off-by: Andy Lutomirski &lt;luto@amacapital.net&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
paravirt_enabled has the following effects:

 - Disables the F00F bug workaround warning.  There is no F00F bug
   workaround any more because Linux's standard IDT handling already
   works around the F00F bug, but the warning still exists.  This
   is only cosmetic, and, in any event, there is no such thing as
   KVM on a CPU with the F00F bug.

 - Disables 32-bit APM BIOS detection.  On a KVM paravirt system,
   there should be no APM BIOS anyway.

 - Disables tboot.  I think that the tboot code should check the
   CPUID hypervisor bit directly if it matters.

 - paravirt_enabled disables espfix32.  espfix32 should *not* be
   disabled under KVM paravirt.

The last point is the purpose of this patch.  It fixes a leak of the
high 16 bits of the kernel stack address on 32-bit KVM paravirt
guests.  Fixes CVE-2014-8134.

Cc: stable@vger.kernel.org
Suggested-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
Signed-off-by: Andy Lutomirski &lt;luto@amacapital.net&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>kvm: kvmclock: use get_cpu() and put_cpu()</title>
<updated>2014-11-03T11:07:33+00:00</updated>
<author>
<name>Tiejun Chen</name>
<email>tiejun.chen@intel.com</email>
</author>
<published>2014-09-26T06:00:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=c6338ce494456ed9c92ef10f63c0a8408bfeac6d'/>
<id>c6338ce494456ed9c92ef10f63c0a8408bfeac6d</id>
<content type='text'>
We can use get_cpu() and put_cpu() to replace
preempt_disable()/cpu = smp_processor_id() and
preempt_enable() for slightly better code.

Signed-off-by: Tiejun Chen &lt;tiejun.chen@intel.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We can use get_cpu() and put_cpu() to replace
preempt_disable()/cpu = smp_processor_id() and
preempt_enable() for slightly better code.

Signed-off-by: Tiejun Chen &lt;tiejun.chen@intel.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
