vbox: Drop support for virtualbox-6.0.0

According to VirtualBox download page [1], the 6.0.0 release is
no longer supported (the support ended 2020/07). Drop it from
Libvirt too.

1: https://www.virtualbox.org/wiki/Download_Old_Builds

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
Michal Privoznik 2023-01-21 13:30:34 +01:00
parent 445549af07
commit aad22bea70
9 changed files with 22 additions and 29650 deletions

View File

@ -4,7 +4,7 @@
VirtualBox hypervisor driver VirtualBox hypervisor driver
============================ ============================
The libvirt VirtualBox driver can manage any VirtualBox version from version 6.0 The libvirt VirtualBox driver can manage any VirtualBox version from version 6.1
onwards ( :since:`since libvirt 3.0.0` ). onwards ( :since:`since libvirt 3.0.0` ).
Project Links Project Links

View File

@ -1,5 +1,4 @@
vbox_driver_sources = [ vbox_driver_sources = [
'vbox_V6_0.c',
'vbox_V6_1.c', 'vbox_V6_1.c',
'vbox_common.c', 'vbox_common.c',
'vbox_driver.c', 'vbox_driver.c',

File diff suppressed because it is too large Load Diff

View File

@ -1,13 +0,0 @@
/** @file vbox_V6_0.c
* C file to include support for multiple versions of VirtualBox
* at runtime.
*/
#include <config.h>
/** The API Version */
#define VBOX_API_VERSION 6000000
/** Version specific prefix. */
#define NAME(name) vbox60##name
#include "vbox_tmpl.c"

View File

@ -30,7 +30,7 @@
# define ___VBoxXPCOMC_cglue_h # define ___VBoxXPCOMC_cglue_h
/* This has to be the oldest version we support. */ /* This has to be the oldest version we support. */
# include "vbox_CAPI_v6_0.h" # include "vbox_CAPI_v6_1.h"
/** Pointer to VBoxGetXPCOMCFunctions for the loaded VBoxXPCOMC so/dylib/dll. */ /** Pointer to VBoxGetXPCOMCFunctions for the loaded VBoxXPCOMC so/dylib/dll. */
extern PFNVBOXGETXPCOMCFUNCTIONS g_pfnGetFunctions; extern PFNVBOXGETXPCOMCFUNCTIONS g_pfnGetFunctions;

View File

@ -440,9 +440,7 @@ typedef nsISupports IKeyboard;
#define installUniformedAPI(gVBoxAPI, result) \ #define installUniformedAPI(gVBoxAPI, result) \
do { \ do { \
result = 0; \ result = 0; \
if (uVersion >= 6000000 && uVersion < 6000051) { \ if (uVersion >= 6000051 && uVersion < 6001051) { \
vbox60InstallUniformedAPI(&gVBoxAPI); \
} else if (uVersion >= 6000051 && uVersion < 6001051) { \
vbox61InstallUniformedAPI(&gVBoxAPI); \ vbox61InstallUniformedAPI(&gVBoxAPI); \
} else { \ } else { \
result = -1; \ result = -1; \

View File

@ -881,9 +881,7 @@ virStorageDriver *vboxGetStorageDriver(uint32_t uVersion)
/* Install gVBoxAPI according to the vbox API version. /* Install gVBoxAPI according to the vbox API version.
* Return -1 for unsupported version. * Return -1 for unsupported version.
*/ */
if (uVersion >= 6000000 && uVersion < 6000051) { if (uVersion >= 6000051 && uVersion < 6001051) {
vbox60InstallUniformedAPI(&gVBoxAPI);
} else if (uVersion >= 6000051 && uVersion < 6001051) {
vbox61InstallUniformedAPI(&gVBoxAPI); vbox61InstallUniformedAPI(&gVBoxAPI);
} else { } else {
return NULL; return NULL;

View File

@ -44,9 +44,7 @@
#include "virstring.h" #include "virstring.h"
/* This one changes from version to version. */ /* This one changes from version to version. */
#if VBOX_API_VERSION == 6000000 #if VBOX_API_VERSION == 6001000
# include "vbox_CAPI_v6_0.h"
#elif VBOX_API_VERSION == 6001000
# include "vbox_CAPI_v6_1.h" # include "vbox_CAPI_v6_1.h"
#else #else
# error "Unsupported VBOX_API_VERSION" # error "Unsupported VBOX_API_VERSION"
@ -743,14 +741,10 @@ _machineLaunchVMProcess(struct _vboxDriver *data,
PRUnichar *sessionType, PRUnichar *env, PRUnichar *sessionType, PRUnichar *env,
IProgress **progress) IProgress **progress)
{ {
#if VBOX_API_VERSION >= 6001000
PRUnichar *envlist[] = { env }; PRUnichar *envlist[] = { env };
return machine->vtbl->LaunchVMProcess(machine, data->vboxSession, return machine->vtbl->LaunchVMProcess(machine, data->vboxSession,
sessionType, 1, envlist, progress); sessionType, 1, envlist, progress);
#else
return machine->vtbl->LaunchVMProcess(machine, data->vboxSession,
sessionType, env, progress);
#endif
} }
static nsresult static nsresult
@ -910,123 +904,107 @@ _machineSetBootOrder(IMachine *machine, PRUint32 position, PRUint32 device)
static nsresult static nsresult
_machineGetVRAMSize(IMachine *machine, PRUint32 *VRAMSize) _machineGetVRAMSize(IMachine *machine, PRUint32 *VRAMSize)
{ {
#if VBOX_API_VERSION >= 6001000
IGraphicsAdapter *ga; IGraphicsAdapter *ga;
nsresult ret; nsresult ret;
ret = machine->vtbl->GetGraphicsAdapter(machine, &ga); ret = machine->vtbl->GetGraphicsAdapter(machine, &ga);
if (NS_FAILED(ret)) if (NS_FAILED(ret))
return ret; return ret;
return ga->vtbl->GetVRAMSize(ga, VRAMSize); return ga->vtbl->GetVRAMSize(ga, VRAMSize);
#else
return machine->vtbl->GetVRAMSize(machine, VRAMSize);
#endif
} }
static nsresult static nsresult
_machineSetVRAMSize(IMachine *machine, PRUint32 VRAMSize) _machineSetVRAMSize(IMachine *machine, PRUint32 VRAMSize)
{ {
#if VBOX_API_VERSION >= 6001000
IGraphicsAdapter *ga; IGraphicsAdapter *ga;
nsresult ret; nsresult ret;
ret = machine->vtbl->GetGraphicsAdapter(machine, &ga); ret = machine->vtbl->GetGraphicsAdapter(machine, &ga);
if (NS_FAILED(ret)) if (NS_FAILED(ret))
return ret; return ret;
return ga->vtbl->SetVRAMSize(ga, VRAMSize); return ga->vtbl->SetVRAMSize(ga, VRAMSize);
#else
return machine->vtbl->SetVRAMSize(machine, VRAMSize);
#endif
} }
static nsresult static nsresult
_machineGetMonitorCount(IMachine *machine, PRUint32 *monitorCount) _machineGetMonitorCount(IMachine *machine, PRUint32 *monitorCount)
{ {
#if VBOX_API_VERSION >= 6001000
IGraphicsAdapter *ga; IGraphicsAdapter *ga;
nsresult ret; nsresult ret;
ret = machine->vtbl->GetGraphicsAdapter(machine, &ga); ret = machine->vtbl->GetGraphicsAdapter(machine, &ga);
if (NS_FAILED(ret)) if (NS_FAILED(ret))
return ret; return ret;
return ga->vtbl->GetMonitorCount(ga, monitorCount); return ga->vtbl->GetMonitorCount(ga, monitorCount);
#else
return machine->vtbl->GetMonitorCount(machine, monitorCount);
#endif
} }
static nsresult static nsresult
_machineSetMonitorCount(IMachine *machine, PRUint32 monitorCount) _machineSetMonitorCount(IMachine *machine, PRUint32 monitorCount)
{ {
#if VBOX_API_VERSION >= 6001000
IGraphicsAdapter *ga; IGraphicsAdapter *ga;
nsresult ret; nsresult ret;
ret = machine->vtbl->GetGraphicsAdapter(machine, &ga); ret = machine->vtbl->GetGraphicsAdapter(machine, &ga);
if (NS_FAILED(ret)) if (NS_FAILED(ret))
return ret; return ret;
return ga->vtbl->SetMonitorCount(ga, monitorCount); return ga->vtbl->SetMonitorCount(ga, monitorCount);
#else
return machine->vtbl->SetMonitorCount(machine, monitorCount);
#endif
} }
static nsresult static nsresult
_machineGetAccelerate3DEnabled(IMachine *machine, PRBool *accelerate3DEnabled) _machineGetAccelerate3DEnabled(IMachine *machine, PRBool *accelerate3DEnabled)
{ {
#if VBOX_API_VERSION >= 6001000
IGraphicsAdapter *ga; IGraphicsAdapter *ga;
nsresult ret; nsresult ret;
ret = machine->vtbl->GetGraphicsAdapter(machine, &ga); ret = machine->vtbl->GetGraphicsAdapter(machine, &ga);
if (NS_FAILED(ret)) if (NS_FAILED(ret))
return ret; return ret;
return ga->vtbl->GetAccelerate3DEnabled(ga, accelerate3DEnabled); return ga->vtbl->GetAccelerate3DEnabled(ga, accelerate3DEnabled);
#else
return machine->vtbl->GetAccelerate3DEnabled(machine, accelerate3DEnabled);
#endif
} }
static nsresult static nsresult
_machineSetAccelerate3DEnabled(IMachine *machine, PRBool accelerate3DEnabled) _machineSetAccelerate3DEnabled(IMachine *machine, PRBool accelerate3DEnabled)
{ {
#if VBOX_API_VERSION >= 6001000
IGraphicsAdapter *ga; IGraphicsAdapter *ga;
nsresult ret; nsresult ret;
ret = machine->vtbl->GetGraphicsAdapter(machine, &ga); ret = machine->vtbl->GetGraphicsAdapter(machine, &ga);
if (NS_FAILED(ret)) if (NS_FAILED(ret))
return ret; return ret;
return ga->vtbl->SetAccelerate3DEnabled(ga, accelerate3DEnabled); return ga->vtbl->SetAccelerate3DEnabled(ga, accelerate3DEnabled);
#else
return machine->vtbl->SetAccelerate3DEnabled(machine, accelerate3DEnabled);
#endif
} }
static nsresult static nsresult
_machineGetAccelerate2DVideoEnabled(IMachine *machine, _machineGetAccelerate2DVideoEnabled(IMachine *machine,
PRBool *accelerate2DVideoEnabled) PRBool *accelerate2DVideoEnabled)
{ {
#if VBOX_API_VERSION >= 6001000
IGraphicsAdapter *ga; IGraphicsAdapter *ga;
nsresult ret; nsresult ret;
ret = machine->vtbl->GetGraphicsAdapter(machine, &ga); ret = machine->vtbl->GetGraphicsAdapter(machine, &ga);
if (NS_FAILED(ret)) if (NS_FAILED(ret))
return ret; return ret;
return ga->vtbl->GetAccelerate2DVideoEnabled(ga, accelerate2DVideoEnabled); return ga->vtbl->GetAccelerate2DVideoEnabled(ga, accelerate2DVideoEnabled);
#else
return machine->vtbl->GetAccelerate2DVideoEnabled(machine, accelerate2DVideoEnabled);
#endif
} }
static nsresult static nsresult
_machineSetAccelerate2DVideoEnabled(IMachine *machine, _machineSetAccelerate2DVideoEnabled(IMachine *machine,
PRBool accelerate2DVideoEnabled) PRBool accelerate2DVideoEnabled)
{ {
#if VBOX_API_VERSION >= 6001000
IGraphicsAdapter *ga; IGraphicsAdapter *ga;
nsresult ret; nsresult ret;
ret = machine->vtbl->GetGraphicsAdapter(machine, &ga); ret = machine->vtbl->GetGraphicsAdapter(machine, &ga);
if (NS_FAILED(ret)) if (NS_FAILED(ret))
return ret; return ret;
return ga->vtbl->SetAccelerate2DVideoEnabled(ga, accelerate2DVideoEnabled); return ga->vtbl->SetAccelerate2DVideoEnabled(ga, accelerate2DVideoEnabled);
#else
return machine->vtbl->SetAccelerate2DVideoEnabled(machine, accelerate2DVideoEnabled);
#endif
} }
static nsresult static nsresult
@ -2113,13 +2091,8 @@ static nsresult
_dhcpServerStart(IDHCPServer *dhcpServer, PRUnichar *networkName G_GNUC_UNUSED, _dhcpServerStart(IDHCPServer *dhcpServer, PRUnichar *networkName G_GNUC_UNUSED,
PRUnichar *trunkName, PRUnichar *trunkType) PRUnichar *trunkName, PRUnichar *trunkType)
{ {
#if VBOX_API_VERSION >= 6001000
return dhcpServer->vtbl->Start(dhcpServer, return dhcpServer->vtbl->Start(dhcpServer,
trunkName, trunkType); trunkName, trunkType);
#else
return dhcpServer->vtbl->Start(dhcpServer, networkName,
trunkName, trunkType);
#endif
} }
static nsresult static nsresult

View File

@ -550,5 +550,4 @@ virDomainPtr vboxDomainLookupByUUID(virConnectPtr conn,
const unsigned char *uuid); const unsigned char *uuid);
/* Version specified functions for installing uniformed API */ /* Version specified functions for installing uniformed API */
void vbox60InstallUniformedAPI(vboxUniformedAPI *pVBoxAPI);
void vbox61InstallUniformedAPI(vboxUniformedAPI *pVBoxAPI); void vbox61InstallUniformedAPI(vboxUniformedAPI *pVBoxAPI);