File xen.trc-vcpu_ioreq_pending.patch of Package xen
From: Olaf Hering <olaf@aepfle.de>
Date: Thu, 15 Jun 2023 08:40:36 +0000
Subject: trc vcpu_ioreq_pending
Signed-off-by: Olaf Hering <olaf@aepfle.de>
---
xen/common/ioreq.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
--- a/xen/common/ioreq.c
+++ b/xen/common/ioreq.c
@@ -182,25 +182,32 @@ static struct ioreq_vcpu *get_pending_vcpu(const struct vcpu *v,
TRACE_trc(TRC_IOREQ_get_pending_vcpu);
return sv;
}
}
}
TRACE_trc(TRC_IOREQ_get_pending_vcpu);
return NULL;
}
bool vcpu_ioreq_pending(struct vcpu *v)
{
- return get_pending_vcpu(v, NULL);
+ bool b = !!get_pending_vcpu(v, NULL);
+ trc_vcpu_ioreq_pending_t trc = {
+ .d = v->domain->domain_id,
+ .v = v->vcpu_id,
+ .b = b,
+ };
+ TRACE_trc(TRC_IOREQ_vcpu_ioreq_pending);
+ return b;
}
static bool wait_for_io(struct ioreq_vcpu *sv, ioreq_t *p)
{
unsigned int prev_state = STATE_IOREQ_NONE;
unsigned int state = p->state;
uint64_t data = ~0;
smp_rmb();
/*
* The only reason we should see this condition be false is when an