const char *cmdline;
struct bootmodule *xen_bootmodule;
struct domain *dom0;
- struct xen_domctl_createdomain dom0_cfg = {};
+ struct xen_domctl_createdomain dom0_cfg = {
+ .max_evtchn_port = -1,
+ };
dcache_line_bytes = read_dcache_line_bytes();
};
struct xen_domctl_createdomain dom0_cfg = {
.flags = XEN_DOMCTL_CDF_s3_integrity,
+ .max_evtchn_port = -1,
};
/* Critical region without IDT or TSS. Any fault is deadly! */
radix_tree_init(&d->pirq_tree);
- if ( (err = evtchn_init(d)) != 0 )
+ if ( (err = evtchn_init(d, config->max_evtchn_port)) != 0 )
goto fail;
init_status |= INIT_evtchn;
break;
}
- d->max_evtchn_port = min_t(unsigned int,
- op->u.createdomain.max_evtchn_port, INT_MAX);
-
ret = 0;
op->domain = d->domain_id;
copyback = 1;
}
}
-int evtchn_init(struct domain *d)
+int evtchn_init(struct domain *d, unsigned int max_port)
{
evtchn_2l_init(d);
- d->max_evtchn_port = INT_MAX;
+ d->max_evtchn_port = min_t(unsigned int, max_port, INT_MAX);
d->evtchn = alloc_evtchn_bucket(d, 0);
if ( !d->evtchn )
#endif
} __attribute__((aligned(64)));
-int evtchn_init(struct domain *d); /* from domain_create */
+int evtchn_init(struct domain *d, unsigned int max_port);
void evtchn_destroy(struct domain *d); /* from domain_kill */
void evtchn_destroy_final(struct domain *d); /* from complete_domain_destroy */