HVM (or PVH) domain not having PIRQ support won't be allowed to map PIRQs in the first place, but would still be allowed usage of EVTCHNOP_bind_pirq. Such hypercall won't have any practical effect on the domain, as the event channels would never be bound to PIRQs.
Signed-off-by: Roger Pau Monné <[email protected]> --- xen/common/event_channel.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xen/common/event_channel.c b/xen/common/event_channel.c index ffb042a241..bc4985706a 100644 --- a/xen/common/event_channel.c +++ b/xen/common/event_channel.c @@ -556,6 +556,9 @@ static int evtchn_bind_pirq(evtchn_bind_pirq_t *bind) int port = 0, rc; unsigned int pirq = bind->pirq; + if ( is_hvm_domain(d) && !has_pirq(d) ) + return -ENOSYS; + if ( pirq >= d->nr_pirqs ) return -EINVAL; -- 2.34.1
