[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v9 2/5] xen: add parent_domid field to createdomain domctl

On Mon, Feb 24, 2020 at 8:45 AM Andrew Cooper <andrew.cooper3@xxxxxxxxxx> wrote:
> On 21/02/2020 18:49, Tamas K Lengyel wrote:
> > When creating a domain that will be used as a VM fork some information is
> > required to set things up properly, like the max_vcpus count. Instead of the
> > toolstack having to gather this information for each fork in a separate
> > hypercall we can just include the parent domain's id in the createdomain 
> > domctl
> > so that Xen can copy the setting without the extra toolstack queries.
> Right, but when I said this wasn't safe, I did mean it...
> What happens when parent and the current domain have different gnttab or
> evtchn limits, or different emulation settings?
> If you want to fork a domain safely, you either need to have no
> parameters passed by the toolstack (and let Xen copy appropriate
> values), or cross check every provided parameter and bail early on a
> mismatch.

If you are using the toolstack code we add in patch 5 that doesn't
happen. So, for the situation you describe to happen: 1) you have to
custom compile Xen with the EXPERT setting enable this experimental
feature 2) write your own toolstack code 3) screw up doing so. This is
such an unlikely scenario that I'm not really bothered by it.


Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.