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 E929F217F9 for ; Tue, 16 Apr 2024 20:48:23 +0200 (CEST) Received: from mail-pl1-f173.google.com ([209.85.214.173]) by 9front; Tue Apr 16 14:46:12 -0400 2024 Received: by mail-pl1-f173.google.com with SMTP id d9443c01a7336-1e5aa82d1f6so466215ad.0 for <9front@9front.org>; Tue, 16 Apr 2024 11:46:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mforney.org; s=google; t=1713293169; x=1713897969; darn=9front.org; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:references:from:subject:to:date:from:to:cc:subject:date :message-id:reply-to; bh=r0NyUjtmta1hYdq2+R/iu+oD5OL4KOfKPdn52HgPX3Y=; b=E0Tf3FnmlCBrw0VDMUtJ6BDicjsaAq/jN5CXgP7Bhw1H1PVtdN0NVKPTzTTtBEgOse 6L9cum0Thdz5B955L15Kxfzk5LNTRMJDpYK/NT1DSo73b9Y8afHWUt7wXf6iAkFx3rdd wXkyqgqvSqhTIYRlk+PdN/AX27Prr9BPRlS78wAmxNAyQKlRm8vbKtACFOWYvckXmffK bXkrq3WJD+EBNfzVXMxk+G3BxKwxuLLICe0zuC4ugUFgtmGFN9SfIXDdCnnvdZVtGtUN Uqo8eAZ2OmHszA5XLy4HR9zFxBaRRmqactiv/wk0fkqR0utWA3YRm2hGDzOGqC7Cy+lV lLyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713293169; x=1713897969; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:references:from:subject:to:date:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=r0NyUjtmta1hYdq2+R/iu+oD5OL4KOfKPdn52HgPX3Y=; b=Duat7lUnAUNZvTbpw/1Y8csvyJsjgzspPTv6GGB+y640bHRSMJk9TctBuCwgipmfqa QMbXJ3vc2WE5iDuTQAlkUEWkh+71oO1nGpSThHuosyj0uQoCDDpvDGbzkQiz8TP/4Pz0 Uzwbgn1vfr3nG0LTqcZi3HJiunvHudulmecjYZMbLM5Zc/udm/2b5WF9LkulTFlAUje0 oq0fF6E/xQj0hurww1CWgYsBhw1gAFgcOAp+IAcJ7CVphUh7x6Ft5rG0LMUu37Zj4Pl/ ncVcCmuiZfUZlUJzoKd+iuBeV0GkIE//H4mIxO7E+UnkpGQn/eGDlcJTXT50BizAG9ak iqLg== X-Gm-Message-State: AOJu0Yw9hx48USwu4FVf+m+lo6AOWcuO6Kj33rZFCQ7pQ404v5BiPPuI uOTmzIU/Z9cKKyWUNFvQnemgm/zDPeKAdFO50em89hsY91hO00r/Pbbyf24gD9NnXWtyOt011Pk WuCM= X-Google-Smtp-Source: AGHT+IEN8vDrotLrBi8m8FPMp+NXXjtHtfPd+7ZixOKTk/47nE2bRgHsaVo8DEVy/Ep4wE7fNp7k9g== X-Received: by 2002:a17:903:234c:b0:1e2:58f:7ed4 with SMTP id c12-20020a170903234c00b001e2058f7ed4mr4851746plh.5.1713293169102; Tue, 16 Apr 2024 11:46:09 -0700 (PDT) Received: from localhost ([2601:647:6400:20b0:16dd:a9ff:fee7:6b79]) by smtp.gmail.com with ESMTPSA id h9-20020a170902f2c900b001e0e5722788sm10188825plc.17.2024.04.16.11.46.08 for <9front@9front.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 16 Apr 2024 11:46:08 -0700 (PDT) Date: Tue, 16 Apr 2024 11:46:08 -0700 To: 9front@9front.org From: Michael Forney References: <9f91383e-c9f5-4cfa-8065-494cfffdebc1@posixcafe.org> In-Reply-To: <9f91383e-c9f5-4cfa-8065-494cfffdebc1@posixcafe.org> Message-Id: <3GC3CN1M69JY3.30ENE0AQSGFTE@mforney.org> User-Agent: mblaze/1.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: service ActivityPub API engine cloud generator Subject: Re: [9front] qemu clock/timer issue Reply-To: 9front@9front.org Precedence: bulk Jacob Moody wrote: > It is understood that this bug only happens with intel kvm virtual machin= es. > From all that has been tested it was currently understood to affect newe= r intel machines. > It seems however that your machine is a bit older(10+ years) and still tr= iggering 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. M= y money > is on some QEMU change. >=20 > 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 i= f 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 t= hrough the releases > going back. Give that a go for a couple of them, then maybe try some olde= r qemu. If you look at my original mails, I had already bisected it to: http://git.9front.org/plan9front/plan9front/a05bab362f66ddd6fa65f2e7cda9eaa= a0217ec08/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=3D1 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