From: "Pratik R. Sampat" <prsampat@amd.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: mcgrof@kernel.org, russ.weight@linux.dev, dakr@kernel.org,
ashish.kalra@amd.com, thomas.lendacky@amd.com,
davem@davemloft.net, linux-crypto@vger.kernel.org,
linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org,
rafael@kernel.org, chao.gao@intel.com, aik@amd.com,
tycho@kernel.org, nikunj@amd.com, michael.roth@amd.com,
shansinha@google.com
Subject: Re: [Patch v5 7/7] crypto: ccp - Implement SNP Download Firmware EX
Date: Wed, 11 Nov 2026 14:41:14 -0500 [thread overview]
Message-ID: <c31651a5-0e52-4b9c-b988-786efb566aef@amd.com> (raw)
In-Reply-To: <avRKB59olTJmKQun@gondor.apana.org.au>
On 11/11/26 5:57 AM, Herbert Xu wrote:
> On Wed, Oct 21, 2026 at 05:05:03PM +0000, Pratik R. Sampat wrote:
>> Implement SNP live firmware update using the DOWNLOAD_FIRMWARE_EX
>> command.
>>
>> DOWNLOAD_FIRMWARE_EX requires the legacy SEV platform to be UNINIT. If
>> it is WORKING then legacy guests are running and the update is refused
>> as busy. If it is INIT, shut it down, release the buffers the firmware
>> owns across that shutdown, run the update, and bring the platform back
>> up afterwards. SNP is never taken down, so SNP guests are unaffected.
>>
>> To test run the following with your sbin file in FW:
>>
>> echo 1 > /sys/class/firmware/sev/loading
>> cat <firmware.sbin> > /sys/class/firmware/sev/data
>> echo 0 > /sys/class/firmware/sev/loading
>>
>> The COMMIT bit is left clear, so the image is only loaded provisionally
>> and the admin decides when to make it permanent with ioctl(/dev/sev,
>> SNP_COMMIT). To roll back, do not commit and upload the previous image
>> the same way.
>>
>> Co-developed-by: Tycho Andersen (AMD) <tycho@kernel.org>
>> Signed-off-by: Tycho Andersen (AMD) <tycho@kernel.org>
>> Signed-off-by: Pratik R. Sampat <prsampat@amd.com>
>> ---
>> v4..v5:
>> * Report original firmware error on rollback failure - Tycho, Shantanu
>> ---
>> drivers/crypto/ccp/sev-dev.c | 297 ++++++++++++++++++++++++++++++++++-
>> drivers/crypto/ccp/sev-dev.h | 2 +
>> include/linux/psp-sev.h | 19 +++
>> 3 files changed, 317 insertions(+), 1 deletion(-)
>
> Sashiko has a comment on this patch:
>
> https://sashiko.dev/#/patchset/cover.1792599491.git.prsampat%40amd.com
>
Thanks for pointing them out, I had missed looking at Sashiko.
I'll refresh the platform status before sev_fw_upload_reinit_platform() to fix
the stale version report.
Calling sev_get_api_version (or a new __locked version rather) before re-init
should also close the short race window.
I'll respin the patches with these changes.
Thanks!
--Pratik
> Thanks,
prev parent reply other threads:[~2026-11-11 19:41 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-21 17:04 [Patch v5 0/7] Implement SNP live firmware update support Pratik R. Sampat
2026-10-21 17:04 ` [Patch v5 1/7] firmware_loader: Stop pinning modules on registration Pratik R. Sampat
2026-10-21 17:04 ` [Patch v5 2/7] firmware_loader: Stop pinning parent device per workqueue invocation Pratik R. Sampat
2026-10-21 17:04 ` [Patch v5 3/7] treewide: firmware_loader: Drop the unused @module argument Pratik R. Sampat
2026-10-21 17:05 ` [Patch v5 4/7] crypto: ccp - Factor out the release of the SEV firmware buffers Pratik R. Sampat
2026-10-21 17:05 ` [Patch v5 5/7] crypto: ccp - Allow SNP platform data to be queried after SNP INIT Pratik R. Sampat
2026-10-21 17:05 ` [Patch v5 6/7] crypto: ccp - Register with fw_uploader and always fail Pratik R. Sampat
2026-10-21 17:05 ` [Patch v5 7/7] crypto: ccp - Implement SNP Download Firmware EX Pratik R. Sampat
2026-11-03 20:06 ` Shantanu Sinha
2026-11-11 10:57 ` Herbert Xu
2026-11-11 19:41 ` Pratik R. Sampat [this message]
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=c31651a5-0e52-4b9c-b988-786efb566aef@amd.com \
--to=prsampat@amd.com \
--cc=aik@amd.com \
--cc=ashish.kalra@amd.com \
--cc=chao.gao@intel.com \
--cc=dakr@kernel.org \
--cc=davem@davemloft.net \
--cc=gregkh@linuxfoundation.org \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mcgrof@kernel.org \
--cc=michael.roth@amd.com \
--cc=nikunj@amd.com \
--cc=rafael@kernel.org \
--cc=russ.weight@linux.dev \
--cc=shansinha@google.com \
--cc=thomas.lendacky@amd.com \
--cc=tycho@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®