Hi Everyone,
I've been looking at ioreq latency and pausing of vCPUs. Specifically
for MMIO (IOREQ_TYPE_COPY) writes, they still need completions:
static inline bool ioreq_needs_completion(const ioreq_t *ioreq)
{
return ioreq->state == STATE_IOREQ_READY &&
!ioreq->data_is_ptr &&
(ioreq->type != IOREQ_TYPE_PIO || ioreq->dir != IOREQ_WRITE);
}
state == STATE_IOREQ_READY
data_is_ptr == 0
type == IOREQ_TYPE_COPY
dir == IOREQ_WRITE
To a completion is needed. The vCPU remains paused with
_VPF_blocked_in_xen set in paused_flags until the ioreq server notifies
of the completion.
At least for the case I'm looking, a single write to a mmio register, it
doesn't seem like the vCPU needs to be blocked. The write has been sent
and subsequent emulation should not depend on it.
I feel like I am missing something, but I can't think of a specific
example where a write needs to be blocking. Maybe it simplifies the
implementation, so a subsequent instruction will always have a ioreq
slot available?
Any insights are appreciated.
Thanks,
Jason