shithub: riscv

Download patch

ref: bd4513fe87360c790e2a96e00dacbf34c5f081cc
parent: 6ed716eab605e4b374e7d456cc6b3ed586c9f13b
author: aiju <devnull@localhost>
date: Sat Sep 2 06:43:37 EDT 2017

devvmx: call vmxshutdown from reboot() function manually

--- a/sys/src/9/pc/devvmx.c
+++ b/sys/src/9/pc/devvmx.c
@@ -1844,7 +1844,7 @@
 	return vmx;
 }
 
-static void
+void
 vmxshutdown(void)
 {
 	int i;
@@ -2203,7 +2203,7 @@
 	
 	vmxreset,
 	devinit,
-	vmxshutdown,
+	devshutdown,
 	vmxattach,
 	vmxwalk,
 	vmxstat,
--- a/sys/src/9/pc/fns.h
+++ b/sys/src/9/pc/fns.h
@@ -198,6 +198,7 @@
 void*	vmap(ulong, int);
 int	vmapsync(ulong);
 void	vmxprocrestore(Proc *);
+void	vmxshutdown(void);
 void	vunmap(void*, int);
 void	wbinvd(void);
 void	writeconf(void);
--- a/sys/src/9/pc/main.c
+++ b/sys/src/9/pc/main.c
@@ -735,6 +735,7 @@
 	ulong *pdb;
 
 	writeconf();
+	vmxshutdown();
 
 	/*
 	 * the boot processor is cpu0.  execute this function on it
--- a/sys/src/9/pc64/fns.h
+++ b/sys/src/9/pc64/fns.h
@@ -190,6 +190,7 @@
 void	upareserve(uintptr, int);
 void	vectortable(void);
 void	vmxprocrestore(Proc *);
+void	vmxshutdown(void);
 void*	vmap(uintptr, int);
 void	vunmap(void*, int);
 void	wbinvd(void);
--- a/sys/src/9/pc64/main.c
+++ b/sys/src/9/pc64/main.c
@@ -350,6 +350,7 @@
 	void (*f)(uintptr, uintptr, ulong);
 
 	writeconf();
+	vmxshutdown();
 
 	/*
 	 * the boot processor is cpu0.  execute this function on it