This function is necessary as part of the pre-suspend operation.
Signed-off-by: Bruno Alvisio <bruno.alvisio@gmail.com>
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
return (shared_info_t *)shared_info;
}
+void unmap_shared_info(void)
+{
+ int rc;
+ pte_t nullpte = { };
+
+ if ( (rc = HYPERVISOR_update_va_mapping((unsigned long)shared_info,
+ nullpte, UVMF_INVLPG)) )
+ {
+ printk("Failed to unmap shared_info page!! rc=%d\n", rc);
+ do_exit();
+ }
+}
+
static void get_cmdline(void *p)
{
start_info_t *si = p;
return &shared_info;
}
+
+void unmap_shared_info(void)
+{
+ struct xen_remove_from_physmap xrtp;
+
+ xrtp.domid = DOMID_SELF;
+ xrtp.gpfn = virt_to_pfn(&shared_info);
+ if ( HYPERVISOR_memory_op(XENMEM_remove_from_physmap, &xrtp) != 0 )
+ BUG();
+
+ return;
+}
#endif
void do_hypervisor_callback(struct pt_regs *regs)
int hvm_set_parameter(int idx, uint64_t value);
#endif
shared_info_t *map_shared_info(void *p);
+void unmap_shared_info(void);
void force_evtchn_callback(void);
void do_hypervisor_callback(struct pt_regs *regs);
void mask_evtchn(uint32_t port);