Commit 1cae0255 authored by Martin Schwidefsky's avatar Martin Schwidefsky Committed by Christian Borntraeger

KVM: s390: avoid packed attribute

For naturally aligned and sized data structures avoid superfluous
packed and aligned attributes.
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
Reviewed-by: default avatarChristian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: default avatarChristian Borntraeger <borntraeger@de.ibm.com>
parent 2c1a48f2
...@@ -58,7 +58,7 @@ union bsca_sigp_ctrl { ...@@ -58,7 +58,7 @@ union bsca_sigp_ctrl {
__u8 r : 1; __u8 r : 1;
__u8 scn : 6; __u8 scn : 6;
}; };
} __packed; };
union esca_sigp_ctrl { union esca_sigp_ctrl {
__u16 value; __u16 value;
...@@ -67,14 +67,14 @@ union esca_sigp_ctrl { ...@@ -67,14 +67,14 @@ union esca_sigp_ctrl {
__u8 reserved: 7; __u8 reserved: 7;
__u8 scn; __u8 scn;
}; };
} __packed; };
struct esca_entry { struct esca_entry {
union esca_sigp_ctrl sigp_ctrl; union esca_sigp_ctrl sigp_ctrl;
__u16 reserved1[3]; __u16 reserved1[3];
__u64 sda; __u64 sda;
__u64 reserved2[6]; __u64 reserved2[6];
} __packed; };
struct bsca_entry { struct bsca_entry {
__u8 reserved0; __u8 reserved0;
...@@ -82,7 +82,7 @@ struct bsca_entry { ...@@ -82,7 +82,7 @@ struct bsca_entry {
__u16 reserved[3]; __u16 reserved[3];
__u64 sda; __u64 sda;
__u64 reserved2[2]; __u64 reserved2[2];
} __attribute__((packed)); };
union ipte_control { union ipte_control {
unsigned long val; unsigned long val;
...@@ -99,7 +99,7 @@ struct bsca_block { ...@@ -99,7 +99,7 @@ struct bsca_block {
__u64 mcn; __u64 mcn;
__u64 reserved2; __u64 reserved2;
struct bsca_entry cpu[KVM_S390_BSCA_CPU_SLOTS]; struct bsca_entry cpu[KVM_S390_BSCA_CPU_SLOTS];
} __attribute__((packed)); };
struct esca_block { struct esca_block {
union ipte_control ipte_control; union ipte_control ipte_control;
...@@ -107,7 +107,7 @@ struct esca_block { ...@@ -107,7 +107,7 @@ struct esca_block {
__u64 mcn[4]; __u64 mcn[4];
__u64 reserved2[20]; __u64 reserved2[20];
struct esca_entry cpu[KVM_S390_ESCA_CPU_SLOTS]; struct esca_entry cpu[KVM_S390_ESCA_CPU_SLOTS];
} __packed; };
#define CPUSTAT_STOPPED 0x80000000 #define CPUSTAT_STOPPED 0x80000000
#define CPUSTAT_WAIT 0x10000000 #define CPUSTAT_WAIT 0x10000000
...@@ -262,14 +262,14 @@ struct kvm_s390_sie_block { ...@@ -262,14 +262,14 @@ struct kvm_s390_sie_block {
struct kvm_s390_itdb { struct kvm_s390_itdb {
__u8 data[256]; __u8 data[256];
} __packed; };
struct sie_page { struct sie_page {
struct kvm_s390_sie_block sie_block; struct kvm_s390_sie_block sie_block;
__u8 reserved200[1024]; /* 0x0200 */ __u8 reserved200[1024]; /* 0x0200 */
struct kvm_s390_itdb itdb; /* 0x0600 */ struct kvm_s390_itdb itdb; /* 0x0600 */
__u8 reserved700[2304]; /* 0x0700 */ __u8 reserved700[2304]; /* 0x0700 */
} __packed; };
struct kvm_vcpu_stat { struct kvm_vcpu_stat {
u64 exit_userspace; u64 exit_userspace;
...@@ -683,7 +683,7 @@ struct sie_page2 { ...@@ -683,7 +683,7 @@ struct sie_page2 {
__u64 fac_list[S390_ARCH_FAC_LIST_SIZE_U64]; /* 0x0000 */ __u64 fac_list[S390_ARCH_FAC_LIST_SIZE_U64]; /* 0x0000 */
struct kvm_s390_crypto_cb crycb; /* 0x0800 */ struct kvm_s390_crypto_cb crycb; /* 0x0800 */
u8 reserved900[0x1000 - 0x900]; /* 0x0900 */ u8 reserved900[0x1000 - 0x900]; /* 0x0900 */
} __packed; };
struct kvm_s390_vsie { struct kvm_s390_vsie {
struct mutex mutex; struct mutex mutex;
......
...@@ -242,7 +242,7 @@ struct ale { ...@@ -242,7 +242,7 @@ struct ale {
unsigned long asteo : 25; /* ASN-Second-Table-Entry Origin */ unsigned long asteo : 25; /* ASN-Second-Table-Entry Origin */
unsigned long : 6; unsigned long : 6;
unsigned long astesn : 32; /* ASTE Sequence Number */ unsigned long astesn : 32; /* ASTE Sequence Number */
} __packed; };
struct aste { struct aste {
unsigned long i : 1; /* ASX-Invalid Bit */ unsigned long i : 1; /* ASX-Invalid Bit */
...@@ -258,7 +258,7 @@ struct aste { ...@@ -258,7 +258,7 @@ struct aste {
unsigned long ald : 32; unsigned long ald : 32;
unsigned long astesn : 32; unsigned long astesn : 32;
/* .. more fields there */ /* .. more fields there */
} __packed; };
int ipte_lock_held(struct kvm_vcpu *vcpu) int ipte_lock_held(struct kvm_vcpu *vcpu)
{ {
......
...@@ -35,7 +35,7 @@ struct vsie_page { ...@@ -35,7 +35,7 @@ struct vsie_page {
__u8 reserved[0x0700 - 0x0218]; /* 0x0218 */ __u8 reserved[0x0700 - 0x0218]; /* 0x0218 */
struct kvm_s390_crypto_cb crycb; /* 0x0700 */ struct kvm_s390_crypto_cb crycb; /* 0x0700 */
__u8 fac[S390_ARCH_FAC_LIST_SIZE_BYTE]; /* 0x0800 */ __u8 fac[S390_ARCH_FAC_LIST_SIZE_BYTE]; /* 0x0800 */
} __packed; };
/* trigger a validity icpt for the given scb */ /* trigger a validity icpt for the given scb */
static int set_validity_icpt(struct kvm_s390_sie_block *scb, static int set_validity_icpt(struct kvm_s390_sie_block *scb,
......
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