From: Ingo Molnar <mingo@elte.hu>
To: Avi Kivity <avi@redhat.com>
Cc: Luis Henriques <henrix@sapo.pt>,
Peter Zijlstra <peterz@infradead.org>,
linux-kernel@vger.kernel.org,
Andrea Arcangeli <aarcange@redhat.com>
Subject: Re: Problem with kvm on -tip
Date: Sun, 12 Apr 2009 14:42:43 +0200 [thread overview]
Message-ID: <20090412124243.GA20281@elte.hu> (raw)
In-Reply-To: <49E08857.2090503@redhat.com>
* Avi Kivity <avi@redhat.com> wrote:
> index a1ecec5..b556b6a 100644
> --- a/arch/x86/kvm/x86.c
> +++ b/arch/x86/kvm/x86.c
> @@ -630,10 +630,12 @@ static void kvm_write_guest_time(struct kvm_vcpu *v)
> if ((!vcpu->time_page))
> return;
>
> + preempt_disable();
> if (unlikely(vcpu->hv_clock_tsc_khz != __get_cpu_var(cpu_tsc_khz))) {
> kvm_set_time_scale(__get_cpu_var(cpu_tsc_khz), &vcpu->hv_clock);
> vcpu->hv_clock_tsc_khz = __get_cpu_var(cpu_tsc_khz);
> }
> + preempt_enable();
fix look good, but note that this is an open-coded get_cpu_var()
sequence - please use get_cpu_var()/put_cpu_var() instead.
Ingo
next prev parent reply other threads:[~2009-04-12 12:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-09 21:07 Problem with kvm on -tip Luis Henriques
2009-04-10 11:58 ` Ingo Molnar
2009-04-10 15:33 ` Jeremy Fitzhardinge
2009-04-11 12:08 ` Avi Kivity
2009-04-11 19:45 ` Luis Henriques
2009-04-12 11:53 ` Avi Kivity
2009-04-12 12:54 ` Luis Henriques
2009-04-12 12:42 ` Ingo Molnar [this message]
2009-04-12 12:46 ` Avi Kivity
2009-04-14 7:58 ` Peter Zijlstra
2009-04-14 8:20 ` Avi Kivity
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090412124243.GA20281@elte.hu \
--to=mingo@elte.hu \
--cc=aarcange@redhat.com \
--cc=avi@redhat.com \
--cc=henrix@sapo.pt \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox