aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm/kvm_book3s.h
diff options
context:
space:
mode:
authorAlexander Graf <agraf@suse.de>2010-03-24 16:48:36 -0400
committerAvi Kivity <avi@redhat.com>2010-05-17 05:17:20 -0400
commit3ed9c6d2b5aa0ac365c52a2a3a370ac499f21e45 (patch)
tree2b2b946d76b9e1344f98dad5542d63971a3bd288 /arch/powerpc/include/asm/kvm_book3s.h
parent5a1b419fc936af9f10766c889d83d80990ecd300 (diff)
KVM: PPC: Make bools bitfields
Bool defaults to at least byte width. We usually only want to waste a single bit on this. So let's move all the bool values to bitfields, potentially saving memory. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/powerpc/include/asm/kvm_book3s.h')
-rw-r--r--arch/powerpc/include/asm/kvm_book3s.h28
1 files changed, 14 insertions, 14 deletions
diff --git a/arch/powerpc/include/asm/kvm_book3s.h b/arch/powerpc/include/asm/kvm_book3s.h
index 8a6b4c54086..ee7992189c6 100644
--- a/arch/powerpc/include/asm/kvm_book3s.h
+++ b/arch/powerpc/include/asm/kvm_book3s.h
@@ -29,40 +29,40 @@ struct kvmppc_slb {
29 u64 vsid; 29 u64 vsid;
30 u64 orige; 30 u64 orige;
31 u64 origv; 31 u64 origv;
32 bool valid; 32 bool valid : 1;
33 bool Ks; 33 bool Ks : 1;
34 bool Kp; 34 bool Kp : 1;
35 bool nx; 35 bool nx : 1;
36 bool large; /* PTEs are 16MB */ 36 bool large : 1; /* PTEs are 16MB */
37 bool tb; /* 1TB segment */ 37 bool tb : 1; /* 1TB segment */
38 bool class; 38 bool class : 1;
39}; 39};
40 40
41struct kvmppc_sr { 41struct kvmppc_sr {
42 u32 raw; 42 u32 raw;
43 u32 vsid; 43 u32 vsid;
44 bool Ks; 44 bool Ks : 1;
45 bool Kp; 45 bool Kp : 1;
46 bool nx; 46 bool nx : 1;
47 bool valid; 47 bool valid : 1;
48}; 48};
49 49
50struct kvmppc_bat { 50struct kvmppc_bat {
51 u64 raw; 51 u64 raw;
52 u32 bepi; 52 u32 bepi;
53 u32 bepi_mask; 53 u32 bepi_mask;
54 bool vs;
55 bool vp;
56 u32 brpn; 54 u32 brpn;
57 u8 wimg; 55 u8 wimg;
58 u8 pp; 56 u8 pp;
57 bool vs : 1;
58 bool vp : 1;
59}; 59};
60 60
61struct kvmppc_sid_map { 61struct kvmppc_sid_map {
62 u64 guest_vsid; 62 u64 guest_vsid;
63 u64 guest_esid; 63 u64 guest_esid;
64 u64 host_vsid; 64 u64 host_vsid;
65 bool valid; 65 bool valid : 1;
66}; 66};
67 67
68#define SID_MAP_BITS 9 68#define SID_MAP_BITS 9