From c54ae3f023bd2408e1ea5c1cb603a3bec56f64aa Mon Sep 17 00:00:00 2001 From: Daniel Veillard Date: Mon, 20 Mar 2006 23:42:12 +0000 Subject: [PATCH] * src/driver.h src/xen_internal.c: just add a driver block for the Xen hypervisor direct access module. Need to convert xend_internal.[ch] and make one for the Xenstore now ... Daniel --- ChangeLog | 6 ++++++ src/driver.h | 2 +- src/xen_internal.c | 29 +++++++++++++++++++++++++++++ 3 files changed, 36 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 5ad82484ad..94c8d8cc7a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Tue Mar 21 00:40:29 CET 2006 Daniel Veillard + + * src/driver.h src/xen_internal.c: just add a driver block for + the Xen hypervisor direct access module. Need to convert + xend_internal.[ch] and make one for the Xenstore now ... + Mon Mar 20 18:43:19 CET 2006 Daniel Veillard * src/driver.h src/internal.h src/libvirt.c src/xen_internal.c diff --git a/src/driver.h b/src/driver.h index 08853704f3..377af8af1b 100644 --- a/src/driver.h +++ b/src/driver.h @@ -29,7 +29,7 @@ typedef int typedef const char * (*virDrvGetType) (virConnectPtr conn); typedef int - (*virDrvGetVersion) (void * conn, + (*virDrvGetVersion) (virConnectPtr conn, unsigned long *hvVer); typedef int (*virDrvListDomains) (virConnectPtr conn, diff --git a/src/xen_internal.c b/src/xen_internal.c index 316aefd468..e3fc858e11 100644 --- a/src/xen_internal.c +++ b/src/xen_internal.c @@ -36,6 +36,35 @@ typedef struct hypercall_struct { #define XEN_HYPERVISOR_SOCKET "/proc/xen/privcmd" +static virDriver xenHypervisorDriver = { + "Xen", + NULL, /* init */ + xenHypervisorOpen, /* open */ + xenHypervisorClose, /* close */ + NULL, /* type */ + xenHypervisorGetVersion, /* version */ + NULL, /* listDomains */ + NULL, /* numOfDomains */ + NULL, /* domainCreateLinux */ + NULL, /* domainLookupByID */ + NULL, /* domainLookupByUUID */ + NULL, /* domainLookupByName */ + xenHypervisorPauseDomain, /* domainSuspend */ + xenHypervisorResumeDomain, /* domainResume */ + NULL, /* domainShutdown */ + xenHypervisorDestroyDomain, /* domainDestroy */ + NULL, /* domainFree */ + NULL, /* domainGetName */ + NULL, /* domainGetID */ + NULL, /* domainGetUUID */ + NULL, /* domainGetOSType */ + NULL, /* domainGetMaxMemory */ + xenHypervisorSetMaxMemory, /* domainSetMaxMemory */ + xenHypervisorGetDomainInfo, /* domainGetInfo */ + NULL, /* domainSave */ + NULL /* domainRestore */ +}; + /** * virXenError: * @conn: the connection if available -- GitLab