lkml.org 
[lkml]   [2023]   [Feb]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 03/11] virt/coco/sev-guest: Simplify extended guest request handling
>         if (ghcb->save.sw_exit_info_2) {
> /* Number of expected pages are returned in RBX */
> if (exit_code == SVM_VMGEXIT_EXT_GUEST_REQUEST &&
> - ghcb->save.sw_exit_info_2 == SNP_GUEST_REQ_INVALID_LEN)
> + ghcb->save.sw_exit_info_2 == SNP_GUEST_REQ_INVALID_LEN) {
> input->data_npages = ghcb_get_rbx(ghcb);
> + ret = -ENOSPC;
> + } else {
> + ret = -EIO;
> + }
>
> *fw_err = ghcb->save.sw_exit_info_2;
> -
> - ret = -EIO;
> }

I think *fw_err still needs to be hoisted out of this if block so that
a 0 fw_err gets written back to user space rather than the 0xff
placeholder. The 0 would more correctly indicate the lack of an error.


--
-Dionna Glaze, PhD (she/her)

\
 
 \ /
  Last update: 2023-03-27 00:26    [W:2.566 / U:0.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site