Lines Matching refs:kvm_eq

566 	struct kvm_ppc_xive_eq kvm_eq;  in kvmppc_xive_native_set_queue_config()  local
583 if (copy_from_user(&kvm_eq, ubufp, sizeof(kvm_eq))) in kvmppc_xive_native_set_queue_config()
601 __func__, server, priority, kvm_eq.flags, in kvmppc_xive_native_set_queue_config()
602 kvm_eq.qshift, kvm_eq.qaddr, kvm_eq.qtoggle, kvm_eq.qindex); in kvmppc_xive_native_set_queue_config()
605 if (!kvm_eq.qshift) { in kvmppc_xive_native_set_queue_config()
627 if (kvm_eq.flags != KVM_XIVE_EQ_ALWAYS_NOTIFY) { in kvmppc_xive_native_set_queue_config()
628 pr_err("invalid flags %d\n", kvm_eq.flags); in kvmppc_xive_native_set_queue_config()
632 rc = xive_native_validate_queue_size(kvm_eq.qshift); in kvmppc_xive_native_set_queue_config()
634 pr_err("invalid queue size %d\n", kvm_eq.qshift); in kvmppc_xive_native_set_queue_config()
638 if (kvm_eq.qaddr & ((1ull << kvm_eq.qshift) - 1)) { in kvmppc_xive_native_set_queue_config()
639 pr_err("queue page is not aligned %llx/%llx\n", kvm_eq.qaddr, in kvmppc_xive_native_set_queue_config()
640 1ull << kvm_eq.qshift); in kvmppc_xive_native_set_queue_config()
645 gfn = gpa_to_gfn(kvm_eq.qaddr); in kvmppc_xive_native_set_queue_config()
648 if (1ull << kvm_eq.qshift > page_size) { in kvmppc_xive_native_set_queue_config()
657 pr_err("Couldn't get queue page %llx!\n", kvm_eq.qaddr); in kvmppc_xive_native_set_queue_config()
661 qaddr = page_to_virt(page) + (kvm_eq.qaddr & ~PAGE_MASK); in kvmppc_xive_native_set_queue_config()
668 q->guest_qaddr = kvm_eq.qaddr; in kvmppc_xive_native_set_queue_config()
669 q->guest_qshift = kvm_eq.qshift; in kvmppc_xive_native_set_queue_config()
677 (__be32 *) qaddr, kvm_eq.qshift, true); in kvmppc_xive_native_set_queue_config()
689 if (kvm_eq.qtoggle != 1 || kvm_eq.qindex != 0) { in kvmppc_xive_native_set_queue_config()
691 kvm_eq.qtoggle, in kvmppc_xive_native_set_queue_config()
692 kvm_eq.qindex); in kvmppc_xive_native_set_queue_config()
715 struct kvm_ppc_xive_eq kvm_eq; in kvmppc_xive_native_get_queue_config() local
745 memset(&kvm_eq, 0, sizeof(kvm_eq)); in kvmppc_xive_native_get_queue_config()
755 kvm_eq.flags = 0; in kvmppc_xive_native_get_queue_config()
757 kvm_eq.flags |= KVM_XIVE_EQ_ALWAYS_NOTIFY; in kvmppc_xive_native_get_queue_config()
759 kvm_eq.qshift = q->guest_qshift; in kvmppc_xive_native_get_queue_config()
760 kvm_eq.qaddr = q->guest_qaddr; in kvmppc_xive_native_get_queue_config()
762 rc = xive_native_get_queue_state(xc->vp_id, priority, &kvm_eq.qtoggle, in kvmppc_xive_native_get_queue_config()
763 &kvm_eq.qindex); in kvmppc_xive_native_get_queue_config()
768 __func__, server, priority, kvm_eq.flags, in kvmppc_xive_native_get_queue_config()
769 kvm_eq.qshift, kvm_eq.qaddr, kvm_eq.qtoggle, kvm_eq.qindex); in kvmppc_xive_native_get_queue_config()
771 if (copy_to_user(ubufp, &kvm_eq, sizeof(kvm_eq))) in kvmppc_xive_native_get_queue_config()