Lines Matching refs:spr_val
120 int kvmppc_booke_emulate_mtspr(struct kvm_vcpu *vcpu, int sprn, ulong spr_val) in kvmppc_booke_emulate_mtspr() argument
127 vcpu->arch.shared->dar = spr_val; in kvmppc_booke_emulate_mtspr()
130 vcpu->arch.shared->esr = spr_val; in kvmppc_booke_emulate_mtspr()
133 vcpu->arch.csrr0 = spr_val; in kvmppc_booke_emulate_mtspr()
136 vcpu->arch.csrr1 = spr_val; in kvmppc_booke_emulate_mtspr()
139 vcpu->arch.dsrr0 = spr_val; in kvmppc_booke_emulate_mtspr()
142 vcpu->arch.dsrr1 = spr_val; in kvmppc_booke_emulate_mtspr()
153 vcpu->arch.dbg_reg.iac1 = spr_val; in kvmppc_booke_emulate_mtspr()
164 vcpu->arch.dbg_reg.iac2 = spr_val; in kvmppc_booke_emulate_mtspr()
176 vcpu->arch.dbg_reg.iac3 = spr_val; in kvmppc_booke_emulate_mtspr()
187 vcpu->arch.dbg_reg.iac4 = spr_val; in kvmppc_booke_emulate_mtspr()
199 vcpu->arch.dbg_reg.dac1 = spr_val; in kvmppc_booke_emulate_mtspr()
210 vcpu->arch.dbg_reg.dac2 = spr_val; in kvmppc_booke_emulate_mtspr()
221 spr_val &= (DBCR0_IDM | DBCR0_IC | DBCR0_BT | DBCR0_TIE | in kvmppc_booke_emulate_mtspr()
225 vcpu->arch.dbg_reg.dbcr0 = spr_val; in kvmppc_booke_emulate_mtspr()
236 vcpu->arch.dbg_reg.dbcr1 = spr_val; in kvmppc_booke_emulate_mtspr()
247 vcpu->arch.dbg_reg.dbcr2 = spr_val; in kvmppc_booke_emulate_mtspr()
257 vcpu->arch.dbsr &= ~spr_val; in kvmppc_booke_emulate_mtspr()
262 kvmppc_clr_tsr_bits(vcpu, spr_val); in kvmppc_booke_emulate_mtspr()
270 spr_val &= ~TCR_WRC_MASK; in kvmppc_booke_emulate_mtspr()
271 spr_val |= vcpu->arch.tcr & TCR_WRC_MASK; in kvmppc_booke_emulate_mtspr()
273 kvmppc_set_tcr(vcpu, spr_val); in kvmppc_booke_emulate_mtspr()
277 vcpu->arch.decar = spr_val; in kvmppc_booke_emulate_mtspr()
285 kvmppc_set_sprg4(vcpu, spr_val); in kvmppc_booke_emulate_mtspr()
288 kvmppc_set_sprg5(vcpu, spr_val); in kvmppc_booke_emulate_mtspr()
291 kvmppc_set_sprg6(vcpu, spr_val); in kvmppc_booke_emulate_mtspr()
294 kvmppc_set_sprg7(vcpu, spr_val); in kvmppc_booke_emulate_mtspr()
298 vcpu->arch.ivpr = spr_val; in kvmppc_booke_emulate_mtspr()
300 mtspr(SPRN_GIVPR, spr_val); in kvmppc_booke_emulate_mtspr()
304 vcpu->arch.ivor[BOOKE_IRQPRIO_CRITICAL] = spr_val; in kvmppc_booke_emulate_mtspr()
307 vcpu->arch.ivor[BOOKE_IRQPRIO_MACHINE_CHECK] = spr_val; in kvmppc_booke_emulate_mtspr()
310 vcpu->arch.ivor[BOOKE_IRQPRIO_DATA_STORAGE] = spr_val; in kvmppc_booke_emulate_mtspr()
312 mtspr(SPRN_GIVOR2, spr_val); in kvmppc_booke_emulate_mtspr()
316 vcpu->arch.ivor[BOOKE_IRQPRIO_INST_STORAGE] = spr_val; in kvmppc_booke_emulate_mtspr()
319 vcpu->arch.ivor[BOOKE_IRQPRIO_EXTERNAL] = spr_val; in kvmppc_booke_emulate_mtspr()
322 vcpu->arch.ivor[BOOKE_IRQPRIO_ALIGNMENT] = spr_val; in kvmppc_booke_emulate_mtspr()
325 vcpu->arch.ivor[BOOKE_IRQPRIO_PROGRAM] = spr_val; in kvmppc_booke_emulate_mtspr()
328 vcpu->arch.ivor[BOOKE_IRQPRIO_FP_UNAVAIL] = spr_val; in kvmppc_booke_emulate_mtspr()
331 vcpu->arch.ivor[BOOKE_IRQPRIO_SYSCALL] = spr_val; in kvmppc_booke_emulate_mtspr()
333 mtspr(SPRN_GIVOR8, spr_val); in kvmppc_booke_emulate_mtspr()
337 vcpu->arch.ivor[BOOKE_IRQPRIO_AP_UNAVAIL] = spr_val; in kvmppc_booke_emulate_mtspr()
340 vcpu->arch.ivor[BOOKE_IRQPRIO_DECREMENTER] = spr_val; in kvmppc_booke_emulate_mtspr()
343 vcpu->arch.ivor[BOOKE_IRQPRIO_FIT] = spr_val; in kvmppc_booke_emulate_mtspr()
346 vcpu->arch.ivor[BOOKE_IRQPRIO_WATCHDOG] = spr_val; in kvmppc_booke_emulate_mtspr()
349 vcpu->arch.ivor[BOOKE_IRQPRIO_DTLB_MISS] = spr_val; in kvmppc_booke_emulate_mtspr()
352 vcpu->arch.ivor[BOOKE_IRQPRIO_ITLB_MISS] = spr_val; in kvmppc_booke_emulate_mtspr()
355 vcpu->arch.ivor[BOOKE_IRQPRIO_DEBUG] = spr_val; in kvmppc_booke_emulate_mtspr()
358 vcpu->arch.mcsr &= ~spr_val; in kvmppc_booke_emulate_mtspr()
362 kvmppc_set_epcr(vcpu, spr_val); in kvmppc_booke_emulate_mtspr()
379 int kvmppc_booke_emulate_mfspr(struct kvm_vcpu *vcpu, int sprn, ulong *spr_val) in kvmppc_booke_emulate_mfspr() argument
385 *spr_val = vcpu->arch.ivpr; in kvmppc_booke_emulate_mfspr()
388 *spr_val = vcpu->arch.shared->dar; in kvmppc_booke_emulate_mfspr()
391 *spr_val = vcpu->arch.shared->esr; in kvmppc_booke_emulate_mfspr()
394 *spr_val = vcpu->arch.epr; in kvmppc_booke_emulate_mfspr()
397 *spr_val = vcpu->arch.csrr0; in kvmppc_booke_emulate_mfspr()
400 *spr_val = vcpu->arch.csrr1; in kvmppc_booke_emulate_mfspr()
403 *spr_val = vcpu->arch.dsrr0; in kvmppc_booke_emulate_mfspr()
406 *spr_val = vcpu->arch.dsrr1; in kvmppc_booke_emulate_mfspr()
409 *spr_val = vcpu->arch.dbg_reg.iac1; in kvmppc_booke_emulate_mfspr()
412 *spr_val = vcpu->arch.dbg_reg.iac2; in kvmppc_booke_emulate_mfspr()
416 *spr_val = vcpu->arch.dbg_reg.iac3; in kvmppc_booke_emulate_mfspr()
419 *spr_val = vcpu->arch.dbg_reg.iac4; in kvmppc_booke_emulate_mfspr()
423 *spr_val = vcpu->arch.dbg_reg.dac1; in kvmppc_booke_emulate_mfspr()
426 *spr_val = vcpu->arch.dbg_reg.dac2; in kvmppc_booke_emulate_mfspr()
429 *spr_val = vcpu->arch.dbg_reg.dbcr0; in kvmppc_booke_emulate_mfspr()
431 *spr_val = *spr_val | DBCR0_EDM; in kvmppc_booke_emulate_mfspr()
434 *spr_val = vcpu->arch.dbg_reg.dbcr1; in kvmppc_booke_emulate_mfspr()
437 *spr_val = vcpu->arch.dbg_reg.dbcr2; in kvmppc_booke_emulate_mfspr()
440 *spr_val = vcpu->arch.dbsr; in kvmppc_booke_emulate_mfspr()
443 *spr_val = vcpu->arch.tsr; in kvmppc_booke_emulate_mfspr()
446 *spr_val = vcpu->arch.tcr; in kvmppc_booke_emulate_mfspr()
450 *spr_val = vcpu->arch.ivor[BOOKE_IRQPRIO_CRITICAL]; in kvmppc_booke_emulate_mfspr()
453 *spr_val = vcpu->arch.ivor[BOOKE_IRQPRIO_MACHINE_CHECK]; in kvmppc_booke_emulate_mfspr()
456 *spr_val = vcpu->arch.ivor[BOOKE_IRQPRIO_DATA_STORAGE]; in kvmppc_booke_emulate_mfspr()
459 *spr_val = vcpu->arch.ivor[BOOKE_IRQPRIO_INST_STORAGE]; in kvmppc_booke_emulate_mfspr()
462 *spr_val = vcpu->arch.ivor[BOOKE_IRQPRIO_EXTERNAL]; in kvmppc_booke_emulate_mfspr()
465 *spr_val = vcpu->arch.ivor[BOOKE_IRQPRIO_ALIGNMENT]; in kvmppc_booke_emulate_mfspr()
468 *spr_val = vcpu->arch.ivor[BOOKE_IRQPRIO_PROGRAM]; in kvmppc_booke_emulate_mfspr()
471 *spr_val = vcpu->arch.ivor[BOOKE_IRQPRIO_FP_UNAVAIL]; in kvmppc_booke_emulate_mfspr()
474 *spr_val = vcpu->arch.ivor[BOOKE_IRQPRIO_SYSCALL]; in kvmppc_booke_emulate_mfspr()
477 *spr_val = vcpu->arch.ivor[BOOKE_IRQPRIO_AP_UNAVAIL]; in kvmppc_booke_emulate_mfspr()
480 *spr_val = vcpu->arch.ivor[BOOKE_IRQPRIO_DECREMENTER]; in kvmppc_booke_emulate_mfspr()
483 *spr_val = vcpu->arch.ivor[BOOKE_IRQPRIO_FIT]; in kvmppc_booke_emulate_mfspr()
486 *spr_val = vcpu->arch.ivor[BOOKE_IRQPRIO_WATCHDOG]; in kvmppc_booke_emulate_mfspr()
489 *spr_val = vcpu->arch.ivor[BOOKE_IRQPRIO_DTLB_MISS]; in kvmppc_booke_emulate_mfspr()
492 *spr_val = vcpu->arch.ivor[BOOKE_IRQPRIO_ITLB_MISS]; in kvmppc_booke_emulate_mfspr()
495 *spr_val = vcpu->arch.ivor[BOOKE_IRQPRIO_DEBUG]; in kvmppc_booke_emulate_mfspr()
498 *spr_val = vcpu->arch.mcsr; in kvmppc_booke_emulate_mfspr()
502 *spr_val = vcpu->arch.epcr; in kvmppc_booke_emulate_mfspr()