x86: VMX: Require 16-byte alignment for struct vmx_msr_entry
PATCH 1/1 x86: VMX: Require 16-byte alignment for struct vmx_msr_entry
The MSR-store area and the MSR-load areas must be 16-byte aligned, per the hardware specification.
Fixes bd1bf2d6af77a ("VMX: Test MSR load/store feature")
Signed-off-by Jim Mattson <[email protected]>
--- x86/vmx_tests.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
x86/vmx_tests.c +1 -1
@@ -1959,7 +1959,7 @@ struct vmx_msr_entry {u32 index;u32 reserved;u64 value; -} __attribute__((packed)); +} __attribute__((packed, aligned(16)));#define MSR_MAGIC 0x31415926struct vmx_msr_entry *exit_msr_store, *entry_msr_load, *exit_msr_load;
Signature · 1 line
2.36.0.rc0.470.gd361397f0d-goog
Quoted 24 lines · Jim Mattson
The MSR-store area and the MSR-load areas must be 16-byte aligned, per the hardware specification.
Fixes bd1bf2d6af77a ("VMX: Test MSR load/store feature")Signed-off-by Jim Mattson <[email protected]>--- x86/vmx_tests.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)x86/vmx_tests.c +1
-2@@ -1959,7 +1959,7 @@ struct vmx_msr_entry {u32 index;u32 reserved;u64 value; -} __attribute__((packed)); +} __attribute__((packed, aligned(16)));#define MSR_MAGIC 0x31415926struct vmx_msr_entry *exit_msr_store, *entry_msr_load, *exit_msr_load; --
Quoted 2 lines
2.36.0.rc0.470.gd361397f0d-goog
Reviewed-by Aaron Lewis <[email protected]>