Messages in this thread | | | From | Peter Gonda <> | Date | Fri, 4 Nov 2022 19:33:02 -0600 | Subject | Re: [PATCH v8 2/4] x86/sev: Change snp_guest_issue_request's fw_err |
| |
On Fri, Nov 4, 2022 at 5:01 PM Dionna Glaze <dionnaglaze@google.com> 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> > Cc: Ingo Molnar <mingo@redhat.com> > Cc: Borislav Petkov <bp@alien8.de> > Cc: "H. Peter Anvin" <hpa@zytor.com> > Cc: Venu Busireddy <venu.busireddy@oracle.com> > Cc: Michael Roth <michael.roth@amd.com> > Cc: "Kirill A. Shutemov" <kirill@shutemov.name> > Cc: Michael Sterritt <sterritt@google.com> > > Fixes: d5af44dde546 ("x86/sev: Provide support for SNP guest request NAEs") > Signed-off-by: Dionna Glaze <dionnaglaze@google.com>
Reviewed-by: Peter Gonda <pgonda@google.com
| |