Lines Matching refs:vpa
441 static void init_vpa(struct kvm_vcpu *vcpu, struct lppaca *vpa) in init_vpa() argument
443 vpa->__old_status |= LPPACA_OLD_SHARED_PROC; in init_vpa()
444 vpa->yield_count = cpu_to_be32(1); in init_vpa()
481 unsigned long vcpuid, unsigned long vpa) in do_h_register_vpa() argument
499 if ((vpa & (L1_CACHE_BYTES - 1)) || !vpa) in do_h_register_vpa()
503 va = kvmppc_pin_guest_page(kvm, vpa, &nb); in do_h_register_vpa()
510 kvmppc_unpin_guest_page(kvm, va, vpa, false); in do_h_register_vpa()
516 vpa = 0; in do_h_register_vpa()
535 vpap = &tvcpu->arch.vpa; in do_h_register_vpa()
546 if (!vpa_is_registered(&tvcpu->arch.vpa)) in do_h_register_vpa()
556 if (!vpa_is_registered(&tvcpu->arch.vpa)) in do_h_register_vpa()
570 vpap = &tvcpu->arch.vpa; in do_h_register_vpa()
586 vpap->next_gpa = vpa; in do_h_register_vpa()
648 if (!(vcpu->arch.vpa.update_pending || in kvmppc_update_vpas()
654 if (vcpu->arch.vpa.update_pending) { in kvmppc_update_vpas()
655 kvmppc_update_vpa(vcpu, &vcpu->arch.vpa); in kvmppc_update_vpas()
656 if (vcpu->arch.vpa.pinned_addr) in kvmppc_update_vpas()
657 init_vpa(vcpu, vcpu->arch.vpa.pinned_addr); in kvmppc_update_vpas()
691 struct lppaca *vpa; in kvmppc_create_dtl_entry() local
698 vpa = vcpu->arch.vpa.pinned_addr; in kvmppc_create_dtl_entry()
707 if (!dt || !vpa) in kvmppc_create_dtl_entry()
722 vpa->dtl_idx = cpu_to_be64(++vcpu->arch.dtl_index); in kvmppc_create_dtl_entry()
920 lppaca = (struct lppaca *)vcpu->arch.vpa.pinned_addr; in kvmppc_get_yield_count()
2146 *val = get_reg_val(id, vcpu->arch.vpa.next_gpa); in kvmppc_get_one_reg_hv()
2391 r = set_vpa(vcpu, &vcpu->arch.vpa, addr, sizeof(struct lppaca)); in kvmppc_set_one_reg_hv()
2397 if (addr && !vcpu->arch.vpa.next_gpa) in kvmppc_set_one_reg_hv()
2406 !vcpu->arch.vpa.next_gpa)) in kvmppc_set_one_reg_hv()
2845 static void unpin_vpa(struct kvm *kvm, struct kvmppc_vpa *vpa) in unpin_vpa() argument
2847 if (vpa->pinned_addr) in unpin_vpa()
2848 kvmppc_unpin_guest_page(kvm, vpa->pinned_addr, vpa->gpa, in unpin_vpa()
2849 vpa->dirty); in unpin_vpa()
2857 unpin_vpa(vcpu->kvm, &vcpu->arch.vpa); in kvmppc_core_vcpu_free_hv()
3265 else if (vcpu->arch.vpa.update_pending || in prepare_threads()
3894 if (vcpu->arch.vpa.pinned_addr) { in kvmhv_p9_guest_entry()
3895 struct lppaca *lp = vcpu->arch.vpa.pinned_addr; in kvmhv_p9_guest_entry()
3898 vcpu->arch.vpa.dirty = 1; in kvmhv_p9_guest_entry()
3908 if (vcpu->arch.vpa.pinned_addr) { in kvmhv_p9_guest_entry()
3909 struct lppaca *lp = vcpu->arch.vpa.pinned_addr; in kvmhv_p9_guest_entry()
4040 if (vcpu->arch.vpa.pinned_addr) { in kvmhv_p9_guest_entry()
4041 struct lppaca *lp = vcpu->arch.vpa.pinned_addr; in kvmhv_p9_guest_entry()
4044 vcpu->arch.vpa.dirty = 1; in kvmhv_p9_guest_entry()
4835 kvmppc_harvest_vpa_dirty(&vcpu->arch.vpa, memslot, buf); in kvm_vm_ioctl_get_dirty_log_hv()
5826 static void unpin_vpa_reset(struct kvm *kvm, struct kvmppc_vpa *vpa) in unpin_vpa_reset() argument
5828 unpin_vpa(kvm, vpa); in unpin_vpa_reset()
5829 vpa->gpa = 0; in unpin_vpa_reset()
5830 vpa->pinned_addr = NULL; in unpin_vpa_reset()
5831 vpa->dirty = false; in unpin_vpa_reset()
5832 vpa->update_pending = 0; in unpin_vpa_reset()
5917 unpin_vpa_reset(kvm, &vcpu->arch.vpa); in kvmhv_svm_off()