Patch "KVM: SVM: correct the size of spec_ctrl field in VMCB save area" has been added to the 6.1-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    KVM: SVM: correct the size of spec_ctrl field in VMCB save area

to the 6.1-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     kvm-svm-correct-the-size-of-spec_ctrl-field-in-vmcb-.patch
and it can be found in the queue-6.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 11f5e505e7b73a1d76ba076f00630d72e0e4e3c2
Author: Manali Shukla <manali.shukla@xxxxxxx>
Date:   Mon Jul 17 04:19:03 2023 +0000

    KVM: SVM: correct the size of spec_ctrl field in VMCB save area
    
    [ Upstream commit f67063414c0e83bb4a9e12358cc179af53c2a8bb ]
    
    Correct the spec_ctrl field in the VMCB save area based on the AMD
    Programmer's manual.
    
    Originally, the spec_ctrl was listed as u32 with 4 bytes of reserved
    area.  The AMD Programmer's Manual now lists the spec_ctrl as 8 bytes
    in VMCB save area.
    
    The Public Processor Programming reference for Genoa, shows SPEC_CTRL
    as 64b register, but the AMD Programmer's Manual lists SPEC_CTRL as
    32b register. This discrepancy will be cleaned up in next revision of
    the AMD Programmer's Manual.
    
    Since remaining bits above bit 7 are reserved bits in SPEC_CTRL MSR
    and thus, not being used, the spec_ctrl added as u32 in the VMCB save
    area is currently not an issue.
    
    Fixes: 3dd2775b74c9 ("KVM: SVM: Create a separate mapping for the SEV-ES save area")
    Suggested-by: Tom Lendacky <thomas.lendacky@xxxxxxx>
    Signed-off-by: Manali Shukla <manali.shukla@xxxxxxx>
    Link: https://lore.kernel.org/r/20230717041903.85480-1-manali.shukla@xxxxxxx
    Signed-off-by: Sean Christopherson <seanjc@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/arch/x86/include/asm/svm.h b/arch/x86/include/asm/svm.h
index 770dcf75eaa97..a14e62a12d616 100644
--- a/arch/x86/include/asm/svm.h
+++ b/arch/x86/include/asm/svm.h
@@ -337,7 +337,7 @@ struct vmcb_save_area {
 	u64 last_excp_from;
 	u64 last_excp_to;
 	u8 reserved_0x298[72];
-	u32 spec_ctrl;		/* Guest version of SPEC_CTRL at 0x2E0 */
+	u64 spec_ctrl;		/* Guest version of SPEC_CTRL at 0x2E0 */
 } __packed;
 
 /* Save area definition for SEV-ES and SEV-SNP guests */
@@ -504,7 +504,7 @@ struct ghcb {
 } __packed;
 
 
-#define EXPECTED_VMCB_SAVE_AREA_SIZE		740
+#define EXPECTED_VMCB_SAVE_AREA_SIZE		744
 #define EXPECTED_GHCB_SAVE_AREA_SIZE		1032
 #define EXPECTED_SEV_ES_SAVE_AREA_SIZE		1648
 #define EXPECTED_VMCB_CONTROL_AREA_SIZE		1024



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux