1eb0cc229Sedp /*
2eb0cc229Sedp * CDDL HEADER START
3eb0cc229Sedp *
4eb0cc229Sedp * The contents of this file are subject to the terms of the
5eb0cc229Sedp * Common Development and Distribution License (the "License").
6eb0cc229Sedp * You may not use this file except in compliance with the License.
7eb0cc229Sedp *
8eb0cc229Sedp * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9eb0cc229Sedp * or http://www.opensolaris.org/os/licensing.
10eb0cc229Sedp * See the License for the specific language governing permissions
11eb0cc229Sedp * and limitations under the License.
12eb0cc229Sedp *
13eb0cc229Sedp * When distributing Covered Code, include this CDDL HEADER in each
14eb0cc229Sedp * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15eb0cc229Sedp * If applicable, add the following below this CDDL HEADER, with the
16eb0cc229Sedp * fields enclosed by brackets "[]" replaced with your own identifying
17eb0cc229Sedp * information: Portions Copyright [yyyy] [name of copyright owner]
18eb0cc229Sedp *
19eb0cc229Sedp * CDDL HEADER END
20eb0cc229Sedp */
21eb0cc229Sedp /*
22eb0cc229Sedp * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
23eb0cc229Sedp * Use is subject to license terms.
24eb0cc229Sedp */
25eb0cc229Sedp
26eb0cc229Sedp /*
27eb0cc229Sedp * Fake rtls module. Prevents the real rtls driver from loading in
28eb0cc229Sedp * a xen HVM domain so that xnf may operate instead.
29eb0cc229Sedp */
30eb0cc229Sedp
31eb0cc229Sedp #include <sys/sunddi.h>
32eb0cc229Sedp #include <sys/errno.h>
33eb0cc229Sedp #include <sys/modctl.h>
34eb0cc229Sedp
35eb0cc229Sedp struct dev_ops pv_rtls_ops = {
36eb0cc229Sedp DEVO_REV,
37eb0cc229Sedp 0,
38eb0cc229Sedp NULL,
39eb0cc229Sedp nulldev,
40eb0cc229Sedp nulldev,
41eb0cc229Sedp NULL,
42eb0cc229Sedp NULL,
43eb0cc229Sedp nodev,
44eb0cc229Sedp NULL,
45*19397407SSherry Moore NULL,
46*19397407SSherry Moore NULL,
47*19397407SSherry Moore ddi_quiesce_not_needed, /* quiesce */
48eb0cc229Sedp };
49eb0cc229Sedp
50eb0cc229Sedp /*
51eb0cc229Sedp * Module linkage information for the kernel.
52eb0cc229Sedp */
53eb0cc229Sedp static struct modldrv modldrv = {
54eb0cc229Sedp &mod_driverops,
55613b2871SRichard Bean "xVM rtls stub",
56eb0cc229Sedp &pv_rtls_ops
57eb0cc229Sedp };
58eb0cc229Sedp
59eb0cc229Sedp static struct modlinkage modlinkage = {
60eb0cc229Sedp MODREV_1, (void *)&modldrv, NULL
61eb0cc229Sedp };
62eb0cc229Sedp
63eb0cc229Sedp int
_init(void)64eb0cc229Sedp _init(void)
65eb0cc229Sedp {
66eb0cc229Sedp return (mod_install(&modlinkage));
67eb0cc229Sedp }
68eb0cc229Sedp
69eb0cc229Sedp int
_info(struct modinfo * modinfop)70eb0cc229Sedp _info(struct modinfo *modinfop)
71eb0cc229Sedp {
72eb0cc229Sedp return (mod_info(&modlinkage, modinfop));
73eb0cc229Sedp }
74eb0cc229Sedp
75eb0cc229Sedp int
_fini(void)76eb0cc229Sedp _fini(void)
77eb0cc229Sedp {
78eb0cc229Sedp return (EBUSY);
79eb0cc229Sedp }
80