Lines Matching +full:- +full:42
1 /* SPDX-License-Identifier: GPL-2.0-only */
44 EMULATE_EXIT_USER, /* emulation requires exit to user-space */
105 /* Core-specific hooks */
187 (iommu_tce_check_ioba((stt)->page_shift, (stt)->offset, \
188 (stt)->size, (ioba), (npages)) ? \
335 if (vcpu->arch.last_inst == KVM_INST_FETCH_FAILED) in kvmppc_get_last_inst()
336 ret = kvmppc_load_last_inst(vcpu, type, &vcpu->arch.last_inst); in kvmppc_get_last_inst()
346 if ((vcpu->arch.last_inst >> 32) != 0) { in kvmppc_get_last_inst()
347 u32 prefix = vcpu->arch.last_inst >> 32; in kvmppc_get_last_inst()
348 u32 suffix = vcpu->arch.last_inst; in kvmppc_get_last_inst()
359 swab32(vcpu->arch.last_inst) : in kvmppc_get_last_inst()
360 vcpu->arch.last_inst; in kvmppc_get_last_inst()
367 return kvm->arch.kvm_ops == kvmppc_hv_ops; in is_kvmppc_hv_enabled()
383 mask = (1 << (lsb - msb + 1)) - 1; in kvmppc_get_field()
384 r = (inst >> (63 - lsb)) & mask; in kvmppc_get_field()
399 mask = ((1 << (lsb - msb + 1)) - 1) << (63 - lsb); in kvmppc_set_field()
400 r = (inst & ~mask) | ((value << (63 - lsb)) & mask); in kvmppc_set_field()
448 paca_ptrs[cpu]->kvm_hstate.xics_phys = (void __iomem *)addr; in kvmppc_set_xics_phys()
455 paca_ptrs[cpu]->kvm_hstate.xive_tima_phys = (void __iomem *)phys_addr; in kvmppc_set_xive_tima()
456 paca_ptrs[cpu]->kvm_hstate.xive_tima_virt = virt_addr; in kvmppc_set_xive_tima()
463 xirr = get_paca()->kvm_hstate.saved_xirr; in kvmppc_get_xics_latch()
464 get_paca()->kvm_hstate.saved_xirr = 0; in kvmppc_get_xics_latch()
472 * guest, potentially to process new state like externally-generated
490 * X: doorbell_global_ipi(42):
491 * X: kvmppc_set_host_ipi(42)
493 * X: ppc_msgsnd() -> 42
494 * 42: doorbell_exception(): // from CPU X
495 * 42: ppc_msgsync()
498 * // STORE DEFERRED DUE TO RE-ORDERING
499 * --105: message[CALL_FUNCTION] = 1
500 * | 105: doorbell_global_ipi(42):
501 * | 105: kvmppc_set_host_ipi(42)
502 * | 42: kvmppc_clear_host_ipi(42)
503 * | 42: smp_ipi_demux_relaxed()
504 * | 42: // returns to executing guest
505 * | // RE-ORDERED STORE COMPLETES
506 * ->105: message[CALL_FUNCTION] = 1
508 * 105: ppc_msgsnd() -> 42
509 * 42: local_paca->kvm_hstate.host_ipi == 0 // IPI ignored
510 * 105: // hangs waiting on 42 to process messages/call_single_queue
514 * a read-side pairing with the barrier in kvmppc_set_host_ipi()):
520 * X: doorbell_global_ipi(42):
521 * X: kvmppc_set_host_ipi(42)
523 * X: ppc_msgsnd() -> 42
524 * 42: doorbell_exception(): // from CPU X
525 * 42: ppc_msgsync()
526 * // STORE DEFERRED DUE TO RE-ORDERING
527 * -- 42: kvmppc_clear_host_ipi(42)
528 * | 42: smp_ipi_demux_relaxed()
532 * | 105: doorbell_global_ipi(42):
533 * | 105: kvmppc_set_host_ipi(42)
534 * | // RE-ORDERED STORE COMPLETES
535 * -> 42: kvmppc_clear_host_ipi(42)
536 * 42: // returns to executing guest
538 * 105: ppc_msgsnd() -> 42
539 * 42: local_paca->kvm_hstate.host_ipi == 0 // IPI ignored
540 * 105: // hangs waiting on 42 to process messages/call_single_queue
550 WRITE_ONCE(paca_ptrs[cpu]->kvm_hstate.host_ipi, 1); in kvmppc_set_host_ipi()
555 WRITE_ONCE(paca_ptrs[cpu]->kvm_hstate.host_ipi, 0); in kvmppc_clear_host_ipi()
566 vcpu->kvm->arch.kvm_ops->fast_vcpu_kick(vcpu); in kvmppc_fast_vcpu_kick()
658 return vcpu->arch.irq_type == KVMPPC_IRQ_XICS; in kvmppc_xics_enabled()
665 return kvm->arch.pimap; in kvmppc_get_passthru_irqmap()
746 return vcpu->arch.irq_type == KVMPPC_IRQ_XIVE; in kvmppc_xive_enabled()
760 u32 priority) { return -1; } in kvmppc_xive_set_xive()
762 u32 *priority) { return -1; } in kvmppc_xive_get_xive()
763 static inline int kvmppc_xive_int_on(struct kvm *kvm, u32 irq) { return -1; } in kvmppc_xive_int_on()
764 static inline int kvmppc_xive_int_off(struct kvm *kvm, u32 irq) { return -1; } in kvmppc_xive_int_off()
767 struct kvm_vcpu *vcpu, u32 cpu) { return -EBUSY; } in kvmppc_xive_connect_vcpu()
770 struct irq_desc *host_desc) { return -ENODEV; } in kvmppc_xive_set_mapped()
772 struct irq_desc *host_desc) { return -ENODEV; } in kvmppc_xive_clr_mapped()
774 static inline int kvmppc_xive_set_icp(struct kvm_vcpu *vcpu, u64 icpval) { return -ENOENT; } in kvmppc_xive_set_icp()
777 int level, bool line_status) { return -ENODEV; } in kvmppc_xive_set_irq()
785 struct kvm_vcpu *vcpu, u32 cpu) { return -EBUSY; } in kvmppc_xive_native_connect_vcpu()
792 { return -ENOENT; } in kvmppc_xive_native_set_vp()
849 * Host-side operations we want to set up while running in real
880 return vcpu->arch.epr; in kvmppc_get_epr()
891 vcpu->arch.epr = epr; in kvmppc_set_epr()
911 return -EINVAL; in kvmppc_mpic_connect_vcpu()
940 /* Clear i-cache for new pages */ in kvmppc_mmu_flush_icache()
942 if (!test_bit(PG_dcache_clean, &folio->flags.f)) { in kvmppc_mmu_flush_icache()
944 set_bit(PG_dcache_clean, &folio->flags.f); in kvmppc_mmu_flush_icache()
955 /* Only Book3S_64 PR supports bi-endian for now */ in kvmppc_shared_big_endian()
956 return vcpu->arch.shared_big_endian; in kvmppc_shared_big_endian()
983 return be##size##_to_cpu((__be##size __force)vcpu->arch.shared->reg); \
985 return le##size##_to_cpu((__le##size __force)vcpu->arch.shared->reg); \
992 vcpu->arch.shared->reg = (u##size __force)cpu_to_be##size(val); \
994 vcpu->arch.shared->reg = (u##size __force)cpu_to_le##size(val); \
1033 vcpu->arch.shared->msr = cpu_to_be64(val); in kvmppc_set_msr_fast()
1035 vcpu->arch.shared->msr = cpu_to_le64(val); in kvmppc_set_msr_fast()
1048 return be32_to_cpu(vcpu->arch.shared->sr[nr]); in kvmppc_get_sr()
1050 return le32_to_cpu(vcpu->arch.shared->sr[nr]); in kvmppc_get_sr()
1056 vcpu->arch.shared->sr[nr] = cpu_to_be32(val); in kvmppc_set_sr()
1058 vcpu->arch.shared->sr[nr] = cpu_to_le32(val); in kvmppc_set_sr()
1073 * interrupts fully-enabled to hard-disabled. in kvmppc_fix_ee_before_entry()
1075 WARN_ON(local_paca->irq_happened != PACA_IRQ_HARD_DIS); in kvmppc_fix_ee_before_entry()
1078 local_paca->irq_happened = 0; in kvmppc_fix_ee_before_entry()
1087 local_paca->irq_happened = PACA_IRQ_HARD_DIS; in kvmppc_fix_ee_after_exit()