Lines Matching refs:p
210 XenEvtchnPort *p = &s->port_table[i]; in xen_evtchn_post_load() local
212 if (p->type == EVTCHNSTAT_pirq) { in xen_evtchn_post_load()
213 assert(p->u.pirq); in xen_evtchn_post_load()
214 assert(p->u.pirq < s->nr_pirqs); in xen_evtchn_post_load()
221 s->pirq[p->u.pirq].gsi = IRQ_UNBOUND; in xen_evtchn_post_load()
222 s->pirq[p->u.pirq].port = i; in xen_evtchn_post_load()
603 XenEvtchnPort *p; in unbind_backend_ports() local
607 p = &s->port_table[i]; in unbind_backend_ports()
608 if (p->type == EVTCHNSTAT_interdomain && p->u.interdomain.to_qemu) { in unbind_backend_ports()
609 evtchn_port_t be_port = p->u.interdomain.port; in unbind_backend_ports()
613 p->type = EVTCHNSTAT_unbound; in unbind_backend_ports()
614 p->u.interdomain.port = 0; in unbind_backend_ports()
629 XenEvtchnPort *p; in xen_evtchn_status_op() local
645 p = &s->port_table[status->port]; in xen_evtchn_status_op()
647 status->status = p->type; in xen_evtchn_status_op()
648 status->vcpu = p->vcpu; in xen_evtchn_status_op()
650 switch (p->type) { in xen_evtchn_status_op()
652 status->u.unbound.dom = p->u.interdomain.to_qemu ? DOMID_QEMU in xen_evtchn_status_op()
657 status->u.interdomain.dom = p->u.interdomain.to_qemu ? DOMID_QEMU in xen_evtchn_status_op()
659 status->u.interdomain.port = p->u.interdomain.port; in xen_evtchn_status_op()
663 status->u.pirq = p->u.pirq; in xen_evtchn_status_op()
667 status->u.virq = p->u.virq; in xen_evtchn_status_op()
916 XenEvtchnPort *p = &s->port_table[port]; in set_port_pending() local
917 CPUState *cpu = qemu_get_cpu(p->vcpu); in set_port_pending()
950 void *p = xen_overlay_get_shinfo_ptr(); in clear_port_pending() local
952 if (!p) { in clear_port_pending()
957 struct shared_info *shinfo = p; in clear_port_pending()
967 struct compat_shared_info *shinfo = p; in clear_port_pending()
1000 evtchn_port_t p = 1; in allocate_port() local
1002 for (p = 1; valid_port(p); p++) { in allocate_port()
1003 if (s->port_table[p].type == EVTCHNSTAT_closed) { in allocate_port()
1004 s->port_table[p].vcpu = vcpu; in allocate_port()
1005 s->port_table[p].type = type; in allocate_port()
1006 s->port_table[p].u.val = val; in allocate_port()
1008 *port = p; in allocate_port()
1010 if (s->nr_ports < p + 1) { in allocate_port()
1011 s->nr_ports = p + 1; in allocate_port()
1037 XenEvtchnPort *p = &s->port_table[port]; in close_port() local
1042 switch (p->type) { in close_port()
1047 s->pirq[p->u.pirq].port = 0; in close_port()
1048 if (s->pirq[p->u.pirq].is_translated) { in close_port()
1054 kvm_xen_set_vcpu_virq(virq_is_global(p->u.virq) ? 0 : p->vcpu, in close_port()
1055 p->u.virq, 0); in close_port()
1065 if (p->u.interdomain.to_qemu) { in close_port()
1066 uint16_t be_port = p->u.interdomain.port; in close_port()
1076 XenEvtchnPort *rp = &s->port_table[p->u.interdomain.port]; in close_port()
1077 if (!valid_port(p->u.interdomain.port) || in close_port()
1187 XenEvtchnPort *p; in xen_evtchn_bind_vcpu_op() local
1204 p = &s->port_table[vcpu->port]; in xen_evtchn_bind_vcpu_op()
1206 if (p->type == EVTCHNSTAT_interdomain || in xen_evtchn_bind_vcpu_op()
1207 p->type == EVTCHNSTAT_unbound || in xen_evtchn_bind_vcpu_op()
1208 p->type == EVTCHNSTAT_pirq || in xen_evtchn_bind_vcpu_op()
1209 (p->type == EVTCHNSTAT_virq && virq_is_global(p->u.virq))) { in xen_evtchn_bind_vcpu_op()
1214 p->vcpu = vcpu->vcpu; in xen_evtchn_bind_vcpu_op()
1459 XenEvtchnPort *p = &s->port_table[alloc->port]; in xen_evtchn_alloc_unbound_op() local
1460 p->u.interdomain.to_qemu = 1; in xen_evtchn_alloc_unbound_op()
1471 XenEvtchnPort *p; in xen_evtchn_send_op() local
1484 p = &s->port_table[send->port]; in xen_evtchn_send_op()
1486 switch (p->type) { in xen_evtchn_send_op()
1488 if (p->u.interdomain.to_qemu) { in xen_evtchn_send_op()
1493 uint16_t be_port = p->u.interdomain.port; in xen_evtchn_send_op()
1503 set_port_pending(s, p->u.interdomain.port); in xen_evtchn_send_op()
1528 XenEvtchnPort *p; in xen_evtchn_set_port() local
1541 p = &s->port_table[port]; in xen_evtchn_set_port()
1544 if (p->type == EVTCHNSTAT_virq || in xen_evtchn_set_port()
1545 (p->type == EVTCHNSTAT_interdomain && p->u.interdomain.to_qemu)) { in xen_evtchn_set_port()
2257 XenEvtchnPort *p = &s->port_table[i]; in qmp_xen_event_list() local
2260 if (p->type == EVTCHNSTAT_closed) { in qmp_xen_event_list()
2274 info->type = p->type; in qmp_xen_event_list()
2275 if (p->type == EVTCHNSTAT_interdomain) { in qmp_xen_event_list()
2276 info->remote_domain = g_strdup(p->u.interdomain.to_qemu ? in qmp_xen_event_list()
2278 info->target = p->u.interdomain.port; in qmp_xen_event_list()
2280 info->target = p->u.val; /* pirq# or virq# */ in qmp_xen_event_list()
2282 info->vcpu = p->vcpu; in qmp_xen_event_list()