Bugs item #2826486, was opened at 2009-07-24 11:16 Message generated for change (Comment added) made by aurel32 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=893831&aid=2826486&group_id=180599 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: POLYMORF34 (polymorf34) Assigned to: Nobody/Anonymous (nobody) Summary: Clock speed in FreeBSD Initial Comment: I use KVM 88 and KVM 85 on Gentoo GNU/Linux 2.6.29, running on Intel Core2 CPU 6320 and Intel Xeon CPU E5405, both in 64 bits mode. All gests running on FreeBSD 7.1-p5 in 64 bits with -smp 1. The first machine host only one gest. The "sleep" command on FreeBSD does not work has expected. All sleep time are multiplied by 3 Example : freebsdmachine ~ # time sleep 1 real 0m3.148s user 0m0.000s sys 0m0.002s freebsdmachine ~ # time sleep 10 real 0m31.429s user 0m0.009s sys 0m0.002s With the "-no-kvm" flag, the "sleep" command works has expected. ---------------------------------------------------------------------- Comment By: Aurelien Jarno (aurel32) Date: 2009-09-25 11:11 Message: The following patch fixes the problem for me (already posted on the mailing list). >From 0dc540e09345ad5a1b99acbc92a7eab60029cec3 Mon Sep 17 00:00:00 2001 From: Aurelien Jarno <aurelien@xxxxxxxxxxx> Date: Fri, 25 Sep 2009 11:01:30 +0200 Subject: [PATCH] KVM: fix LAPIC timer period overflow Don't overflow when computing the 64-bit period from 32-bit registers. Fixes sourceforge bug #2826486. Signed-off-by: Aurelien Jarno <aurelien@xxxxxxxxxxx> --- arch/x86/kvm/lapic.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c index 9c8f901..3ca7767 100644 --- a/arch/x86/kvm/lapic.c +++ b/arch/x86/kvm/lapic.c @@ -658,7 +658,7 @@ static void start_apic_timer(struct kvm_lapic *apic) { ktime_t now = apic->lapic_timer.timer.base->get_time(); - apic->lapic_timer.period = apic_get_reg(apic, APIC_TMICT) * + apic->lapic_timer.period = (u64)apic_get_reg(apic, APIC_TMICT) * APIC_BUS_CYCLE_NS * apic->divide_count; atomic_set(&apic->lapic_timer.pending, 0); -- 1.6.4.3 ---------------------------------------------------------------------- Comment By: Aurelien Jarno (aurel32) Date: 2009-09-24 11:30 Message: This is a regression introduced by this commit: commit a7dfd4349f00e256a884b572f98c2c3be57ad212 Author: Marcelo Tosatti <mtosatti@xxxxxxxxxx> Date: Wed Jan 21 13:07:00 2009 -0200 KVM: x86: fix LAPIC pending count calculation Simplify LAPIC TMCCT calculation by using hrtimer provided function to query remaining time until expiration. Fixes host hang with nested ESX. Signed-off-by: Marcelo Tosatti <mtosatti@xxxxxxxxxx> Signed-off-by: Alexander Graf <agraf@xxxxxxx> Signed-off-by: Avi Kivity <avi@xxxxxxxxxx> ---------------------------------------------------------------------- Comment By: rmdir (rmdir) Date: 2009-09-11 11:03 Message: >Seems like there's a bug in one of the emulated timers. I worked around it >with the Fedora 11 version of kvm by using the -no-kvm-irqchip flag. -no-kvm-irqchip is not real solution. On FreeBSD guest it's really mess with smp > 1 (I don't know with other guest). You can reproduce this by making a du or fsck date ; du -csh /usr/ports/ ; date #use date instead of time because of this bug with : -smp 2 => 32s -smp 2 -no-kvm-irqchip => 4m28 -smp 1 -no-kvm-irqchip => 35s -smp 1 => 35s no options => 17s ---------------------------------------------------------------------- Comment By: Ed Swierk (eswierk) Date: 2009-07-24 16:01 Message: Seems like there's a bug in one of the emulated timers. I worked around it with the Fedora 11 version of kvm by using the -no-kvm-irqchip flag. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=893831&aid=2826486&group_id=180599 -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html