From: Marcelo Tosatti <mtosatti@redhat.com>
To: Avi Kivity <avi@redhat.com>
Cc: kvm@vger.kernel.org,
Benjamin Serebrin <benjamin.serebrin@amd.com>,
Marcelo Tosatti <mtosatti@redhat.com>
Subject: [patch 2/3] QEMU/KVM: BIOS: revert TSC zeroing
Date: Mon, 08 Dec 2008 23:12:49 -0200 [thread overview]
Message-ID: <20081209012212.093152663@localhost.localdomain> (raw)
In-Reply-To: 20081209011247.570596925@localhost.localdomain
[-- Attachment #1: bios-tsc-fix --]
[-- Type: text/plain, Size: 1191 bytes --]
The TSC is zeroed at RESET, and not at SMP initialization.
This avoids the TSC from going out of sync between vcpu's on SMP
guests.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Index: kvm-userspace.tip/bios/rombios32.c
===================================================================
--- kvm-userspace.tip.orig/bios/rombios32.c
+++ kvm-userspace.tip/bios/rombios32.c
@@ -610,12 +610,6 @@ void smp_probe(void)
writel(APIC_BASE + APIC_ICR_LOW, 0x000C4500);
sipi_vector = AP_BOOT_ADDR >> 12;
writel(APIC_BASE + APIC_ICR_LOW, 0x000C4600 | sipi_vector);
- asm volatile(
- "xor %%eax, %%eax \n\t"
- "xor %%edx, %%edx \n\t"
- "mov $0x10, %%ecx \n\t"
- "wrmsr"
- : : : "eax", "ecx", "edx");
#ifndef BX_QEMU
delay_ms(10);
Index: kvm-userspace.tip/bios/rombios32start.S
===================================================================
--- kvm-userspace.tip.orig/bios/rombios32start.S
+++ kvm-userspace.tip/bios/rombios32start.S
@@ -43,10 +43,6 @@ smp_ap_boot_code_start:
cli
xor %ax, %ax
mov %ax, %ds
- xor %eax, %eax
- xor %edx, %edx
- mov $0x10, %ecx
- wrmsr
mov $SMP_MSR_ADDR, %ebx
11:
--
next prev parent reply other threads:[~2008-12-09 1:25 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-09 1:12 [patch 0/3] synchronized TSC between vcpu's on SMP guests Marcelo Tosatti
2008-12-09 1:12 ` [patch 1/3] QEMU/KVM: x86: separate TSC load from kvm_arch_load_regs Marcelo Tosatti
2008-12-10 10:10 ` Avi Kivity
2008-12-09 1:12 ` Marcelo Tosatti [this message]
2008-12-09 1:12 ` [patch 3/3] KVM: VMX: initialize TSC offset relative to vm creation time Marcelo Tosatti
2008-12-10 10:19 ` Avi Kivity
2008-12-10 16:53 ` Marcelo Tosatti
2008-12-11 17:38 ` Avi Kivity
2008-12-11 19:45 ` Marcelo Tosatti
2008-12-28 9:26 ` Avi Kivity
2008-12-09 11:38 ` [patch 0/3] synchronized TSC between vcpu's on SMP guests Michael Tokarev
2008-12-09 10:47 ` Marcelo Tosatti
2008-12-09 22:48 ` Michael Tokarev
2008-12-22 23:16 ` David S. Ahern
2008-12-28 9:33 ` 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=20081209012212.093152663@localhost.localdomain \
--to=mtosatti@redhat.com \
--cc=avi@redhat.com \
--cc=benjamin.serebrin@amd.com \
--cc=kvm@vger.kernel.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