From: "Fernando Luis Vázquez Cao" <fernando_b1@lab.ntt.co.jp>
To: Marcelo Tosatti <mtosatti@redhat.com>
Cc: kvm@vger.kernel.org
Subject: [PATCH] kvm: remove redundant registration of BSP's hv_clock area
Date: Fri, 14 Feb 2014 16:37:04 +0900 [thread overview]
Message-ID: <1392363424.24711.2.camel@nexus> (raw)
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 <fernando@oss.ntt.co.jp>
---
diff -urNp linux-3.14-rc2-orig/arch/x86/kernel/kvm.c linux-3.14-rc2/arch/x86/kernel/kvm.c
--- linux-3.14-rc2-orig/arch/x86/kernel/kvm.c 2014-02-12 15:49:32.359727407 +0900
+++ linux-3.14-rc2/arch/x86/kernel/kvm.c 2014-02-14 14:39:15.657337787 +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:07.000000000 +0900
+++ linux-3.14-rc2/arch/x86/kernel/kvmclock.c 2014-02-14 14:20:10.546961060 +0900
@@ -242,7 +248,7 @@ void __init kvmclock_init(void)
hv_clock = __va(mem);
memset(hv_clock, 0, size);
- if (kvm_register_clock("boot clock")) {
+ if (kvm_register_clock("boot/primary cpu clock")) {
hv_clock = NULL;
memblock_free(mem, size);
return;
next reply other threads:[~2014-02-14 7:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-14 7:37 Fernando Luis Vázquez Cao [this message]
2014-02-18 9:12 ` [PATCH] kvm: remove redundant registration of BSP's hv_clock area Paolo Bonzini
2014-02-18 10:09 ` [PATCH v2] " Fernando Luis Vázquez Cao
2014-02-18 11:06 ` Paolo Bonzini
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=1392363424.24711.2.camel@nexus \
--to=fernando_b1@lab.ntt.co.jp \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.