From nobody Tue Aug 12 14:57:00 2025 X-Original-To: virtualization@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4c1ZND58Szz64vKt for ; Tue, 12 Aug 2025 14:57:00 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c1ZND4SCFz3fM0 for ; Tue, 12 Aug 2025 14:57:00 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755010620; 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=XSMv9Rc5a9GK+1Tzi+SsptKq42IoU3cmWwPueoJE9iE=; b=ZcEyZvH9Td9J9UvDOjdn3tBUaQQ7knbFW5WCOK7x0OYWpLgbTJ0zyIxfr4Jn3h/Kfge6sU 3gJiBJuGbZpMJ8Rv2i9KqHIS8Qf974ZAp73IxUNIYlcPApHvlaTkb72VKstiImKMBkGqWx YNsuZ4mh1vhbXfQCOcAY+y7OW9+Kh3ALC0HjRVISIREnD1pkZA9WX0LxYRvy037sgsOyl0 6vsZMTgIciHBS9u0fDvohZAq7eH/JLsl8zPAThnaJ+0O/wsXyRWoQKUOR+Hr6Lh+ivhCeN OlYkZ4w0DGKNbTqJFRHdbUSzZ95j1kzVgqWUp9HLOUozZLgrIuHIdINKIBCyfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755010620; 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=XSMv9Rc5a9GK+1Tzi+SsptKq42IoU3cmWwPueoJE9iE=; b=L6jivK4PJcCiUJgbGFleCD6t2DHEWu6nJP7OThaKmoF0ImncLWZIVXclUKhC8EbxJFE2fW XEDM1pWS5RUHRrO5W4lHVSvBENMixYUp61U7GPDBEPe1bSfcX8cVEhciPgJbWWXwOgF5Js PMZjL0lsmL8I0ylN+RykM8GosK7PhZnipBrJRkVDtuw8Sn/4CjBgJpZEA2XUIEpz9/nu1x L8d7Y/fTbWdQHg82Q9pS4lLa58ny8vZxgDsKdoLM8I0DNOfbTiwQUgBZQWNwhkS0VqSRfG ASjEvonSxna9RMir/Dkjxlcexabj2mAchFKdPLUi2Bzsq7yhl1KYedK9h0tt1w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755010620; a=rsa-sha256; cv=none; b=lWi/oxl8+yqLn7RELfBZ8cV4GM9dTUbOLRZp8Ug+t+moo6C0++breyajHxwYS2VJvG8bdq ziSYB59o6iX11bdHgojltzQE6zycessK3rerRDAW5yd+E00uq5HMRC4nXDMTkBYN7P1vEu mkDUDrovM7lzOnyOLdNw/H8R7R5rRscciv9GxPLc4j2WWPZeuSjduSBJSKBgN/hJ6oUupo fX73tFudt8gdUgD37vc9LlAxmdX3Ya/n+bmSwe3UD9bjRTXpWzMHEW2cSQU26/14MZaHGB 78CV20cT98IHnjabeb9wuDsCkkPbgSqxIRlNcOhB7U+5B9fGtoNgH36GW6moJg== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4c1ZND42wHzjvl for ; Tue, 12 Aug 2025 14:57:00 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 57CEv0mq018375 for ; Tue, 12 Aug 2025 14:57:00 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 57CEv01q018373 for virtualization@FreeBSD.org; Tue, 12 Aug 2025 14:57:00 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: virtualization@FreeBSD.org Subject: [Bug 256781] EC2 Nitro: TSC-low timecounter lags Date: Tue, 12 Aug 2025 14:57:00 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 13.0-RELEASE X-Bugzilla-Keywords: needs-patch, needs-qa X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: dwmw2@infradead.org X-Bugzilla-Status: Closed X-Bugzilla-Resolution: Overcome By Events X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: virtualization@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? mfc-stable13? mfc-stable12? X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Discussion List-Archive: https://lists.freebsd.org/archives/freebsd-virtualization List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-virtualization@freebsd.org Sender: owner-freebsd-virtualization@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D256781 --- Comment #43 from dwmw2@infradead.org --- I suspect Linux doesn't use that because it was only ever *proposed* as a generic standard (by VMware) in https://lkml.org/lkml/2008/10/1/246 and see= med to get shot down? It never actually got adopted by KVM, and it's strictly w= rong for a guest to look at 0x40000010 under anything but VMware, I think? I certainly wouldn't look at it it under Hyper-V (and EC2 doesn't expose it, = for Windows instances when EC2 puts the Hyper-V leaves at 0x40000000 and the KVM leaves at 0x40000100). Looking back, I actually *approved* that commit to add it in EC2 without realising that it wasn't really a standard. Bad Dave, no biscuit! That said, it's probably a bad idea for any hypervisor to start using 0x40000010 for anything *else* at this point. And KVM might as well adopt it (so we should add it to QEMU. And I note bhyve doesn't expose it either.) Amusingly, even on VMware, Linux uses a hypercall to get the TSC frequency instead. Under KVM, Linux gets the information from the KVM clock. It might be sligh= tly less accurate because it needs to reverse-engineer the divide/shift fields = to get it though. So I think I'll make it use 0x40000010. Thanks for pointing = it out! Xen puts it in leaf 040000x03 btw. --=20 You are receiving this mail because: You are the assignee for the bug.=