From: Jan Kiszka <jan.kiszka@web.de>
To: Gleb Natapov <gleb@redhat.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>, kvm <kvm@vger.kernel.org>
Subject: Re: [PATCH] x86: kvmclock: Do not setup kvmclock vsyscall in the absence of that clock
Date: Sun, 07 Apr 2013 13:33:05 +0200 [thread overview]
Message-ID: <51615971.9050604@web.de> (raw)
In-Reply-To: <20130227111955.GC23616@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1681 bytes --]
On 2013-02-27 12:19, Gleb Natapov wrote:
> On Sat, Feb 23, 2013 at 05:05:29PM +0100, Jan Kiszka wrote:
>> From: Jan Kiszka <jan.kiszka@siemens.com>
>>
>> This fixes boot lockups with "no-kvmclock", when the host is not
>> exposing this particular feature (QEMU: -cpu ...,-kvmclock) or when
>> the kvmclock initialization failed for whatever reason.
>>
>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> Applied, thanks.
Just noticed that this fix isn't in Linus tree yet, thus also not yet in
3.8.y. Which route does it take?
Jan
>
>> ---
>>
>> Should go to 3.8 as well, I presume.
>>
>> arch/x86/kernel/kvmclock.c | 9 ++++++++-
>> 1 files changed, 8 insertions(+), 1 deletions(-)
>>
>> diff --git a/arch/x86/kernel/kvmclock.c b/arch/x86/kernel/kvmclock.c
>> index 5bedbdd..b730efa 100644
>> --- a/arch/x86/kernel/kvmclock.c
>> +++ b/arch/x86/kernel/kvmclock.c
>> @@ -160,8 +160,12 @@ int kvm_register_clock(char *txt)
>> {
>> int cpu = smp_processor_id();
>> int low, high, ret;
>> - struct pvclock_vcpu_time_info *src = &hv_clock[cpu].pvti;
>> + struct pvclock_vcpu_time_info *src;
>> +
>> + if (!hv_clock)
>> + return 0;
>>
>> + src = &hv_clock[cpu].pvti;
>> low = (int)__pa(src) | 1;
>> high = ((u64)__pa(src) >> 32);
>> ret = native_write_msr_safe(msr_kvm_system_time, low, high);
>> @@ -276,6 +280,9 @@ int __init kvm_setup_vsyscall_timeinfo(void)
>> struct pvclock_vcpu_time_info *vcpu_time;
>> unsigned int size;
>>
>> + if (!hv_clock)
>> + return 0;
>> +
>> size = PAGE_ALIGN(sizeof(struct pvclock_vsyscall_time_info)*NR_CPUS);
>>
>> preempt_disable();
>> --
>> 1.7.3.4
>>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 263 bytes --]
next prev parent reply other threads:[~2013-04-07 11:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-23 16:05 [PATCH] x86: kvmclock: Do not setup kvmclock vsyscall in the absence of that clock Jan Kiszka
2013-02-23 16:20 ` Jan Kiszka
2013-02-26 2:22 ` Marcelo Tosatti
2013-02-27 11:19 ` Gleb Natapov
2013-04-07 11:33 ` Jan Kiszka [this message]
2013-04-07 11:37 ` Gleb Natapov
2013-04-07 11:38 ` Jan Kiszka
2013-04-07 11:45 ` Gleb Natapov
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=51615971.9050604@web.de \
--to=jan.kiszka@web.de \
--cc=gleb@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.com \
/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