sysctl.h revision 843e19887f64dde75055cf8842fc4db2171eff45
/******************************************************************************
* sysctl.h
*
* System management operations. For use by node control stack.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*
* Copyright (c) 2002-2006, K Fraser
*/
#ifndef __XEN_PUBLIC_SYSCTL_H__
#define __XEN_PUBLIC_SYSCTL_H__
/*
* XXPV - We need sysctl (physinfo) in the solaris kernel.
*/
#if 0
#if !defined(__XEN__) && !defined(__XEN_TOOLS__)
#error "sysctl operations are intended for use by node control tools only"
#endif
#endif /* XXPV */
#include "xen.h"
#include "domctl.h"
#define XEN_SYSCTL_INTERFACE_VERSION 0x00000002
/*
* Read console content from Xen buffer ring.
*/
#define XEN_SYSCTL_readconsole 1
struct xen_sysctl_readconsole {
/* IN variables. */
};
typedef struct xen_sysctl_readconsole xen_sysctl_readconsole_t;
/* Get trace buffers machine base address */
#define XEN_SYSCTL_tbuf_op 2
struct xen_sysctl_tbuf_op {
/* IN variables */
#define XEN_SYSCTL_TBUFOP_get_info 0
#define XEN_SYSCTL_TBUFOP_set_cpu_mask 1
#define XEN_SYSCTL_TBUFOP_set_evt_mask 2
#define XEN_SYSCTL_TBUFOP_set_size 3
#define XEN_SYSCTL_TBUFOP_enable 4
#define XEN_SYSCTL_TBUFOP_disable 5
struct xenctl_cpumap cpu_mask;
/* OUT variables */
};
typedef struct xen_sysctl_tbuf_op xen_sysctl_tbuf_op_t;
/*
* Get physical information about the host machine
*/
#define XEN_SYSCTL_physinfo 3
struct xen_sysctl_physinfo {
};
typedef struct xen_sysctl_physinfo xen_sysctl_physinfo_t;
/*
* Get the ID of the current scheduler.
*/
#define XEN_SYSCTL_sched_id 4
struct xen_sysctl_sched_id {
/* OUT variable */
};
typedef struct xen_sysctl_sched_id xen_sysctl_sched_id_t;
/* Interface for controlling Xen software performance counters. */
#define XEN_SYSCTL_perfc_op 5
/* Sub-operations: */
struct xen_sysctl_perfc_desc {
};
typedef struct xen_sysctl_perfc_desc xen_sysctl_perfc_desc_t;
typedef uint32_t xen_sysctl_perfc_val_t;
struct xen_sysctl_perfc_op {
/* IN variables. */
/* OUT variables. */
/* counter information (or NULL) */
/* counter values (or NULL) */
};
typedef struct xen_sysctl_perfc_op xen_sysctl_perfc_op_t;
#define XEN_SYSCTL_getdomaininfolist 6
struct xen_sysctl_getdomaininfolist {
/* IN variables. */
/* OUT variables. */
};
typedef struct xen_sysctl_getdomaininfolist xen_sysctl_getdomaininfolist_t;
struct xen_sysctl {
union {
struct xen_sysctl_readconsole readconsole;
struct xen_sysctl_tbuf_op tbuf_op;
struct xen_sysctl_physinfo physinfo;
struct xen_sysctl_sched_id sched_id;
struct xen_sysctl_perfc_op perfc_op;
} u;
};
typedef struct xen_sysctl xen_sysctl_t;
#endif /* __XEN_PUBLIC_SYSCTL_H__ */
/*
* Local variables:
* mode: C
* c-set-style: "BSD"
* c-basic-offset: 4
* tab-width: 4
* indent-tabs-mode: nil
* End:
*/