From: Paolo Bonzini <pbonzini@redhat.com>
To: Marcelo Tosatti <mtosatti@redhat.com>, kvm@vger.kernel.org
Subject: Re: [PATCH] KVM: x86: add bit to indicate correct tsc_shift
Date: Fri, 20 Jan 2023 09:56:41 +0100 [thread overview]
Message-ID: <dfec1db0-d2f7-cd80-c9f5-0f20b72cbddc@redhat.com> (raw)
In-Reply-To: <Y8no/eAQi0QkIJqa@tpad>
On 1/20/23 02:06, Marcelo Tosatti wrote:
> Before commit 78db6a5037965429c04d708281f35a6e5562d31b,
> kvm_guest_time_update() would use vcpu->virtual_tsc_khz to calculate
> tsc_shift value in the vcpus pvclock structure written to guest memory.
>
> For those kernels, if vcpu->virtual_tsc_khz != tsc_khz (which can be the
> case when guest state is restored via migration, or if tsc-khz option is
> passed to QEMU), and TSC scaling is not enabled (which happens if the
> difference between the frequency requested via KVM_SET_TSC_KHZ and the
> host TSC KHZ is smaller than 250ppm), then there can be a difference
> between what KVM_GET_CLOCK would return and what the guest reads as
> kvmclock value.
I don't think it's justifiable to further complicate the userspace API
for a bug that's been fixed six years ago. I'd be very surprised if any
combination of modern upstream {QEMU,kernel} is going to do a successful
migration from such an old {QEMU,kernel}. RHEL/CentOS are able to do so
because *specific pairs* have been tested, but as far as upstream is
concerned this adds complexity that absolutely no one will use.
I replied on the QEMU patch with further suggestions.
Paolo
prev parent reply other threads:[~2023-01-20 8:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-20 1:06 [PATCH] KVM: x86: add bit to indicate correct tsc_shift Marcelo Tosatti
2023-01-20 8:56 ` Paolo Bonzini [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=dfec1db0-d2f7-cd80-c9f5-0f20b72cbddc@redhat.com \
--to=pbonzini@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox