Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Jun 2014 08:48:06 +0000 (UTC)
From:      Roger Pau Monné <royger@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r267533 - head/sys/xen/xenstore
Message-ID:  <201406160848.s5G8m6Ec075084@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201406160848.s5G8m6Ec075084>