From: Bruno Alvisio Date: Mon, 11 Dec 2017 16:12:47 +0000 (-0800) Subject: Save/Restore Support: Add suspend/restore support for Grant Tables. X-Git-Tag: xen-RELEASE-4.14.0~13 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=8e9d16af97d4a284f378eff73d98e85eef6dcfb1;p=mini-os.git Save/Restore Support: Add suspend/restore support for Grant Tables. Signed-off-by: Bruno Alvisio Reviewed-by: Juergen Gross --- diff --git a/arch/x86/mm.c b/arch/x86/mm.c index 003f9e1..ea58444 100644 --- a/arch/x86/mm.c +++ b/arch/x86/mm.c @@ -917,6 +917,40 @@ grant_entry_v1_t *arch_init_gnttab(int nr_grant_frames) return map_frames(frames, nr_grant_frames); } +void arch_suspend_gnttab(grant_entry_v1_t *gnttab_table, int nr_grant_frames) +{ +#ifdef CONFIG_PARAVIRT + int i; + + for (i = 0; i < nr_grant_frames; i++) { + HYPERVISOR_update_va_mapping((unsigned long)(((char *)gnttab_table) + PAGE_SIZE * i), + (pte_t){0x0<