I will look at the pdf while I am away. I will not be able to test the
diff til I get back next week.




On Tue, 2 Nov 2021 at 14:46, Mark Kettenis <mark.kette...@xs4all.nl> wrote:

> > From: Andrew Grillet <and...@grillet.co.uk>
> > Date: Tue, 2 Nov 2021 14:14:13 +0000
> >
> > These were attached to the email I sent last week - that is, the entire
> > contents of the directories in
> > which I defined the ldom.conf file and the results of compiling it. I
> have
> > attached the file again.
> >
> > In each case, this was on a fresh install of the OS, and with a fresh
> copy
> > of the factory-default config.
> >
> >  >> > After this, my device tree is empty.
> >   >>
> >   >> I'm not sure what you mean by that.
> >   >> You mean you end up in OBP but there are no devices you can boot
> from?
> >   >>
> > Yes, this.
> > The PCI address appears to be wrong - it is @780, when it should be @7c0.
> >
> > If you have a tool to examine the binaries in the directory, I would
> like a
> > copy, and any documentation
> > of what the contents means.
>
> There is sysutils/mdprint in ports.
>
> There is
>
>   https://sun4v.github.io/downloads/hypervisor-api-3.0draft7.pdf
>
> in particular chaper 8.  But the documentation is somewhat incomplete.
>
>
> Quickly scanning your files, I found one difference related to PCIe.
> Might be worth trying the attached diff.
>
> Index: usr.sbin/ldomctl/config.c
> ===================================================================
> RCS file: /cvs/src/usr.sbin/ldomctl/config.c,v
> retrieving revision 1.42
> diff -u -p -r1.42 config.c
> --- usr.sbin/ldomctl/config.c   31 Jan 2021 05:14:24 -0000      1.42
> +++ usr.sbin/ldomctl/config.c   2 Nov 2021 14:41:58 -0000
> @@ -704,7 +704,8 @@ hvmd_init_device(struct md *md, struct m
>         device = xzalloc(sizeof(*device));
>         md_get_prop_val(md, node, "gid", &device->gid);
>         md_get_prop_val(md, node, "cfghandle", &device->cfghandle);
> -       md_get_prop_val(md, node, "rcid", &device->rcid);
> +       if (!md_get_prop_val(md, node, "rcid", &device->rcid))
> +               device->rcid = -1;
>         device->resource_id = resource_id;
>         if (strcmp(node->name->str, "pcie_bus") == 0)
>                 pcie_busses[resource_id] = device;
> @@ -1072,7 +1073,8 @@ hvmd_finalize_device(struct md *md, stru
>         md_add_prop_val(md, node, "resource_id", device->resource_id);
>         md_add_prop_val(md, node, "cfghandle", device->cfghandle);
>         md_add_prop_val(md, node, "gid", device->gid);
> -       md_add_prop_val(md, node, "rcid", device->rcid);
> +       if (device->rcid != -1)
> +               md_add_prop_val(md, node, "rcid", device->rcid);
>         device->hv_node = node;
>  }
>
>

Reply via email to