summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrab <none@none>2008-04-07 10:59:35 -0700
committerrab <none@none>2008-04-07 10:59:35 -0700
commit8b47140eade5d1c2de36bf888e510a05e499f05c (patch)
tree99b51f15ada18f788a96e942d4970c8b4b89e433
parent92bb3aa0c4df55e8df8196e55c7b030d462865c3 (diff)
downloadillumos-gate-8b47140eade5d1c2de36bf888e510a05e499f05c.tar.gz
6659979 need rtls shell driver for PV in HVM networking
-rw-r--r--usr/src/pkgdefs/SUNWxvmpv/prototype_i3862
-rw-r--r--usr/src/uts/i86pc/Makefile.files1
-rw-r--r--usr/src/uts/i86pc/Makefile.i86pc.shared1
-rw-r--r--usr/src/uts/i86pc/io/pv_rtls.c79
-rw-r--r--usr/src/uts/i86pc/pv_rtls/Makefile91
5 files changed, 174 insertions, 0 deletions
diff --git a/usr/src/pkgdefs/SUNWxvmpv/prototype_i386 b/usr/src/pkgdefs/SUNWxvmpv/prototype_i386
index 548a7d6d6b..a4d8268b92 100644
--- a/usr/src/pkgdefs/SUNWxvmpv/prototype_i386
+++ b/usr/src/pkgdefs/SUNWxvmpv/prototype_i386
@@ -51,11 +51,13 @@ d none platform/i86hvm/kernel 0755 root sys
d none platform/i86hvm/kernel/drv 0755 root sys
d none platform/i86hvm/kernel/drv/amd64 0755 root sys
f none platform/i86hvm/kernel/drv/amd64/cmdk 0755 root sys
+f none platform/i86hvm/kernel/drv/amd64/rtls 0755 root sys
f none platform/i86hvm/kernel/drv/amd64/xdf 0755 root sys
f none platform/i86hvm/kernel/drv/amd64/xnf 0755 root sys
f none platform/i86hvm/kernel/drv/amd64/xpv 0755 root sys
f none platform/i86hvm/kernel/drv/amd64/xpvd 0755 root sys
f none platform/i86hvm/kernel/drv/cmdk 0755 root sys
+f none platform/i86hvm/kernel/drv/rtls 0755 root sys
f none platform/i86hvm/kernel/drv/xdf 0755 root sys
f none platform/i86hvm/kernel/drv/xnf 0755 root sys
f none platform/i86hvm/kernel/drv/xpv 0755 root sys
diff --git a/usr/src/uts/i86pc/Makefile.files b/usr/src/uts/i86pc/Makefile.files
index c010175b33..895e3362c8 100644
--- a/usr/src/uts/i86pc/Makefile.files
+++ b/usr/src/uts/i86pc/Makefile.files
@@ -187,6 +187,7 @@ TZMON_OBJS += tzmon.o
UPPC_OBJS += uppc.o psm_common.o
XSVC_OBJS += xsvc.o
PV_CMDK_OBJS += pv_cmdk.o
+PV_RTLS_OBJS += pv_rtls.o
HVM_BOOTSTRAP_OBJS += hvm_bootstrap.o
XDF_OBJS += xdf.o
XNF_OBJS += xnf.o
diff --git a/usr/src/uts/i86pc/Makefile.i86pc.shared b/usr/src/uts/i86pc/Makefile.i86pc.shared
index 4bbc13720a..37da8ed6bb 100644
--- a/usr/src/uts/i86pc/Makefile.i86pc.shared
+++ b/usr/src/uts/i86pc/Makefile.i86pc.shared
@@ -247,6 +247,7 @@ DRV_KMODS += mc-amd
DRV_KMODS += tzmon
DRV_KMODS += battery
DRV_KMODS += pv_cmdk
+DRV_KMODS += pv_rtls
DRV_KMODS += xdf
DRV_KMODS += xnf
DRV_KMODS += xpv
diff --git a/usr/src/uts/i86pc/io/pv_rtls.c b/usr/src/uts/i86pc/io/pv_rtls.c
new file mode 100644
index 0000000000..40303870b4
--- /dev/null
+++ b/usr/src/uts/i86pc/io/pv_rtls.c
@@ -0,0 +1,79 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI"
+
+/*
+ * Fake rtls module. Prevents the real rtls driver from loading in
+ * a xen HVM domain so that xnf may operate instead.
+ */
+
+#include <sys/sunddi.h>
+#include <sys/errno.h>
+#include <sys/modctl.h>
+
+struct dev_ops pv_rtls_ops = {
+ DEVO_REV,
+ 0,
+ NULL,
+ nulldev,
+ nulldev,
+ NULL,
+ NULL,
+ nodev,
+ NULL,
+ NULL
+};
+
+/*
+ * Module linkage information for the kernel.
+ */
+static struct modldrv modldrv = {
+ &mod_driverops,
+ "xVM rtls stub %I%",
+ &pv_rtls_ops
+};
+
+static struct modlinkage modlinkage = {
+ MODREV_1, (void *)&modldrv, NULL
+};
+
+int
+_init(void)
+{
+ return (mod_install(&modlinkage));
+}
+
+int
+_info(struct modinfo *modinfop)
+{
+ return (mod_info(&modlinkage, modinfop));
+}
+
+int
+_fini(void)
+{
+ return (EBUSY);
+}
diff --git a/usr/src/uts/i86pc/pv_rtls/Makefile b/usr/src/uts/i86pc/pv_rtls/Makefile
new file mode 100644
index 0000000000..a9f19fc182
--- /dev/null
+++ b/usr/src/uts/i86pc/pv_rtls/Makefile
@@ -0,0 +1,91 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# uts/i86pc/pv_rtls/Makefile
+#
+# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+#ident "%Z%%M% %I% %E% SMI"
+#
+# This makefile drives the production of the null rtls module for xvm.
+#
+# i86pc implementation architecture dependent
+#
+# Path to the base of the uts directory tree (usually /usr/src/uts).
+#
+UTSBASE = ../..
+
+#
+# Define the module and object file sets.
+#
+MODULE = rtls
+OBJECTS = $(PV_RTLS_OBJS:%=$(OBJS_DIR)/%)
+LINTS = $(PV_RTLS_OBJS:%.o=$(LINTS_DIR)/%.ln)
+ROOTMODULE = $(ROOT_HVM_DRV_DIR)/$(MODULE)
+
+#
+# Include common rules.
+#
+include $(UTSBASE)/i86pc/Makefile.i86pc
+include $(UTSBASE)/i86pc/Makefile.hvm
+
+#
+# When generating lint libraries, we want the name of the lint module
+# that will be generated to be pv_rtls and not rtls, so override the
+# default lint module name here.
+#
+LINT_MODULE = pv_rtls
+
+#
+# Define targets
+#
+ALL_TARGET = $(BINARY)
+LINT_TARGET = $(LINT_MODULE).lint
+INSTALL_TARGET = $(BINARY) $(ROOTMODULE)
+
+LDFLAGS += -dy
+
+#
+# Default build targets.
+#
+.KEEP_STATE:
+
+def: $(DEF_DEPS)
+
+all: $(ALL_DEPS)
+
+clean: $(CLEAN_DEPS)
+
+clobber: $(CLOBBER_DEPS)
+
+lint: $(LINT_DEPS)
+
+modlintlib: $(MODLINTLIB_DEPS)
+
+clean.lint: $(CLEAN_LINT_DEPS)
+
+install: $(INSTALL_DEPS)
+
+#
+# Include common targets.
+#
+include $(UTSBASE)/i86pc/Makefile.targ