libvirt/src/xen/xen_hypervisor.h

141 lines
5.9 KiB
C
Raw Normal View History

/*
* xen_internal.h: internal API for direct access to Xen hypervisor level
*
* Copyright (C) 2005, 2010-2011 Red Hat, Inc.
*
* See COPYING.LIB for the License of this software
*
* Daniel Veillard <veillard@redhat.com>
*/
#ifndef __VIR_XEN_INTERNAL_H__
# define __VIR_XEN_INTERNAL_H__
# include <libxml/uri.h>
# include "internal.h"
# include "capabilities.h"
# include "driver.h"
/* See xenHypervisorInit() for details. */
struct xenHypervisorVersions {
int hv; /* u16 major,minor hypervisor version */
int hypervisor; /* -1,0,1,2,3 */
int sys_interface; /* -1,2,3,4,6,7,8 */
int dom_interface; /* -1,3,4,5,6,7 */
};
extern struct xenUnifiedDriver xenHypervisorDriver;
int xenHypervisorInit(struct xenHypervisorVersions *override_versions);
2008-09-05 11:35:43 +00:00
virCapsPtr xenHypervisorMakeCapabilities (virConnectPtr conn);
int
xenHypervisorHasDomain(virConnectPtr conn,
int id);
virDomainPtr
xenHypervisorLookupDomainByID (virConnectPtr conn,
int id);
virDomainPtr
xenHypervisorLookupDomainByUUID (virConnectPtr conn,
const unsigned char *uuid);
char *
xenHypervisorDomainGetOSType (virDomainPtr dom);
virDrvOpenStatus
xenHypervisorOpen (virConnectPtr conn,
virConnectAuthPtr auth,
drivers: prefer unsigned int for flags Now that the public APIs always use unsigned flags, the internal driver callbacks might as well do likewise. * src/driver.h (vrDrvOpen, virDrvDomainCoreDump) (virDrvDomainGetXMLDesc, virDrvNetworkGetXMLDesc) (virDrvNWFilterGetXMLDesc): Update type. * src/remote/remote_protocol.x (remote_open_args) (remote_domain_core_dump_args, remote_domain_get_xml_desc_args) (remote_network_get_xml_desc_args) (remote_nwfilter_get_xml_desc_args): Likewise. * src/test/test_driver.c: Update clients. * src/remote/remote_driver.c: Likewise. * src/xen/xen_hypervisor.c: Likewise. * src/xen/xen_hypervisor.h: Likewise. * src/xen/xen_driver.c: Likewise. * src/xen/xend_internal.c: Likewise. * src/xen/xend_internal.h: Likewise. * src/xen/xm_internal.c: Likewise. * src/xen/xm_internal.h: Likewise. * src/xen/xs_internal.c: Likewise. * src/xen/xs_internal.h: Likewise. * src/xen/xen_inotify.c: Likewise. * src/xen/xen_inotify.h: Likewise. * src/phyp/phyp_driver.c: Likewise. * src/openvz/openvz_driver.c: Likewise. * src/vmware/vmware_driver.c: Likewise. * src/vbox/vbox_driver.c: Likewise. * src/vbox/vbox_tmpl.c: Likewise. * src/xenapi/xenapi_driver.c: Likewise. * src/esx/esx_driver.c: Likewise. * src/esx/esx_interface_driver.c: Likewise. * src/esx/esx_network_driver.c: Likewise. * src/esx/esx_storage_driver.c: Likewise. * src/esx/esx_device_monitor.c: Likewise. * src/esx/esx_secret_driver.c: Likewise. * src/esx/esx_nwfilter_driver.c: Likewise. * src/interface/netcf_driver.c: Likewise. * src/nwfilter/nwfilter_driver.c: Likewise. * src/libxl/libxl_driver.c: Likewise. * src/qemu/qemu_driver.c: Likewise. * src/lxc/lxc_driver.c: Likewise. * src/uml/uml_driver.c: Likewise. * src/network/bridge_driver.c: Likewise. * src/secret/secret_driver.c: Likewise. * src/storage/storage_driver.c: Likewise. * src/node_device/node_device_hal.c: Likewise. * src/node_device/node_device_udev.c: Likewise. * src/remote_protocol-structs: Likewise.
2011-07-06 20:40:19 +00:00
unsigned int flags);
int xenHypervisorClose (virConnectPtr conn);
int xenHypervisorGetVersion (virConnectPtr conn,
unsigned long *hvVer);
virCapsPtr
2008-09-05 11:35:43 +00:00
xenHypervisorMakeCapabilitiesInternal(virConnectPtr conn,
const char *hostmachine,
FILE *cpuinfo,
FILE *capabilities);
char *
xenHypervisorGetCapabilities (virConnectPtr conn);
unsigned long
xenHypervisorGetDomMaxMemory (virConnectPtr conn,
int id);
int xenHypervisorNumOfDomains (virConnectPtr conn);
int xenHypervisorListDomains (virConnectPtr conn,
int *ids,
int maxids);
int xenHypervisorGetMaxVcpus (virConnectPtr conn,
const char *type);
int xenHypervisorDestroyDomain (virDomainPtr domain)
ATTRIBUTE_NONNULL (1);
int xenHypervisorDestroyDomainFlags (virDomainPtr domain,
unsigned int flags)
ATTRIBUTE_NONNULL (1);
int xenHypervisorResumeDomain (virDomainPtr domain)
ATTRIBUTE_NONNULL (1);
int xenHypervisorPauseDomain (virDomainPtr domain)
ATTRIBUTE_NONNULL (1);
int xenHypervisorGetDomainInfo (virDomainPtr domain,
virDomainInfoPtr info)
ATTRIBUTE_NONNULL (1);
int xenHypervisorGetDomainState (virDomainPtr domain,
int *state,
int *reason,
unsigned int flags)
ATTRIBUTE_NONNULL (1);
int xenHypervisorGetDomInfo (virConnectPtr conn,
int id,
virDomainInfoPtr info);
int xenHypervisorSetMaxMemory (virDomainPtr domain,
unsigned long memory)
ATTRIBUTE_NONNULL (1);
int xenHypervisorCheckID (virConnectPtr conn,
int id);
int xenHypervisorSetVcpus (virDomainPtr domain,
unsigned int nvcpus)
ATTRIBUTE_NONNULL (1);
int xenHypervisorPinVcpu (virDomainPtr domain,
unsigned int vcpu,
unsigned char *cpumap,
int maplen)
ATTRIBUTE_NONNULL (1);
int xenHypervisorGetVcpus (virDomainPtr domain,
virVcpuInfoPtr info,
int maxinfo,
unsigned char *cpumaps,
int maplen)
ATTRIBUTE_NONNULL (1);
int xenHypervisorGetVcpuMax (virDomainPtr domain)
ATTRIBUTE_NONNULL (1);
char * xenHypervisorGetSchedulerType (virDomainPtr domain,
int *nparams)
ATTRIBUTE_NONNULL (1);
int xenHypervisorGetSchedulerParameters(virDomainPtr domain,
virTypedParameterPtr params,
int *nparams)
ATTRIBUTE_NONNULL (1);
int xenHypervisorSetSchedulerParameters(virDomainPtr domain,
virTypedParameterPtr params,
int nparams)
ATTRIBUTE_NONNULL (1);
int xenHypervisorDomainBlockStats (virDomainPtr domain,
const char *path,
struct _virDomainBlockStats *stats)
ATTRIBUTE_NONNULL (1);
int xenHypervisorDomainInterfaceStats (virDomainPtr domain,
const char *path,
struct _virDomainInterfaceStats *stats)
ATTRIBUTE_NONNULL (1);
int xenHypervisorNodeGetCellsFreeMemory(virConnectPtr conn,
unsigned long long *freeMems,
int startCell,
int maxCells);
2009-01-22 17:49:41 +00:00
int xenHavePrivilege(void);
#endif /* __VIR_XEN_INTERNAL_H__ */