From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <9front-bounces@9front.inri.net> X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.4 Received: from 9front.inri.net (9front.inri.net [168.235.81.73]) by inbox.vuxu.org (Postfix) with ESMTP id B808A216DC for ; Tue, 16 Apr 2024 20:57:38 +0200 (CEST) Received: from mail.posixcafe.org ([45.76.19.58]) by 9front; Tue Apr 16 14:56:23 -0400 2024 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=posixcafe.org; s=20200506; t=1713293737; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=sznKGg3mqABaJF4b/CoahilrGImtBRbT7fVVoBtkXVI=; b=SraYd9DaN2JLAd54ylTtOr6wesYeuWHdQhN/OZrOysT76vSYkjHwhVkWoLUDl8JSH33TY0 kemra9MgzKpHUvLUtGZiWv2dQ715WKFG3uQCV8p26POkAxJSs6+WQhyXqO9MmzSUW4aIWq f4poRWXxxxWFD2O20IOl9T0X1GChTCE= Received: from [192.168.168.200] ( [207.45.82.38]) by mail.posixcafe.org (OpenSMTPD) with ESMTPSA id 8411cc20 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for <9front@9front.org>; Tue, 16 Apr 2024 13:55:36 -0500 (CDT) Message-ID: Date: Tue, 16 Apr 2024 13:56:21 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: 9front@9front.org References: <9f91383e-c9f5-4cfa-8065-494cfffdebc1@posixcafe.org> <3GC3CN1M69JY3.30ENE0AQSGFTE@mforney.org> Content-Language: en-US From: Jacob Moody In-Reply-To: <3GC3CN1M69JY3.30ENE0AQSGFTE@mforney.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: compliant strategy reduce/map-based SSL element polling rich-client generator Subject: Re: [9front] qemu clock/timer issue Reply-To: 9front@9front.org Precedence: bulk On 4/16/24 13:46, Michael Forney wrote: > Jacob Moody wrote: >> It is understood that this bug only happens with intel kvm virtual machines. >> From all that has been tested it was currently understood to affect newer intel machines. >> It seems however that your machine is a bit older(10+ years) and still triggering this. >> I've certainly run 9front in kvm on intel machines before so it is likely either >> something that changed with us or something that has changed with QEMU. My money >> is on some QEMU change. >> >> If you do not feel comfortable debugging but would still be interested in helping >> perhaps you can help bisect 9front and qemu (one side at a time) to see if you can >> narrow down what has changed to get more information to fix these things. >> I would start with the nightly iso just to double check, then move back through the releases >> going back. Give that a go for a couple of them, then maybe try some older qemu. > > If you look at my original mails, I had already bisected it to: > http://git.9front.org/plan9front/plan9front/a05bab362f66ddd6fa65f2e7cda9eaaa0217ec08/commit.html > > This changes the mechanism by which CPU frequencies are detected > by default in 9front, and the timing/clock issues arise when the > frequency is detected incorrectly as 25MHz instead of 3.3GHz. The > issue went away when using *nohpet=1 to revert to i8253 > clockinit/fastclock. > > I wasn't able to explain why hpetcpufreq didn't work, but i8253cpufreq > did. They are both emulated with QEMU_CLOCK_VIRTUAL: > https://github.com/qemu/qemu/blob/62dbe54c24dbf77051bafe1039c31ddc8f37602d/hw/timer/hpet.c#L156 > https://github.com/qemu/qemu/blob/62dbe54c24dbf77051bafe1039c31ddc8f37602d/hw/timer/i8254.c#L57-L58 Ah my bad, I had forgotten about this. Thank you for the original bisecting work and for reiterating. - moody