From owner-svn-src-head@FreeBSD.ORG Mon Jun 16 08:48:07 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 351D589D; Mon, 16 Jun 2014 08:48:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 22474277E; Mon, 16 Jun 2014 08:48:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5G8m7F6075085; Mon, 16 Jun 2014 08:48:07 GMT (envelope-from royger@svn.freebsd.org) Received: (from royger@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5G8m6Ec075084; Mon, 16 Jun 2014 08:48:06 GMT (envelope-from royger@svn.freebsd.org) Message-Id: <201406160848.s5G8m6Ec075084@svn.freebsd.org> From: Roger Pau Monné Date: Mon, 16 Jun 2014 08:48:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r267533 - head/sys/xen/xenstore X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Jun 2014 08:48:07 -0000 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 #include -#include #include #include @@ -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;