[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 31/41] x86/tsc: Pass KNOWN_FREQ and RELIABLE as params to registration
- To: "tglx@xxxxxxxxxx" <tglx@xxxxxxxxxx>, "longli@xxxxxxxxxxxxx" <longli@xxxxxxxxxxxxx>, "luto@xxxxxxxxxx" <luto@xxxxxxxxxx>, "alexey.makhalov@xxxxxxxxxxxx" <alexey.makhalov@xxxxxxxxxxxx>, "jstultz@xxxxxxxxxx" <jstultz@xxxxxxxxxx>, "dave.hansen@xxxxxxxxxxxxxxx" <dave.hansen@xxxxxxxxxxxxxxx>, "ajay.kaher@xxxxxxxxxxxx" <ajay.kaher@xxxxxxxxxxxx>, "jan.kiszka@xxxxxxxxxxx" <jan.kiszka@xxxxxxxxxxx>, "haiyangz@xxxxxxxxxxxxx" <haiyangz@xxxxxxxxxxxxx>, "kas@xxxxxxxxxx" <kas@xxxxxxxxxx>, "seanjc@xxxxxxxxxx" <seanjc@xxxxxxxxxx>, "pbonzini@xxxxxxxxxx" <pbonzini@xxxxxxxxxx>, "kys@xxxxxxxxxxxxx" <kys@xxxxxxxxxxxxx>, "decui@xxxxxxxxxxxxx" <decui@xxxxxxxxxxxxx>, "daniel.lezcano@xxxxxxxxxx" <daniel.lezcano@xxxxxxxxxx>, "wei.liu@xxxxxxxxxx" <wei.liu@xxxxxxxxxx>, "peterz@xxxxxxxxxxxxx" <peterz@xxxxxxxxxxxxx>, "jgross@xxxxxxxx" <jgross@xxxxxxxx>
- From: "Woodhouse, David" <dwmw@xxxxxxxxxxxx>
- Date: Wed, 20 May 2026 23:49:35 +0000
- Accept-language: en-GB, en-US
- Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=amazoncorp2 header.d=amazon.co.uk header.i="@amazon.co.uk" header.h="From:To:CC:Subject:Date:Message-ID:References:In-Reply-To"
- Cc: "boris.ostrovsky@xxxxxxxxxx" <boris.ostrovsky@xxxxxxxxxx>, "linux-coco@xxxxxxxxxxxxxxx" <linux-coco@xxxxxxxxxxxxxxx>, "kvm@xxxxxxxxxxxxxxx" <kvm@xxxxxxxxxxxxxxx>, "mhklinux@xxxxxxxxxxx" <mhklinux@xxxxxxxxxxx>, "thomas.lendacky@xxxxxxx" <thomas.lendacky@xxxxxxx>, "linux-kernel@xxxxxxxxxxxxxxx" <linux-kernel@xxxxxxxxxxxxxxx>, "bcm-kernel-feedback-list@xxxxxxxxxxxx" <bcm-kernel-feedback-list@xxxxxxxxxxxx>, "tglx@xxxxxxxxxxxxx" <tglx@xxxxxxxxxxxxx>, "nikunj@xxxxxxx" <nikunj@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "linux-hyperv@xxxxxxxxxxxxxxx" <linux-hyperv@xxxxxxxxxxxxxxx>, "vkuznets@xxxxxxxxxx" <vkuznets@xxxxxxxxxx>, "rick.p.edgecombe@xxxxxxxxx" <rick.p.edgecombe@xxxxxxxxx>, "virtualization@xxxxxxxxxxxxxxx" <virtualization@xxxxxxxxxxxxxxx>, "sboyd@xxxxxxxxxx" <sboyd@xxxxxxxxxx>, "x86@xxxxxxxxxx" <x86@xxxxxxxxxx>
- Delivery-date: Wed, 20 May 2026 23:49:47 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Thread-index: AQHc6LNQ1Kwwb6vjAEO0wWcwOC4yeg==
- Thread-topic: [PATCH v3 31/41] x86/tsc: Pass KNOWN_FREQ and RELIABLE as params to registration
On Fri, 2026-05-15 at 12:19 -0700, Sean Christopherson wrote:
> Add a "tsc_properties" set of flags and use it to annotate whether the
> TSC operates at a known and/or reliable frequency when registering a
> paravirtual TSC calibration routine. Currently, each PV flow manually
> sets the associated feature flags, but often in haphazard fashion that
> makes it difficult for unfamiliar readers to see the properties of the
> TSC when running under a particular hypervisor.
>
> The other, bigger issue with manually setting the feature flags is that
> it decouples the flags from the calibration routine. E.g. in theory, PV
> code could mark the TSC as having a known frequency, but then have its
> PV calibration discarded in favor of a method that doesn't use that known
> frequency. Passing the TSC properties along with the calibration routine
> will allow adding sanity checks to guard against replacing a "better"
> calibration routine with a "worse" routine.
>
> As a bonus, the flags also give developers working on new PV code a heads
> up that they should at least mark the TSC as having a known frequency.
>
> Reviewed-by: Michael Kelley <mhklinux@xxxxxxxxxxx>
> Tested-by: Michael Kelley <mhklinux@xxxxxxxxxxx>
> Signed-off-by: Sean Christopherson <seanjc@xxxxxxxxxx>
Reviewed-by: David Woodhouse <dwmw@xxxxxxxxxxxx>
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
Amazon Development Centre (London) Ltd.Registered in England and Wales with registration number 04543232 with its registered office at 1 Principal Place, Worship Street, London EC2A 2FA, United Kingdom.
|