<driver iothread='4'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x0b' function='0x0'/>
</controller>
- <controller type='xenbus' maxGrantFrames='64'/>
+ <controller type='xenbus' maxGrantFrames='64' maxEventChannels='2047'/>
...
</devices>
...</pre>
<dd><span class="since">Since 5.2.0</span>, the <code>xenbus</code>
controller has an optional attribute <code>maxGrantFrames</code>,
which specifies the maximum number of grant frames the controller
- makes available for connected devices.</dd>
+ makes available for connected devices.
+ <span class="since">Since 6.3.0</span>, the xenbus controller
+ supports the optional <code>maxEventChannels</code> attribute,
+ which specifies maximum number of event channels (PV interrupts)
+ that can be used by the guest.</dd>
</dl>
<p>
break;
case VIR_DOMAIN_CONTROLLER_TYPE_XENBUS:
def->opts.xenbusopts.maxGrantFrames = -1;
+ def->opts.xenbusopts.maxEventChannels = -1;
break;
case VIR_DOMAIN_CONTROLLER_TYPE_IDE:
case VIR_DOMAIN_CONTROLLER_TYPE_FDC:
break;
case VIR_DOMAIN_CONTROLLER_TYPE_XENBUS: {
g_autofree char *gntframes = virXMLPropString(node, "maxGrantFrames");
+ g_autofree char *eventchannels = virXMLPropString(node, "maxEventChannels");
if (gntframes) {
int r = virStrToLong_i(gntframes, NULL, 10,
goto error;
}
}
+ if (eventchannels) {
+ int r = virStrToLong_i(eventchannels, NULL, 10,
+ &def->opts.xenbusopts.maxEventChannels);
+ if (r != 0 || def->opts.xenbusopts.maxEventChannels < 0) {
+ virReportError(VIR_ERR_INTERNAL_ERROR,
+ _("Invalid maxEventChannels: %s"), eventchannels);
+ goto error;
+ }
+ }
break;
}
virBufferAsprintf(&attrBuf, " maxGrantFrames='%d'",
def->opts.xenbusopts.maxGrantFrames);
}
+ if (def->opts.xenbusopts.maxEventChannels != -1) {
+ virBufferAsprintf(&attrBuf, " maxEventChannels='%d'",
+ def->opts.xenbusopts.maxEventChannels);
+ }
break;
default: