diff options
author | Mike Belopuhov <mikeb@cvs.openbsd.org> | 2016-11-29 14:55:05 +0000 |
---|---|---|
committer | Mike Belopuhov <mikeb@cvs.openbsd.org> | 2016-11-29 14:55:05 +0000 |
commit | 0bd51f5aa863243923f6f17262ed851a2bb94240 (patch) | |
tree | 6b87f78c432ce899f26ede059cd287919075e148 /sys/dev/pv/xenvar.h | |
parent | 26160aeb8e70019cc5aa21506b154398da93b450 (diff) |
Stop exposing xen_softc to PV devices directly
Diffstat (limited to 'sys/dev/pv/xenvar.h')
-rw-r--r-- | sys/dev/pv/xenvar.h | 32 |
1 files changed, 21 insertions, 11 deletions
diff --git a/sys/dev/pv/xenvar.h b/sys/dev/pv/xenvar.h index c10d67caf58..8378d1db0a2 100644 --- a/sys/dev/pv/xenvar.h +++ b/sys/dev/pv/xenvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: xenvar.h,v 1.40 2016/11/29 13:55:33 mikeb Exp $ */ +/* $OpenBSD: xenvar.h,v 1.41 2016/11/29 14:55:04 mikeb Exp $ */ /* * Copyright (c) 2015 Mike Belopuhov @@ -61,10 +61,9 @@ struct xen_softc { struct shared_info *sc_ipg; /* HYPERVISOR_shared_info */ uint32_t sc_flags; -#define XSF_CBVEC 0x0001 -#define XSF_UNPLUG_NIC 0x0002 /* disable emul. NICs */ -#define XSF_UNPLUG_IDE 0x0004 /* disable emul. primary IDE */ -#define XSF_UNPLUG_IDESEC 0x0008 /* disable emul. sec. IDE */ +#define XSF_CBVEC 0x0001 + + uint32_t sc_unplug; uint64_t sc_irq; /* IDT vector number */ SLIST_HEAD(, xen_intsrc) sc_intrs; @@ -84,11 +83,13 @@ struct xen_softc { extern struct xen_softc *xen_sc; +#define XEN_MAX_NODE_LEN 64 +#define XEN_MAX_BACKEND_LEN 128 + struct xen_attach_args { - void *xa_parent; char xa_name[16]; - char xa_node[64]; - char xa_backend[128]; + char xa_node[XEN_MAX_NODE_LEN]; + char xa_backend[XEN_MAX_BACKEND_LEN]; int xa_domid; bus_dma_tag_t xa_dmat; }; @@ -123,6 +124,15 @@ void xen_intr_mask(xen_intr_handle_t); int xen_intr_unmask(xen_intr_handle_t); /* + * Miscellaneous + */ +#define XEN_UNPLUG_NIC 0x0001 /* disable emul. NICs */ +#define XEN_UNPLUG_IDE 0x0002 /* disable emul. primary IDE */ +#define XEN_UNPLUG_IDESEC 0x0004 /* disable emul. secondary IDE */ + +void xen_unplug_emulated(void *, int); + +/* * XenStore */ #define XS_LIST 0x01 @@ -164,10 +174,10 @@ test_bit(u_int b, volatile void *p) int xs_cmd(struct xs_transaction *, int, const char *, struct iovec **, int *); void xs_resfree(struct xs_transaction *, struct iovec *, int); -int xs_watch(struct xen_softc *, const char *, const char *, struct task *, +int xs_watch(void *, const char *, const char *, struct task *, void (*)(void *), void *); -int xs_getprop(struct xen_softc *, const char *, const char *, char *, int); -int xs_setprop(struct xen_softc *, const char *, const char *, char *, int); +int xs_getprop(void *, const char *, const char *, char *, int); +int xs_setprop(void *, const char *, const char *, char *, int); int xs_kvop(void *, int, char *, char *, size_t); #endif /* _DEV_PV_XENVAR_H_ */ |