From: Tom Lendacky <thomas.lendacky@amd.com>
To: Dionna Glaze <dionnaglaze@google.com>,
linux-kernel@vger.kernel.org, x86@kernel.org
Cc: Paolo Bonzini <pbonzini@redhat.com>,
Joerg Roedel <jroedel@suse.de>, Peter Gonda <pgonda@google.com>,
Thomas Gleixner <tglx@linutronix.de>,
Dave Hansen <dave.hansen@linux.intel.com>
Subject: Re: [PATCH v4 2/4] x86/sev: Change snp_guest_issue_request's fw_err
Date: Fri, 28 Oct 2022 09:45:09 -0500 [thread overview]
Message-ID: <3f1b0015-9393-a441-ce5f-79b39c3e8ee7@amd.com> (raw)
In-Reply-To: <20221024224657.2917482-3-dionnaglaze@google.com>
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(-)
>
next prev parent reply other threads:[~2022-10-28 14:45 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-24 22:46 [PATCH v4 0/4] Add throttling detection to sev-guest Dionna Glaze
2022-10-24 22:46 ` [PATCH v4 1/4] ccp: Name -1 return value as SEV_RET_NO_FW_CALL Dionna Glaze
2022-10-28 14:35 ` Tom Lendacky
2022-10-24 22:46 ` [PATCH v4 2/4] x86/sev: Change snp_guest_issue_request's fw_err Dionna Glaze
2022-10-27 16:09 ` Peter Gonda
2022-10-27 16:11 ` Dionna Amalie Glaze
2022-10-28 14:45 ` Tom Lendacky [this message]
2022-10-24 22:46 ` [PATCH v4 3/4] virt/coco/sev-guest: Remove err in handle_guest_request Dionna Glaze
2022-10-28 14:46 ` Tom Lendacky
2022-10-24 22:46 ` [PATCH v4 4/4] virt/coco/sev-guest: interpret VMM errors from guest request Dionna Glaze
2022-10-28 15:15 ` Tom Lendacky
2022-10-28 15:57 ` Dionna Amalie Glaze
2022-10-27 15:53 ` [PATCH v4 0/4] Add throttling detection to sev-guest Dionna Amalie Glaze
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3f1b0015-9393-a441-ce5f-79b39c3e8ee7@amd.com \
--to=thomas.lendacky@amd.com \
--cc=dave.hansen@linux.intel.com \
--cc=dionnaglaze@google.com \
--cc=jroedel@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=pgonda@google.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®