From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f202.google.com (mail-pf1-f202.google.com [209.85.210.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DAC44422542 for ; Mon, 6 Jul 2026 18:00:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.202 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783360827; cv=none; b=tZgR+GYdgnppLUBqwEwkIvb3UxEYtJy63fEUodcvmaWR06ByhX5TqWZqLkkF8QWn1rXt8UpbX51oKb90ONnOZ07ITKTr6quq8rmDbidUiJSD3g3Ob2zyzTgygr6y1v7x5YCvUnJlMxqt/pMJzo+uARvUY2S4JMbjBy2g639IF/Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783360827; c=relaxed/simple; bh=6HvxXL/hPWnIS2ERxITvaZCHswmXyfcfLFJrYY619nA=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=D3MaGLDk1xCyxaz7o/zCyDqW/iV2Zn8mlyEyLaiHjSnjN2p72sZ3NLTmIvmNX6LkieOYz83slOfj550rx9AUnH3JRKDpWNJT4dDyM+X4iV8s5sPagjpfTZeGIp05Y5V5VzsUNctIuNl4KO7HT9dSdce9sqto8PMGYXaHWuFlWlA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=RXQ0ghIO; arc=none smtp.client-ip=209.85.210.202 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="RXQ0ghIO" Received: by mail-pf1-f202.google.com with SMTP id d2e1a72fcca58-8479586724eso2727331b3a.2 for ; Mon, 06 Jul 2026 11:00:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1783360824; x=1783965624; darn=vger.kernel.org; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:from:to:cc:subject:date:message-id:reply-to :content-type; bh=eYcfhMi5NCPMduPSvGqKtbO87FaKSq3RfhmI47bcB1U=; b=RXQ0ghIO8YjTkVaNc0tBgPzpzmIOayR9GycdMFFLTze2Fm/FZF5nP9PPdi9oioYA20 o/Ue6nVHngNvn7bMtJuQiEh4EVC8cmpgjJW1zcUsfw5Z0Sm4XfDur4pvSpDXhAILSXsZ 9pKE48vIO5t75P8WiCW2Il2LUSCnVsMHasvgGK/hdMaAJ3jXYSi1y4vKWv0eSpxK0J+A kX3td/oBo2BaYc1vXyX2D/H9FSB/Np6E85nXG4dbwuuDLgTG5vpt2K2uuBy+ZrC+jt++ tilMgtyWw2t+HCzj4iFCXsmWnpkacl/BH1WhkMg+YGV4lvYKJoC4fccgDpsEreW+ezu0 Tysw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783360824; x=1783965624; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=eYcfhMi5NCPMduPSvGqKtbO87FaKSq3RfhmI47bcB1U=; b=KIIPLc4OPAOwZ+LHdy/8LQgb8fq5aeOEs6VdZuc/amd+kUlRm/1jaV/kkiz5xkS+aq jKlAOgbkv3wl6nuJEPKTN1ALzihIv3MYsMuwQ+K/Hh4tcXQxx5JLZ8DCLVOVUA1u+vqP nGzzcdnqfq0fgnUnkyaoPvvrcviPTcImBsoROjFvtNTI8Sfj12DvwJon6wdHMiae3TQG YAHkqso736ma9SIQM5S6SCjoFg89eSbKYpz3PNy5qtWOVPHkrFMni5YHus9p8s0WUuty 41pxuad0P8AjMsZlOwNneqlNSklANJJ2XGGos/KrU5zqKixEMfH8Jm07W3iZcrQl9eg3 0DLQ== X-Forwarded-Encrypted: i=1; AHgh+Ro1RY+dLpyf93322c/CBPD4Ke1bycY18Z2pmkb4BnUwEIIwgQfMBGh5HxZvWMyFSbskh7Z6YdpfwkKsFO4=@vger.kernel.org X-Gm-Message-State: AOJu0Yy3s606r7SkQ3QhV1vxKDj6+7mpYcGE5tTwlMOLinsfeuABJAxK KkBnIUQCITsBTpM/1nf0ZhhvtOFFgcBWQ6tOYbfeWsMShHm5ZY3Pnvp/YcXbp2qX7BF9ZR8fYUH xaFt5Lw== X-Received: from pgam14.prod.google.com ([2002:a05:6a02:2b4e:b0:c92:460e:4f73]) (user=seanjc job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6a00:4307:b0:847:8c6d:2f24 with SMTP id d2e1a72fcca58-84826ec2591mr1691676b3a.56.1783360823962; Mon, 06 Jul 2026 11:00:23 -0700 (PDT) Date: Mon, 6 Jul 2026 11:00:23 -0700 In-Reply-To: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260701193212.749551-1-seanjc@google.com> <20260701193212.749551-2-seanjc@google.com> Message-ID: Subject: Re: [PATCH v5 01/51] x86/apic: Provide helpers to set local APIC timer period in hz and khz From: Sean Christopherson To: Michael Kelley Cc: Jonathan Corbet , Paolo Bonzini , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "x86@kernel.org" , Kiryl Shutsemau , Rick Edgecombe , "K. Y. Srinivasan" , Haiyang Zhang , Wei Liu , Dexuan Cui , Long Li , Ajay Kaher , Alexey Makhalov , Jan Kiszka , Andy Lutomirski , Peter Zijlstra , Juergen Gross , Daniel Lezcano , John Stultz , Shuah Khan , "H. Peter Anvin" , Vitaly Kuznetsov , Broadcom internal kernel review list , Boris Ostrovsky , Stephen Boyd , "linux-doc@vger.kernel.org" , "kvm@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-coco@lists.linux.dev" , "linux-hyperv@vger.kernel.org" , "virtualization@lists.linux.dev" , "xen-devel@lists.xenproject.org" , Tom Lendacky , Nikunj A Dadhania , David Woodhouse , David Woodhouse , Thomas Gleixner Content-Type: text/plain; charset="us-ascii" On Thu, Jul 02, 2026, Michael Kelley wrote: > > @@ -796,6 +796,16 @@ bool __init apic_needs_pit(void) > > return lapic_timer_period == 0; > > } > > > > +void apic_set_timer_period_khz(u64 period_khz, const char *source) > > +{ > > + lapic_timer_period = mul_u64_u32_div(period_khz, 1000, HZ); > > +} > > + > > +void apic_set_timer_period_hz(u64 period_hz, const char *source) > > +{ > > + lapic_timer_period = div_u64(period_hz, HZ); > > +} > > A string "source" argument is passed in, but not used. Is there an > envisioned future use? Also, this function doesn't output a pr_info() > message like the existing Hyper-V and VMware code does. It was a complete goof on my part (Sashiko also pointed out the oddity[*]). I fully intended to log a message and provide equivalent Hyper-V/VMware behavior, and totally spaced it. [*] https://lore.kernel.org/all/20260701194621.4BD691F000E9@smtp.kernel.org > I don't know that the message is all that useful, though I do remember one > case where I was debugging some clock/timer issue when I looked at it.