vbox: read 'force_ioapic' config option only once

Fixes #2049
This commit is contained in:
Christian Prochaska 2016-07-29 17:34:15 +02:00 committed by Christian Helmuth
parent 7f8f0f50ea
commit c72d1655f4

View File

@ -76,7 +76,8 @@ extern "C" int VBoxDevicesRegister(PPDMDEVREGCB pCallbacks, uint32_t u32Version)
* - 'pciSetIrqInternal()' in DevPCI.cpp
* - '_PIC' and '_PRT' ACPI methods in vbox.dsl
*/
bool force_ioapic()
static bool read_force_ioapic_from_config()
{
try {
Genode::Attached_rom_dataspace config("config");
@ -85,3 +86,10 @@ bool force_ioapic()
return false;
}
}
bool force_ioapic()
{
/* read only once from config ROM */
static bool force = read_force_ioapic_from_config();
return force;
}