public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Sean Christopherson <seanjc@google.com>
To: Jim Mattson <jmattson@google.com>
Cc: kvm@vger.kernel.org, pbonzini@redhat.com
Subject: Re: [PATCH] KVM: x86: Pass host's CPUID.16H through to KVM_GET_SUPPORTED_CPUID
Date: Mon, 26 Sep 2022 20:50:18 +0000	[thread overview]
Message-ID: <YzIQigG1cVLoHQvm@google.com> (raw)
In-Reply-To: <20220923223338.483103-1-jmattson@google.com>

On Fri, Sep 23, 2022, Jim Mattson wrote:
> In the default configuration, the guest TSC frequency is the same as
> the host TSC frequency. Similarly, the maximum frequency of the
> virtual CPU is the same as the maximum frequency of the physical
> CPU.

Under the hood, yes, but after the VM is migrated, isn't it possible that the
host frequencies are completely disjoint from the frequencies that are enumerated
to the guest?

> Also, the bus (reference) frequency of the virtual CPU matches
> that of the physical CPU.
> 
> Pass this information directly from host CPUID.16H to guest CPUID.16H
> in KVM_GET_SUPPORTED_CPUID.

What about "solving" this via documentation, same as CPUID.15H?  If the API were
KVM_GET_DEFAULT_CPUID, then enumerating host properties makes sense, but from a
very pedantic point of view, the "supported" frequencies are just about anything.

Somewhat of a moot point, as the leaf comes with "informational only" disclaimer.

  The returned information should not be used for any other purpose as the returned
  information does not accurately correlate to information / counters returned by
  other processor interfaces.

  reply	other threads:[~2022-09-26 20:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-23 22:33 [PATCH] KVM: x86: Pass host's CPUID.16H through to KVM_GET_SUPPORTED_CPUID Jim Mattson
2022-09-26 20:50 ` Sean Christopherson [this message]
2022-09-26 21:13   ` Jim Mattson

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=YzIQigG1cVLoHQvm@google.com \
    --to=seanjc@google.com \
    --cc=jmattson@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@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