-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Sorry, $subject reflects only half of the fix (v0.1, when I thought
hunk #2 would suffice). A better headline:

"x86: kvmclock: Fix boot with kvmclock disabled or not existing"

If you want me to resend, let me know.

Jan

On 2013-02-23 17:05, Jan Kiszka wrote:
> From: Jan Kiszka <[email protected]>
> 
> 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 <[email protected]> ---
> 
> 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();
> 

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.16 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlEo7DUACgkQitSsb3rl5xSZqACfX6CIIu4GtiAafeHAlDNAM1su
v9UAniQcdE/gRhgoILKfEk/THLHB26T2
=aW5W
-----END PGP SIGNATURE-----
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to