public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Melody Wang <huibo.wang@amd.com>
To: Sean Christopherson <seanjc@google.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>, KVM <kvm@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Tom Lendacky <thomas.lendacky@amd.com>,
	Paluri PavanKumar <pavankumar.paluri@amd.com>,
	Melody Wang <huibo.wang@amd.com>
Subject: [PATCH v5 0/2] KVM: SVM: Make VMGEXIT GHCB exit codes more readable
Date: Tue, 25 Feb 2025 21:39:35 +0000	[thread overview]
Message-ID: <20250225213937.2471419-1-huibo.wang@amd.com> (raw)

This patchset includes two patches to make VMGEXIT GHCB exit codes returned by the
hypervisor more readable. One patch coverts plain error code numbers to defines, the
other one adds helpers to set the error code.

No functionality changed.

Thanks,
Melody

Changelog:

Changes since v4:
* Add explanation comment about svm_vmgexit_no_action() is corresponding to SW_EXITINFO1.
* Add explanation comment about svm_vmgexit_no_action() when the request failed due to a firmware error.

Changes since v3:
* Document the weirdness with PSC's SW_EXITINFO1.
* Add svm_vmgexit_no_action() helper along with svm_vmgexit_success() to clarify meaning.
* Change GHCB_HV_RESP_SUCCESS to GHCB_HV_RESP_NO_ACTION to avoid the confusion.

Changes since v2:
* Add one patch for providing helpers to set the error code when converting VMGEXIT SW_EXITINFO1 and
SW_EXITINFO2 codes from plain numbers to proper defines.
* Add comments for better code readability.

Changes since v1: Rebase with the latest KVM next.

Melody Wang (2):
  KVM: SVM: Convert plain error code numbers to defines
  KVM: SVM: Provide helpers to set the error code

 arch/x86/include/asm/sev-common.h |  8 +++++++
 arch/x86/kvm/svm/sev.c            | 39 +++++++++++++++++--------------
 arch/x86/kvm/svm/svm.c            |  6 +----
 arch/x86/kvm/svm/svm.h            | 29 +++++++++++++++++++++++
 4 files changed, 59 insertions(+), 23 deletions(-)

-- 
2.34.1


             reply	other threads:[~2025-02-25 21:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-25 21:39 Melody Wang [this message]
2025-02-25 21:39 ` [PATCH v5 1/2] KVM: SVM: Convert plain error code numbers to defines Melody Wang
2025-02-25 22:28   ` Sean Christopherson
2025-02-25 21:39 ` [PATCH v5 2/2] KVM: SVM: Provide helpers to set the error code Melody Wang
2025-02-25 22:32   ` Sean Christopherson
2025-02-25 22:39 ` [PATCH v5 0/2] KVM: SVM: Make VMGEXIT GHCB exit codes more readable Sean Christopherson
2025-02-28 17:06 ` 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=20250225213937.2471419-1-huibo.wang@amd.com \
    --to=huibo.wang@amd.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavankumar.paluri@amd.com \
    --cc=pbonzini@redhat.com \
    --cc=seanjc@google.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox