Lines Matching refs:p

35                               const ioreq_t *p)  in hvm_mmio_accept()  argument
37 paddr_t first = hvm_mmio_first_byte(p), last; in hvm_mmio_accept()
45 last = hvm_mmio_last_byte(p); in hvm_mmio_accept()
76 const ioreq_t *p) in hvm_portio_accept() argument
83 return (p->addr >= start) && ((p->addr + p->size) <= end); in hvm_portio_accept()
117 ioreq_t *p) in hvm_process_io_intercept() argument
120 int rc = X86EMUL_OKAY, i, step = p->df ? -p->size : p->size; in hvm_process_io_intercept()
124 if ( p->dir == IOREQ_READ ) in hvm_process_io_intercept()
126 for ( i = 0; i < p->count; i++ ) in hvm_process_io_intercept()
128 addr = (p->type == IOREQ_TYPE_COPY) ? in hvm_process_io_intercept()
129 p->addr + step * i : in hvm_process_io_intercept()
130 p->addr; in hvm_process_io_intercept()
132 rc = ops->read(handler, addr, p->size, &data); in hvm_process_io_intercept()
136 if ( p->data_is_ptr ) in hvm_process_io_intercept()
138 switch ( hvm_copy_to_guest_phys(p->data + step * i, in hvm_process_io_intercept()
139 &data, p->size, current) ) in hvm_process_io_intercept()
158 p->data = data; in hvm_process_io_intercept()
163 for ( i = 0; i < p->count; i++ ) in hvm_process_io_intercept()
165 if ( p->data_is_ptr ) in hvm_process_io_intercept()
171 switch ( hvm_copy_from_guest_phys(&data, p->data + step * i, in hvm_process_io_intercept()
172 p->size) ) in hvm_process_io_intercept()
193 data = p->data; in hvm_process_io_intercept()
195 addr = (p->type == IOREQ_TYPE_COPY) ? in hvm_process_io_intercept()
196 p->addr + step * i : in hvm_process_io_intercept()
197 p->addr; in hvm_process_io_intercept()
198 rc = ops->write(handler, addr, p->size, data); in hvm_process_io_intercept()
206 p->count = i; in hvm_process_io_intercept()
216 p->count = 1; in hvm_process_io_intercept()
222 static const struct hvm_io_handler *hvm_find_io_handler(const ioreq_t *p) in hvm_find_io_handler() argument
227 BUG_ON((p->type != IOREQ_TYPE_PIO) && in hvm_find_io_handler()
228 (p->type != IOREQ_TYPE_COPY)); in hvm_find_io_handler()
236 if ( handler->type != p->type ) in hvm_find_io_handler()
239 if ( ops->accept(handler, p) ) in hvm_find_io_handler()
246 int hvm_io_intercept(ioreq_t *p) in hvm_io_intercept() argument
252 handler = hvm_find_io_handler(p); in hvm_io_intercept()
257 rc = hvm_process_io_intercept(handler, p); in hvm_io_intercept()
337 ioreq_t p = { in hvm_mmio_internal() local
344 handler = hvm_find_io_handler(&p); in hvm_mmio_internal()