diff options
author | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2017-06-21 10:49:15 -0400 |
---|---|---|
committer | Christian Borntraeger <borntraeger@de.ibm.com> | 2017-06-22 06:41:07 -0400 |
commit | 1cae025577f447fa69e55f194b1f3b078f5fbc25 (patch) | |
tree | b9cd388773eae59a94580b5ac8976b91616df5d5 | |
parent | 2c1a48f2e5ed31b881eaa003a6276818a4794485 (diff) |
KVM: s390: avoid packed attribute
For naturally aligned and sized data structures avoid superfluous
packed and aligned attributes.
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
-rw-r--r-- | arch/s390/include/asm/kvm_host.h | 18 | ||||
-rw-r--r-- | arch/s390/kvm/gaccess.c | 4 | ||||
-rw-r--r-- | arch/s390/kvm/vsie.c | 2 |
3 files changed, 12 insertions, 12 deletions
diff --git a/arch/s390/include/asm/kvm_host.h b/arch/s390/include/asm/kvm_host.h index a8cafed79eb4..72bad6753d97 100644 --- a/arch/s390/include/asm/kvm_host.h +++ b/arch/s390/include/asm/kvm_host.h | |||
@@ -58,7 +58,7 @@ union bsca_sigp_ctrl { | |||
58 | __u8 r : 1; | 58 | __u8 r : 1; |
59 | __u8 scn : 6; | 59 | __u8 scn : 6; |
60 | }; | 60 | }; |
61 | } __packed; | 61 | }; |
62 | 62 | ||
63 | union esca_sigp_ctrl { | 63 | union esca_sigp_ctrl { |
64 | __u16 value; | 64 | __u16 value; |
@@ -67,14 +67,14 @@ union esca_sigp_ctrl { | |||
67 | __u8 reserved: 7; | 67 | __u8 reserved: 7; |
68 | __u8 scn; | 68 | __u8 scn; |
69 | }; | 69 | }; |
70 | } __packed; | 70 | }; |
71 | 71 | ||
72 | struct esca_entry { | 72 | struct esca_entry { |
73 | union esca_sigp_ctrl sigp_ctrl; | 73 | union esca_sigp_ctrl sigp_ctrl; |
74 | __u16 reserved1[3]; | 74 | __u16 reserved1[3]; |
75 | __u64 sda; | 75 | __u64 sda; |
76 | __u64 reserved2[6]; | 76 | __u64 reserved2[6]; |
77 | } __packed; | 77 | }; |
78 | 78 | ||
79 | struct bsca_entry { | 79 | struct bsca_entry { |
80 | __u8 reserved0; | 80 | __u8 reserved0; |
@@ -82,7 +82,7 @@ struct bsca_entry { | |||
82 | __u16 reserved[3]; | 82 | __u16 reserved[3]; |
83 | __u64 sda; | 83 | __u64 sda; |
84 | __u64 reserved2[2]; | 84 | __u64 reserved2[2]; |
85 | } __attribute__((packed)); | 85 | }; |
86 | 86 | ||
87 | union ipte_control { | 87 | union ipte_control { |
88 | unsigned long val; | 88 | unsigned long val; |
@@ -99,7 +99,7 @@ struct bsca_block { | |||
99 | __u64 mcn; | 99 | __u64 mcn; |
100 | __u64 reserved2; | 100 | __u64 reserved2; |
101 | struct bsca_entry cpu[KVM_S390_BSCA_CPU_SLOTS]; | 101 | struct bsca_entry cpu[KVM_S390_BSCA_CPU_SLOTS]; |
102 | } __attribute__((packed)); | 102 | }; |
103 | 103 | ||
104 | struct esca_block { | 104 | struct esca_block { |
105 | union ipte_control ipte_control; | 105 | union ipte_control ipte_control; |
@@ -107,7 +107,7 @@ struct esca_block { | |||
107 | __u64 mcn[4]; | 107 | __u64 mcn[4]; |
108 | __u64 reserved2[20]; | 108 | __u64 reserved2[20]; |
109 | struct esca_entry cpu[KVM_S390_ESCA_CPU_SLOTS]; | 109 | struct esca_entry cpu[KVM_S390_ESCA_CPU_SLOTS]; |
110 | } __packed; | 110 | }; |
111 | 111 | ||
112 | #define CPUSTAT_STOPPED 0x80000000 | 112 | #define CPUSTAT_STOPPED 0x80000000 |
113 | #define CPUSTAT_WAIT 0x10000000 | 113 | #define CPUSTAT_WAIT 0x10000000 |
@@ -262,14 +262,14 @@ struct kvm_s390_sie_block { | |||
262 | 262 | ||
263 | struct kvm_s390_itdb { | 263 | struct kvm_s390_itdb { |
264 | __u8 data[256]; | 264 | __u8 data[256]; |
265 | } __packed; | 265 | }; |
266 | 266 | ||
267 | struct sie_page { | 267 | struct sie_page { |
268 | struct kvm_s390_sie_block sie_block; | 268 | struct kvm_s390_sie_block sie_block; |
269 | __u8 reserved200[1024]; /* 0x0200 */ | 269 | __u8 reserved200[1024]; /* 0x0200 */ |
270 | struct kvm_s390_itdb itdb; /* 0x0600 */ | 270 | struct kvm_s390_itdb itdb; /* 0x0600 */ |
271 | __u8 reserved700[2304]; /* 0x0700 */ | 271 | __u8 reserved700[2304]; /* 0x0700 */ |
272 | } __packed; | 272 | }; |
273 | 273 | ||
274 | struct kvm_vcpu_stat { | 274 | struct kvm_vcpu_stat { |
275 | u64 exit_userspace; | 275 | u64 exit_userspace; |
@@ -683,7 +683,7 @@ struct sie_page2 { | |||
683 | __u64 fac_list[S390_ARCH_FAC_LIST_SIZE_U64]; /* 0x0000 */ | 683 | __u64 fac_list[S390_ARCH_FAC_LIST_SIZE_U64]; /* 0x0000 */ |
684 | struct kvm_s390_crypto_cb crycb; /* 0x0800 */ | 684 | struct kvm_s390_crypto_cb crycb; /* 0x0800 */ |
685 | u8 reserved900[0x1000 - 0x900]; /* 0x0900 */ | 685 | u8 reserved900[0x1000 - 0x900]; /* 0x0900 */ |
686 | } __packed; | 686 | }; |
687 | 687 | ||
688 | struct kvm_s390_vsie { | 688 | struct kvm_s390_vsie { |
689 | struct mutex mutex; | 689 | struct mutex mutex; |
diff --git a/arch/s390/kvm/gaccess.c b/arch/s390/kvm/gaccess.c index 6fda095f1a99..17e3a4e71bc9 100644 --- a/arch/s390/kvm/gaccess.c +++ b/arch/s390/kvm/gaccess.c | |||
@@ -242,7 +242,7 @@ struct ale { | |||
242 | unsigned long asteo : 25; /* ASN-Second-Table-Entry Origin */ | 242 | unsigned long asteo : 25; /* ASN-Second-Table-Entry Origin */ |
243 | unsigned long : 6; | 243 | unsigned long : 6; |
244 | unsigned long astesn : 32; /* ASTE Sequence Number */ | 244 | unsigned long astesn : 32; /* ASTE Sequence Number */ |
245 | } __packed; | 245 | }; |
246 | 246 | ||
247 | struct aste { | 247 | struct aste { |
248 | unsigned long i : 1; /* ASX-Invalid Bit */ | 248 | unsigned long i : 1; /* ASX-Invalid Bit */ |
@@ -258,7 +258,7 @@ struct aste { | |||
258 | unsigned long ald : 32; | 258 | unsigned long ald : 32; |
259 | unsigned long astesn : 32; | 259 | unsigned long astesn : 32; |
260 | /* .. more fields there */ | 260 | /* .. more fields there */ |
261 | } __packed; | 261 | }; |
262 | 262 | ||
263 | int ipte_lock_held(struct kvm_vcpu *vcpu) | 263 | int ipte_lock_held(struct kvm_vcpu *vcpu) |
264 | { | 264 | { |
diff --git a/arch/s390/kvm/vsie.c b/arch/s390/kvm/vsie.c index 4719ecb9ab42..e947657d82ac 100644 --- a/arch/s390/kvm/vsie.c +++ b/arch/s390/kvm/vsie.c | |||
@@ -35,7 +35,7 @@ struct vsie_page { | |||
35 | __u8 reserved[0x0700 - 0x0218]; /* 0x0218 */ | 35 | __u8 reserved[0x0700 - 0x0218]; /* 0x0218 */ |
36 | struct kvm_s390_crypto_cb crycb; /* 0x0700 */ | 36 | struct kvm_s390_crypto_cb crycb; /* 0x0700 */ |
37 | __u8 fac[S390_ARCH_FAC_LIST_SIZE_BYTE]; /* 0x0800 */ | 37 | __u8 fac[S390_ARCH_FAC_LIST_SIZE_BYTE]; /* 0x0800 */ |
38 | } __packed; | 38 | }; |
39 | 39 | ||
40 | /* trigger a validity icpt for the given scb */ | 40 | /* trigger a validity icpt for the given scb */ |
41 | static int set_validity_icpt(struct kvm_s390_sie_block *scb, | 41 | static int set_validity_icpt(struct kvm_s390_sie_block *scb, |