From 894c7411e70476b2c92c134ff78d8c92a1138ef4 Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Fri, 8 May 2020 15:38:48 +0200 Subject: [PATCH] Remove obsolete vmm_utils test --- repos/ports/run/vmm_utils.run | 40 --------- repos/ports/src/test/vmm_utils/main.cc | 100 ----------------------- repos/ports/src/test/vmm_utils/target.mk | 9 -- 3 files changed, 149 deletions(-) delete mode 100644 repos/ports/run/vmm_utils.run delete mode 100644 repos/ports/src/test/vmm_utils/main.cc delete mode 100644 repos/ports/src/test/vmm_utils/target.mk diff --git a/repos/ports/run/vmm_utils.run b/repos/ports/run/vmm_utils.run deleted file mode 100644 index 2ce0a2a98..000000000 --- a/repos/ports/run/vmm_utils.run +++ /dev/null @@ -1,40 +0,0 @@ -build { core init timer test/vmm_utils } - -create_boot_directory - -install_config { - - - - - - - - - - - - - - - - - - - - - - -} - -build_boot_image { core ld.lib.so init timer test-vmm_utils } - -append qemu_args " -cpu phenom " -append qemu_args " -nographic " - -run_genode_until {.*VMM: vcpu_s_1 _vcpu_startup called.*\n} 30 -run_genode_until {.*VMM: vcpu_s_2 _vcpu_startup called.*\n} 10 [output_spawn_id] -run_genode_until {.*VMM: vcpu_o_1 _vcpu_startup called.*\n} 10 [output_spawn_id] -run_genode_until {.*VMM: vcpu_o_2 _vcpu_startup called.*\n} 10 [output_spawn_id] - -puts "Test succeeded" diff --git a/repos/ports/src/test/vmm_utils/main.cc b/repos/ports/src/test/vmm_utils/main.cc deleted file mode 100644 index 34e47e16a..000000000 --- a/repos/ports/src/test/vmm_utils/main.cc +++ /dev/null @@ -1,100 +0,0 @@ -/* - * \brief Test for Genode's VMM utilities - * \author Norman Feske - * \date 2013-08-20 - */ - -/* - * Copyright (C) 2010-2017 Genode Labs GmbH - * - * This file is distributed under the terms of the GNU General Public License - * version 2. - */ - -/* Genode includes */ -#include - -/* VMM utility includes */ -#include -#include -#include - - -template -class Vcpu_dispatcher : public Vmm::Vcpu_dispatcher -{ - private: - - typedef Vcpu_dispatcher This; - - T _vcpu_thread; - - /** - * Shortcut for calling 'Vmm::Vcpu_dispatcher::register_handler' - * with 'Vcpu_dispatcher' as template argument - */ - template - void _register_handler(Genode::addr_t exc_base, Nova::Mtd mtd) - { - register_handler(exc_base, mtd); - } - - enum { STACK_SIZE = 1024*sizeof(long) }; - - - /*********************************** - ** Virtualization event handlers ** - ***********************************/ - - void _vcpu_startup() - { - Vmm::log(name(), " ", __func__, " called"); - } - - public: - - enum Type { SVM, VTX }; - - Vcpu_dispatcher(Genode::Env &env, Type type, char const * name, - Genode::Capability pd_cap) - : - Vmm::Vcpu_dispatcher(env, STACK_SIZE, &env.cpu(), - Genode::Affinity::Location(), - name), - _vcpu_thread(&env.cpu(), Genode::Affinity::Location(), pd_cap, - STACK_SIZE) - { - using namespace Nova; - - /* shortcuts for common message-transfer descriptors */ - Mtd const mtd_all(Mtd::ALL); - Mtd const mtd_cpuid(Mtd::EIP | Mtd::ACDB | Mtd::IRQ); - Mtd const mtd_irq(Mtd::IRQ); - - Genode::addr_t exc_base = _vcpu_thread.exc_base(); - - /* register virtualization event handlers */ - if (type == SVM) { - _register_handler<0xfe, &This::_vcpu_startup> - (exc_base, mtd_all); - } - - /* start virtual CPU */ - _vcpu_thread.start(sel_sm_ec() + 1); - } -}; - - -void Component::construct(Genode::Env &env) -{ - typedef Vcpu_dispatcher Vcpu_s; - - static Vcpu_s vcpu_s_1(env, Vcpu_s::SVM, "vcpu_s_1", env.pd_session_cap()); - static Vcpu_s vcpu_s_2(env, Vcpu_s::SVM, "vcpu_s_2", env.pd_session_cap()); - - typedef Vcpu_dispatcher Vcpu_o; - - static Genode::Pd_connection remote_pd(env, "VM"); - static Vcpu_o vcpu_o_1(env, Vcpu_o::SVM, "vcpu_o_1", remote_pd.rpc_cap()); - static Vcpu_o vcpu_o_2(env, Vcpu_o::SVM, "vcpu_o_2", remote_pd.rpc_cap()); -} diff --git a/repos/ports/src/test/vmm_utils/target.mk b/repos/ports/src/test/vmm_utils/target.mk deleted file mode 100644 index 5958acbac..000000000 --- a/repos/ports/src/test/vmm_utils/target.mk +++ /dev/null @@ -1,9 +0,0 @@ -TARGET = test-vmm_utils -SRC_CC = main.cc -LIBS += base-nova - -REQUIRES = nova - -vpath %.cc $(PRG_DIR)/.. - -CC_CXX_WARN_STRICT =