2005-12-07 18:10:51 +00:00
|
|
|
/*
|
|
|
|
* xen_internal.h: internal API for direct access to Xen hypervisor level
|
|
|
|
*
|
|
|
|
* Copyright (C) 2005 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__
|
|
|
|
|
2008-11-04 23:22:06 +00:00
|
|
|
#include <libxml/uri.h>
|
|
|
|
|
2008-07-25 13:17:27 +00:00
|
|
|
#include "internal.h"
|
|
|
|
#include "capabilities.h"
|
2008-12-17 21:26:16 +00:00
|
|
|
#include "driver.h"
|
2008-07-25 13:17:27 +00:00
|
|
|
|
Fri Jul 6 16:08:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* src/proxy_internal.c, src/proxy_internal.h,
src.xen_internal.c, src/xen_internal.h,
src/xen_unified.c, src/xen_unified.h,
src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h,
src/xs_internal.c, src/xs_internal.h: The interface
between xen_unified.c and its underlying driver now uses
a custom structure (struct xenUnifiedDriver) instead
of reusing virDriver.
* src/xen_unified.c: virDomainLookup* functions in Xen
now throw VIR_ERR_NO_DOMAIN if the domain does not exist.
* src/xs_internal.c: Fix indentation.
2007-07-06 15:11:22 +00:00
|
|
|
extern struct xenUnifiedDriver xenHypervisorDriver;
|
2008-12-22 10:32:20 +00:00
|
|
|
int xenHypervisorInit (void);
|
2007-04-04 14:19:49 +00:00
|
|
|
|
2008-09-05 11:35:43 +00:00
|
|
|
virCapsPtr xenHypervisorMakeCapabilities (virConnectPtr conn);
|
2008-07-25 13:17:27 +00:00
|
|
|
|
2007-04-04 14:19:49 +00:00
|
|
|
/* The following calls are made directly by the Xen proxy: */
|
|
|
|
|
2007-08-10 18:25:15 +00:00
|
|
|
virDomainPtr
|
|
|
|
xenHypervisorLookupDomainByID (virConnectPtr conn,
|
2008-04-10 16:54:54 +00:00
|
|
|
int id);
|
2007-08-10 18:25:15 +00:00
|
|
|
virDomainPtr
|
2008-12-22 10:32:20 +00:00
|
|
|
xenHypervisorLookupDomainByUUID (virConnectPtr conn,
|
|
|
|
const unsigned char *uuid);
|
2007-08-10 18:25:15 +00:00
|
|
|
char *
|
2008-12-22 10:32:20 +00:00
|
|
|
xenHypervisorDomainGetOSType (virDomainPtr dom);
|
2007-08-10 18:25:15 +00:00
|
|
|
|
2008-12-17 21:26:16 +00:00
|
|
|
virDrvOpenStatus
|
2008-12-22 10:32:20 +00:00
|
|
|
xenHypervisorOpen (virConnectPtr conn,
|
2008-04-10 16:54:54 +00:00
|
|
|
virConnectAuthPtr auth,
|
|
|
|
int flags);
|
2008-12-22 10:32:20 +00:00
|
|
|
int xenHypervisorClose (virConnectPtr conn);
|
|
|
|
int xenHypervisorGetVersion (virConnectPtr conn,
|
2008-04-10 16:54:54 +00:00
|
|
|
unsigned long *hvVer);
|
2008-07-25 13:17:27 +00:00
|
|
|
virCapsPtr
|
2008-09-05 11:35:43 +00:00
|
|
|
xenHypervisorMakeCapabilitiesInternal(virConnectPtr conn,
|
|
|
|
const char *hostmachine,
|
2008-07-25 13:17:27 +00:00
|
|
|
FILE *cpuinfo,
|
|
|
|
FILE *capabilities);
|
2007-03-15 17:24:56 +00:00
|
|
|
char *
|
|
|
|
xenHypervisorGetCapabilities (virConnectPtr conn);
|
2006-06-29 22:12:47 +00:00
|
|
|
unsigned long
|
2008-12-22 10:32:20 +00:00
|
|
|
xenHypervisorGetDomMaxMemory (virConnectPtr conn,
|
2008-04-10 16:54:54 +00:00
|
|
|
int id);
|
2008-12-22 10:32:20 +00:00
|
|
|
int xenHypervisorNumOfDomains (virConnectPtr conn);
|
|
|
|
int xenHypervisorListDomains (virConnectPtr conn,
|
2008-04-10 16:54:54 +00:00
|
|
|
int *ids,
|
|
|
|
int maxids);
|
2008-12-22 10:32:20 +00:00
|
|
|
int xenHypervisorGetMaxVcpus (virConnectPtr conn,
|
|
|
|
const char *type);
|
|
|
|
int xenHypervisorDestroyDomain (virDomainPtr domain);
|
|
|
|
int xenHypervisorResumeDomain (virDomainPtr domain);
|
|
|
|
int xenHypervisorPauseDomain (virDomainPtr domain);
|
|
|
|
int xenHypervisorGetDomainInfo (virDomainPtr domain,
|
2008-04-10 16:54:54 +00:00
|
|
|
virDomainInfoPtr info);
|
2008-12-22 10:32:20 +00:00
|
|
|
int xenHypervisorGetDomInfo (virConnectPtr conn,
|
2008-04-10 16:54:54 +00:00
|
|
|
int id,
|
|
|
|
virDomainInfoPtr info);
|
2008-12-22 10:32:20 +00:00
|
|
|
int xenHypervisorSetMaxMemory (virDomainPtr domain,
|
2008-04-10 16:54:54 +00:00
|
|
|
unsigned long memory);
|
2008-12-22 10:32:20 +00:00
|
|
|
int xenHypervisorCheckID (virConnectPtr conn,
|
2008-04-10 16:54:54 +00:00
|
|
|
int id);
|
2008-12-22 10:32:20 +00:00
|
|
|
int xenHypervisorSetVcpus (virDomainPtr domain,
|
2008-04-10 16:54:54 +00:00
|
|
|
unsigned int nvcpus);
|
2008-12-22 10:32:20 +00:00
|
|
|
int xenHypervisorPinVcpu (virDomainPtr domain,
|
2008-04-10 16:54:54 +00:00
|
|
|
unsigned int vcpu,
|
|
|
|
unsigned char *cpumap,
|
|
|
|
int maplen);
|
2008-12-22 10:32:20 +00:00
|
|
|
int xenHypervisorGetVcpus (virDomainPtr domain,
|
2008-04-10 16:54:54 +00:00
|
|
|
virVcpuInfoPtr info,
|
|
|
|
int maxinfo,
|
|
|
|
unsigned char *cpumaps,
|
|
|
|
int maplen);
|
2008-12-22 10:32:20 +00:00
|
|
|
int xenHypervisorGetVcpuMax (virDomainPtr domain);
|
2006-08-04 10:41:05 +00:00
|
|
|
|
2008-12-22 10:32:20 +00:00
|
|
|
char * xenHypervisorGetSchedulerType (virDomainPtr domain,
|
2008-04-10 16:54:54 +00:00
|
|
|
int *nparams);
|
2007-06-05 12:06:08 +00:00
|
|
|
|
2008-12-22 10:32:20 +00:00
|
|
|
int xenHypervisorGetSchedulerParameters(virDomainPtr domain,
|
2008-04-10 16:54:54 +00:00
|
|
|
virSchedParameterPtr params,
|
|
|
|
int *nparams);
|
2007-06-05 12:06:08 +00:00
|
|
|
|
2008-12-22 10:32:20 +00:00
|
|
|
int xenHypervisorSetSchedulerParameters(virDomainPtr domain,
|
2008-04-10 16:54:54 +00:00
|
|
|
virSchedParameterPtr params,
|
|
|
|
int nparams);
|
2007-06-05 12:06:08 +00:00
|
|
|
|
2007-08-21 10:08:12 +00:00
|
|
|
int xenHypervisorDomainBlockStats (virDomainPtr domain,
|
2008-04-10 16:54:54 +00:00
|
|
|
const char *path,
|
|
|
|
struct _virDomainBlockStats *stats);
|
2007-08-21 10:08:12 +00:00
|
|
|
int xenHypervisorDomainInterfaceStats (virDomainPtr domain,
|
2008-04-10 16:54:54 +00:00
|
|
|
const char *path,
|
|
|
|
struct _virDomainInterfaceStats *stats);
|
2007-08-21 10:08:12 +00:00
|
|
|
|
2008-12-22 10:32:20 +00:00
|
|
|
int xenHypervisorNodeGetCellsFreeMemory(virConnectPtr conn,
|
2008-04-10 16:54:54 +00:00
|
|
|
unsigned long long *freeMems,
|
|
|
|
int startCell,
|
|
|
|
int maxCells);
|
2008-08-20 20:48:35 +00:00
|
|
|
|
2006-03-15 12:13:25 +00:00
|
|
|
#endif /* __VIR_XEN_INTERNAL_H__ */
|