summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Mooney <pmooney@pfmooney.com>2019-06-12 18:02:40 +0000
committerPatrick Mooney <pmooney@pfmooney.com>2019-06-14 14:50:02 +0000
commitde37b27aa9332f8b33b7b4041b3bdaa6894dcde9 (patch)
tree9d0c6fe8dc4d6d307b739030e87d5dc28d09cbf0
parent3812225f415409fb9a9021dfb89e3e794b0a1e52 (diff)
downloadillumos-joyent-de37b27aa9332f8b33b7b4041b3bdaa6894dcde9.tar.gz
OS-7835 bhyve modules should have mapfiles
Reviewed by: Robert Mustacchi <rm@joyent.com> Reviewed by: John Levon <john.levon@joyent.com> Reviewed by: Mike Gerdts <mike.gerdts@joyent.com> Approved by: Mike Gerdts <mike.gerdts@joyent.com>
-rw-r--r--usr/src/uts/Makefile.targ4
-rw-r--r--usr/src/uts/i86pc/io/viona/viona.mapfile41
-rw-r--r--usr/src/uts/i86pc/io/vmm/io/ppt.c4
-rw-r--r--usr/src/uts/i86pc/io/vmm/io/ppt.mapfile52
-rw-r--r--usr/src/uts/i86pc/io/vmm/vmm.mapfile59
-rw-r--r--usr/src/uts/i86pc/io/vmm/vmm_sol_dev.c2
-rw-r--r--usr/src/uts/i86pc/ppt/Makefile2
-rw-r--r--usr/src/uts/i86pc/viona/Makefile2
-rw-r--r--usr/src/uts/i86pc/vmm/Makefile2
9 files changed, 163 insertions, 5 deletions
diff --git a/usr/src/uts/Makefile.targ b/usr/src/uts/Makefile.targ
index 0fb7bb8a90..bdbfcabab9 100644
--- a/usr/src/uts/Makefile.targ
+++ b/usr/src/uts/Makefile.targ
@@ -20,7 +20,7 @@
#
#
# Copyright (c) 1991, 2010, Oracle and/or its affiliates. All rights reserved.
-# Copyright 2015, Joyent, Inc.
+# Copyright 2019 Joyent, Inc.
# Copyright 2014 Garrett D'Amore <garrett@damore.org>
# Copyright 2016 Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org>
#
@@ -51,7 +51,7 @@ $(OBJECTS): $(INLINES)
# Partially link .o files to generate the kmod. The fake dependency
# on modstubs simplifies things...
#
-$(BINARY): $(OBJECTS) $(DTRACE_MAPFILE)
+$(BINARY): $(OBJECTS) $(DTRACE_MAPFILE) $(MAPFILE)
$(LD) -r $(LDFLAGS) -o $@ $(OBJECTS)
$(CTFMERGE_UNIQUIFY_AGAINST_GENUNIX)
$(POST_PROCESS)
diff --git a/usr/src/uts/i86pc/io/viona/viona.mapfile b/usr/src/uts/i86pc/io/viona/viona.mapfile
new file mode 100644
index 0000000000..cece86348c
--- /dev/null
+++ b/usr/src/uts/i86pc/io/viona/viona.mapfile
@@ -0,0 +1,41 @@
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source. A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+
+#
+# Copyright 2019 Joyent, Inc.
+#
+
+#
+# MAPFILE HEADER START
+#
+# WARNING: STOP NOW. DO NOT MODIFY THIS FILE.
+# Object versioning must comply with the rules detailed in
+#
+# usr/src/lib/README.mapfiles
+#
+# You should not be making modifications here until you've read the most current
+# copy of that file. If you need help, contact a gatekeeper for guidance.
+#
+# MAPFILE HEADER END
+#
+
+$mapfile_version 2
+
+SYMBOL_VERSION ILLUMOSprivate {
+ global:
+ # DDI Interfaces
+ _fini;
+ _init;
+ _info;
+
+ local:
+ *;
+};
diff --git a/usr/src/uts/i86pc/io/vmm/io/ppt.c b/usr/src/uts/i86pc/io/vmm/io/ppt.c
index 0c5815278e..64efa954fa 100644
--- a/usr/src/uts/i86pc/io/vmm/io/ppt.c
+++ b/usr/src/uts/i86pc/io/vmm/io/ppt.c
@@ -29,7 +29,7 @@
*/
/*
- * Copyright 2018 Joyent, Inc
+ * Copyright 2019 Joyent, Inc
*/
#include <sys/cdefs.h>
@@ -623,7 +623,7 @@ static struct dev_ops ppt_ops = {
static struct modldrv modldrv = {
&mod_driverops,
- "ppt",
+ "bhyve pci pass-thru",
&ppt_ops
};
diff --git a/usr/src/uts/i86pc/io/vmm/io/ppt.mapfile b/usr/src/uts/i86pc/io/vmm/io/ppt.mapfile
new file mode 100644
index 0000000000..aac896e89e
--- /dev/null
+++ b/usr/src/uts/i86pc/io/vmm/io/ppt.mapfile
@@ -0,0 +1,52 @@
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source. A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+
+#
+# Copyright 2019 Joyent, Inc.
+#
+
+#
+# MAPFILE HEADER START
+#
+# WARNING: STOP NOW. DO NOT MODIFY THIS FILE.
+# Object versioning must comply with the rules detailed in
+#
+# usr/src/lib/README.mapfiles
+#
+# You should not be making modifications here until you've read the most current
+# copy of that file. If you need help, contact a gatekeeper for guidance.
+#
+# MAPFILE HEADER END
+#
+
+$mapfile_version 2
+
+SYMBOL_VERSION ILLUMOSprivate {
+ global:
+ # DDI Interfaces
+ _fini;
+ _init;
+ _info;
+
+ # PCI pass-thru API for bhyve
+ ppt_assigned_devices;
+ ppt_is_mmio;
+ ppt_assign_device;
+ ppt_unassign_device;
+ ppt_unassign_all;
+ ppt_map_mmio;
+ ppt_setup_msi;
+ ppt_setup_msix;
+ ppt_get_limits;
+
+ local:
+ *;
+};
diff --git a/usr/src/uts/i86pc/io/vmm/vmm.mapfile b/usr/src/uts/i86pc/io/vmm/vmm.mapfile
new file mode 100644
index 0000000000..2059dfcc97
--- /dev/null
+++ b/usr/src/uts/i86pc/io/vmm/vmm.mapfile
@@ -0,0 +1,59 @@
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source. A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+
+#
+# Copyright 2019 Joyent, Inc.
+#
+
+#
+# MAPFILE HEADER START
+#
+# WARNING: STOP NOW. DO NOT MODIFY THIS FILE.
+# Object versioning must comply with the rules detailed in
+#
+# usr/src/lib/README.mapfiles
+#
+# You should not be making modifications here until you've read the most current
+# copy of that file. If you need help, contact a gatekeeper for guidance.
+#
+# MAPFILE HEADER END
+#
+
+$mapfile_version 2
+
+SYMBOL_VERSION ILLUMOSprivate {
+ global:
+ # DDI Interfaces
+ _fini;
+ _init;
+ _info;
+
+ # bhyve driver API
+ vmm_drv_hold;
+ vmm_drv_rele;
+ vmm_drv_expired;
+ vmm_drv_gpa2kva;
+ vmm_drv_ioport_hook;
+ vmm_drv_ioport_unhook;
+ vmm_drv_msi;
+
+ # IOMMU API for PCI pass-thru
+ iommu_add_device;
+ iommu_host_domain;
+ iommu_remove_device;
+ lapic_intr_msi;
+ vm_iommu_domain;
+ vm_map_mmio;
+ vm_unmap_mmio;
+
+ local:
+ *;
+};
diff --git a/usr/src/uts/i86pc/io/vmm/vmm_sol_dev.c b/usr/src/uts/i86pc/io/vmm/vmm_sol_dev.c
index 7d1d0c0bfb..af775d4d7b 100644
--- a/usr/src/uts/i86pc/io/vmm/vmm_sol_dev.c
+++ b/usr/src/uts/i86pc/io/vmm/vmm_sol_dev.c
@@ -1994,7 +1994,7 @@ static struct dev_ops vmm_ops = {
static struct modldrv modldrv = {
&mod_driverops,
- "vmm",
+ "bhyve vmm",
&vmm_ops
};
diff --git a/usr/src/uts/i86pc/ppt/Makefile b/usr/src/uts/i86pc/ppt/Makefile
index 60add02d5a..f231dfddf6 100644
--- a/usr/src/uts/i86pc/ppt/Makefile
+++ b/usr/src/uts/i86pc/ppt/Makefile
@@ -27,6 +27,7 @@ OBJECTS = $(PPT_OBJS:%=$(OBJS_DIR)/%)
LINTS = $(PPT_OBJS:%.o=$(LINTS_DIR)/%.ln)
ROOTMODULE = $(USR_DRV_DIR)/$(MODULE)
CONF_SRCDIR = $(UTSBASE)/i86pc/io/vmm/io
+MAPFILE = $(UTSBASE)/i86pc/io/vmm/io/ppt.mapfile
#
# Include common rules.
@@ -51,6 +52,7 @@ INC_PATH += -I$(UTSBASE)/i86pc/io/vmm -I$(UTSBASE)/i86pc/io/vmm/io
AS_INC_PATH += -I$(UTSBASE)/i86pc/io/vmm -I$(OBJS_DIR)
LDFLAGS += -dy -N drv/vmm -N misc/pcie
+LDFLAGS += -M $(MAPFILE)
$(OBJS_DIR)/ppt.o := CERRWARN += -_gcc=-Wno-unused-variable
diff --git a/usr/src/uts/i86pc/viona/Makefile b/usr/src/uts/i86pc/viona/Makefile
index 7053d62967..dac59c9a45 100644
--- a/usr/src/uts/i86pc/viona/Makefile
+++ b/usr/src/uts/i86pc/viona/Makefile
@@ -27,6 +27,7 @@ OBJECTS = $(VIONA_OBJS:%=$(OBJS_DIR)/%)
LINTS = $(VIONA_OBJS:%.o=$(LINTS_DIR)/%.ln)
ROOTMODULE = $(USR_DRV_DIR)/$(MODULE)
CONF_SRCDIR = $(UTSBASE)/i86pc/io/viona
+MAPFILE = $(UTSBASE)/i86pc/io/viona/viona.mapfile
#
# Include common rules.
@@ -58,6 +59,7 @@ DEF_BUILDS = $(DEF_BUILDSONLY64)
CFLAGS += $(CCVERBOSE)
LDFLAGS += -dy -Ndrv/dld -Nmisc/mac -Nmisc/dls -Ndrv/vmm -Nmisc/neti
LDFLAGS += -Nmisc/hook
+LDFLAGS += -M $(MAPFILE)
#
# Default build targets.
diff --git a/usr/src/uts/i86pc/vmm/Makefile b/usr/src/uts/i86pc/vmm/Makefile
index 72090ac159..fd14c0e95c 100644
--- a/usr/src/uts/i86pc/vmm/Makefile
+++ b/usr/src/uts/i86pc/vmm/Makefile
@@ -27,6 +27,7 @@ OBJECTS = $(VMM_OBJS:%=$(OBJS_DIR)/%)
LINTS = $(VMM_OBJS:%.o=$(LINTS_DIR)/%.ln)
ROOTMODULE = $(USR_DRV_DIR)/$(MODULE)
CONF_SRCDIR = $(UTSBASE)/i86pc/io/vmm
+MAPFILE = $(UTSBASE)/i86pc/io/vmm/vmm.mapfile
#
# Include common rules.
@@ -109,6 +110,7 @@ $(OBJS_DIR)/vmx.o := CERRWARN += -_gcc=-Wno-unused-variable
$(OBJS_DIR)/iommu.o := CERRWARN += -_gcc=-Wno-unused-variable
LDFLAGS += -dy -N misc/acpica -N misc/pcie -N fs/dev
+LDFLAGS += -M $(MAPFILE)
OFFSETS_VMX = $(CONF_SRCDIR)/intel/offsets.in
OFFSETS_SVM = $(CONF_SRCDIR)/amd/offsets.in