File xen.trc-is_ioreq_server_page.patch of Package xen
From: Olaf Hering <olaf@aepfle.de>
Date: Thu, 15 Jun 2023 08:41:35 +0000
Subject: trc is_ioreq_server_page
Signed-off-by: Olaf Hering <olaf@aepfle.de>
---
xen/common/ioreq.c | 6 ++++++
1 file changed, 6 insertions(+)
--- a/xen/common/ioreq.c
+++ b/xen/common/ioreq.c
@@ -411,38 +411,44 @@ static void ioreq_server_free_mfn(struct ioreq_server *s, bool buf)
unmap_domain_page_global(iorp->va);
iorp->va = NULL;
put_page_alloc_ref(page);
put_page_and_type(page);
}
bool is_ioreq_server_page(struct domain *d, const struct page_info *page)
{
const struct ioreq_server *s;
unsigned int id;
bool found = false;
+ trc_is_ioreq_server_page_t trc = {
+ .d = d->domain_id,
+ .mfn = page ? mfn_x(page_to_mfn(page)) : 0,
+ };
rspin_lock(&d->ioreq_server.lock);
FOR_EACH_IOREQ_SERVER(d, id, s)
{
if ( (s->ioreq.page == page) || (s->bufioreq.page == page) )
{
found = true;
break;
}
}
rspin_unlock(&d->ioreq_server.lock);
+ trc.found = found;
+ TRACE_trc(TRC_IOREQ_is_ioreq_server_page);
return found;
}
static void ioreq_server_update_evtchn(struct ioreq_server *s,
struct ioreq_vcpu *sv)
{
ASSERT(spin_is_locked(&s->lock));
if ( s->ioreq.va != NULL )
{
ioreq_t *p = get_ioreq(s, sv->vcpu);