lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250225213937.2471419-1-huibo.wang@amd.com>
Date: Tue, 25 Feb 2025 21:39:35 +0000
From: Melody Wang <huibo.wang@....com>
To: Sean Christopherson <seanjc@...gle.com>
CC: Paolo Bonzini <pbonzini@...hat.com>, KVM <kvm@...r.kernel.org>, LKML
	<linux-kernel@...r.kernel.org>, Tom Lendacky <thomas.lendacky@....com>,
	Paluri PavanKumar <pavankumar.paluri@....com>, Melody Wang
	<huibo.wang@....com>
Subject: [PATCH v5 0/2] KVM: SVM: Make VMGEXIT GHCB exit codes more readable

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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ