Author: marcel
Date: Fri Feb 26 16:00:16 2016
New Revision: 296099
URL: https://svnweb.freebsd.org/changeset/base/296099

Log:
  Add vm_set_register() and vm_set_desc() callbacks. These callbacks
  translate directly into calls to their namesake API functions in
  libvmmapi.
  
  It is an improvement over the existing setreg(), setmsr(), setcr()
  setgdt() and exec() callbacks in that the new additions give full
  control and don't assume we're booting FreeBSD, like exec() and
  don't assume one only wants to set the value of RSP, like setreg().

Modified:
  head/sys/boot/userboot/userboot.h

Modified: head/sys/boot/userboot/userboot.h
==============================================================================
--- head/sys/boot/userboot/userboot.h   Fri Feb 26 15:54:34 2016        
(r296098)
+++ head/sys/boot/userboot/userboot.h   Fri Feb 26 16:00:16 2016        
(r296099)
@@ -34,6 +34,14 @@
 #define        USERBOOT_VERSION_3      3
 
 /*
+ * Version 4 added more generic callbacks for setting up
+ * registers and descriptors. The callback structure is
+ * backward compatible (new callbacks have been added at
+ * the tail end).
+ */
+#define        USERBOOT_VERSION_4      4
+
+/*
  * Exit codes from the loader
  */
 #define        USERBOOT_EXIT_QUIT      1
@@ -195,4 +203,11 @@ struct loader_callbacks {
         * each invocation will add 1 to the previous value of 'num'.
         */
        const char *    (*getenv)(void *arg, int num);
+
+       /*
+        * Version 4 additions.
+        */
+       int     (*vm_set_register)(void *arg, int vcpu, int reg, uint64_t val);
+       int     (*vm_set_desc)(void *arg, int vcpu, int reg, uint64_t base,
+           u_int limit, u_int access);
 };
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to