xpvd.c revision 6eb35ee750312cc65aa066dd0f625b9d54c6f86e
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * CDDL HEADER START
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * The contents of this file are subject to the terms of the
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Common Development and Distribution License (the "License").
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * You may not use this file except in compliance with the License.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * See the License for the specific language governing permissions
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * and limitations under the License.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * When distributing Covered Code, include this CDDL HEADER in each
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * If applicable, add the following below this CDDL HEADER, with the
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * fields enclosed by brackets "[]" replaced with your own identifying
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * information: Portions Copyright [yyyy] [name of copyright owner]
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * CDDL HEADER END
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Use is subject to license terms.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#pragma ident "%Z%%M% %I% %E% SMI"
dc20a3024900c47dd2ee44b9707e6df38f7d62a5as * Host to hypervisor virtual devices nexus driver
8c10a8659ac31335ed870a1711c0182623f72fd6as * - Add watchpoints on vbd/vif and enumerate/offline on watch callback
3db3f65c6274eb042354801a308c8e9bc4994553amw * - Add DR IOCTLs
3db3f65c6274eb042354801a308c8e9bc4994553amw * - Filter/restrict property lookups into xenstore
ddi_intr_handle_impl_t *, void *);
int, char *, caddr_t, int *);
void *, dev_info_t **);
char *, ddi_eventcookie_t *);
ddi_eventcookie_t, void *, void *),
void *, ddi_callback_id_t *);
ddi_eventcookie_t, void *);
domid_t *, int *);
psm_intr_op_t, int *);
NULL,
NULL,
NULL,
#define XENDEV_N_NDI_EVENTS \
#define XENDEV_INTR_CAPABILITIES \
(void *)&modldrv,
_init(void)
_fini(void)
switch (cmd) {
return (DDI_FAILURE);
case DDI_INFO_DEVT2INSTANCE:
*result = (void *)0;
return (DDI_SUCCESS);
case DDI_INFO_DEVT2DEVINFO:
return (DDI_SUCCESS);
extern void xvdi_watch_devices(int);
#ifdef XPV_HVM_DRIVER
NULL) {
return (DDI_FAILURE);
return (DDI_FAILURE);
return (DDI_FAILURE);
#ifdef XPV_HVM_DRIVER
return (DDI_SUCCESS);
return (DDI_FAILURE);
int *lengthp)
void *prop_str;
unsigned int len;
int rv;
goto toss_off;
goto got_xs_prop;
goto got_xs_prop;
switch (prop_op) {
case PROP_LEN:
case PROP_LEN_AND_VAL_ALLOC:
case PROP_LEN_AND_VAL_BUF:
return (rv);
struct intrspec *
return (NULL);
int *intpriorities;
(void *)dip));
return (DDI_FAILURE);
return (DDI_SUCCESS);
int priority = 0;
switch (intr_op) {
case DDI_INTROP_NINTRS:
case DDI_INTROP_ALLOC:
return (DDI_FAILURE);
case DDI_INTROP_FREE:
return (DDI_FAILURE);
case DDI_INTROP_GETPRI:
return (DDI_FAILURE);
priority));
case DDI_INTROP_SETPRI:
return (DDI_FAILURE);
return (DDI_FAILURE);
return (DDI_FAILURE);
return (DDI_FAILURE);
case DDI_INTROP_ADDISR:
return (DDI_FAILURE);
case DDI_INTROP_REMISR:
if (ispec) {
case DDI_INTROP_GETCAP:
*(int *)result = 0;
return (DDI_FAILURE);
*(int *)result));
case DDI_INTROP_SETCAP:
*(int *)result));
return (DDI_FAILURE);
return (DDI_FAILURE);
case DDI_INTROP_ENABLE:
return (DDI_FAILURE);
return (DDI_FAILURE);
case DDI_INTROP_DISABLE:
return (DDI_FAILURE);
case DDI_INTROP_BLOCKENABLE:
case DDI_INTROP_BLOCKDISABLE:
return (DDI_FAILURE);
case DDI_INTROP_SETMASK:
case DDI_INTROP_CLRMASK:
#ifdef XPV_HVM_DRIVER
return (DDI_ENOTSUP);
return (DDI_FAILURE);
case DDI_INTROP_GETPENDING:
#ifdef XPV_HVM_DRIVER
return (DDI_ENOTSUP);
return (DDI_FAILURE);
*(int *)result));
case DDI_INTROP_NAVAIL:
*(int *)result));
return (DDI_SUCCESS);
int vector;
return (DDI_FAILURE);
return (DDI_FAILURE);
return (DDI_SUCCESS);
int vector;
switch (ctlop) {
case DDI_CTLOPS_REPORTDEV:
return (DDI_FAILURE);
return (DDI_SUCCESS);
case DDI_CTLOPS_INITCHILD:
case DDI_CTLOPS_UNINITCHILD:
case DDI_CTLOPS_SIDDEV:
return (DDI_SUCCESS);
case DDI_CTLOPS_REGSIZE:
case DDI_CTLOPS_NREGS:
return (DDI_FAILURE);
case DDI_CTLOPS_POWER: {
char *prop_str;
return (DDI_FAILURE);
!= DDI_PROP_SUCCESS) {
return (DDI_FAILURE);
return (DDI_SUCCESS);
return (DDI_FAILURE);
return (DDI_SUCCESS);
return (DDI_FAILURE);
return (DDI_NOT_WELL_FORMED);
return (DDI_FAILURE);
return (DDI_FAILURE);
return (DDI_SUCCESS);
return (DDI_SUCCESS);
void *device_name)
static boolean_t
goto done;
if (*devclassp < 0) {
goto done;
goto done;
goto done;
done:
return (ret);
int circ;
switch (op) {
case BUS_CONFIG_ONE: {
int vdev;
return (NDI_FAILURE);
return (NDI_FAILURE);
case BUS_CONFIG_DRIVER: {
return (NDI_FAILURE);
case BUS_CONFIG_ALL:
return (NDI_FAILURE);
cb_id));