All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wanpeng Li <kernellwp@gmail.com>
To: Sean Christopherson <sean.j.christopherson@intel.com>
Cc: LKML <linux-kernel@vger.kernel.org>, kvm <kvm@vger.kernel.org>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Radim Krčmář" <rkrcmar@redhat.com>
Subject: Re: [PATCH v2 1/5] KVM: X86: Dynamic allocate core residency msr state
Date: Thu, 13 Jun 2019 08:43:28 +0800	[thread overview]
Message-ID: <CANRm+CyyCq5keLokqu5ZZodnyvd-AmGejY_O3Gz2pcGWBrz=WA@mail.gmail.com> (raw)
In-Reply-To: <20190612160123.GH20308@linux.intel.com>

On Thu, 13 Jun 2019 at 00:01, Sean Christopherson
<sean.j.christopherson@intel.com> wrote:
>
> On Tue, Jun 11, 2019 at 03:34:07PM +0800, Wanpeng Li wrote:
> > From: Wanpeng Li <wanpengli@tencent.com>
> >
> > Dynamic allocate core residency msr state. MSR_CORE_C1_RES is unreadable
> > except for ATOM platform, so it is ignore here.
> >
> > Cc: Paolo Bonzini <pbonzini@redhat.com>
> > Cc: Radim Krčmář <rkrcmar@redhat.com>
> > Signed-off-by: Wanpeng Li <wanpengli@tencent.com>
> > ---
> >  arch/x86/include/asm/kvm_host.h | 11 +++++++++++
> >  arch/x86/kvm/vmx/vmx.c          |  5 +++++
> >  2 files changed, 16 insertions(+)
> >
> > diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
> > index 15e973d..bd615ee 100644
> > --- a/arch/x86/include/asm/kvm_host.h
> > +++ b/arch/x86/include/asm/kvm_host.h
> > @@ -538,6 +538,15 @@ struct kvm_vcpu_hv {
> >       cpumask_t tlb_flush;
> >  };
> >
> > +#define NR_CORE_RESIDENCY_MSRS 3
> > +
> > +struct kvm_residency_msr {
> > +     s64 value;
> > +     u32 index;
> > +     bool delta_from_host;
> > +     bool count_with_host;
> > +};
> > +
> >  struct kvm_vcpu_arch {
> >       /*
> >        * rip and regs accesses must go through
> > @@ -785,6 +794,8 @@ struct kvm_vcpu_arch {
> >
> >       /* AMD MSRC001_0015 Hardware Configuration */
> >       u64 msr_hwcr;
> > +
> > +     struct kvm_residency_msr *core_cstate_msrs;
>
> Why are these in kvm_vcpu_arch?  AFAICT they're only wired up for VMX.

They can be used by SVM later though I'm too busy to do that.

Regards,
Wanpeng Li

  reply	other threads:[~2019-06-13 16:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-11  7:34 [PATCH v2 0/5] KVM: X86: Add virtual C-states residency msrs support Wanpeng Li
2019-06-11  7:34 ` [PATCH v2 1/5] KVM: X86: Dynamic allocate core residency msr state Wanpeng Li
2019-06-12 16:01   ` Sean Christopherson
2019-06-13  0:43     ` Wanpeng Li [this message]
2019-06-11  7:34 ` [PATCH v2 2/5] KVM: X86: Introduce residency msrs read/write operations Wanpeng Li
2019-06-11  7:34 ` [PATCH v2 3/5] KVM: X86: setup residency msrs during vCPU creation Wanpeng Li
2019-06-11  7:34 ` [PATCH v2 4/5] KVM: VMX: Add get/set residency msrs logic Wanpeng Li
2019-06-11  7:34 ` [PATCH v2 5/5] KVM: X86: Save/restore residency values when vCPU migrations Wanpeng Li

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='CANRm+CyyCq5keLokqu5ZZodnyvd-AmGejY_O3Gz2pcGWBrz=WA@mail.gmail.com' \
    --to=kernellwp@gmail.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=rkrcmar@redhat.com \
    --cc=sean.j.christopherson@intel.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 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.