From f4cfa0ca43186ff9e61c3b47ff6c9104225fa572 Mon Sep 17 00:00:00 2001 From: Christian Prochaska Date: Thu, 3 May 2018 14:51:26 +0200 Subject: [PATCH] vbox5: remove 'force_ioapic' code Fixes #2806 --- repos/ports/src/virtualbox5/README | 13 --------- repos/ports/src/virtualbox5/devices.cc | 37 ++++---------------------- 2 files changed, 5 insertions(+), 45 deletions(-) diff --git a/repos/ports/src/virtualbox5/README b/repos/ports/src/virtualbox5/README index eec7691b6e..3b9223e7a4 100644 --- a/repos/ports/src/virtualbox5/README +++ b/repos/ports/src/virtualbox5/README @@ -14,19 +14,6 @@ configuration option: -IOAPIC -====== - -The virtual PCI model delivers IRQs to the PIC by default and to the IOAPIC -only if the guest operating system selected the IOAPIC with the '_PIC' ACPI -method and if it called the '_PRT' ACPI method afterwards. When running a -guest operating system which uses the IOAPIC, but does not call these ACPI -methods (for example Genode/NOVA), the configuration option - - - -enforces the delivery of PCI IRQs to the IOAPIC. - CAPSLOCK ======== diff --git a/repos/ports/src/virtualbox5/devices.cc b/repos/ports/src/virtualbox5/devices.cc index 74fcf8f98c..469e627643 100644 --- a/repos/ports/src/virtualbox5/devices.cc +++ b/repos/ports/src/virtualbox5/devices.cc @@ -11,8 +11,11 @@ * version 2. */ -/* Genode includes */ -#include +/* + * VirtualBox defines a 'Log' macro, which would interfere with 'Genode::Log' + * if we didn't include the header here + */ +#include /* VirtualBox includes */ #include @@ -72,33 +75,3 @@ extern "C" int VBoxDevicesRegister(PPDMDEVREGCB pCallbacks, uint32_t u32Version) return VINF_SUCCESS; } - -/* - * The virtual PCI model delivers IRQs to the PIC by default and to the IOAPIC - * only if the guest operating system selected the IOAPIC with the '_PIC' ACPI - * method and if it called the '_PRT' ACPI method afterwards. When running a - * guest operating system which uses the IOAPIC, but does not call these ACPI - * methods (for example Genode/NOVA), IRQ delivery to the IOAPIC can be - * enforced with the 'force_ioapic' configuration option. - * - * References: - * - 'pciSetIrqInternal()' in DevPCI.cpp - * - '_PIC' and '_PRT' ACPI methods in vbox.dsl - */ - -static bool read_force_ioapic_from_config() -{ - try { - Genode::Attached_rom_dataspace config(genode_env(), "config"); - return config.xml().attribute_value("force_ioapic", false); - } catch (Genode::Rom_connection::Rom_connection_failed) { - return false; - } -} - -bool force_ioapic() -{ - /* read only once from config ROM */ - static bool force = read_force_ioapic_from_config(); - return force; -}