Hi, On 18/10/2023 15:29, Jan Beulich wrote: > > > On 18.10.2023 12:38, Manuel Bouyer wrote: >> Hello, >> With Xen 4.18, a PV domain running under pvshim doesn't get console input. >> This is because the domain id in pvshim isn't 0 (and on x86 max_init_domid is >> hardwired to 0), so console_input_domain() will never select that domain >> as input. >> >> The attached patch fixes it by translating 0 to the real domain id for >> pvshim, but there may be a better way to do this. > > My primary observation with the patch is that it presumably won't build for > other than x86. There are also indentation and other style issues, no S-o-b, > and no description. But I wonder whether a different approach doesn't want > taking: Wouldn't it help if max_init_domid was 1 in the shim case, with no > need for any other changes? > > Also Cc-ing Michal as the author of the (possibly) offending patch. What if we set max_init_domid in pvshim case to the value returned by get_initial_domain_id() in create_dom0()? The drawback is that we would waste some time in a loop if the value is large.
~Michal
