xics 323 arch/powerpc/include/asm/kvm_host.h struct kvmppc_xics *xics; xics 33 arch/powerpc/kvm/book3s_hv_rm_xics.c static void icp_rm_deliver_irq(struct kvmppc_xics *xics, struct kvmppc_icp *icp, xics 38 arch/powerpc/kvm/book3s_hv_rm_xics.c static void ics_rm_check_resend(struct kvmppc_xics *xics, xics 46 arch/powerpc/kvm/book3s_hv_rm_xics.c icp_rm_deliver_irq(xics, icp, state->number, true); xics 222 arch/powerpc/kvm/book3s_hv_rm_xics.c static inline int check_too_hard(struct kvmppc_xics *xics, xics 225 arch/powerpc/kvm/book3s_hv_rm_xics.c return (xics->real_mode_dbg || icp->rm_action) ? H_TOO_HARD : H_SUCCESS; xics 228 arch/powerpc/kvm/book3s_hv_rm_xics.c static void icp_rm_check_resend(struct kvmppc_xics *xics, xics 235 arch/powerpc/kvm/book3s_hv_rm_xics.c for_each_set_bit(icsid, icp->resend_map, xics->max_icsid + 1) { xics 236 arch/powerpc/kvm/book3s_hv_rm_xics.c struct kvmppc_ics *ics = xics->ics[icsid]; xics 242 arch/powerpc/kvm/book3s_hv_rm_xics.c ics_rm_check_resend(xics, ics, icp); xics 284 arch/powerpc/kvm/book3s_hv_rm_xics.c static void icp_rm_deliver_irq(struct kvmppc_xics *xics, struct kvmppc_icp *icp, xics 309 arch/powerpc/kvm/book3s_hv_rm_xics.c ics = kvmppc_xics_find_ics(xics, new_irq, &src); xics 312 arch/powerpc/kvm/book3s_hv_rm_xics.c xics->err_noics++; xics 322 arch/powerpc/kvm/book3s_hv_rm_xics.c icp = kvmppc_xics_find_server(xics->kvm, state->server); xics 325 arch/powerpc/kvm/book3s_hv_rm_xics.c xics->err_noicp++; xics 416 arch/powerpc/kvm/book3s_hv_rm_xics.c static void icp_rm_down_cppr(struct kvmppc_xics *xics, struct kvmppc_icp *icp, xics 485 arch/powerpc/kvm/book3s_hv_rm_xics.c icp_rm_check_resend(xics, icp); xics 493 arch/powerpc/kvm/book3s_hv_rm_xics.c struct kvmppc_xics *xics = vcpu->kvm->arch.xics; xics 497 arch/powerpc/kvm/book3s_hv_rm_xics.c if (!xics || !xics->real_mode) xics 525 arch/powerpc/kvm/book3s_hv_rm_xics.c return check_too_hard(xics, icp); xics 532 arch/powerpc/kvm/book3s_hv_rm_xics.c struct kvmppc_xics *xics = vcpu->kvm->arch.xics; xics 538 arch/powerpc/kvm/book3s_hv_rm_xics.c if (!xics || !xics->real_mode) xics 603 arch/powerpc/kvm/book3s_hv_rm_xics.c icp_rm_deliver_irq(xics, icp, reject, false); xics 609 arch/powerpc/kvm/book3s_hv_rm_xics.c icp_rm_check_resend(xics, icp); xics 612 arch/powerpc/kvm/book3s_hv_rm_xics.c return check_too_hard(xics, this_icp); xics 618 arch/powerpc/kvm/book3s_hv_rm_xics.c struct kvmppc_xics *xics = vcpu->kvm->arch.xics; xics 622 arch/powerpc/kvm/book3s_hv_rm_xics.c if (!xics || !xics->real_mode) xics 633 arch/powerpc/kvm/book3s_hv_rm_xics.c icp_rm_down_cppr(xics, icp, cppr); xics 671 arch/powerpc/kvm/book3s_hv_rm_xics.c icp_rm_deliver_irq(xics, icp, reject, false); xics 674 arch/powerpc/kvm/book3s_hv_rm_xics.c return check_too_hard(xics, icp); xics 679 arch/powerpc/kvm/book3s_hv_rm_xics.c struct kvmppc_xics *xics = vcpu->kvm->arch.xics; xics 694 arch/powerpc/kvm/book3s_hv_rm_xics.c ics = kvmppc_xics_find_ics(xics, irq, &src); xics 709 arch/powerpc/kvm/book3s_hv_rm_xics.c icp_rm_deliver_irq(xics, NULL, irq, false); xics 732 arch/powerpc/kvm/book3s_hv_rm_xics.c return check_too_hard(xics, icp); xics 737 arch/powerpc/kvm/book3s_hv_rm_xics.c struct kvmppc_xics *xics = vcpu->kvm->arch.xics; xics 741 arch/powerpc/kvm/book3s_hv_rm_xics.c if (!xics || !xics->real_mode) xics 758 arch/powerpc/kvm/book3s_hv_rm_xics.c icp_rm_down_cppr(xics, icp, xirr >> 24); xics 762 arch/powerpc/kvm/book3s_hv_rm_xics.c return check_too_hard(xics, icp); xics 859 arch/powerpc/kvm/book3s_hv_rm_xics.c struct kvmppc_xics *xics; xics 868 arch/powerpc/kvm/book3s_hv_rm_xics.c xics = vcpu->kvm->arch.xics; xics 873 arch/powerpc/kvm/book3s_hv_rm_xics.c ics = kvmppc_xics_find_ics(xics, irq, &src); xics 887 arch/powerpc/kvm/book3s_hv_rm_xics.c icp_rm_deliver_irq(xics, icp, irq, false); xics 893 arch/powerpc/kvm/book3s_hv_rm_xics.c if (check_too_hard(xics, icp) == H_TOO_HARD) xics 61 arch/powerpc/kvm/book3s_xics.c static void icp_deliver_irq(struct kvmppc_xics *xics, struct kvmppc_icp *icp, xics 69 arch/powerpc/kvm/book3s_xics.c static int ics_deliver_irq(struct kvmppc_xics *xics, u32 irq, u32 level) xics 78 arch/powerpc/kvm/book3s_xics.c ics = kvmppc_xics_find_ics(xics, irq, &src); xics 116 arch/powerpc/kvm/book3s_xics.c icp_deliver_irq(xics, NULL, irq, false); xics 125 arch/powerpc/kvm/book3s_xics.c static void ics_check_resend(struct kvmppc_xics *xics, struct kvmppc_ics *ics, xics 135 arch/powerpc/kvm/book3s_xics.c icp_deliver_irq(xics, icp, state->number, true); xics 140 arch/powerpc/kvm/book3s_xics.c static bool write_xive(struct kvmppc_xics *xics, struct kvmppc_ics *ics, xics 168 arch/powerpc/kvm/book3s_xics.c struct kvmppc_xics *xics = kvm->arch.xics; xics 174 arch/powerpc/kvm/book3s_xics.c if (!xics) xics 177 arch/powerpc/kvm/book3s_xics.c ics = kvmppc_xics_find_ics(xics, irq, &src); xics 190 arch/powerpc/kvm/book3s_xics.c if (write_xive(xics, ics, state, server, priority, priority)) xics 191 arch/powerpc/kvm/book3s_xics.c icp_deliver_irq(xics, icp, irq, false); xics 198 arch/powerpc/kvm/book3s_xics.c struct kvmppc_xics *xics = kvm->arch.xics; xics 204 arch/powerpc/kvm/book3s_xics.c if (!xics) xics 207 arch/powerpc/kvm/book3s_xics.c ics = kvmppc_xics_find_ics(xics, irq, &src); xics 224 arch/powerpc/kvm/book3s_xics.c struct kvmppc_xics *xics = kvm->arch.xics; xics 230 arch/powerpc/kvm/book3s_xics.c if (!xics) xics 233 arch/powerpc/kvm/book3s_xics.c ics = kvmppc_xics_find_ics(xics, irq, &src); xics 242 arch/powerpc/kvm/book3s_xics.c if (write_xive(xics, ics, state, state->server, state->saved_priority, xics 244 arch/powerpc/kvm/book3s_xics.c icp_deliver_irq(xics, icp, irq, false); xics 251 arch/powerpc/kvm/book3s_xics.c struct kvmppc_xics *xics = kvm->arch.xics; xics 256 arch/powerpc/kvm/book3s_xics.c if (!xics) xics 259 arch/powerpc/kvm/book3s_xics.c ics = kvmppc_xics_find_ics(xics, irq, &src); xics 264 arch/powerpc/kvm/book3s_xics.c write_xive(xics, ics, state, state->server, MASKED, state->priority); xics 318 arch/powerpc/kvm/book3s_xics.c static void icp_check_resend(struct kvmppc_xics *xics, xics 325 arch/powerpc/kvm/book3s_xics.c for_each_set_bit(icsid, icp->resend_map, xics->max_icsid + 1) { xics 326 arch/powerpc/kvm/book3s_xics.c struct kvmppc_ics *ics = xics->ics[icsid]; xics 332 arch/powerpc/kvm/book3s_xics.c ics_check_resend(xics, ics, icp); xics 377 arch/powerpc/kvm/book3s_xics.c static void icp_deliver_irq(struct kvmppc_xics *xics, struct kvmppc_icp *icp, xics 403 arch/powerpc/kvm/book3s_xics.c ics = kvmppc_xics_find_ics(xics, new_irq, &src); xics 416 arch/powerpc/kvm/book3s_xics.c icp = kvmppc_xics_find_server(xics->kvm, state->server); xics 513 arch/powerpc/kvm/book3s_xics.c static void icp_down_cppr(struct kvmppc_xics *xics, struct kvmppc_icp *icp, xics 583 arch/powerpc/kvm/book3s_xics.c icp_check_resend(xics, icp); xics 623 arch/powerpc/kvm/book3s_xics.c struct kvmppc_xics *xics = vcpu->kvm->arch.xics; xics 695 arch/powerpc/kvm/book3s_xics.c icp_deliver_irq(xics, icp, reject, false); xics 699 arch/powerpc/kvm/book3s_xics.c icp_check_resend(xics, icp); xics 724 arch/powerpc/kvm/book3s_xics.c struct kvmppc_xics *xics = vcpu->kvm->arch.xics; xics 738 arch/powerpc/kvm/book3s_xics.c icp_down_cppr(xics, icp, cppr); xics 774 arch/powerpc/kvm/book3s_xics.c icp_deliver_irq(xics, icp, reject, false); xics 779 arch/powerpc/kvm/book3s_xics.c struct kvmppc_xics *xics = vcpu->kvm->arch.xics; xics 794 arch/powerpc/kvm/book3s_xics.c ics = kvmppc_xics_find_ics(xics, irq, &src); xics 810 arch/powerpc/kvm/book3s_xics.c icp_deliver_irq(xics, icp, irq, false); xics 819 arch/powerpc/kvm/book3s_xics.c struct kvmppc_xics *xics = vcpu->kvm->arch.xics; xics 839 arch/powerpc/kvm/book3s_xics.c icp_down_cppr(xics, icp, xirr >> 24); xics 850 arch/powerpc/kvm/book3s_xics.c struct kvmppc_xics *xics = vcpu->kvm->arch.xics; xics 862 arch/powerpc/kvm/book3s_xics.c icp_check_resend(xics, icp->rm_resend_icp); xics 877 arch/powerpc/kvm/book3s_xics.c struct kvmppc_xics *xics = vcpu->kvm->arch.xics; xics 882 arch/powerpc/kvm/book3s_xics.c if (!xics || !vcpu->arch.icp) xics 898 arch/powerpc/kvm/book3s_xics.c if (xics->real_mode && is_kvmppc_hv_enabled(vcpu->kvm)) xics 942 arch/powerpc/kvm/book3s_xics.c struct kvmppc_xics *xics = m->private; xics 943 arch/powerpc/kvm/book3s_xics.c struct kvm *kvm = xics->kvm; xics 989 arch/powerpc/kvm/book3s_xics.c struct kvmppc_ics *ics = xics->ics[icsid]; xics 1017 arch/powerpc/kvm/book3s_xics.c static void xics_debugfs_init(struct kvmppc_xics *xics) xics 1021 arch/powerpc/kvm/book3s_xics.c name = kasprintf(GFP_KERNEL, "kvm-xics-%p", xics); xics 1027 arch/powerpc/kvm/book3s_xics.c xics->dentry = debugfs_create_file(name, 0444, powerpc_debugfs_root, xics 1028 arch/powerpc/kvm/book3s_xics.c xics, &xics_debug_fops); xics 1035 arch/powerpc/kvm/book3s_xics.c struct kvmppc_xics *xics, int irq) xics 1045 arch/powerpc/kvm/book3s_xics.c if (xics->ics[icsid]) xics 1061 arch/powerpc/kvm/book3s_xics.c xics->ics[icsid] = ics; xics 1063 arch/powerpc/kvm/book3s_xics.c if (icsid > xics->max_icsid) xics 1064 arch/powerpc/kvm/book3s_xics.c xics->max_icsid = icsid; xics 1068 arch/powerpc/kvm/book3s_xics.c return xics->ics[icsid]; xics 1075 arch/powerpc/kvm/book3s_xics.c if (!vcpu->kvm->arch.xics) xics 1113 arch/powerpc/kvm/book3s_xics.c struct kvmppc_xics *xics = vcpu->kvm->arch.xics; xics 1121 arch/powerpc/kvm/book3s_xics.c if (!icp || !xics) xics 1140 arch/powerpc/kvm/book3s_xics.c ics = kvmppc_xics_find_ics(xics, xisr, &src); xics 1180 arch/powerpc/kvm/book3s_xics.c icp_check_resend(xics, icp); xics 1185 arch/powerpc/kvm/book3s_xics.c static int xics_get_source(struct kvmppc_xics *xics, long irq, u64 addr) xics 1195 arch/powerpc/kvm/book3s_xics.c ics = kvmppc_xics_find_ics(xics, irq, &idx); xics 1235 arch/powerpc/kvm/book3s_xics.c static int xics_set_source(struct kvmppc_xics *xics, long irq, u64 addr) xics 1249 arch/powerpc/kvm/book3s_xics.c ics = kvmppc_xics_find_ics(xics, irq, &idx); xics 1251 arch/powerpc/kvm/book3s_xics.c ics = kvmppc_xics_create_ics(xics->kvm, xics, irq); xics 1262 arch/powerpc/kvm/book3s_xics.c kvmppc_xics_find_server(xics->kvm, server) == NULL) xics 1288 arch/powerpc/kvm/book3s_xics.c icp_deliver_irq(xics, NULL, irqp->number, false); xics 1296 arch/powerpc/kvm/book3s_xics.c struct kvmppc_xics *xics = kvm->arch.xics; xics 1298 arch/powerpc/kvm/book3s_xics.c if (!xics) xics 1300 arch/powerpc/kvm/book3s_xics.c return ics_deliver_irq(xics, irq, level); xics 1305 arch/powerpc/kvm/book3s_xics.c struct kvmppc_xics *xics = dev->private; xics 1309 arch/powerpc/kvm/book3s_xics.c return xics_set_source(xics, attr->attr, attr->addr); xics 1316 arch/powerpc/kvm/book3s_xics.c struct kvmppc_xics *xics = dev->private; xics 1320 arch/powerpc/kvm/book3s_xics.c return xics_get_source(xics, attr->attr, attr->addr); xics 1339 arch/powerpc/kvm/book3s_xics.c struct kvmppc_xics *xics = dev->private; xics 1341 arch/powerpc/kvm/book3s_xics.c struct kvm *kvm = xics->kvm; xics 1343 arch/powerpc/kvm/book3s_xics.c debugfs_remove(xics->dentry); xics 1346 arch/powerpc/kvm/book3s_xics.c kvm->arch.xics = NULL; xics 1348 arch/powerpc/kvm/book3s_xics.c for (i = 0; i <= xics->max_icsid; i++) xics 1349 arch/powerpc/kvm/book3s_xics.c kfree(xics->ics[i]); xics 1350 arch/powerpc/kvm/book3s_xics.c kfree(xics); xics 1356 arch/powerpc/kvm/book3s_xics.c struct kvmppc_xics *xics; xics 1360 arch/powerpc/kvm/book3s_xics.c xics = kzalloc(sizeof(*xics), GFP_KERNEL); xics 1361 arch/powerpc/kvm/book3s_xics.c if (!xics) xics 1364 arch/powerpc/kvm/book3s_xics.c dev->private = xics; xics 1365 arch/powerpc/kvm/book3s_xics.c xics->dev = dev; xics 1366 arch/powerpc/kvm/book3s_xics.c xics->kvm = kvm; xics 1369 arch/powerpc/kvm/book3s_xics.c if (kvm->arch.xics) xics 1372 arch/powerpc/kvm/book3s_xics.c kvm->arch.xics = xics; xics 1375 arch/powerpc/kvm/book3s_xics.c kfree(xics); xics 1383 arch/powerpc/kvm/book3s_xics.c xics->real_mode = ENABLE_REALMODE; xics 1384 arch/powerpc/kvm/book3s_xics.c xics->real_mode_dbg = DEBUG_REALMODE; xics 1393 arch/powerpc/kvm/book3s_xics.c struct kvmppc_xics *xics = (struct kvmppc_xics *)dev->private; xics 1395 arch/powerpc/kvm/book3s_xics.c xics_debugfs_init(xics); xics 1411 arch/powerpc/kvm/book3s_xics.c struct kvmppc_xics *xics = dev->private; xics 1416 arch/powerpc/kvm/book3s_xics.c if (xics->kvm != vcpu->kvm) xics 1440 arch/powerpc/kvm/book3s_xics.c struct kvmppc_xics *xics = kvm->arch.xics; xics 1444 arch/powerpc/kvm/book3s_xics.c ics = kvmppc_xics_find_ics(xics, irq, &idx); xics 1456 arch/powerpc/kvm/book3s_xics.c struct kvmppc_xics *xics = kvm->arch.xics; xics 1460 arch/powerpc/kvm/book3s_xics.c ics = kvmppc_xics_find_ics(xics, irq, &idx); xics 128 arch/powerpc/kvm/book3s_xics.h static inline struct kvmppc_ics *kvmppc_xics_find_ics(struct kvmppc_xics *xics, xics 139 arch/powerpc/kvm/book3s_xics.h ics = xics->ics[icsid]; xics 15 arch/powerpc/kvm/irq.h ret = ret || (kvm->arch.xics != NULL); xics 1993 arch/powerpc/kvm/powerpc.c if (kvm->arch.xics || kvm->arch.xive)