|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Minios-devel] [PATCH RFC 08/16] Save/Restore Support: Add arch_mm_pre|post_suspend
Bruno Alvisio, on mar. 19 déc. 2017 15:42:03 -0800, wrote:
> For PV guests the pagetables reference the real MFNs rather than PFNs, so when
> the guest is resumed into a different area of a hosts memory, these will need
> to
> be rewritten. Thus for PV guests the MFNs need to be replaced with PFNs:
> canonicalization.
>
> PVH guests are auto-translated so no memory operation is needed.
>
> Signed-off-by: Bruno Alvisio <bruno.alvisio@xxxxxxxxxx>
Reviewed-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>
> ---
> arch/x86/mm.c | 14 ++++++++++++++
> include/x86/arch_mm.h | 3 +++
> 2 files changed, 17 insertions(+)
>
> diff --git a/arch/x86/mm.c b/arch/x86/mm.c
> index 05ad029..1b163ac 100644
> --- a/arch/x86/mm.c
> +++ b/arch/x86/mm.c
> @@ -848,6 +848,20 @@ void arch_init_p2m(unsigned long max_pfn)
>
> arch_remap_p2m(max_pfn);
> }
> +
> +void arch_mm_pre_suspend(void)
> +{
> + //TODO: Canonicalize pagetables
> +}
> +
> +void arch_mm_post_suspend(int canceled)
> +{
> + //TODO: Locate pagetables and 'uncanonicalize' them
> +}
> +#else
> +void arch_mm_pre_suspend(void){ }
> +
> +void arch_mm_post_suspend(int canceled){ }
> #endif
>
> void arch_init_mm(unsigned long* start_pfn_p, unsigned long* max_pfn_p)
> diff --git a/include/x86/arch_mm.h b/include/x86/arch_mm.h
> index ab8a53e..cbbeb21 100644
> --- a/include/x86/arch_mm.h
> +++ b/include/x86/arch_mm.h
> @@ -279,6 +279,9 @@ pgentry_t *need_pgt(unsigned long addr);
> void arch_mm_preinit(void *p);
> unsigned long alloc_virt_kernel(unsigned n_pages);
>
> +void arch_mm_pre_suspend(void);
> +void arch_mm_post_suspend(int canceled);
> +
> #ifndef CONFIG_PARAVIRT
> void arch_print_memmap(void);
> #endif
> --
> 2.3.2 (Apple Git-55)
>
>
> _______________________________________________
> Minios-devel mailing list
> Minios-devel@xxxxxxxxxxxxxxxxxxxx
> https://lists.xenproject.org/mailman/listinfo/minios-devel
--
Samuel
J'ai un gros problème: j'ai cet exercice à rendre demain lundi, mais ma
TI 89 ne sait pas le faire...
Est-ce que quelqu'un pourrait m'aider??
-+- OD In Guide du Neuneu Usenet : Comment ça ! Il faut réfléchir ?-+-
_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |