[Devel] Re: [PATCH 1/1] c/r: define s390-specific checkpoint-restart code (v3)
Christian Borntraeger
borntraeger at de.ibm.com
Wed Feb 4 01:19:53 PST 2009
Am Tuesday 03 February 2009 17:12:23 schrieb Serge E. Hallyn:
[...]
> +/* Nothing to do for mm context state */
> +int cr_write_mm_context(struct cr_ctx *ctx, struct mm_struct *mm, int
> parent) +{
> + struct cr_hdr h;
> + struct cr_hdr_mm_context *hh = cr_hbuf_get(ctx, sizeof(*hh));
> + int ret;
> +
> + h.type = CR_HDR_MM_CONTEXT;
> + h.len = sizeof(*hh);
> + h.parent = parent;
> +
> +#if 0
> + /* Oren's v13 is on an older kernel which has no vdso_base */
> + /* on newer kernel, we'll have to enable this */
> + hh->vdso_base = mm->context.vdso_base;
> + printk(KERN_NOTICE "checkpointing vdso_base %lx\n", hh->vdso_base);
> +#else
> + hh->vdso_base = 0;
> +#endif
> +
> + ret = cr_write_obj(ctx, &h, hh);
> + cr_hbuf_put(ctx, sizeof(*hh));
> +
> + return ret;
> +}
Hmm, maybe you should also save/restore other elements of mm_context_t.
At least noexec, has_pgste and alloc_pgste have an impact on the page table
layout and special features like no execute or the ability to run kvm guests.
[...]
> +int cr_read_mm_context(struct cr_ctx *ctx, struct mm_struct *mm, int
> rparent) +{
> + struct cr_hdr_mm_context *hh = cr_hbuf_get(ctx, sizeof(*hh));
> + int parent, ret = -EINVAL;
> +
> + s390_enable_sie();
Hmm, why do you call s390_enable_sie()? It will fail on multi-threaded apps
and will create enhanced page tables for running kvm guest otherwise. It is
not needed for non-kvm processes. See the has_pgste/alloc_pgste topic above.
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
More information about the Devel
mailing list