Lines Matching defs:xc

178 	struct kvmppc_xive_vcpu *xc = vcpu->arch.xive_vcpu;
179 struct xive_q *q = &xc->queues[prio];
184 if (xc->esc_virq[prio])
188 xc->esc_virq[prio] = irq_create_mapping(NULL, q->esc_irq);
189 if (!xc->esc_virq[prio]) {
191 prio, xc->server_num);
197 vcpu->kvm->arch.lpid, xc->server_num);
200 vcpu->kvm->arch.lpid, xc->server_num, prio);
203 prio, xc->server_num);
208 pr_devel("Escalation %s irq %d (prio %d)\n", name, xc->esc_virq[prio], prio);
210 rc = request_irq(xc->esc_virq[prio], xive_esc_irq,
214 prio, xc->server_num);
217 xc->esc_virq_names[prio] = name;
228 struct irq_data *d = irq_get_irq_data(xc->esc_virq[prio]);
239 irq_dispose_mapping(xc->esc_virq[prio]);
240 xc->esc_virq[prio] = 0;
247 struct kvmppc_xive_vcpu *xc = vcpu->arch.xive_vcpu;
248 struct kvmppc_xive *xive = xc->xive;
249 struct xive_q *q = &xc->queues[prio];
260 prio, xc->server_num);
272 rc = xive_native_configure_queue(xc->vp_id, q, prio, qpage,
276 prio, xc->server_num);
316 struct kvmppc_xive_vcpu *xc;
325 xc = vcpu->arch.xive_vcpu;
326 if (WARN_ON(!xc))
329 q = &xc->queues[prio];
335 struct kvmppc_xive_vcpu *xc = vcpu->arch.xive_vcpu;
339 if (WARN_ON(!xc))
341 if (!xc->valid)
344 q = &xc->queues[prio];
826 struct kvmppc_xive_vcpu *xc = vcpu->arch.xive_vcpu;
828 if (!xc)
832 return (u64)xc->cppr << KVM_REG_PPC_ICP_CPPR_SHIFT |
833 (u64)xc->mfrr << KVM_REG_PPC_ICP_MFRR_SHIFT |
839 struct kvmppc_xive_vcpu *xc = vcpu->arch.xive_vcpu;
844 if (!xc || !xive)
854 xc->server_num, cppr, mfrr, xisr);
866 xc->hw_cppr = xc->cppr = cppr;
874 xc->mfrr = mfrr;
876 xive_irq_trigger(&xc->vp_ipi_data);
888 xc->delayed_irq = xisr;
1076 struct kvmppc_xive_vcpu *xc = vcpu->arch.xive_vcpu;
1093 if (state->act_server != xc->server_num)
1134 struct kvmppc_xive_vcpu *xc, int irq)
1152 struct kvmppc_xive_vcpu *xc = vcpu->arch.xive_vcpu;
1159 if (!xc)
1162 pr_devel("cleanup_vcpu(cpu=%d)\n", xc->server_num);
1165 xc->valid = false;
1169 xive_vm_esb_load(&xc->vp_ipi_data, XIVE_ESB_SET_PQ_01);
1173 if (xc->esc_virq[i]) {
1174 if (xc->xive->single_escalation)
1175 xive_cleanup_single_escalation(vcpu, xc,
1176 xc->esc_virq[i]);
1177 free_irq(xc->esc_virq[i], vcpu);
1178 irq_dispose_mapping(xc->esc_virq[i]);
1179 kfree(xc->esc_virq_names[i]);
1184 xive_native_disable_vp(xc->vp_id);
1191 struct xive_q *q = &xc->queues[i];
1193 xive_native_disable_queue(xc->vp_id, q, i);
1202 if (xc->vp_ipi) {
1203 xive_cleanup_irq_data(&xc->vp_ipi_data);
1204 xive_native_free_irq(xc->vp_ipi);
1207 kfree(xc);
1254 struct kvmppc_xive_vcpu *xc;
1276 xc = kzalloc(sizeof(*xc), GFP_KERNEL);
1277 if (!xc) {
1282 vcpu->arch.xive_vcpu = xc;
1283 xc->xive = xive;
1284 xc->vcpu = vcpu;
1285 xc->server_num = cpu;
1286 xc->vp_id = vp_id;
1287 xc->mfrr = 0xff;
1288 xc->valid = true;
1290 r = xive_native_get_vp_info(xc->vp_id, &xc->vp_cam, &xc->vp_chip_id);
1296 vcpu->arch.xive_cam_word = cpu_to_be32(xc->vp_cam | TM_QW1W2_VO);
1299 xc->vp_ipi = xive_native_alloc_irq();
1300 if (!xc->vp_ipi) {
1305 pr_devel(" IPI=0x%x\n", xc->vp_ipi);
1307 r = xive_native_populate_irq_data(xc->vp_ipi, &xc->vp_ipi_data);
1315 r = xive_native_enable_vp(xc->vp_id, xive->single_escalation);
1329 struct xive_q *q = &xc->queues[i];
1344 r = xive_native_configure_queue(xc->vp_id,
1360 r = xive_native_configure_irq(xc->vp_ipi, xc->vp_id, 0, XICS_IPI);
1362 xive_vm_esb_load(&xc->vp_ipi_data, XIVE_ESB_SET_PQ_00);
1484 struct kvmppc_xive_vcpu *xc = vcpu->arch.xive_vcpu;
1485 if (!xc)
1488 if (xc->queues[j].qpage)
1489 xive_pre_save_queue(xive, &xc->queues[j]);
1652 struct kvmppc_xive_vcpu *xc = vcpu->arch.xive_vcpu;
1654 if (!xc)
1657 if (xc->delayed_irq == irq) {
1658 xc->delayed_irq = 0;
2118 struct kvmppc_xive_vcpu *xc = vcpu->arch.xive_vcpu;
2122 struct xive_q *q = &xc->queues[i];
2125 if (!q->qpage && !xc->esc_virq[i])
2138 if (xc->esc_virq[i]) {
2139 struct irq_data *d = irq_get_irq_data(xc->esc_virq[i]);
2147 xc->esc_virq[i], pq, xd->eoi_page);
2177 struct kvmppc_xive_vcpu *xc = vcpu->arch.xive_vcpu;
2179 if (!xc)
2184 xc->server_num, xc->vp_id, xc->cppr, xc->hw_cppr,
2185 xc->mfrr, xc->pending,
2186 xc->stat_rm_h_xirr, xc->stat_vm_h_xirr);
2190 t_rm_h_xirr += xc->stat_rm_h_xirr;
2191 t_rm_h_ipoll += xc->stat_rm_h_ipoll;
2192 t_rm_h_cppr += xc->stat_rm_h_cppr;
2193 t_rm_h_eoi += xc->stat_rm_h_eoi;
2194 t_rm_h_ipi += xc->stat_rm_h_ipi;
2195 t_vm_h_xirr += xc->stat_vm_h_xirr;
2196 t_vm_h_ipoll += xc->stat_vm_h_ipoll;
2197 t_vm_h_cppr += xc->stat_vm_h_cppr;
2198 t_vm_h_eoi += xc->stat_vm_h_eoi;
2199 t_vm_h_ipi += xc->stat_vm_h_ipi;