From: Peter Zijlstra <peterz@infradead.org>
To: Jack Allister <jalliste@amazon.com>
Cc: diapop@amazon.co.uk, metikaya@amazon.co.uk,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Radim Krčmář" <rkrcmar@redhat.com>,
"Sean Christopherson" <sean.j.christopherson@intel.com>,
"Vitaly Kuznetsov" <vkuznets@redhat.com>,
"Wanpeng Li" <wanpengli@tencent.com>,
"Jim Mattson" <jmattson@google.com>,
"Joerg Roedel" <joro@8bytes.org>,
"Thomas Gleixner" <tglx@linutronix.de>,
"Ingo Molnar" <mingo@redhat.com>,
"Borislav Petkov" <bp@alien8.de>,
"H. Peter Anvin" <hpa@zytor.com>,
x86@kernel.org, kvm@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] KVM: VMX: CPU frequency scaling for intel x86_64 KVM guests
Date: Tue, 31 May 2022 15:38:40 +0200 [thread overview]
Message-ID: <YpYaYK7a28DFT5Ne@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <20220531105925.27676-1-jalliste@amazon.com>
On Tue, May 31, 2022 at 10:59:25AM +0000, Jack Allister wrote:
> A VMM can control a vCPU's CPU frequency by interfacing with KVM via
> the vCPU file descriptor to enable/set CPU frequency scaling for a
> guest. Instead of creating a separate IOCTL to this this, KVM capabil-
> ities are extended to include a capability called
> KVM_CAP_CPU_FREQ_SCALING.
>
> A generic set_cpu_freq interface is added to kvm_x86_ops
> to allow for architecture (AMD/Intel) independent CPU frequency
> scaling setting.
>
> For Intel platforms, Hardware-Controlled Performance States (HWP) are
> used to implement CPU scaling within the guest. Further information on
> this mechanism can be seen in Intel SDM Vol 3B (section 14.4). The CPU
> frequency is set as soon as this function is called and is kept running
> until explicitly reset or set again.
>
> Currently the AMD frequency setting interface is left unimplemented.
>
> Please note that CPU frequency scaling will have an effect on host
> processing in it's current form. To change back to full performance
> when running in host context an IOCTL with a frequency value of 0
> is needed to run back at uncapped speed.
Nowhere does this explain *WHY* we would want to do this?
next prev parent reply other threads:[~2022-05-31 13:39 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-31 10:59 [PATCH] KVM: VMX: CPU frequency scaling for intel x86_64 KVM guests Jack Allister
2022-05-31 11:43 ` Metin Kaya
2022-05-31 18:11 ` Paolo Bonzini
2022-06-01 12:55 ` David Woodhouse
2022-05-31 13:38 ` Peter Zijlstra [this message]
2022-05-31 14:02 ` ...\n Jack Allister
2022-05-31 14:44 ` ...\n Peter Zijlstra
2022-05-31 14:52 ` ...\n Durrant, Paul
2022-05-31 15:51 ` ...\n Paolo Bonzini
2022-06-01 7:57 ` ...\n Vitaly Kuznetsov
2022-06-01 8:59 ` ...\n Paolo Bonzini
2022-06-01 10:19 ` ...\n Peter Zijlstra
2022-06-01 6:52 ` ...\n Peter Zijlstra
2022-06-01 8:03 ` ...\n Vitaly Kuznetsov
2022-06-01 8:25 ` ...\n Christophe de Dinechin
2022-06-01 8:54 ` ...\n Durrant, Paul
2022-06-01 8:57 ` ...\n Paolo Bonzini
2022-06-01 9:20 ` ...\n Durrant, Paul
2022-06-01 9:43 ` ...\n Amit Shah
2022-06-01 13:14 ` ...\n David Woodhouse
2022-05-31 14:52 ` ...\n Paolo Bonzini
2022-05-31 15:27 ` ...\n Peter Zijlstra
2022-05-31 15:01 ` [PATCH] KVM: VMX: CPU frequency scaling for intel x86_64 KVM guests Vitaly Kuznetsov
-- strict thread matches above, loose matches on Subject: below --
2022-05-31 11:16 Jack Allister
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=YpYaYK7a28DFT5Ne@hirez.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=bp@alien8.de \
--cc=diapop@amazon.co.uk \
--cc=hpa@zytor.com \
--cc=jalliste@amazon.com \
--cc=jmattson@google.com \
--cc=joro@8bytes.org \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=metikaya@amazon.co.uk \
--cc=mingo@redhat.com \
--cc=pbonzini@redhat.com \
--cc=rkrcmar@redhat.com \
--cc=sean.j.christopherson@intel.com \
--cc=tglx@linutronix.de \
--cc=vkuznets@redhat.com \
--cc=wanpengli@tencent.com \
--cc=x86@kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.