Messages in this thread | | | Date | Fri, 28 Oct 2022 09:45:09 -0500 | Subject | Re: [PATCH v4 2/4] x86/sev: Change snp_guest_issue_request's fw_err | From | Tom Lendacky <> |
| |
On 10/24/22 17:46, Dionna Glaze wrote: > The GHCB specification declares that the firmware error value for a > guest request will be stored in the lower 32 bits of EXIT_INFO_2. > The upper 32 bits are for the VMM's own error code. The fw_err argument > is thus a misnomer, and callers will need access to all 64 bits. > > The type of unsigned long also causes problems, since sw_exit_info2 is > u64 (unsigned long long) vs the argument's previous unsigned long*. > The signature change requires the follow-up change to > drivers/virt/coco/sev-guest to use the new expected type in order to > compile. > > The firmware might not even be called, so we bookend the call with the > no firmware call error and clearing the error. > > Cc: Tom Lendacky <Thomas.Lendacky@amd.com> > Cc: Paolo Bonzini <pbonzini@redhat.com> > Cc: Joerg Roedel <jroedel@suse.de> > Cc: Peter Gonda <pgonda@google.com> > Cc: Thomas Gleixner <tglx@linutronix.de> > Cc: Dave Hansen <dave.hansen@linux.intel.com> > > Fixes: d5af44dde546 ("x86/sev: Provide support for SNP guest request NAEs") > Signed-off-by: Dionna Glaze <dionnaglaze@google.com>
Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com>
> --- > arch/x86/include/asm/sev.h | 4 ++-- > arch/x86/kernel/sev.c | 10 ++++++---- > 2 files changed, 8 insertions(+), 6 deletions(-) >
| |