• Home
  • Raw
  • Download

Lines Matching refs:vcpu

34 static int handle_ri(struct kvm_vcpu *vcpu)  in handle_ri()  argument
36 vcpu->stat.instruction_ri++; in handle_ri()
38 if (test_kvm_facility(vcpu->kvm, 64)) { in handle_ri()
39 VCPU_EVENT(vcpu, 3, "%s", "ENABLE: RI (lazy)"); in handle_ri()
40 vcpu->arch.sie_block->ecb3 |= ECB3_RI; in handle_ri()
41 kvm_s390_retry_instr(vcpu); in handle_ri()
44 return kvm_s390_inject_program_int(vcpu, PGM_OPERATION); in handle_ri()
47 int kvm_s390_handle_aa(struct kvm_vcpu *vcpu) in kvm_s390_handle_aa() argument
49 if ((vcpu->arch.sie_block->ipa & 0xf) <= 4) in kvm_s390_handle_aa()
50 return handle_ri(vcpu); in kvm_s390_handle_aa()
55 static int handle_gs(struct kvm_vcpu *vcpu) in handle_gs() argument
57 vcpu->stat.instruction_gs++; in handle_gs()
59 if (test_kvm_facility(vcpu->kvm, 133)) { in handle_gs()
60 VCPU_EVENT(vcpu, 3, "%s", "ENABLE: GS (lazy)"); in handle_gs()
63 current->thread.gs_cb = (struct gs_cb *)&vcpu->run->s.regs.gscb; in handle_gs()
66 vcpu->arch.sie_block->ecb |= ECB_GS; in handle_gs()
67 vcpu->arch.sie_block->ecd |= ECD_HOSTREGMGMT; in handle_gs()
68 vcpu->arch.gs_enabled = 1; in handle_gs()
69 kvm_s390_retry_instr(vcpu); in handle_gs()
72 return kvm_s390_inject_program_int(vcpu, PGM_OPERATION); in handle_gs()
75 int kvm_s390_handle_e3(struct kvm_vcpu *vcpu) in kvm_s390_handle_e3() argument
77 int code = vcpu->arch.sie_block->ipb & 0xff; in kvm_s390_handle_e3()
80 return handle_gs(vcpu); in kvm_s390_handle_e3()
85 static int handle_set_clock(struct kvm_vcpu *vcpu) in handle_set_clock() argument
92 vcpu->stat.instruction_sck++; in handle_set_clock()
94 if (vcpu->arch.sie_block->gpsw.mask & PSW_MASK_PSTATE) in handle_set_clock()
95 return kvm_s390_inject_program_int(vcpu, PGM_PRIVILEGED_OP); in handle_set_clock()
97 op2 = kvm_s390_get_base_disp_s(vcpu, &ar); in handle_set_clock()
99 return kvm_s390_inject_program_int(vcpu, PGM_SPECIFICATION); in handle_set_clock()
100 rc = read_guest(vcpu, op2, ar, &gtod.tod, sizeof(gtod.tod)); in handle_set_clock()
102 return kvm_s390_inject_prog_cond(vcpu, rc); in handle_set_clock()
104 VCPU_EVENT(vcpu, 3, "SCK: setting guest TOD to 0x%llx", gtod.tod); in handle_set_clock()
115 if (!kvm_s390_try_set_tod_clock(vcpu->kvm, &gtod)) { in handle_set_clock()
116 kvm_s390_retry_instr(vcpu); in handle_set_clock()
120 kvm_s390_set_psw_cc(vcpu, 0); in handle_set_clock()
124 static int handle_set_prefix(struct kvm_vcpu *vcpu) in handle_set_prefix() argument
131 vcpu->stat.instruction_spx++; in handle_set_prefix()
133 if (vcpu->arch.sie_block->gpsw.mask & PSW_MASK_PSTATE) in handle_set_prefix()
134 return kvm_s390_inject_program_int(vcpu, PGM_PRIVILEGED_OP); in handle_set_prefix()
136 operand2 = kvm_s390_get_base_disp_s(vcpu, &ar); in handle_set_prefix()
140 return kvm_s390_inject_program_int(vcpu, PGM_SPECIFICATION); in handle_set_prefix()
143 rc = read_guest(vcpu, operand2, ar, &address, sizeof(address)); in handle_set_prefix()
145 return kvm_s390_inject_prog_cond(vcpu, rc); in handle_set_prefix()
154 if (kvm_is_error_gpa(vcpu->kvm, address)) in handle_set_prefix()
155 return kvm_s390_inject_program_int(vcpu, PGM_ADDRESSING); in handle_set_prefix()
157 kvm_s390_set_prefix(vcpu, address); in handle_set_prefix()
158 trace_kvm_s390_handle_prefix(vcpu, 1, address); in handle_set_prefix()
162 static int handle_store_prefix(struct kvm_vcpu *vcpu) in handle_store_prefix() argument
169 vcpu->stat.instruction_stpx++; in handle_store_prefix()
171 if (vcpu->arch.sie_block->gpsw.mask & PSW_MASK_PSTATE) in handle_store_prefix()
172 return kvm_s390_inject_program_int(vcpu, PGM_PRIVILEGED_OP); in handle_store_prefix()
174 operand2 = kvm_s390_get_base_disp_s(vcpu, &ar); in handle_store_prefix()
178 return kvm_s390_inject_program_int(vcpu, PGM_SPECIFICATION); in handle_store_prefix()
180 address = kvm_s390_get_prefix(vcpu); in handle_store_prefix()
183 rc = write_guest(vcpu, operand2, ar, &address, sizeof(address)); in handle_store_prefix()
185 return kvm_s390_inject_prog_cond(vcpu, rc); in handle_store_prefix()
187 VCPU_EVENT(vcpu, 3, "STPX: storing prefix 0x%x into 0x%llx", address, operand2); in handle_store_prefix()
188 trace_kvm_s390_handle_prefix(vcpu, 0, address); in handle_store_prefix()
192 static int handle_store_cpu_address(struct kvm_vcpu *vcpu) in handle_store_cpu_address() argument
194 u16 vcpu_id = vcpu->vcpu_id; in handle_store_cpu_address()
199 vcpu->stat.instruction_stap++; in handle_store_cpu_address()
201 if (vcpu->arch.sie_block->gpsw.mask & PSW_MASK_PSTATE) in handle_store_cpu_address()
202 return kvm_s390_inject_program_int(vcpu, PGM_PRIVILEGED_OP); in handle_store_cpu_address()
204 ga = kvm_s390_get_base_disp_s(vcpu, &ar); in handle_store_cpu_address()
207 return kvm_s390_inject_program_int(vcpu, PGM_SPECIFICATION); in handle_store_cpu_address()
209 rc = write_guest(vcpu, ga, ar, &vcpu_id, sizeof(vcpu_id)); in handle_store_cpu_address()
211 return kvm_s390_inject_prog_cond(vcpu, rc); in handle_store_cpu_address()
213 VCPU_EVENT(vcpu, 3, "STAP: storing cpu address (%u) to 0x%llx", vcpu_id, ga); in handle_store_cpu_address()
214 trace_kvm_s390_handle_stap(vcpu, ga); in handle_store_cpu_address()
218 int kvm_s390_skey_check_enable(struct kvm_vcpu *vcpu) in kvm_s390_skey_check_enable() argument
222 trace_kvm_s390_skey_related_inst(vcpu); in kvm_s390_skey_check_enable()
224 if (vcpu->arch.skey_enabled) in kvm_s390_skey_check_enable()
228 VCPU_EVENT(vcpu, 3, "enabling storage keys for guest: %d", rc); in kvm_s390_skey_check_enable()
232 if (kvm_s390_test_cpuflags(vcpu, CPUSTAT_KSS)) in kvm_s390_skey_check_enable()
233 kvm_s390_clear_cpuflags(vcpu, CPUSTAT_KSS); in kvm_s390_skey_check_enable()
234 if (!vcpu->kvm->arch.use_skf) in kvm_s390_skey_check_enable()
235 vcpu->arch.sie_block->ictl |= ICTL_ISKE | ICTL_SSKE | ICTL_RRBE; in kvm_s390_skey_check_enable()
237 vcpu->arch.sie_block->ictl &= ~(ICTL_ISKE | ICTL_SSKE | ICTL_RRBE); in kvm_s390_skey_check_enable()
238 vcpu->arch.skey_enabled = true; in kvm_s390_skey_check_enable()
242 static int try_handle_skey(struct kvm_vcpu *vcpu) in try_handle_skey() argument
246 rc = kvm_s390_skey_check_enable(vcpu); in try_handle_skey()
249 if (vcpu->kvm->arch.use_skf) { in try_handle_skey()
251 kvm_s390_retry_instr(vcpu); in try_handle_skey()
252 VCPU_EVENT(vcpu, 4, "%s", "retrying storage key operation"); in try_handle_skey()
258 static int handle_iske(struct kvm_vcpu *vcpu) in handle_iske() argument
266 vcpu->stat.instruction_iske++; in handle_iske()
268 if (vcpu->arch.sie_block->gpsw.mask & PSW_MASK_PSTATE) in handle_iske()
269 return kvm_s390_inject_program_int(vcpu, PGM_PRIVILEGED_OP); in handle_iske()
271 rc = try_handle_skey(vcpu); in handle_iske()
275 kvm_s390_get_regs_rre(vcpu, &reg1, &reg2); in handle_iske()
277 gaddr = vcpu->run->s.regs.gprs[reg2] & PAGE_MASK; in handle_iske()
278 gaddr = kvm_s390_logical_to_effective(vcpu, gaddr); in handle_iske()
279 gaddr = kvm_s390_real_to_abs(vcpu, gaddr); in handle_iske()
280 vmaddr = gfn_to_hva(vcpu->kvm, gpa_to_gfn(gaddr)); in handle_iske()
282 return kvm_s390_inject_program_int(vcpu, PGM_ADDRESSING); in handle_iske()
298 return kvm_s390_inject_program_int(vcpu, PGM_ADDRESSING); in handle_iske()
301 vcpu->run->s.regs.gprs[reg1] &= ~0xff; in handle_iske()
302 vcpu->run->s.regs.gprs[reg1] |= key; in handle_iske()
306 static int handle_rrbe(struct kvm_vcpu *vcpu) in handle_rrbe() argument
313 vcpu->stat.instruction_rrbe++; in handle_rrbe()
315 if (vcpu->arch.sie_block->gpsw.mask & PSW_MASK_PSTATE) in handle_rrbe()
316 return kvm_s390_inject_program_int(vcpu, PGM_PRIVILEGED_OP); in handle_rrbe()
318 rc = try_handle_skey(vcpu); in handle_rrbe()
322 kvm_s390_get_regs_rre(vcpu, &reg1, &reg2); in handle_rrbe()
324 gaddr = vcpu->run->s.regs.gprs[reg2] & PAGE_MASK; in handle_rrbe()
325 gaddr = kvm_s390_logical_to_effective(vcpu, gaddr); in handle_rrbe()
326 gaddr = kvm_s390_real_to_abs(vcpu, gaddr); in handle_rrbe()
327 vmaddr = gfn_to_hva(vcpu->kvm, gpa_to_gfn(gaddr)); in handle_rrbe()
329 return kvm_s390_inject_program_int(vcpu, PGM_ADDRESSING); in handle_rrbe()
344 return kvm_s390_inject_program_int(vcpu, PGM_ADDRESSING); in handle_rrbe()
347 kvm_s390_set_psw_cc(vcpu, rc); in handle_rrbe()
355 static int handle_sske(struct kvm_vcpu *vcpu) in handle_sske() argument
357 unsigned char m3 = vcpu->arch.sie_block->ipb >> 28; in handle_sske()
364 vcpu->stat.instruction_sske++; in handle_sske()
366 if (vcpu->arch.sie_block->gpsw.mask & PSW_MASK_PSTATE) in handle_sske()
367 return kvm_s390_inject_program_int(vcpu, PGM_PRIVILEGED_OP); in handle_sske()
369 rc = try_handle_skey(vcpu); in handle_sske()
373 if (!test_kvm_facility(vcpu->kvm, 8)) in handle_sske()
375 if (!test_kvm_facility(vcpu->kvm, 10)) in handle_sske()
377 if (!test_kvm_facility(vcpu->kvm, 14)) in handle_sske()
380 kvm_s390_get_regs_rre(vcpu, &reg1, &reg2); in handle_sske()
382 key = vcpu->run->s.regs.gprs[reg1] & 0xfe; in handle_sske()
383 start = vcpu->run->s.regs.gprs[reg2] & PAGE_MASK; in handle_sske()
384 start = kvm_s390_logical_to_effective(vcpu, start); in handle_sske()
389 start = kvm_s390_real_to_abs(vcpu, start); in handle_sske()
394 unsigned long vmaddr = gfn_to_hva(vcpu->kvm, gpa_to_gfn(start)); in handle_sske()
398 return kvm_s390_inject_program_int(vcpu, PGM_ADDRESSING); in handle_sske()
412 return kvm_s390_inject_program_int(vcpu, PGM_ADDRESSING); in handle_sske()
423 kvm_s390_set_psw_cc(vcpu, 3); in handle_sske()
425 kvm_s390_set_psw_cc(vcpu, rc); in handle_sske()
426 vcpu->run->s.regs.gprs[reg1] &= ~0xff00UL; in handle_sske()
427 vcpu->run->s.regs.gprs[reg1] |= (u64) oldkey << 8; in handle_sske()
431 if (psw_bits(vcpu->arch.sie_block->gpsw).eaba == PSW_BITS_AMODE_64BIT) in handle_sske()
432 vcpu->run->s.regs.gprs[reg2] &= ~PAGE_MASK; in handle_sske()
434 vcpu->run->s.regs.gprs[reg2] &= ~0xfffff000UL; in handle_sske()
435 end = kvm_s390_logical_to_effective(vcpu, end); in handle_sske()
436 vcpu->run->s.regs.gprs[reg2] |= end; in handle_sske()
441 static int handle_ipte_interlock(struct kvm_vcpu *vcpu) in handle_ipte_interlock() argument
443 vcpu->stat.instruction_ipte_interlock++; in handle_ipte_interlock()
444 if (psw_bits(vcpu->arch.sie_block->gpsw).pstate) in handle_ipte_interlock()
445 return kvm_s390_inject_program_int(vcpu, PGM_PRIVILEGED_OP); in handle_ipte_interlock()
446 wait_event(vcpu->kvm->arch.ipte_wq, !ipte_lock_held(vcpu)); in handle_ipte_interlock()
447 kvm_s390_retry_instr(vcpu); in handle_ipte_interlock()
448 VCPU_EVENT(vcpu, 4, "%s", "retrying ipte interlock operation"); in handle_ipte_interlock()
452 static int handle_test_block(struct kvm_vcpu *vcpu) in handle_test_block() argument
457 vcpu->stat.instruction_tb++; in handle_test_block()
459 if (vcpu->arch.sie_block->gpsw.mask & PSW_MASK_PSTATE) in handle_test_block()
460 return kvm_s390_inject_program_int(vcpu, PGM_PRIVILEGED_OP); in handle_test_block()
462 kvm_s390_get_regs_rre(vcpu, NULL, &reg2); in handle_test_block()
463 addr = vcpu->run->s.regs.gprs[reg2] & PAGE_MASK; in handle_test_block()
464 addr = kvm_s390_logical_to_effective(vcpu, addr); in handle_test_block()
465 if (kvm_s390_check_low_addr_prot_real(vcpu, addr)) in handle_test_block()
466 return kvm_s390_inject_prog_irq(vcpu, &vcpu->arch.pgm); in handle_test_block()
467 addr = kvm_s390_real_to_abs(vcpu, addr); in handle_test_block()
469 if (kvm_is_error_gpa(vcpu->kvm, addr)) in handle_test_block()
470 return kvm_s390_inject_program_int(vcpu, PGM_ADDRESSING); in handle_test_block()
475 if (kvm_clear_guest(vcpu->kvm, addr, PAGE_SIZE)) in handle_test_block()
477 kvm_s390_set_psw_cc(vcpu, 0); in handle_test_block()
478 vcpu->run->s.regs.gprs[0] = 0; in handle_test_block()
482 static int handle_tpi(struct kvm_vcpu *vcpu) in handle_tpi() argument
491 vcpu->stat.instruction_tpi++; in handle_tpi()
493 addr = kvm_s390_get_base_disp_s(vcpu, &ar); in handle_tpi()
495 return kvm_s390_inject_program_int(vcpu, PGM_SPECIFICATION); in handle_tpi()
497 inti = kvm_s390_get_io_int(vcpu->kvm, vcpu->arch.sie_block->gcr[6], 0); in handle_tpi()
499 kvm_s390_set_psw_cc(vcpu, 0); in handle_tpi()
512 rc = write_guest(vcpu, addr, ar, &tpi_data, len); in handle_tpi()
514 rc = kvm_s390_inject_prog_cond(vcpu, rc); in handle_tpi()
523 if (write_guest_lc(vcpu, __LC_SUBCHANNEL_ID, &tpi_data, len)) { in handle_tpi()
532 kvm_s390_set_psw_cc(vcpu, 1); in handle_tpi()
540 if (kvm_s390_reinject_io_int(vcpu->kvm, inti)) { in handle_tpi()
548 static int handle_tsch(struct kvm_vcpu *vcpu) in handle_tsch() argument
553 vcpu->stat.instruction_tsch++; in handle_tsch()
556 if (vcpu->run->s.regs.gprs[1]) in handle_tsch()
557 inti = kvm_s390_get_io_int(vcpu->kvm, isc_mask, in handle_tsch()
558 vcpu->run->s.regs.gprs[1]); in handle_tsch()
568 vcpu->run->exit_reason = KVM_EXIT_S390_TSCH; in handle_tsch()
569 vcpu->run->s390_tsch.dequeued = !!inti; in handle_tsch()
571 vcpu->run->s390_tsch.subchannel_id = inti->io.subchannel_id; in handle_tsch()
572 vcpu->run->s390_tsch.subchannel_nr = inti->io.subchannel_nr; in handle_tsch()
573 vcpu->run->s390_tsch.io_int_parm = inti->io.io_int_parm; in handle_tsch()
574 vcpu->run->s390_tsch.io_int_word = inti->io.io_int_word; in handle_tsch()
576 vcpu->run->s390_tsch.ipb = vcpu->arch.sie_block->ipb; in handle_tsch()
581 static int handle_io_inst(struct kvm_vcpu *vcpu) in handle_io_inst() argument
583 VCPU_EVENT(vcpu, 4, "%s", "I/O instruction"); in handle_io_inst()
585 if (vcpu->arch.sie_block->gpsw.mask & PSW_MASK_PSTATE) in handle_io_inst()
586 return kvm_s390_inject_program_int(vcpu, PGM_PRIVILEGED_OP); in handle_io_inst()
588 if (vcpu->kvm->arch.css_support) { in handle_io_inst()
593 if (vcpu->arch.sie_block->ipa == 0xb236) in handle_io_inst()
594 return handle_tpi(vcpu); in handle_io_inst()
595 if (vcpu->arch.sie_block->ipa == 0xb235) in handle_io_inst()
596 return handle_tsch(vcpu); in handle_io_inst()
598 vcpu->stat.instruction_io_other++; in handle_io_inst()
605 kvm_s390_set_psw_cc(vcpu, 3); in handle_io_inst()
625 static int handle_pqap(struct kvm_vcpu *vcpu) in handle_pqap() argument
636 if (!(vcpu->arch.sie_block->eca & ECA_APIE)) in handle_pqap()
646 reg0 = vcpu->run->s.regs.gprs[0]; in handle_pqap()
652 if (vcpu->arch.sie_block->gpsw.mask & PSW_MASK_PSTATE) in handle_pqap()
653 return kvm_s390_inject_program_int(vcpu, PGM_PRIVILEGED_OP); in handle_pqap()
658 return kvm_s390_inject_program_int(vcpu, PGM_SPECIFICATION); in handle_pqap()
660 if (!test_kvm_facility(vcpu->kvm, 15) && (reg0 & 0x00800000UL)) in handle_pqap()
661 return kvm_s390_inject_program_int(vcpu, PGM_SPECIFICATION); in handle_pqap()
663 if (!(vcpu->kvm->arch.crypto.crycbd & 0x02) && (reg0 & 0x0000c0f0UL)) in handle_pqap()
664 return kvm_s390_inject_program_int(vcpu, PGM_SPECIFICATION); in handle_pqap()
668 if (!test_kvm_facility(vcpu->kvm, 65)) in handle_pqap()
669 return kvm_s390_inject_program_int(vcpu, PGM_SPECIFICATION); in handle_pqap()
675 if (vcpu->kvm->arch.crypto.pqap_hook) { in handle_pqap()
676 if (!try_module_get(vcpu->kvm->arch.crypto.pqap_hook->owner)) in handle_pqap()
678 ret = vcpu->kvm->arch.crypto.pqap_hook->hook(vcpu); in handle_pqap()
679 module_put(vcpu->kvm->arch.crypto.pqap_hook->owner); in handle_pqap()
680 if (!ret && vcpu->run->s.regs.gprs[1] & 0x00ff0000) in handle_pqap()
681 kvm_s390_set_psw_cc(vcpu, 3); in handle_pqap()
690 memcpy(&vcpu->run->s.regs.gprs[1], &status, sizeof(status)); in handle_pqap()
691 kvm_s390_set_psw_cc(vcpu, 3); in handle_pqap()
695 static int handle_stfl(struct kvm_vcpu *vcpu) in handle_stfl() argument
700 vcpu->stat.instruction_stfl++; in handle_stfl()
702 if (vcpu->arch.sie_block->gpsw.mask & PSW_MASK_PSTATE) in handle_stfl()
703 return kvm_s390_inject_program_int(vcpu, PGM_PRIVILEGED_OP); in handle_stfl()
709 fac = *vcpu->kvm->arch.model.fac_list >> 32; in handle_stfl()
710 rc = write_guest_lc(vcpu, offsetof(struct lowcore, stfl_fac_list), in handle_stfl()
714 VCPU_EVENT(vcpu, 3, "STFL: store facility list 0x%x", fac); in handle_stfl()
715 trace_kvm_s390_handle_stfl(vcpu, fac); in handle_stfl()
741 int kvm_s390_handle_lpsw(struct kvm_vcpu *vcpu) in kvm_s390_handle_lpsw() argument
743 psw_t *gpsw = &vcpu->arch.sie_block->gpsw; in kvm_s390_handle_lpsw()
749 vcpu->stat.instruction_lpsw++; in kvm_s390_handle_lpsw()
752 return kvm_s390_inject_program_int(vcpu, PGM_PRIVILEGED_OP); in kvm_s390_handle_lpsw()
754 addr = kvm_s390_get_base_disp_s(vcpu, &ar); in kvm_s390_handle_lpsw()
756 return kvm_s390_inject_program_int(vcpu, PGM_SPECIFICATION); in kvm_s390_handle_lpsw()
758 rc = read_guest(vcpu, addr, ar, &new_psw, sizeof(new_psw)); in kvm_s390_handle_lpsw()
760 return kvm_s390_inject_prog_cond(vcpu, rc); in kvm_s390_handle_lpsw()
762 return kvm_s390_inject_program_int(vcpu, PGM_SPECIFICATION); in kvm_s390_handle_lpsw()
767 return kvm_s390_inject_program_int(vcpu, PGM_SPECIFICATION); in kvm_s390_handle_lpsw()
771 static int handle_lpswe(struct kvm_vcpu *vcpu) in handle_lpswe() argument
778 vcpu->stat.instruction_lpswe++; in handle_lpswe()
780 if (vcpu->arch.sie_block->gpsw.mask & PSW_MASK_PSTATE) in handle_lpswe()
781 return kvm_s390_inject_program_int(vcpu, PGM_PRIVILEGED_OP); in handle_lpswe()
783 addr = kvm_s390_get_base_disp_s(vcpu, &ar); in handle_lpswe()
785 return kvm_s390_inject_program_int(vcpu, PGM_SPECIFICATION); in handle_lpswe()
786 rc = read_guest(vcpu, addr, ar, &new_psw, sizeof(new_psw)); in handle_lpswe()
788 return kvm_s390_inject_prog_cond(vcpu, rc); in handle_lpswe()
789 vcpu->arch.sie_block->gpsw = new_psw; in handle_lpswe()
790 if (!is_valid_psw(&vcpu->arch.sie_block->gpsw)) in handle_lpswe()
791 return kvm_s390_inject_program_int(vcpu, PGM_SPECIFICATION); in handle_lpswe()
795 static int handle_stidp(struct kvm_vcpu *vcpu) in handle_stidp() argument
797 u64 stidp_data = vcpu->kvm->arch.model.cpuid; in handle_stidp()
802 vcpu->stat.instruction_stidp++; in handle_stidp()
804 if (vcpu->arch.sie_block->gpsw.mask & PSW_MASK_PSTATE) in handle_stidp()
805 return kvm_s390_inject_program_int(vcpu, PGM_PRIVILEGED_OP); in handle_stidp()
807 operand2 = kvm_s390_get_base_disp_s(vcpu, &ar); in handle_stidp()
810 return kvm_s390_inject_program_int(vcpu, PGM_SPECIFICATION); in handle_stidp()
812 rc = write_guest(vcpu, operand2, ar, &stidp_data, sizeof(stidp_data)); in handle_stidp()
814 return kvm_s390_inject_prog_cond(vcpu, rc); in handle_stidp()
816 VCPU_EVENT(vcpu, 3, "STIDP: store cpu id 0x%llx", stidp_data); in handle_stidp()
820 static void handle_stsi_3_2_2(struct kvm_vcpu *vcpu, struct sysinfo_3_2_2 *mem) in handle_stsi_3_2_2() argument
825 cpus = atomic_read(&vcpu->kvm->online_vcpus); in handle_stsi_3_2_2()
847 static void insert_stsi_usr_data(struct kvm_vcpu *vcpu, u64 addr, u8 ar, in insert_stsi_usr_data() argument
850 vcpu->run->exit_reason = KVM_EXIT_S390_STSI; in insert_stsi_usr_data()
851 vcpu->run->s390_stsi.addr = addr; in insert_stsi_usr_data()
852 vcpu->run->s390_stsi.ar = ar; in insert_stsi_usr_data()
853 vcpu->run->s390_stsi.fc = fc; in insert_stsi_usr_data()
854 vcpu->run->s390_stsi.sel1 = sel1; in insert_stsi_usr_data()
855 vcpu->run->s390_stsi.sel2 = sel2; in insert_stsi_usr_data()
858 static int handle_stsi(struct kvm_vcpu *vcpu) in handle_stsi() argument
860 int fc = (vcpu->run->s.regs.gprs[0] & 0xf0000000) >> 28; in handle_stsi()
861 int sel1 = vcpu->run->s.regs.gprs[0] & 0xff; in handle_stsi()
862 int sel2 = vcpu->run->s.regs.gprs[1] & 0xffff; in handle_stsi()
868 vcpu->stat.instruction_stsi++; in handle_stsi()
869 VCPU_EVENT(vcpu, 3, "STSI: fc: %u sel1: %u sel2: %u", fc, sel1, sel2); in handle_stsi()
871 if (vcpu->arch.sie_block->gpsw.mask & PSW_MASK_PSTATE) in handle_stsi()
872 return kvm_s390_inject_program_int(vcpu, PGM_PRIVILEGED_OP); in handle_stsi()
875 kvm_s390_set_psw_cc(vcpu, 3); in handle_stsi()
879 if (vcpu->run->s.regs.gprs[0] & 0x0fffff00 in handle_stsi()
880 || vcpu->run->s.regs.gprs[1] & 0xffff0000) in handle_stsi()
881 return kvm_s390_inject_program_int(vcpu, PGM_SPECIFICATION); in handle_stsi()
884 vcpu->run->s.regs.gprs[0] = 3 << 28; in handle_stsi()
885 kvm_s390_set_psw_cc(vcpu, 0); in handle_stsi()
889 operand2 = kvm_s390_get_base_disp_s(vcpu, &ar); in handle_stsi()
891 if (!kvm_s390_pv_cpu_is_protected(vcpu) && (operand2 & 0xfff)) in handle_stsi()
892 return kvm_s390_inject_program_int(vcpu, PGM_SPECIFICATION); in handle_stsi()
909 handle_stsi_3_2_2(vcpu, (void *) mem); in handle_stsi()
912 if (kvm_s390_pv_cpu_is_protected(vcpu)) { in handle_stsi()
913 memcpy((void *)sida_origin(vcpu->arch.sie_block), (void *)mem, in handle_stsi()
917 rc = write_guest(vcpu, operand2, ar, (void *)mem, PAGE_SIZE); in handle_stsi()
920 rc = kvm_s390_inject_prog_cond(vcpu, rc); in handle_stsi()
923 if (vcpu->kvm->arch.user_stsi) { in handle_stsi()
924 insert_stsi_usr_data(vcpu, operand2, ar, fc, sel1, sel2); in handle_stsi()
927 trace_kvm_s390_handle_stsi(vcpu, fc, sel1, sel2, operand2); in handle_stsi()
929 kvm_s390_set_psw_cc(vcpu, 0); in handle_stsi()
930 vcpu->run->s.regs.gprs[0] = 0; in handle_stsi()
933 kvm_s390_set_psw_cc(vcpu, 3); in handle_stsi()
939 int kvm_s390_handle_b2(struct kvm_vcpu *vcpu) in kvm_s390_handle_b2() argument
941 switch (vcpu->arch.sie_block->ipa & 0x00ff) { in kvm_s390_handle_b2()
943 return handle_stidp(vcpu); in kvm_s390_handle_b2()
945 return handle_set_clock(vcpu); in kvm_s390_handle_b2()
947 return handle_set_prefix(vcpu); in kvm_s390_handle_b2()
949 return handle_store_prefix(vcpu); in kvm_s390_handle_b2()
951 return handle_store_cpu_address(vcpu); in kvm_s390_handle_b2()
953 return kvm_s390_handle_vsie(vcpu); in kvm_s390_handle_b2()
956 return handle_ipte_interlock(vcpu); in kvm_s390_handle_b2()
958 return handle_iske(vcpu); in kvm_s390_handle_b2()
960 return handle_rrbe(vcpu); in kvm_s390_handle_b2()
962 return handle_sske(vcpu); in kvm_s390_handle_b2()
964 return handle_test_block(vcpu); in kvm_s390_handle_b2()
981 return handle_io_inst(vcpu); in kvm_s390_handle_b2()
983 return handle_sthyi(vcpu); in kvm_s390_handle_b2()
985 return handle_stsi(vcpu); in kvm_s390_handle_b2()
987 return handle_pqap(vcpu); in kvm_s390_handle_b2()
989 return handle_stfl(vcpu); in kvm_s390_handle_b2()
991 return handle_lpswe(vcpu); in kvm_s390_handle_b2()
997 static int handle_epsw(struct kvm_vcpu *vcpu) in handle_epsw() argument
1001 vcpu->stat.instruction_epsw++; in handle_epsw()
1003 kvm_s390_get_regs_rre(vcpu, &reg1, &reg2); in handle_epsw()
1006 vcpu->run->s.regs.gprs[reg1] &= 0xffffffff00000000UL; in handle_epsw()
1007 vcpu->run->s.regs.gprs[reg1] |= vcpu->arch.sie_block->gpsw.mask >> 32; in handle_epsw()
1009 vcpu->run->s.regs.gprs[reg2] &= 0xffffffff00000000UL; in handle_epsw()
1010 vcpu->run->s.regs.gprs[reg2] |= in handle_epsw()
1011 vcpu->arch.sie_block->gpsw.mask & 0x00000000ffffffffUL; in handle_epsw()
1026 static int handle_pfmf(struct kvm_vcpu *vcpu) in handle_pfmf() argument
1033 vcpu->stat.instruction_pfmf++; in handle_pfmf()
1035 kvm_s390_get_regs_rre(vcpu, &reg1, &reg2); in handle_pfmf()
1037 if (!test_kvm_facility(vcpu->kvm, 8)) in handle_pfmf()
1038 return kvm_s390_inject_program_int(vcpu, PGM_OPERATION); in handle_pfmf()
1040 if (vcpu->arch.sie_block->gpsw.mask & PSW_MASK_PSTATE) in handle_pfmf()
1041 return kvm_s390_inject_program_int(vcpu, PGM_PRIVILEGED_OP); in handle_pfmf()
1043 if (vcpu->run->s.regs.gprs[reg1] & PFMF_RESERVED) in handle_pfmf()
1044 return kvm_s390_inject_program_int(vcpu, PGM_SPECIFICATION); in handle_pfmf()
1047 if (vcpu->run->s.regs.gprs[reg1] & PFMF_NQ && in handle_pfmf()
1048 !test_kvm_facility(vcpu->kvm, 14)) in handle_pfmf()
1049 return kvm_s390_inject_program_int(vcpu, PGM_SPECIFICATION); in handle_pfmf()
1052 if (vcpu->run->s.regs.gprs[reg1] & PFMF_SK && in handle_pfmf()
1053 test_kvm_facility(vcpu->kvm, 10)) { in handle_pfmf()
1054 mr = vcpu->run->s.regs.gprs[reg1] & PFMF_MR; in handle_pfmf()
1055 mc = vcpu->run->s.regs.gprs[reg1] & PFMF_MC; in handle_pfmf()
1058 nq = vcpu->run->s.regs.gprs[reg1] & PFMF_NQ; in handle_pfmf()
1059 key = vcpu->run->s.regs.gprs[reg1] & PFMF_KEY; in handle_pfmf()
1060 start = vcpu->run->s.regs.gprs[reg2] & PAGE_MASK; in handle_pfmf()
1061 start = kvm_s390_logical_to_effective(vcpu, start); in handle_pfmf()
1063 if (vcpu->run->s.regs.gprs[reg1] & PFMF_CF) { in handle_pfmf()
1064 if (kvm_s390_check_low_addr_prot_real(vcpu, start)) in handle_pfmf()
1065 return kvm_s390_inject_prog_irq(vcpu, &vcpu->arch.pgm); in handle_pfmf()
1068 switch (vcpu->run->s.regs.gprs[reg1] & PFMF_FSC) { in handle_pfmf()
1071 start = kvm_s390_real_to_abs(vcpu, start); in handle_pfmf()
1080 if (!test_kvm_facility(vcpu->kvm, 78) || in handle_pfmf()
1081 psw_bits(vcpu->arch.sie_block->gpsw).eaba == PSW_BITS_AMODE_24BIT) in handle_pfmf()
1082 return kvm_s390_inject_program_int(vcpu, PGM_SPECIFICATION); in handle_pfmf()
1086 return kvm_s390_inject_program_int(vcpu, PGM_SPECIFICATION); in handle_pfmf()
1094 vmaddr = gfn_to_hva(vcpu->kvm, gpa_to_gfn(start)); in handle_pfmf()
1096 return kvm_s390_inject_program_int(vcpu, PGM_ADDRESSING); in handle_pfmf()
1098 if (vcpu->run->s.regs.gprs[reg1] & PFMF_CF) { in handle_pfmf()
1099 if (kvm_clear_guest(vcpu->kvm, start, PAGE_SIZE)) in handle_pfmf()
1100 return kvm_s390_inject_program_int(vcpu, PGM_ADDRESSING); in handle_pfmf()
1103 if (vcpu->run->s.regs.gprs[reg1] & PFMF_SK) { in handle_pfmf()
1104 int rc = kvm_s390_skey_check_enable(vcpu); in handle_pfmf()
1118 return kvm_s390_inject_program_int(vcpu, PGM_ADDRESSING); in handle_pfmf()
1126 if (vcpu->run->s.regs.gprs[reg1] & PFMF_FSC) { in handle_pfmf()
1127 if (psw_bits(vcpu->arch.sie_block->gpsw).eaba == PSW_BITS_AMODE_64BIT) { in handle_pfmf()
1128 vcpu->run->s.regs.gprs[reg2] = end; in handle_pfmf()
1130 vcpu->run->s.regs.gprs[reg2] &= ~0xffffffffUL; in handle_pfmf()
1131 end = kvm_s390_logical_to_effective(vcpu, end); in handle_pfmf()
1132 vcpu->run->s.regs.gprs[reg2] |= end; in handle_pfmf()
1141 static inline int __do_essa(struct kvm_vcpu *vcpu, const int orc) in __do_essa() argument
1152 kvm_s390_get_regs_rre(vcpu, &r1, &r2); in __do_essa()
1153 gfn = vcpu->run->s.regs.gprs[r2] >> PAGE_SHIFT; in __do_essa()
1154 hva = gfn_to_hva(vcpu->kvm, gfn); in __do_essa()
1155 entries = (vcpu->arch.sie_block->cbrlo & ~PAGE_MASK) >> 3; in __do_essa()
1158 return kvm_s390_inject_program_int(vcpu, PGM_ADDRESSING); in __do_essa()
1160 nappended = pgste_perform_essa(vcpu->kvm->mm, hva, orc, &ptev, &pgstev); in __do_essa()
1163 vcpu->run->s.regs.gprs[r1] = res; /* Exception Indication */ in __do_essa()
1180 vcpu->run->s.regs.gprs[r1] = res; in __do_essa()
1188 cbrlo = phys_to_virt(vcpu->arch.sie_block->cbrlo & PAGE_MASK); in __do_essa()
1193 struct kvm_memory_slot *ms = gfn_to_memslot(vcpu->kvm, gfn); in __do_essa()
1197 atomic64_inc(&vcpu->kvm->arch.cmma_dirty_pages); in __do_essa()
1203 static int handle_essa(struct kvm_vcpu *vcpu) in handle_essa() argument
1206 int entries = (vcpu->arch.sie_block->cbrlo & ~PAGE_MASK) >> 3; in handle_essa()
1211 VCPU_EVENT(vcpu, 4, "ESSA: release %d pages", entries); in handle_essa()
1212 gmap = vcpu->arch.gmap; in handle_essa()
1213 vcpu->stat.instruction_essa++; in handle_essa()
1214 if (!vcpu->kvm->arch.use_cmma) in handle_essa()
1215 return kvm_s390_inject_program_int(vcpu, PGM_OPERATION); in handle_essa()
1217 if (vcpu->arch.sie_block->gpsw.mask & PSW_MASK_PSTATE) in handle_essa()
1218 return kvm_s390_inject_program_int(vcpu, PGM_PRIVILEGED_OP); in handle_essa()
1220 orc = (vcpu->arch.sie_block->ipb & 0xf0000000) >> 28; in handle_essa()
1222 if (orc > (test_kvm_facility(vcpu->kvm, 147) ? ESSA_SET_STABLE_NODAT in handle_essa()
1224 return kvm_s390_inject_program_int(vcpu, PGM_SPECIFICATION); in handle_essa()
1226 if (!vcpu->kvm->arch.migration_mode) { in handle_essa()
1236 if (vcpu->kvm->mm->context.uses_cmm == 0) { in handle_essa()
1237 mmap_write_lock(vcpu->kvm->mm); in handle_essa()
1238 vcpu->kvm->mm->context.uses_cmm = 1; in handle_essa()
1239 mmap_write_unlock(vcpu->kvm->mm); in handle_essa()
1250 vcpu->arch.sie_block->ecb2 |= ECB2_CMMA; in handle_essa()
1252 kvm_s390_retry_instr(vcpu); in handle_essa()
1256 mmap_read_lock(vcpu->kvm->mm); in handle_essa()
1257 srcu_idx = srcu_read_lock(&vcpu->kvm->srcu); in handle_essa()
1258 i = __do_essa(vcpu, orc); in handle_essa()
1259 srcu_read_unlock(&vcpu->kvm->srcu, srcu_idx); in handle_essa()
1260 mmap_read_unlock(vcpu->kvm->mm); in handle_essa()
1266 vcpu->arch.sie_block->cbrlo &= PAGE_MASK; /* reset nceo */ in handle_essa()
1267 cbrlo = phys_to_virt(vcpu->arch.sie_block->cbrlo); in handle_essa()
1275 int kvm_s390_handle_b9(struct kvm_vcpu *vcpu) in kvm_s390_handle_b9() argument
1277 switch (vcpu->arch.sie_block->ipa & 0x00ff) { in kvm_s390_handle_b9()
1281 return handle_ipte_interlock(vcpu); in kvm_s390_handle_b9()
1283 return handle_epsw(vcpu); in kvm_s390_handle_b9()
1285 return handle_essa(vcpu); in kvm_s390_handle_b9()
1287 return handle_pfmf(vcpu); in kvm_s390_handle_b9()
1293 int kvm_s390_handle_lctl(struct kvm_vcpu *vcpu) in kvm_s390_handle_lctl() argument
1295 int reg1 = (vcpu->arch.sie_block->ipa & 0x00f0) >> 4; in kvm_s390_handle_lctl()
1296 int reg3 = vcpu->arch.sie_block->ipa & 0x000f; in kvm_s390_handle_lctl()
1302 vcpu->stat.instruction_lctl++; in kvm_s390_handle_lctl()
1304 if (vcpu->arch.sie_block->gpsw.mask & PSW_MASK_PSTATE) in kvm_s390_handle_lctl()
1305 return kvm_s390_inject_program_int(vcpu, PGM_PRIVILEGED_OP); in kvm_s390_handle_lctl()
1307 ga = kvm_s390_get_base_disp_rs(vcpu, &ar); in kvm_s390_handle_lctl()
1310 return kvm_s390_inject_program_int(vcpu, PGM_SPECIFICATION); in kvm_s390_handle_lctl()
1312 VCPU_EVENT(vcpu, 4, "LCTL: r1:%d, r3:%d, addr: 0x%llx", reg1, reg3, ga); in kvm_s390_handle_lctl()
1313 trace_kvm_s390_handle_lctl(vcpu, 0, reg1, reg3, ga); in kvm_s390_handle_lctl()
1316 rc = read_guest(vcpu, ga, ar, ctl_array, nr_regs * sizeof(u32)); in kvm_s390_handle_lctl()
1318 return kvm_s390_inject_prog_cond(vcpu, rc); in kvm_s390_handle_lctl()
1322 vcpu->arch.sie_block->gcr[reg] &= 0xffffffff00000000ul; in kvm_s390_handle_lctl()
1323 vcpu->arch.sie_block->gcr[reg] |= ctl_array[nr_regs++]; in kvm_s390_handle_lctl()
1328 kvm_make_request(KVM_REQ_TLB_FLUSH, vcpu); in kvm_s390_handle_lctl()
1332 int kvm_s390_handle_stctl(struct kvm_vcpu *vcpu) in kvm_s390_handle_stctl() argument
1334 int reg1 = (vcpu->arch.sie_block->ipa & 0x00f0) >> 4; in kvm_s390_handle_stctl()
1335 int reg3 = vcpu->arch.sie_block->ipa & 0x000f; in kvm_s390_handle_stctl()
1341 vcpu->stat.instruction_stctl++; in kvm_s390_handle_stctl()
1343 if (vcpu->arch.sie_block->gpsw.mask & PSW_MASK_PSTATE) in kvm_s390_handle_stctl()
1344 return kvm_s390_inject_program_int(vcpu, PGM_PRIVILEGED_OP); in kvm_s390_handle_stctl()
1346 ga = kvm_s390_get_base_disp_rs(vcpu, &ar); in kvm_s390_handle_stctl()
1349 return kvm_s390_inject_program_int(vcpu, PGM_SPECIFICATION); in kvm_s390_handle_stctl()
1351 VCPU_EVENT(vcpu, 4, "STCTL r1:%d, r3:%d, addr: 0x%llx", reg1, reg3, ga); in kvm_s390_handle_stctl()
1352 trace_kvm_s390_handle_stctl(vcpu, 0, reg1, reg3, ga); in kvm_s390_handle_stctl()
1357 ctl_array[nr_regs++] = vcpu->arch.sie_block->gcr[reg]; in kvm_s390_handle_stctl()
1362 rc = write_guest(vcpu, ga, ar, ctl_array, nr_regs * sizeof(u32)); in kvm_s390_handle_stctl()
1363 return rc ? kvm_s390_inject_prog_cond(vcpu, rc) : 0; in kvm_s390_handle_stctl()
1366 static int handle_lctlg(struct kvm_vcpu *vcpu) in handle_lctlg() argument
1368 int reg1 = (vcpu->arch.sie_block->ipa & 0x00f0) >> 4; in handle_lctlg()
1369 int reg3 = vcpu->arch.sie_block->ipa & 0x000f; in handle_lctlg()
1375 vcpu->stat.instruction_lctlg++; in handle_lctlg()
1377 if (vcpu->arch.sie_block->gpsw.mask & PSW_MASK_PSTATE) in handle_lctlg()
1378 return kvm_s390_inject_program_int(vcpu, PGM_PRIVILEGED_OP); in handle_lctlg()
1380 ga = kvm_s390_get_base_disp_rsy(vcpu, &ar); in handle_lctlg()
1383 return kvm_s390_inject_program_int(vcpu, PGM_SPECIFICATION); in handle_lctlg()
1385 VCPU_EVENT(vcpu, 4, "LCTLG: r1:%d, r3:%d, addr: 0x%llx", reg1, reg3, ga); in handle_lctlg()
1386 trace_kvm_s390_handle_lctl(vcpu, 1, reg1, reg3, ga); in handle_lctlg()
1389 rc = read_guest(vcpu, ga, ar, ctl_array, nr_regs * sizeof(u64)); in handle_lctlg()
1391 return kvm_s390_inject_prog_cond(vcpu, rc); in handle_lctlg()
1395 vcpu->arch.sie_block->gcr[reg] = ctl_array[nr_regs++]; in handle_lctlg()
1400 kvm_make_request(KVM_REQ_TLB_FLUSH, vcpu); in handle_lctlg()
1404 static int handle_stctg(struct kvm_vcpu *vcpu) in handle_stctg() argument
1406 int reg1 = (vcpu->arch.sie_block->ipa & 0x00f0) >> 4; in handle_stctg()
1407 int reg3 = vcpu->arch.sie_block->ipa & 0x000f; in handle_stctg()
1413 vcpu->stat.instruction_stctg++; in handle_stctg()
1415 if (vcpu->arch.sie_block->gpsw.mask & PSW_MASK_PSTATE) in handle_stctg()
1416 return kvm_s390_inject_program_int(vcpu, PGM_PRIVILEGED_OP); in handle_stctg()
1418 ga = kvm_s390_get_base_disp_rsy(vcpu, &ar); in handle_stctg()
1421 return kvm_s390_inject_program_int(vcpu, PGM_SPECIFICATION); in handle_stctg()
1423 VCPU_EVENT(vcpu, 4, "STCTG r1:%d, r3:%d, addr: 0x%llx", reg1, reg3, ga); in handle_stctg()
1424 trace_kvm_s390_handle_stctl(vcpu, 1, reg1, reg3, ga); in handle_stctg()
1429 ctl_array[nr_regs++] = vcpu->arch.sie_block->gcr[reg]; in handle_stctg()
1434 rc = write_guest(vcpu, ga, ar, ctl_array, nr_regs * sizeof(u64)); in handle_stctg()
1435 return rc ? kvm_s390_inject_prog_cond(vcpu, rc) : 0; in handle_stctg()
1438 int kvm_s390_handle_eb(struct kvm_vcpu *vcpu) in kvm_s390_handle_eb() argument
1440 switch (vcpu->arch.sie_block->ipb & 0x000000ff) { in kvm_s390_handle_eb()
1442 return handle_stctg(vcpu); in kvm_s390_handle_eb()
1444 return handle_lctlg(vcpu); in kvm_s390_handle_eb()
1448 return handle_ri(vcpu); in kvm_s390_handle_eb()
1454 static int handle_tprot(struct kvm_vcpu *vcpu) in handle_tprot() argument
1462 vcpu->stat.instruction_tprot++; in handle_tprot()
1464 if (vcpu->arch.sie_block->gpsw.mask & PSW_MASK_PSTATE) in handle_tprot()
1465 return kvm_s390_inject_program_int(vcpu, PGM_PRIVILEGED_OP); in handle_tprot()
1467 kvm_s390_get_base_disp_sse(vcpu, &address1, &address2, &ar, NULL); in handle_tprot()
1474 if (vcpu->arch.sie_block->gpsw.mask & PSW_MASK_DAT) in handle_tprot()
1475 ipte_lock(vcpu); in handle_tprot()
1476 ret = guest_translate_address(vcpu, address1, ar, &gpa, GACC_STORE); in handle_tprot()
1480 ret = guest_translate_address(vcpu, address1, ar, &gpa, in handle_tprot()
1485 ret = kvm_s390_inject_program_int(vcpu, ret); in handle_tprot()
1488 kvm_s390_set_psw_cc(vcpu, 3); in handle_tprot()
1494 hva = gfn_to_hva_prot(vcpu->kvm, gpa_to_gfn(gpa), &writable); in handle_tprot()
1496 ret = kvm_s390_inject_program_int(vcpu, PGM_ADDRESSING); in handle_tprot()
1500 kvm_s390_set_psw_cc(vcpu, cc); in handle_tprot()
1504 if (vcpu->arch.sie_block->gpsw.mask & PSW_MASK_DAT) in handle_tprot()
1505 ipte_unlock(vcpu); in handle_tprot()
1509 int kvm_s390_handle_e5(struct kvm_vcpu *vcpu) in kvm_s390_handle_e5() argument
1511 switch (vcpu->arch.sie_block->ipa & 0x00ff) { in kvm_s390_handle_e5()
1513 return handle_tprot(vcpu); in kvm_s390_handle_e5()
1519 static int handle_sckpf(struct kvm_vcpu *vcpu) in handle_sckpf() argument
1523 vcpu->stat.instruction_sckpf++; in handle_sckpf()
1525 if (vcpu->arch.sie_block->gpsw.mask & PSW_MASK_PSTATE) in handle_sckpf()
1526 return kvm_s390_inject_program_int(vcpu, PGM_PRIVILEGED_OP); in handle_sckpf()
1528 if (vcpu->run->s.regs.gprs[0] & 0x00000000ffff0000) in handle_sckpf()
1529 return kvm_s390_inject_program_int(vcpu, in handle_sckpf()
1532 value = vcpu->run->s.regs.gprs[0] & 0x000000000000ffff; in handle_sckpf()
1533 vcpu->arch.sie_block->todpr = value; in handle_sckpf()
1538 static int handle_ptff(struct kvm_vcpu *vcpu) in handle_ptff() argument
1540 vcpu->stat.instruction_ptff++; in handle_ptff()
1543 kvm_s390_set_psw_cc(vcpu, 3); in handle_ptff()
1547 int kvm_s390_handle_01(struct kvm_vcpu *vcpu) in kvm_s390_handle_01() argument
1549 switch (vcpu->arch.sie_block->ipa & 0x00ff) { in kvm_s390_handle_01()
1551 return handle_ptff(vcpu); in kvm_s390_handle_01()
1553 return handle_sckpf(vcpu); in kvm_s390_handle_01()