mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
target/s390x: Introduce constant when checking if PV header couldn't be decrypted
Introduce a named constant when checking the Set Secure Configuration parameters UV call return code for the case where no valid host key was found and therefore the PV header couldn't be decrypted (0x108). Reviewed-by: Steffen Eiden <seiden@linux.ibm.com> Reviewed-by: Janosch Frank <frankja@linux.ibm.com> Signed-off-by: Gautam Gala <ggala@linux.ibm.com> Message-ID: <20250423080915.1048123-2-ggala@linux.ibm.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
This commit is contained in:
parent
73d29ea241
commit
2e6a9f03ba
1 changed files with 2 additions and 1 deletions
|
@ -147,6 +147,7 @@ bool s390_pv_vm_try_disable_async(S390CcwMachineState *ms)
|
|||
return true;
|
||||
}
|
||||
|
||||
#define UV_RC_SSC_INVAL_HOSTKEY 0x0108
|
||||
int s390_pv_set_sec_parms(uint64_t origin, uint64_t length, Error **errp)
|
||||
{
|
||||
int ret, pvrc;
|
||||
|
@ -158,7 +159,7 @@ int s390_pv_set_sec_parms(uint64_t origin, uint64_t length, Error **errp)
|
|||
ret = s390_pv_cmd_pvrc(KVM_PV_SET_SEC_PARMS, &args, &pvrc);
|
||||
if (ret) {
|
||||
error_setg(errp, "Failed to set secure execution parameters");
|
||||
if (pvrc == 0x108) {
|
||||
if (pvrc == UV_RC_SSC_INVAL_HOSTKEY) {
|
||||
error_append_hint(errp, "Please check whether the image is "
|
||||
"correctly encrypted for this host\n");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue