2005-12-07 18:10:51 +00:00
|
|
|
/*
|
2014-03-07 13:38:51 +00:00
|
|
|
* xen_hypervisor.h: internal API for direct access to Xen hypervisor level
|
2005-12-07 18:10:51 +00:00
|
|
|
*
|
2011-05-26 17:39:04 +00:00
|
|
|
* Copyright (C) 2005, 2010-2011 Red Hat, Inc.
|
2005-12-07 18:10:51 +00:00
|
|
|
*
|
2012-07-27 09:39:53 +00:00
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
2012-09-20 22:30:55 +00:00
|
|
|
* License along with this library. If not, see
|
2012-07-27 09:39:53 +00:00
|
|
|
* <http://www.gnu.org/licenses/>.
|
2005-12-07 18:10:51 +00:00
|
|
|
*
|
|
|
|
* Daniel Veillard <veillard@redhat.com>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __VIR_XEN_INTERNAL_H__
|
2010-03-09 18:22:22 +00:00
|
|
|
# define __VIR_XEN_INTERNAL_H__
|
2005-12-07 18:10:51 +00:00
|
|
|
|
2010-03-09 18:22:22 +00:00
|
|
|
# include "internal.h"
|
|
|
|
# include "capabilities.h"
|
|
|
|
# include "driver.h"
|
2012-02-24 18:48:55 +00:00
|
|
|
# include "viruri.h"
|
2013-05-01 09:31:23 +00:00
|
|
|
# include "domain_conf.h"
|
2008-07-25 13:17:27 +00:00
|
|
|
|
2011-10-14 10:58:01 +00:00
|
|
|
/* 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 */
|
|
|
|
};
|
|
|
|
|
2011-10-14 12:10:26 +00:00
|
|
|
int xenHypervisorInit(struct xenHypervisorVersions *override_versions);
|
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
|
|
|
|
2009-10-09 09:32:37 +00:00
|
|
|
int
|
|
|
|
xenHypervisorHasDomain(virConnectPtr conn,
|
|
|
|
int id);
|
2013-05-01 09:31:23 +00:00
|
|
|
virDomainDefPtr
|
|
|
|
xenHypervisorLookupDomainByID (virConnectPtr conn, int id);
|
|
|
|
virDomainDefPtr
|
2008-12-22 10:32:20 +00:00
|
|
|
xenHypervisorLookupDomainByUUID (virConnectPtr conn,
|
|
|
|
const unsigned char *uuid);
|
2007-08-10 18:25:15 +00:00
|
|
|
char *
|
2013-05-01 10:29:08 +00:00
|
|
|
xenHypervisorDomainGetOSType (virConnectPtr conn,
|
|
|
|
virDomainDefPtr def);
|
2007-08-10 18:25:15 +00:00
|
|
|
|
2013-04-30 13:41:48 +00:00
|
|
|
int
|
2008-12-22 10:32:20 +00:00
|
|
|
xenHypervisorOpen (virConnectPtr conn,
|
2008-04-10 16:54:54 +00:00
|
|
|
virConnectAuthPtr auth,
|
2011-07-06 20:40:19 +00:00
|
|
|
unsigned 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,
|
2012-12-10 22:28:09 +00:00
|
|
|
virArch hostarch,
|
2008-07-25 13:17:27 +00:00
|
|
|
FILE *cpuinfo,
|
|
|
|
FILE *capabilities);
|
2013-05-01 10:29:08 +00:00
|
|
|
char * xenHypervisorGetCapabilities (virConnectPtr conn);
|
2006-06-29 22:12:47 +00:00
|
|
|
unsigned long
|
2013-05-01 10:29:08 +00:00
|
|
|
xenHypervisorGetMaxMemory(virConnectPtr conn,
|
|
|
|
virDomainDefPtr def);
|
2008-12-22 10:32:20 +00:00
|
|
|
int xenHypervisorGetMaxVcpus (virConnectPtr conn,
|
|
|
|
const char *type);
|
2013-05-01 10:29:08 +00:00
|
|
|
int xenHypervisorGetDomainInfo (virConnectPtr conn,
|
|
|
|
virDomainDefPtr def,
|
2010-01-27 12:34:03 +00:00
|
|
|
virDomainInfoPtr info)
|
|
|
|
ATTRIBUTE_NONNULL (1);
|
2013-05-01 10:29:08 +00:00
|
|
|
int xenHypervisorGetDomainState (virConnectPtr conn,
|
|
|
|
virDomainDefPtr def,
|
2011-05-02 09:35:29 +00:00
|
|
|
int *state,
|
2013-04-30 15:42:29 +00:00
|
|
|
int *reason)
|
2011-05-02 09:35:29 +00:00
|
|
|
ATTRIBUTE_NONNULL (1);
|
2008-12-22 10:32:20 +00:00
|
|
|
int xenHypervisorGetDomInfo (virConnectPtr conn,
|
2008-04-10 16:54:54 +00:00
|
|
|
int id,
|
|
|
|
virDomainInfoPtr info);
|
2013-05-01 10:29:08 +00:00
|
|
|
int xenHypervisorSetMaxMemory (virConnectPtr conn,
|
|
|
|
virDomainDefPtr def,
|
2010-01-27 12:34:03 +00:00
|
|
|
unsigned long memory)
|
|
|
|
ATTRIBUTE_NONNULL (1);
|
2008-12-22 10:32:20 +00:00
|
|
|
int xenHypervisorCheckID (virConnectPtr conn,
|
2008-04-10 16:54:54 +00:00
|
|
|
int id);
|
2013-05-01 17:37:29 +00:00
|
|
|
int xenHypervisorPinVcpu (virConnectPtr conn,
|
|
|
|
virDomainDefPtr def,
|
2008-04-10 16:54:54 +00:00
|
|
|
unsigned int vcpu,
|
|
|
|
unsigned char *cpumap,
|
2010-01-27 12:34:03 +00:00
|
|
|
int maplen)
|
|
|
|
ATTRIBUTE_NONNULL (1);
|
2013-05-01 17:37:29 +00:00
|
|
|
int xenHypervisorGetVcpus (virConnectPtr conn,
|
|
|
|
virDomainDefPtr def,
|
2008-04-10 16:54:54 +00:00
|
|
|
virVcpuInfoPtr info,
|
|
|
|
int maxinfo,
|
|
|
|
unsigned char *cpumaps,
|
2010-01-27 12:34:03 +00:00
|
|
|
int maplen)
|
|
|
|
ATTRIBUTE_NONNULL (1);
|
2013-05-01 17:37:29 +00:00
|
|
|
int xenHypervisorGetVcpuMax (virConnectPtr conn,
|
|
|
|
virDomainDefPtr def)
|
2010-01-27 12:34:03 +00:00
|
|
|
ATTRIBUTE_NONNULL (1);
|
2006-08-04 10:41:05 +00:00
|
|
|
|
2013-05-02 10:13:39 +00:00
|
|
|
char * xenHypervisorGetSchedulerType (virConnectPtr conn,
|
2010-01-27 12:34:03 +00:00
|
|
|
int *nparams)
|
|
|
|
ATTRIBUTE_NONNULL (1);
|
2007-06-05 12:06:08 +00:00
|
|
|
|
2013-05-02 10:13:39 +00:00
|
|
|
int xenHypervisorGetSchedulerParameters(virConnectPtr conn,
|
|
|
|
virDomainDefPtr def,
|
|
|
|
virTypedParameterPtr params,
|
|
|
|
int *nparams)
|
2010-01-27 12:34:03 +00:00
|
|
|
ATTRIBUTE_NONNULL (1);
|
2007-06-05 12:06:08 +00:00
|
|
|
|
2013-05-02 10:13:39 +00:00
|
|
|
int xenHypervisorSetSchedulerParameters(virConnectPtr conn,
|
|
|
|
virDomainDefPtr def,
|
|
|
|
virTypedParameterPtr params,
|
|
|
|
int nparams)
|
2010-01-27 12:34:03 +00:00
|
|
|
ATTRIBUTE_NONNULL (1);
|
2007-06-05 12:06:08 +00:00
|
|
|
|
2013-05-02 10:24:49 +00:00
|
|
|
int xenHypervisorDomainBlockStats (virConnectPtr conn,
|
|
|
|
virDomainDefPtr def,
|
2008-04-10 16:54:54 +00:00
|
|
|
const char *path,
|
2014-09-16 13:19:46 +00:00
|
|
|
virDomainBlockStatsPtr stats)
|
2010-01-27 12:34:03 +00:00
|
|
|
ATTRIBUTE_NONNULL (1);
|
2013-05-02 10:24:49 +00:00
|
|
|
int xenHypervisorDomainInterfaceStats (virDomainDefPtr def,
|
|
|
|
const char *path,
|
2014-09-16 13:19:45 +00:00
|
|
|
virDomainInterfaceStatsPtr stats)
|
2010-01-27 12:34:03 +00:00
|
|
|
ATTRIBUTE_NONNULL (1);
|
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
|
|
|
|
2009-01-22 17:49:41 +00:00
|
|
|
int xenHavePrivilege(void);
|
|
|
|
|
2006-03-15 12:13:25 +00:00
|
|
|
#endif /* __VIR_XEN_INTERNAL_H__ */
|