From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH] kvm: remove redundant registration of BSP's hv_clock area Date: Tue, 18 Feb 2014 10:12:12 +0100 Message-ID: <530323EC.2030800@redhat.com> References: <1392363424.24711.2.camel@nexus> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: kvm@vger.kernel.org To: =?UTF-8?B?RmVybmFuZG8gTHVpcyBWw6F6cXVleiBDYW8=?= , Marcelo Tosatti Return-path: Received: from mail-ee0-f52.google.com ([74.125.83.52]:35364 "EHLO mail-ee0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754362AbaBRJMR (ORCPT ); Tue, 18 Feb 2014 04:12:17 -0500 Received: by mail-ee0-f52.google.com with SMTP id e53so7489730eek.25 for ; Tue, 18 Feb 2014 01:12:16 -0800 (PST) In-Reply-To: <1392363424.24711.2.camel@nexus> Sender: kvm-owner@vger.kernel.org List-ID: Il 14/02/2014 08:37, Fernando Luis V=C3=A1zquez Cao ha scritto: > These days hv_clock allocation is memblock based (i.e. the percpu > allocator is not involved), which means that the physical address > of each of the per-cpu hv_clock areas is guaranteed to remain > unchanged through all its lifetime and we do not need to update > its location after CPU bring-up. > > Signed-off-by: Fernando Luis Vazquez Cao > --- > > diff -urNp linux-3.14-rc2-orig/arch/x86/kernel/kvm.c linux-3.14-rc2/a= rch/x86/kernel/kvm.c > --- linux-3.14-rc2-orig/arch/x86/kernel/kvm.c 2014-02-12 15:49:32.359= 727407 +0900 > +++ linux-3.14-rc2/arch/x86/kernel/kvm.c 2014-02-14 14:39:15.65733778= 7 +0900 > @@ -417,7 +417,6 @@ void kvm_disable_steal_time(void) > #ifdef CONFIG_SMP > static void __init kvm_smp_prepare_boot_cpu(void) > { > - WARN_ON(kvm_register_clock("primary cpu clock")); > kvm_guest_cpu_init(); > native_smp_prepare_boot_cpu(); > kvm_spinlock_init(); > diff -urNp linux-3.14-rc2-orig/arch/x86/kernel/kvmclock.c linux-3.14-= rc2/arch/x86/kernel/kvmclock.c > --- linux-3.14-rc2-orig/arch/x86/kernel/kvmclock.c 2014-01-20 11:40:0= 7.000000000 +0900 > +++ linux-3.14-rc2/arch/x86/kernel/kvmclock.c 2014-02-14 14:20:10.546= 961060 +0900 > @@ -242,7 +248,7 @@ void __init kvmclock_init(void) > hv_clock =3D __va(mem); > memset(hv_clock, 0, size); > > - if (kvm_register_clock("boot clock")) { > + if (kvm_register_clock("boot/primary cpu clock")) { We can remove the "boot" part of the string and just use "primary cpu=20 clock". Apart from this, Reviewed-by: Paolo Bonzini Can you post v2? Thanks, Paolo > hv_clock =3D NULL; > memblock_free(mem, size); > return; > > > > -- > To unsubscribe from this list: send the line "unsubscribe kvm" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html >