/******************************************************************************
* 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__
#if !defined(__XEN__) && !defined(__XEN_TOOLS__)
#error "sysctl operations are intended for use by node control tools only"
#endif
#include "xen.h"
#include "domctl.h"
/*
* Read console content from Xen buffer ring.
*/
struct xen_sysctl_readconsole {
/* IN: Non-zero -> clear after reading. */
/* IN: Non-zero -> start index specified by @index field. */
/*
* IN: Start index for consuming from ring buffer (if @incremental);
* OUT: End index after consuming from ring buffer.
*/
/* IN: Virtual address to write console data. */
/* IN: Size of buffer; OUT: Bytes written to buffer. */
};
/* Get trace buffers machine base address */
struct xen_sysctl_tbuf_op {
/* IN variables */
#define XEN_SYSCTL_TBUFOP_get_info 0
/* OUT variables */
};
/*
* Get physical information about the host machine
*/
/* (x86) The platform supports HVM guests. */
#define _XEN_SYSCTL_PHYSCAP_hvm 0
/* (x86) The platform supports HVM-guest direct access to I/O devices. */
struct xen_sysctl_physinfo {
/*
* IN: maximum addressable entry in the caller-provided cpu_to_node array.
* OUT: largest cpu identifier in the system.
* If OUT is greater than IN then the cpu_to_node array is truncated!
*/
/*
* If not NULL, this array is filled with node identifier for each cpu.
* If a cpu has no node information (e.g., cpu not present) then the
* sentinel value ~0u is written.
* The size of this array is specified by the caller in @max_cpu_id.
* If the actual @max_cpu_id is smaller than the array then the trailing
* elements of the array will not be written by the sysctl.
*/
/* XEN_SYSCTL_PHYSCAP_??? */
};
/*
* Get the ID of the current scheduler.
*/
struct xen_sysctl_sched_id {
/* OUT variable */
};
/* Interface for controlling Xen software performance counters. */
/* Sub-operations: */
struct xen_sysctl_perfc_desc {
};
struct xen_sysctl_perfc_op {
/* IN variables. */
/* OUT variables. */
/* counter information (or NULL) */
/* counter values (or NULL) */
};
struct xen_sysctl_getdomaininfolist {
/* IN variables. */
/* OUT variables. */
};
/* Inject debug keys into Xen. */
struct xen_sysctl_debug_keys {
/* IN variables. */
};
/* Get physical CPU information. */
struct xen_sysctl_cpuinfo {
};
struct xen_sysctl_getcpuinfo {
/* IN variables. */
/* OUT variables. */
};
struct xen_sysctl_availheap {
/* IN variables. */
/* OUT variables. */
};
struct pm_px_val {
};
struct pm_px_stat {
};
struct pm_cx_stat {
};
struct xen_sysctl_get_pmstat {
union {
/* other struct for tx, etc */
} u;
};
/*
* Status codes. Must be greater than 0 to avoid confusing
* sysctl callers that see 0 as a plain successful return.
*/
struct xen_sysctl_cpu_hotplug {
/* IN variables */
#define XEN_SYSCTL_CPU_HOTPLUG_ONLINE 0
};
/*
* 1. cpufreq governors and related parameters
*/
struct xen_userspace {
};
struct xen_ondemand {
};
/*
* cpufreq para name of this structure named
* same as sysfs file name of native linux
*/
struct xen_get_cpufreq_para {
/* for all governors */
/* OUT variable */
/* for specific governor */
union {
} u;
};
struct xen_set_cpufreq_gov {
};
struct xen_set_cpufreq_para {
};
/* Get physical CPU topology information. */
#define INVALID_TOPOLOGY_ID (~0U)
struct xen_get_cputopo {
/* IN: maximum addressable entry in
* the caller-provided cpu_to_core/socket.
*/
/* OUT: number of cpus returned
* If OUT is greater than IN then the cpu_to_core/socket is truncated!
*/
};
struct xen_sysctl_pm_op {
/* cpufreq command type */
/* get CPU topology */
/* cpuidle max_cstate access command */
/* set scheduler migration cost value */
union {
} u;
};
struct xen_sysctl_page_offline_op {
/* IN: range of page to be offlined */
/* OUT: result of page offline request */
/*
* bit 0~15: result flags
* bit 16~31: owner
*/
};
/* The result is invalid, i.e. HV does not handle it */
/* only valid when PG_OFFLINE_FAILED */
struct xen_sysctl {
union {
} u;
};
#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:
*/