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

[Xen-changelog] [mini-os master] Save/Restore Support: Add support for suspend/restore events.



commit 3072d6d987404d15fe0d776c91ea81b4e6fd8ae4
Author:     Bruno Alvisio <bruno.alvisio@xxxxxxxxx>
AuthorDate: Mon Dec 11 08:11:09 2017 -0800
Commit:     Wei Liu <wei.liu2@xxxxxxxxxx>
CommitDate: Wed Mar 21 09:16:49 2018 +0000

    Save/Restore Support: Add support for suspend/restore events.
    
    Signed-off-by: Bruno Alvisio <bruno.alvisio@xxxxxxxxx>
    Reviewed-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>
---
 events.c         | 5 +++++
 include/events.h | 1 +
 kernel.c         | 2 ++
 3 files changed, 8 insertions(+)

diff --git a/events.c b/events.c
index e8ef8aa..342aead 100644
--- a/events.c
+++ b/events.c
@@ -183,6 +183,11 @@ void fini_events(void)
     arch_fini_events();
 }
 
+void suspend_events(void)
+{
+    unbind_all_ports();
+}
+
 void default_handler(evtchn_port_t port, struct pt_regs *regs, void *ignore)
 {
     printk("[Port %d] - event received\n", port);
diff --git a/include/events.h b/include/events.h
index 89b5997..705ad93 100644
--- a/include/events.h
+++ b/include/events.h
@@ -55,5 +55,6 @@ static inline int notify_remote_via_evtchn(evtchn_port_t port)
 }
 
 void fini_events(void);
+void suspend_events(void);
 
 #endif /* _EVENTS_H_ */
diff --git a/kernel.c b/kernel.c
index 2fb69bf..d078e0a 100644
--- a/kernel.c
+++ b/kernel.c
@@ -124,6 +124,8 @@ void pre_suspend(void)
     fini_time();
 
     suspend_console();
+
+    suspend_events();
 }
 
 void post_suspend(int canceled)
--
generated by git-patchbot for /home/xen/git/mini-os.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

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