Skip to content

Commit 51a4273

Browse files
nikunjadsean-jc
authored andcommitted
KVM: SVM: Add missing member in SNP_LAUNCH_START command structure
The sev_data_snp_launch_start structure should include a 4-byte desired_tsc_khz field before the gosvw field, which was missed in the initial implementation. As a result, the structure is 4 bytes shorter than expected by the firmware, causing the gosvw field to start 4 bytes early. Fix this by adding the missing 4-byte member for the desired TSC frequency. Fixes: 3a45dc2 ("crypto: ccp: Define the SEV-SNP commands") Cc: [email protected] Suggested-by: Tom Lendacky <[email protected]> Reviewed-by: Tom Lendacky <[email protected]> Tested-by: Vaishali Thakkar <[email protected]> Signed-off-by: Nikunj A Dadhania <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sean Christopherson <[email protected]>
1 parent 0c84b53 commit 51a4273

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

include/linux/psp-sev.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -594,6 +594,7 @@ struct sev_data_snp_addr {
594594
* @imi_en: launch flow is launching an IMI (Incoming Migration Image) for the
595595
* purpose of guest-assisted migration.
596596
* @rsvd: reserved
597+
* @desired_tsc_khz: hypervisor desired mean TSC freq in kHz of the guest
597598
* @gosvw: guest OS-visible workarounds, as defined by hypervisor
598599
*/
599600
struct sev_data_snp_launch_start {
@@ -603,6 +604,7 @@ struct sev_data_snp_launch_start {
603604
u32 ma_en:1; /* In */
604605
u32 imi_en:1; /* In */
605606
u32 rsvd:30;
607+
u32 desired_tsc_khz; /* In */
606608
u8 gosvw[16]; /* In */
607609
} __packed;
608610

0 commit comments

Comments
 (0)