Author: royger
Date: Mon Jun 16 08:48:06 2014
New Revision: 267533
URL: http://svnweb.freebsd.org/changeset/base/267533

Log:
  xen: init gnttab from xenpv
  
  Currently the grant table is initialized from xenstore, but a better
  place to do this would be xenpv, so move grant table initialization
  there.
  
  Sponsored by: Citrix Systems R&D
  Approved by: gibbs
  
  x86/xen/xenpv.c:
   - Add gnttab initialization.
  
  xen/xenstore/xenstore.c:
   - Remove gnttab initialization.

Modified:
  head/sys/xen/xenstore/xenstore.c

Modified: head/sys/xen/xenstore/xenstore.c
==============================================================================
--- head/sys/xen/xenstore/xenstore.c    Mon Jun 16 08:47:15 2014        
(r267532)
+++ head/sys/xen/xenstore/xenstore.c    Mon Jun 16 08:48:06 2014        
(r267533)
@@ -52,7 +52,6 @@ __FBSDID("$FreeBSD$");
 #include <machine/stdarg.h>
 
 #include <xen/xen-os.h>
-#include <xen/gnttab.h>
 #include <xen/hypervisor.h>
 #include <xen/xen_intr.h>
 
@@ -1128,20 +1127,6 @@ xs_attach(device_t dev)
        xs.xs_dev = dev;
        device_set_softc(dev, &xs);
 
-       /*
-        * This seems to be a layering violation.  The XenStore is just
-        * one of many clients of the Grant Table facility.  It happens
-        * to be the first and a gating consumer to all other devices,
-        * so this does work.  A better place would be in the PV support
-        * code for fully PV kernels and the xenpci driver for HVM kernels.
-        */
-       error = gnttab_init();
-       if (error != 0) {
-               log(LOG_WARNING,
-                   "XENSTORE: Error initializing grant tables: %d\n", error);
-               return (ENXIO);
-       }
-
        /* Initialize the interface to xenstore. */
        struct proc *p;
 
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to