All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sean Christopherson <seanjc@google.com>
To: Tom Lendacky <thomas.lendacky@amd.com>
Cc: Manali Shukla <manali.shukla@amd.com>,
	kvm@vger.kernel.org, pbonzini@redhat.com
Subject: Re: [PATCH] KVM: SVM: correct the size of spec_ctrl field in VMCB save area
Date: Mon, 17 Jul 2023 08:01:10 -0700	[thread overview]
Message-ID: <ZLVXtqlOfJsGKMYW@google.com> (raw)
In-Reply-To: <b6f80cd4-acf7-bc87-087d-142e8c54b098@amd.com>

On Mon, Jul 17, 2023, Tom Lendacky wrote:
> On 7/16/23 23:19, Manali Shukla wrote:
> > Correct the spec_ctrl field in the VMCB save area based on the AMD
> > Programmer's manual.
> > 
> > Originally, the spec_ctrl was listed as u32 with 4 bytes of reserved

Nit, either just "spec_ctrl" or "the spec_ctrl field", specific MSRs and fields
are essentially proper nouns when used as nouns and not adjectives.

> > area.  The AMD Programmer's Manual now lists the spec_ctrl as 8 bytes
> > in VMCB save area.
> > 
> > The Public Processor Programming reference for Genoa, shows SPEC_CTRL
> > as 64b register, but the AMD Programmer's Manual lists SPEC_CTRL as

Nit, write out 64-bit (and 32-bit) so that there's zero ambiguity (I paused for
a few seconds to make sure I was reading it correctly).  64b is perfectly valid,
but nowhere near as common in the kernel, e.g.

  $ git log | grep -E "\s64b\s" | wc -l
  160
  $ git log | grep -E "\s64-bit\s" | wc -l
  8334

> > 32b register. This discrepancy will be cleaned up in next revision of
> > the AMD Programmer's Manual.
> > 
> > Since remaining bits above bit 7 are reserved bits in SPEC_CTRL MSR
> > and thus, not being used, the spec_ctrl added as u32 in the VMCB save

Same comment about "the spec_ctrl" here.

> > area is currently not an issue.
> > 
> > Fixes: 3dd2775b74c9 ("KVM: SVM: Create a separate mapping for the SEV-ES save area")
> 
> The more appropriate Fixes: tag should the be commit that originally
> introduced the spec_ctrl field:
> 
> d00b99c514b3 ("KVM: SVM: Add support for Virtual SPEC_CTRL")
> 
> Although because of 3dd2775b74c9, backports to before that might take some
> manual work.

And

  Cc: stable@vger.kernel.org

to make sure this gets backported.

No need for a v2, I can fixup all the nits when applying.

  reply	other threads:[~2023-07-17 15:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-17  4:19 [PATCH] KVM: SVM: correct the size of spec_ctrl field in VMCB save area Manali Shukla
2023-07-17 13:17 ` Tom Lendacky
2023-07-17 15:01   ` Sean Christopherson [this message]
2023-07-22  5:13     ` Manali Shukla
2023-07-26 15:17 ` Sean Christopherson
2023-08-18  0:12 ` Sean Christopherson

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=ZLVXtqlOfJsGKMYW@google.com \
    --to=seanjc@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=manali.shukla@amd.com \
    --cc=pbonzini@redhat.com \
    --cc=thomas.lendacky@amd.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.