diff options
author | David Woodhouse <David.Woodhouse@intel.com> | 2009-01-05 04:50:33 -0500 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2009-01-05 04:50:33 -0500 |
commit | 353816f43d1fb340ff2d9a911dd5d0799c09f6a5 (patch) | |
tree | 517290fd884d286fe2971137ac89f89e3567785a /arch/powerpc/include/asm/kvm_host.h | |
parent | 160bbab3000dafccbe43688e48208cecf4deb879 (diff) | |
parent | fe0bdec68b77020281dc814805edfe594ae89e0f (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:
arch/arm/mach-pxa/corgi.c
arch/arm/mach-pxa/poodle.c
arch/arm/mach-pxa/spitz.c
Diffstat (limited to 'arch/powerpc/include/asm/kvm_host.h')
-rw-r--r-- | arch/powerpc/include/asm/kvm_host.h | 116 |
1 files changed, 80 insertions, 36 deletions
diff --git a/arch/powerpc/include/asm/kvm_host.h b/arch/powerpc/include/asm/kvm_host.h index 34b52b7180cd..c1e436fe7738 100644 --- a/arch/powerpc/include/asm/kvm_host.h +++ b/arch/powerpc/include/asm/kvm_host.h | |||
@@ -64,27 +64,58 @@ struct kvm_vcpu_stat { | |||
64 | u32 halt_wakeup; | 64 | u32 halt_wakeup; |
65 | }; | 65 | }; |
66 | 66 | ||
67 | struct tlbe { | 67 | struct kvmppc_44x_tlbe { |
68 | u32 tid; /* Only the low 8 bits are used. */ | 68 | u32 tid; /* Only the low 8 bits are used. */ |
69 | u32 word0; | 69 | u32 word0; |
70 | u32 word1; | 70 | u32 word1; |
71 | u32 word2; | 71 | u32 word2; |
72 | }; | 72 | }; |
73 | 73 | ||
74 | struct kvm_arch { | 74 | enum kvm_exit_types { |
75 | MMIO_EXITS, | ||
76 | DCR_EXITS, | ||
77 | SIGNAL_EXITS, | ||
78 | ITLB_REAL_MISS_EXITS, | ||
79 | ITLB_VIRT_MISS_EXITS, | ||
80 | DTLB_REAL_MISS_EXITS, | ||
81 | DTLB_VIRT_MISS_EXITS, | ||
82 | SYSCALL_EXITS, | ||
83 | ISI_EXITS, | ||
84 | DSI_EXITS, | ||
85 | EMULATED_INST_EXITS, | ||
86 | EMULATED_MTMSRWE_EXITS, | ||
87 | EMULATED_WRTEE_EXITS, | ||
88 | EMULATED_MTSPR_EXITS, | ||
89 | EMULATED_MFSPR_EXITS, | ||
90 | EMULATED_MTMSR_EXITS, | ||
91 | EMULATED_MFMSR_EXITS, | ||
92 | EMULATED_TLBSX_EXITS, | ||
93 | EMULATED_TLBWE_EXITS, | ||
94 | EMULATED_RFI_EXITS, | ||
95 | DEC_EXITS, | ||
96 | EXT_INTR_EXITS, | ||
97 | HALT_WAKEUP, | ||
98 | USR_PR_INST, | ||
99 | FP_UNAVAIL, | ||
100 | DEBUG_EXITS, | ||
101 | TIMEINGUEST, | ||
102 | __NUMBER_OF_KVM_EXIT_TYPES | ||
75 | }; | 103 | }; |
76 | 104 | ||
77 | struct kvm_vcpu_arch { | 105 | /* allow access to big endian 32bit upper/lower parts and 64bit var */ |
78 | /* Unmodified copy of the guest's TLB. */ | 106 | struct kvmppc_exit_timing { |
79 | struct tlbe guest_tlb[PPC44x_TLB_SIZE]; | 107 | union { |
80 | /* TLB that's actually used when the guest is running. */ | 108 | u64 tv64; |
81 | struct tlbe shadow_tlb[PPC44x_TLB_SIZE]; | 109 | struct { |
82 | /* Pages which are referenced in the shadow TLB. */ | 110 | u32 tbu, tbl; |
83 | struct page *shadow_pages[PPC44x_TLB_SIZE]; | 111 | } tv32; |
112 | }; | ||
113 | }; | ||
84 | 114 | ||
85 | /* Track which TLB entries we've modified in the current exit. */ | 115 | struct kvm_arch { |
86 | u8 shadow_tlb_mod[PPC44x_TLB_SIZE]; | 116 | }; |
87 | 117 | ||
118 | struct kvm_vcpu_arch { | ||
88 | u32 host_stack; | 119 | u32 host_stack; |
89 | u32 host_pid; | 120 | u32 host_pid; |
90 | u32 host_dbcr0; | 121 | u32 host_dbcr0; |
@@ -94,32 +125,32 @@ struct kvm_vcpu_arch { | |||
94 | u32 host_msr; | 125 | u32 host_msr; |
95 | 126 | ||
96 | u64 fpr[32]; | 127 | u64 fpr[32]; |
97 | u32 gpr[32]; | 128 | ulong gpr[32]; |
98 | 129 | ||
99 | u32 pc; | 130 | ulong pc; |
100 | u32 cr; | 131 | u32 cr; |
101 | u32 ctr; | 132 | ulong ctr; |
102 | u32 lr; | 133 | ulong lr; |
103 | u32 xer; | 134 | ulong xer; |
104 | 135 | ||
105 | u32 msr; | 136 | ulong msr; |
106 | u32 mmucr; | 137 | u32 mmucr; |
107 | u32 sprg0; | 138 | ulong sprg0; |
108 | u32 sprg1; | 139 | ulong sprg1; |
109 | u32 sprg2; | 140 | ulong sprg2; |
110 | u32 sprg3; | 141 | ulong sprg3; |
111 | u32 sprg4; | 142 | ulong sprg4; |
112 | u32 sprg5; | 143 | ulong sprg5; |
113 | u32 sprg6; | 144 | ulong sprg6; |
114 | u32 sprg7; | 145 | ulong sprg7; |
115 | u32 srr0; | 146 | ulong srr0; |
116 | u32 srr1; | 147 | ulong srr1; |
117 | u32 csrr0; | 148 | ulong csrr0; |
118 | u32 csrr1; | 149 | ulong csrr1; |
119 | u32 dsrr0; | 150 | ulong dsrr0; |
120 | u32 dsrr1; | 151 | ulong dsrr1; |
121 | u32 dear; | 152 | ulong dear; |
122 | u32 esr; | 153 | ulong esr; |
123 | u32 dec; | 154 | u32 dec; |
124 | u32 decar; | 155 | u32 decar; |
125 | u32 tbl; | 156 | u32 tbl; |
@@ -127,7 +158,7 @@ struct kvm_vcpu_arch { | |||
127 | u32 tcr; | 158 | u32 tcr; |
128 | u32 tsr; | 159 | u32 tsr; |
129 | u32 ivor[16]; | 160 | u32 ivor[16]; |
130 | u32 ivpr; | 161 | ulong ivpr; |
131 | u32 pir; | 162 | u32 pir; |
132 | 163 | ||
133 | u32 shadow_pid; | 164 | u32 shadow_pid; |
@@ -140,9 +171,22 @@ struct kvm_vcpu_arch { | |||
140 | u32 dbcr0; | 171 | u32 dbcr0; |
141 | u32 dbcr1; | 172 | u32 dbcr1; |
142 | 173 | ||
174 | #ifdef CONFIG_KVM_EXIT_TIMING | ||
175 | struct kvmppc_exit_timing timing_exit; | ||
176 | struct kvmppc_exit_timing timing_last_enter; | ||
177 | u32 last_exit_type; | ||
178 | u32 timing_count_type[__NUMBER_OF_KVM_EXIT_TYPES]; | ||
179 | u64 timing_sum_duration[__NUMBER_OF_KVM_EXIT_TYPES]; | ||
180 | u64 timing_sum_quad_duration[__NUMBER_OF_KVM_EXIT_TYPES]; | ||
181 | u64 timing_min_duration[__NUMBER_OF_KVM_EXIT_TYPES]; | ||
182 | u64 timing_max_duration[__NUMBER_OF_KVM_EXIT_TYPES]; | ||
183 | u64 timing_last_exit; | ||
184 | struct dentry *debugfs_exit_timing; | ||
185 | #endif | ||
186 | |||
143 | u32 last_inst; | 187 | u32 last_inst; |
144 | u32 fault_dear; | 188 | ulong fault_dear; |
145 | u32 fault_esr; | 189 | ulong fault_esr; |
146 | gpa_t paddr_accessed; | 190 | gpa_t paddr_accessed; |
147 | 191 | ||
148 | u8 io_gpr; /* GPR used as IO source/target */ | 192 | u8 io_gpr; /* GPR used as IO source/target */ |