aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Borntraeger <borntraeger@de.ibm.com>2008-06-27 09:05:40 -0400
committerAvi Kivity <avi@qumranet.com>2008-07-20 05:42:37 -0400
commit180c12fb22bd17c7187ae1bce023d24a42b2980c (patch)
tree8dbe8b9bffc369862ea69569fb6fe86d19483bd3
parent4da29e909ea8087de09e27476f91f51a070cabe8 (diff)
KVM: s390: rename private structures
While doing some tests with our lcrash implementation I have seen a naming conflict with prefix_info in kvm_host.h vs. addrconf.h To avoid future conflicts lets rename private definitions in asm/kvm_host.h by adding the kvm_s390 prefix. Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Carsten Otte <cotte@de.ibm.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
-rw-r--r--arch/s390/kvm/interrupt.c32
-rw-r--r--arch/s390/kvm/kvm-s390.c3
-rw-r--r--arch/s390/kvm/priv.c2
-rw-r--r--arch/s390/kvm/sigp.c20
-rw-r--r--include/asm-s390/kvm_host.h36
5 files changed, 47 insertions, 46 deletions
diff --git a/arch/s390/kvm/interrupt.c b/arch/s390/kvm/interrupt.c
index 84a7fed4cd4e..11230b0db957 100644
--- a/arch/s390/kvm/interrupt.c
+++ b/arch/s390/kvm/interrupt.c
@@ -31,7 +31,7 @@ static int psw_interrupts_disabled(struct kvm_vcpu *vcpu)
31} 31}
32 32
33static int __interrupt_is_deliverable(struct kvm_vcpu *vcpu, 33static int __interrupt_is_deliverable(struct kvm_vcpu *vcpu,
34 struct interrupt_info *inti) 34 struct kvm_s390_interrupt_info *inti)
35{ 35{
36 switch (inti->type) { 36 switch (inti->type) {
37 case KVM_S390_INT_EMERGENCY: 37 case KVM_S390_INT_EMERGENCY:
@@ -91,7 +91,7 @@ static void __set_cpuflag(struct kvm_vcpu *vcpu, u32 flag)
91} 91}
92 92
93static void __set_intercept_indicator(struct kvm_vcpu *vcpu, 93static void __set_intercept_indicator(struct kvm_vcpu *vcpu,
94 struct interrupt_info *inti) 94 struct kvm_s390_interrupt_info *inti)
95{ 95{
96 switch (inti->type) { 96 switch (inti->type) {
97 case KVM_S390_INT_EMERGENCY: 97 case KVM_S390_INT_EMERGENCY:
@@ -111,7 +111,7 @@ static void __set_intercept_indicator(struct kvm_vcpu *vcpu,
111} 111}
112 112
113static void __do_deliver_interrupt(struct kvm_vcpu *vcpu, 113static void __do_deliver_interrupt(struct kvm_vcpu *vcpu,
114 struct interrupt_info *inti) 114 struct kvm_s390_interrupt_info *inti)
115{ 115{
116 const unsigned short table[] = { 2, 4, 4, 6 }; 116 const unsigned short table[] = { 2, 4, 4, 6 };
117 int rc, exception = 0; 117 int rc, exception = 0;
@@ -290,9 +290,9 @@ static int __try_deliver_ckc_interrupt(struct kvm_vcpu *vcpu)
290 290
291int kvm_cpu_has_interrupt(struct kvm_vcpu *vcpu) 291int kvm_cpu_has_interrupt(struct kvm_vcpu *vcpu)
292{ 292{
293 struct local_interrupt *li = &vcpu->arch.local_int; 293 struct kvm_s390_local_interrupt *li = &vcpu->arch.local_int;
294 struct float_interrupt *fi = vcpu->arch.local_int.float_int; 294 struct kvm_s390_float_interrupt *fi = vcpu->arch.local_int.float_int;
295 struct interrupt_info *inti; 295 struct kvm_s390_interrupt_info *inti;
296 int rc = 0; 296 int rc = 0;
297 297
298 if (atomic_read(&li->active)) { 298 if (atomic_read(&li->active)) {
@@ -408,9 +408,9 @@ void kvm_s390_idle_wakeup(unsigned long data)
408 408
409void kvm_s390_deliver_pending_interrupts(struct kvm_vcpu *vcpu) 409void kvm_s390_deliver_pending_interrupts(struct kvm_vcpu *vcpu)
410{ 410{
411 struct local_interrupt *li = &vcpu->arch.local_int; 411 struct kvm_s390_local_interrupt *li = &vcpu->arch.local_int;
412 struct float_interrupt *fi = vcpu->arch.local_int.float_int; 412 struct kvm_s390_float_interrupt *fi = vcpu->arch.local_int.float_int;
413 struct interrupt_info *n, *inti = NULL; 413 struct kvm_s390_interrupt_info *n, *inti = NULL;
414 int deliver; 414 int deliver;
415 415
416 __reset_intercept_indicators(vcpu); 416 __reset_intercept_indicators(vcpu);
@@ -465,8 +465,8 @@ void kvm_s390_deliver_pending_interrupts(struct kvm_vcpu *vcpu)
465 465
466int kvm_s390_inject_program_int(struct kvm_vcpu *vcpu, u16 code) 466int kvm_s390_inject_program_int(struct kvm_vcpu *vcpu, u16 code)
467{ 467{
468 struct local_interrupt *li = &vcpu->arch.local_int; 468 struct kvm_s390_local_interrupt *li = &vcpu->arch.local_int;
469 struct interrupt_info *inti; 469 struct kvm_s390_interrupt_info *inti;
470 470
471 inti = kzalloc(sizeof(*inti), GFP_KERNEL); 471 inti = kzalloc(sizeof(*inti), GFP_KERNEL);
472 if (!inti) 472 if (!inti)
@@ -487,9 +487,9 @@ int kvm_s390_inject_program_int(struct kvm_vcpu *vcpu, u16 code)
487int kvm_s390_inject_vm(struct kvm *kvm, 487int kvm_s390_inject_vm(struct kvm *kvm,
488 struct kvm_s390_interrupt *s390int) 488 struct kvm_s390_interrupt *s390int)
489{ 489{
490 struct local_interrupt *li; 490 struct kvm_s390_local_interrupt *li;
491 struct float_interrupt *fi; 491 struct kvm_s390_float_interrupt *fi;
492 struct interrupt_info *inti; 492 struct kvm_s390_interrupt_info *inti;
493 int sigcpu; 493 int sigcpu;
494 494
495 inti = kzalloc(sizeof(*inti), GFP_KERNEL); 495 inti = kzalloc(sizeof(*inti), GFP_KERNEL);
@@ -544,8 +544,8 @@ int kvm_s390_inject_vm(struct kvm *kvm,
544int kvm_s390_inject_vcpu(struct kvm_vcpu *vcpu, 544int kvm_s390_inject_vcpu(struct kvm_vcpu *vcpu,
545 struct kvm_s390_interrupt *s390int) 545 struct kvm_s390_interrupt *s390int)
546{ 546{
547 struct local_interrupt *li; 547 struct kvm_s390_local_interrupt *li;
548 struct interrupt_info *inti; 548 struct kvm_s390_interrupt_info *inti;
549 549
550 inti = kzalloc(sizeof(*inti), GFP_KERNEL); 550 inti = kzalloc(sizeof(*inti), GFP_KERNEL);
551 if (!inti) 551 if (!inti)
diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
index cdab57c5bc70..399acf3f64dd 100644
--- a/arch/s390/kvm/kvm-s390.c
+++ b/arch/s390/kvm/kvm-s390.c
@@ -275,7 +275,8 @@ struct kvm_vcpu *kvm_arch_vcpu_create(struct kvm *kvm,
275 if (!vcpu) 275 if (!vcpu)
276 goto out_nomem; 276 goto out_nomem;
277 277
278 vcpu->arch.sie_block = (struct sie_block *) get_zeroed_page(GFP_KERNEL); 278 vcpu->arch.sie_block = (struct kvm_s390_sie_block *)
279 get_zeroed_page(GFP_KERNEL);
279 280
280 if (!vcpu->arch.sie_block) 281 if (!vcpu->arch.sie_block)
281 goto out_free_cpu; 282 goto out_free_cpu;
diff --git a/arch/s390/kvm/priv.c b/arch/s390/kvm/priv.c
index c02286c6a931..2e2d2ffb6a07 100644
--- a/arch/s390/kvm/priv.c
+++ b/arch/s390/kvm/priv.c
@@ -199,7 +199,7 @@ out:
199 199
200static void handle_stsi_3_2_2(struct kvm_vcpu *vcpu, struct sysinfo_3_2_2 *mem) 200static void handle_stsi_3_2_2(struct kvm_vcpu *vcpu, struct sysinfo_3_2_2 *mem)
201{ 201{
202 struct float_interrupt *fi = &vcpu->kvm->arch.float_int; 202 struct kvm_s390_float_interrupt *fi = &vcpu->kvm->arch.float_int;
203 int cpus = 0; 203 int cpus = 0;
204 int n; 204 int n;
205 205
diff --git a/arch/s390/kvm/sigp.c b/arch/s390/kvm/sigp.c
index 0a236acfb5f6..5a556114eaa5 100644
--- a/arch/s390/kvm/sigp.c
+++ b/arch/s390/kvm/sigp.c
@@ -45,7 +45,7 @@
45 45
46static int __sigp_sense(struct kvm_vcpu *vcpu, u16 cpu_addr, u64 *reg) 46static int __sigp_sense(struct kvm_vcpu *vcpu, u16 cpu_addr, u64 *reg)
47{ 47{
48 struct float_interrupt *fi = &vcpu->kvm->arch.float_int; 48 struct kvm_s390_float_interrupt *fi = &vcpu->kvm->arch.float_int;
49 int rc; 49 int rc;
50 50
51 if (cpu_addr >= KVM_MAX_VCPUS) 51 if (cpu_addr >= KVM_MAX_VCPUS)
@@ -71,9 +71,9 @@ static int __sigp_sense(struct kvm_vcpu *vcpu, u16 cpu_addr, u64 *reg)
71 71
72static int __sigp_emergency(struct kvm_vcpu *vcpu, u16 cpu_addr) 72static int __sigp_emergency(struct kvm_vcpu *vcpu, u16 cpu_addr)
73{ 73{
74 struct float_interrupt *fi = &vcpu->kvm->arch.float_int; 74 struct kvm_s390_float_interrupt *fi = &vcpu->kvm->arch.float_int;
75 struct local_interrupt *li; 75 struct kvm_s390_local_interrupt *li;
76 struct interrupt_info *inti; 76 struct kvm_s390_interrupt_info *inti;
77 int rc; 77 int rc;
78 78
79 if (cpu_addr >= KVM_MAX_VCPUS) 79 if (cpu_addr >= KVM_MAX_VCPUS)
@@ -108,9 +108,9 @@ unlock:
108 108
109static int __sigp_stop(struct kvm_vcpu *vcpu, u16 cpu_addr, int store) 109static int __sigp_stop(struct kvm_vcpu *vcpu, u16 cpu_addr, int store)
110{ 110{
111 struct float_interrupt *fi = &vcpu->kvm->arch.float_int; 111 struct kvm_s390_float_interrupt *fi = &vcpu->kvm->arch.float_int;
112 struct local_interrupt *li; 112 struct kvm_s390_local_interrupt *li;
113 struct interrupt_info *inti; 113 struct kvm_s390_interrupt_info *inti;
114 int rc; 114 int rc;
115 115
116 if (cpu_addr >= KVM_MAX_VCPUS) 116 if (cpu_addr >= KVM_MAX_VCPUS)
@@ -169,9 +169,9 @@ static int __sigp_set_arch(struct kvm_vcpu *vcpu, u32 parameter)
169static int __sigp_set_prefix(struct kvm_vcpu *vcpu, u16 cpu_addr, u32 address, 169static int __sigp_set_prefix(struct kvm_vcpu *vcpu, u16 cpu_addr, u32 address,
170 u64 *reg) 170 u64 *reg)
171{ 171{
172 struct float_interrupt *fi = &vcpu->kvm->arch.float_int; 172 struct kvm_s390_float_interrupt *fi = &vcpu->kvm->arch.float_int;
173 struct local_interrupt *li; 173 struct kvm_s390_local_interrupt *li;
174 struct interrupt_info *inti; 174 struct kvm_s390_interrupt_info *inti;
175 int rc; 175 int rc;
176 u8 tmp; 176 u8 tmp;
177 177
diff --git a/include/asm-s390/kvm_host.h b/include/asm-s390/kvm_host.h
index 18cbd8a39796..3234dd5b3511 100644
--- a/include/asm-s390/kvm_host.h
+++ b/include/asm-s390/kvm_host.h
@@ -62,7 +62,7 @@ struct sca_block {
62#define CPUSTAT_J 0x00000002 62#define CPUSTAT_J 0x00000002
63#define CPUSTAT_P 0x00000001 63#define CPUSTAT_P 0x00000001
64 64
65struct sie_block { 65struct kvm_s390_sie_block {
66 atomic_t cpuflags; /* 0x0000 */ 66 atomic_t cpuflags; /* 0x0000 */
67 __u32 prefix; /* 0x0004 */ 67 __u32 prefix; /* 0x0004 */
68 __u8 reserved8[32]; /* 0x0008 */ 68 __u8 reserved8[32]; /* 0x0008 */
@@ -140,14 +140,14 @@ struct kvm_vcpu_stat {
140 u32 diagnose_44; 140 u32 diagnose_44;
141}; 141};
142 142
143struct io_info { 143struct kvm_s390_io_info {
144 __u16 subchannel_id; /* 0x0b8 */ 144 __u16 subchannel_id; /* 0x0b8 */
145 __u16 subchannel_nr; /* 0x0ba */ 145 __u16 subchannel_nr; /* 0x0ba */
146 __u32 io_int_parm; /* 0x0bc */ 146 __u32 io_int_parm; /* 0x0bc */
147 __u32 io_int_word; /* 0x0c0 */ 147 __u32 io_int_word; /* 0x0c0 */
148}; 148};
149 149
150struct ext_info { 150struct kvm_s390_ext_info {
151 __u32 ext_params; 151 __u32 ext_params;
152 __u64 ext_params2; 152 __u64 ext_params2;
153}; 153};
@@ -160,22 +160,22 @@ struct ext_info {
160#define PGM_SPECIFICATION 0x06 160#define PGM_SPECIFICATION 0x06
161#define PGM_DATA 0x07 161#define PGM_DATA 0x07
162 162
163struct pgm_info { 163struct kvm_s390_pgm_info {
164 __u16 code; 164 __u16 code;
165}; 165};
166 166
167struct prefix_info { 167struct kvm_s390_prefix_info {
168 __u32 address; 168 __u32 address;
169}; 169};
170 170
171struct interrupt_info { 171struct kvm_s390_interrupt_info {
172 struct list_head list; 172 struct list_head list;
173 u64 type; 173 u64 type;
174 union { 174 union {
175 struct io_info io; 175 struct kvm_s390_io_info io;
176 struct ext_info ext; 176 struct kvm_s390_ext_info ext;
177 struct pgm_info pgm; 177 struct kvm_s390_pgm_info pgm;
178 struct prefix_info prefix; 178 struct kvm_s390_prefix_info prefix;
179 }; 179 };
180}; 180};
181 181
@@ -183,35 +183,35 @@ struct interrupt_info {
183#define ACTION_STORE_ON_STOP 1 183#define ACTION_STORE_ON_STOP 1
184#define ACTION_STOP_ON_STOP 2 184#define ACTION_STOP_ON_STOP 2
185 185
186struct local_interrupt { 186struct kvm_s390_local_interrupt {
187 spinlock_t lock; 187 spinlock_t lock;
188 struct list_head list; 188 struct list_head list;
189 atomic_t active; 189 atomic_t active;
190 struct float_interrupt *float_int; 190 struct kvm_s390_float_interrupt *float_int;
191 int timer_due; /* event indicator for waitqueue below */ 191 int timer_due; /* event indicator for waitqueue below */
192 wait_queue_head_t wq; 192 wait_queue_head_t wq;
193 atomic_t *cpuflags; 193 atomic_t *cpuflags;
194 unsigned int action_bits; 194 unsigned int action_bits;
195}; 195};
196 196
197struct float_interrupt { 197struct kvm_s390_float_interrupt {
198 spinlock_t lock; 198 spinlock_t lock;
199 struct list_head list; 199 struct list_head list;
200 atomic_t active; 200 atomic_t active;
201 int next_rr_cpu; 201 int next_rr_cpu;
202 unsigned long idle_mask [(64 + sizeof(long) - 1) / sizeof(long)]; 202 unsigned long idle_mask [(64 + sizeof(long) - 1) / sizeof(long)];
203 struct local_interrupt *local_int[64]; 203 struct kvm_s390_local_interrupt *local_int[64];
204}; 204};
205 205
206 206
207struct kvm_vcpu_arch { 207struct kvm_vcpu_arch {
208 struct sie_block *sie_block; 208 struct kvm_s390_sie_block *sie_block;
209 unsigned long guest_gprs[16]; 209 unsigned long guest_gprs[16];
210 s390_fp_regs host_fpregs; 210 s390_fp_regs host_fpregs;
211 unsigned int host_acrs[NUM_ACRS]; 211 unsigned int host_acrs[NUM_ACRS];
212 s390_fp_regs guest_fpregs; 212 s390_fp_regs guest_fpregs;
213 unsigned int guest_acrs[NUM_ACRS]; 213 unsigned int guest_acrs[NUM_ACRS];
214 struct local_interrupt local_int; 214 struct kvm_s390_local_interrupt local_int;
215 struct timer_list ckc_timer; 215 struct timer_list ckc_timer;
216 union { 216 union {
217 cpuid_t cpu_id; 217 cpuid_t cpu_id;
@@ -228,8 +228,8 @@ struct kvm_arch{
228 unsigned long guest_memsize; 228 unsigned long guest_memsize;
229 struct sca_block *sca; 229 struct sca_block *sca;
230 debug_info_t *dbf; 230 debug_info_t *dbf;
231 struct float_interrupt float_int; 231 struct kvm_s390_float_interrupt float_int;
232}; 232};
233 233
234extern int sie64a(struct sie_block *, __u64 *); 234extern int sie64a(struct kvm_s390_sie_block *, __u64 *);
235#endif 235#endif