/*
* Copyright (c) 2007-2011 Antti Kantee. All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
/*
* If RUMP_USE_CTOR is defined, we use __attribute__((constructor)) to
* determine which components are present when rump_init() is called.
* Otherwise, we use link sets and the __start/__stop symbols generated
* by the toolchain.
*/
/* vm bundle for remote clients. the last member is the hypercall cookie */
struct rump_spctl {
struct vmspace spctl_vm;
void *spctl;
};
#define RUMP_SPVM2CTL(vm) (((struct rump_spctl *)vm)->spctl)
/*
* sysproxy is an optional component. The interfaces with "hyp"
* in the name come into the rump kernel from the client or sysproxy
* stub, the rest go out of the rump kernel.
*/
struct rump_sysproxy_ops {
int (*rspo_copyin)(void *, const void *, void *, size_t);
int (*rspo_copyinstr)(void *, const void *, void *, size_t *);
int (*rspo_copyout)(void *, const void *, void *, size_t);
int (*rspo_copyoutstr)(void *, const void *, void *, size_t *);
int (*rspo_anonmmap)(void *, size_t, void **);
int (*rspo_raise)(void *, int);
void (*rspo_fini)(void *);