[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v4 27/30] KVM: x86: Add KVM_VCPU_TSC_EFFECTIVE_FREQ attribute
- To: Sean Christopherson <seanjc@xxxxxxxxxx>
- From: David Woodhouse <dwmw2@xxxxxxxxxxxxx>
- Date: Thu, 21 May 2026 23:40:57 +0100
- Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=casper.20170209 header.d=infradead.org header.i="@infradead.org" header.h="MIME-Version:Content-Type:References:In-Reply-To:Date:Cc:To:From:Subject:Message-ID"
- Cc: Paolo Bonzini <pbonzini@xxxxxxxxxx>, Jonathan Corbet <corbet@xxxxxxx>, Shuah Khan <skhan@xxxxxxxxxxxxxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>, Borislav Petkov <bp@xxxxxxxxx>, Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>, x86@xxxxxxxxxx, "H. Peter Anvin" <hpa@xxxxxxxxx>, Vitaly Kuznetsov <vkuznets@xxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>, Paul Durrant <paul@xxxxxxx>, Jonathan Cameron <jic23@xxxxxxxxxx>, Sascha Bischoff <Sascha.Bischoff@xxxxxxx>, Marc Zyngier <maz@xxxxxxxxxx>, Joey Gouly <joey.gouly@xxxxxxx>, Jack Allister <jalliste@xxxxxxxxxx>, Dongli Zhang <dongli.zhang@xxxxxxxxxx>, joe.jin@xxxxxxxxxx, kvm@xxxxxxxxxxxxxxx, linux-doc@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, linux-kselftest@xxxxxxxxxxxxxxx
- Delivery-date: Thu, 21 May 2026 22:41:27 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Thu, 2026-05-21 at 15:30 -0700, Sean Christopherson wrote:
> On Thu, May 21, 2026, David Woodhouse wrote:
> > On Sat, 2026-05-09 at 23:46 +0100, David Woodhouse wrote:
> > > From: David Woodhouse <dwmw@xxxxxxxxxxxx>
> > That does leave userspace still needing a way to get the APIC bus
> > frequency, to populate CPUID. So maybe I'll just make an attribute
> > which returns that as a single value.
>
> Already exists, KVM_CAP_X86_APIC_BUS_CYCLES_NS. The TDX architecture decided
> that unconditionally telling guests the virtual APIC bus runs at 400Mhz was a
> brilliant idea.
Ah, thanks.
So KVM always exposes 1GHz by default regardless of the actual host?
Which is why there's no *get* method?
(Well... getting KVM_CAP_APIC_BUS_CYCLES_NS returns
APIC_BUS_CYCLE_NS_DEFAULT which is 1, so it's basically just returning
1 like a lot of cap queries do, and *not* returning what the period is
actually set to)
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
|