From 079f687a02fe30042215065fa84618442aa88fb5 Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Sat, 27 Aug 2016 08:16:25 +0200 Subject: [PATCH] return error code if the single-kernel version tries to initialize iRCCE --- README.md | 1 + hermit/kernel/syscall.c | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/README.md b/README.md index 878f7554c..ee3b931da 100644 --- a/README.md +++ b/README.md @@ -64,6 +64,7 @@ The demo applications are stored in their subdirectories `hermit/usr/{tests,benc ## HermitCore as classical standalone unikernel HermitCore applications can be directly started as standalone kernel within a virtual machine. +In this case, iRCCE isn’t supported. Please register the loader like the multi-kernel version of HermitCore (see bullet 4 in section *Building and testing HermitCore on a real machine*). If the environment variable `HERMIT_ISLE` is set to `qemu`, the application will be started within a VM. Please note that the loader requires Qemu **with** KVM support and expects that the executable name is *qemu-system-x86_64*. diff --git a/hermit/kernel/syscall.c b/hermit/kernel/syscall.c index 4a85156f5..70040ec12 100644 --- a/hermit/kernel/syscall.c +++ b/hermit/kernel/syscall.c @@ -463,6 +463,9 @@ int sys_rcce_init(int session_id) int i, err = 0; size_t paddr = 0; + if (is_single_kernel()) + return -ENOSYS; + if (session_id <= 0) return -EINVAL; @@ -514,6 +517,9 @@ size_t sys_rcce_malloc(int session_id, int ue) size_t vaddr = 0; int i, counter = 0; + if (is_single_kernel()) + return -ENOSYS; + if (session_id <= 0) return -EINVAL; @@ -566,6 +572,9 @@ int sys_rcce_fini(int session_id) // we have to free the MPB + if (is_single_kernel()) + return -ENOSYS; + if (session_id <= 0) return -EINVAL;