xref: /illumos-gate/usr/src/uts/i86pc/i86hvm/io/rtls.c (revision c73799dd)
18b47140eSrab /*
28b47140eSrab  * CDDL HEADER START
38b47140eSrab  *
48b47140eSrab  * The contents of this file are subject to the terms of the
58b47140eSrab  * Common Development and Distribution License (the "License").
68b47140eSrab  * You may not use this file except in compliance with the License.
78b47140eSrab  *
88b47140eSrab  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
98b47140eSrab  * or http://www.opensolaris.org/os/licensing.
108b47140eSrab  * See the License for the specific language governing permissions
118b47140eSrab  * and limitations under the License.
128b47140eSrab  *
138b47140eSrab  * When distributing Covered Code, include this CDDL HEADER in each
148b47140eSrab  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
158b47140eSrab  * If applicable, add the following below this CDDL HEADER, with the
168b47140eSrab  * fields enclosed by brackets "[]" replaced with your own identifying
178b47140eSrab  * information: Portions Copyright [yyyy] [name of copyright owner]
188b47140eSrab  *
198b47140eSrab  * CDDL HEADER END
208b47140eSrab  */
21*c73799ddSYuri Pankov 
228b47140eSrab /*
238b47140eSrab  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
248b47140eSrab  * Use is subject to license terms.
258b47140eSrab  */
268b47140eSrab 
278b47140eSrab /*
288b47140eSrab  * Fake rtls module. Prevents the real rtls driver from loading in
298b47140eSrab  * a xen HVM domain so that xnf may operate instead.
308b47140eSrab  */
318b47140eSrab 
328b47140eSrab #include <sys/sunddi.h>
338b47140eSrab #include <sys/errno.h>
348b47140eSrab #include <sys/modctl.h>
358b47140eSrab 
36*c73799ddSYuri Pankov static struct dev_ops stub_ops = {
378b47140eSrab 	DEVO_REV,
388b47140eSrab 	0,
398b47140eSrab 	NULL,
408b47140eSrab 	nulldev,
418b47140eSrab 	nulldev,
428b47140eSrab 	NULL,
438b47140eSrab 	NULL,
448b47140eSrab 	nodev,
458b47140eSrab 	NULL,
4619397407SSherry Moore 	NULL,
4719397407SSherry Moore 	NULL,
48*c73799ddSYuri Pankov 	ddi_quiesce_not_needed
498b47140eSrab };
508b47140eSrab 
518b47140eSrab static struct modldrv modldrv = {
528b47140eSrab 	&mod_driverops,
53613b2871SRichard Bean 	"xVM rtls stub",
54*c73799ddSYuri Pankov 	&stub_ops
558b47140eSrab };
568b47140eSrab 
578b47140eSrab static struct modlinkage modlinkage = {
588b47140eSrab 	MODREV_1, (void *)&modldrv, NULL
598b47140eSrab };
608b47140eSrab 
618b47140eSrab int
_init(void)628b47140eSrab _init(void)
638b47140eSrab {
648b47140eSrab 	return (mod_install(&modlinkage));
658b47140eSrab }
668b47140eSrab 
678b47140eSrab int
_info(struct modinfo * modinfop)688b47140eSrab _info(struct modinfo *modinfop)
698b47140eSrab {
708b47140eSrab 	return (mod_info(&modlinkage, modinfop));
718b47140eSrab }
728b47140eSrab 
738b47140eSrab int
_fini(void)748b47140eSrab _fini(void)
758b47140eSrab {
768b47140eSrab 	return (EBUSY);
778b47140eSrab }
78