Commit 976bc5e2 authored by Borislav Petkov's avatar Borislav Petkov Committed by Borislav Petkov

KVM: SVM: Use __packed shorthand

Use the shorthand to make it more readable.

No functional changes.
Signed-off-by: default avatarBorislav Petkov <bp@alien8.de>
Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
Link: https://lkml.kernel.org/r/20200907131613.12703-5-joro@8bytes.org
parent 3702c2f4
...@@ -150,14 +150,14 @@ struct __attribute__ ((__packed__)) vmcb_control_area { ...@@ -150,14 +150,14 @@ struct __attribute__ ((__packed__)) vmcb_control_area {
#define SVM_NESTED_CTL_NP_ENABLE BIT(0) #define SVM_NESTED_CTL_NP_ENABLE BIT(0)
#define SVM_NESTED_CTL_SEV_ENABLE BIT(1) #define SVM_NESTED_CTL_SEV_ENABLE BIT(1)
struct __attribute__ ((__packed__)) vmcb_seg { struct vmcb_seg {
u16 selector; u16 selector;
u16 attrib; u16 attrib;
u32 limit; u32 limit;
u64 base; u64 base;
}; } __packed;
struct __attribute__ ((__packed__)) vmcb_save_area { struct vmcb_save_area {
struct vmcb_seg es; struct vmcb_seg es;
struct vmcb_seg cs; struct vmcb_seg cs;
struct vmcb_seg ss; struct vmcb_seg ss;
...@@ -231,7 +231,7 @@ struct __attribute__ ((__packed__)) vmcb_save_area { ...@@ -231,7 +231,7 @@ struct __attribute__ ((__packed__)) vmcb_save_area {
u64 xcr0; u64 xcr0;
u8 valid_bitmap[16]; u8 valid_bitmap[16];
u64 x87_state_gpa; u64 x87_state_gpa;
}; } __packed;
struct ghcb { struct ghcb {
struct vmcb_save_area save; struct vmcb_save_area save;
...@@ -256,11 +256,11 @@ static inline void __unused_size_checks(void) ...@@ -256,11 +256,11 @@ static inline void __unused_size_checks(void)
BUILD_BUG_ON(sizeof(struct ghcb) != EXPECTED_GHCB_SIZE); BUILD_BUG_ON(sizeof(struct ghcb) != EXPECTED_GHCB_SIZE);
} }
struct __attribute__ ((__packed__)) vmcb { struct vmcb {
struct vmcb_control_area control; struct vmcb_control_area control;
u8 reserved_control[1024 - sizeof(struct vmcb_control_area)]; u8 reserved_control[1024 - sizeof(struct vmcb_control_area)];
struct vmcb_save_area save; struct vmcb_save_area save;
}; } __packed;
#define SVM_CPUID_FUNC 0x8000000a #define SVM_CPUID_FUNC 0x8000000a
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment