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

Re: [Xen-devel] [PATCH v9 5/5] xen/tools: VM forking toolstack side


On 24/02/2020 16:19, Tamas K Lengyel wrote:
On Mon, Feb 24, 2020 at 9:13 AM Julien Grall <julien@xxxxxxx> wrote:

Hi Tamas,

On 21/02/2020 18:49, Tamas K Lengyel wrote:
+int libxl_domain_fork_vm(libxl_ctx *ctx, uint32_t pdomid, uint32_t *domid)
+    int rc;
+    struct xen_domctl_createdomain create = {0};
+    create.flags |= XEN_DOMCTL_CDF_hvm;
+    create.flags |= XEN_DOMCTL_CDF_hap;
+    create.flags |= XEN_DOMCTL_CDF_oos_off;
+    create.arch.emulation_flags = (XEN_X86_EMU_ALL & ~XEN_X86_EMU_VPCI);

This is x86 specific but seems to be written in common code. Did you
build it on Arm?

I have not, don't have a setup for ARM at the moment. I guess I'll
just move this function to libxl_x86.c to resolve the issue.

It is fairly easy to setup a build environment for Arm. You can use QEMU user emulation and a Arm rootfs.

+    create.ssidref = SECINITSID_DOMU;
+    create.parent_domid = pdomid;
+    create.max_evtchn_port = 1023;
+    create.max_grant_frames = LIBXL_MAX_GRANT_FRAMES_DEFAULT;
+    create.max_maptrack_frames = LIBXL_MAX_MAPTRACK_FRAMES_DEFAULT;

The domain you fork may have different values here. From my
understanding, the fork requires to have the same parameters as the
parent. So how do you ensure they are the same?

The parent domain is created by xl. If you create a domain with xl it
will have these parameters set by default.

I hope you are aware that you can override most of those parameters in the guest configuration file. It would be good to at least write down the limitations so people doesn't spend ages figuring out why it does not work.


Julien Grall

Xen-devel mailing list



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