On 2025-03-07 03:31, Julien Grall wrote:
Hi,

On 06/03/2025 22:03, Jason Andryuk wrote:
Assign domid 0 to the hwdom.  Normally, dom0less does not use domid 0.

A few years ago, we went to great length to avoid making the assumption that the hardware domain is domid 0. See all the calls to "is_hardware_domain()". So I am reluctant to force the domain ID to 0.

I was disappointed when it didn't "just work".


This fixes using the Xen console which assumes domid 0 to use the
hypercall interface.

I had a brief look at drivers/char/console.c and I can't find any place assuming "domid 0". Do you have any pointer?

As Jan pointed out, Denis Mukhin's patch removed the domid 0 assumption. This was developed without this patch when it mattered.

I tested before posting without this patch (and with Denis's), and again now, and I didn't get a hwdom login. Turns out xenstored was assuming domid 0. Changing that with --master-domid gets to the login prompt.

Still, there are now other userspace errors. xen-init-dom0 hardcodes domid 0 which doesn't exist. init-dom0less only initializes non-introduced domains, so hwdom doesn't get its "domid" xenstore node populated. That leads to other errors.

So I think with Denis's patch, this isn't strictly needed. It does help existing toolstack code work today.

Regards,
Jason

Reply via email to