Keep dual-licensed code and/or headers shared between components at one single place.
Signed-off-by: Ralf Ramsauer <[email protected]> Signed-off-by: Antonios Motakis <[email protected]> Cc: Antonios Motakis <[email protected]> --- configs/Makefile | 7 +++--- driver/Makefile | 5 ++++- hypervisor/Makefile | 4 +++- .../arch/arm}/asm/jailhouse_hypercall.h | 0 .../arch/arm64}/asm/jailhouse_hypercall.h | 26 ++++++++++++++++++++++ .../arch/x86}/asm/jailhouse_hypercall.h | 0 .../include => include}/jailhouse/hypercall.h | 0 inmates/Makefile | 4 +++- 8 files changed, 40 insertions(+), 6 deletions(-) rename {hypervisor/arch/arm/include => include/arch/arm}/asm/jailhouse_hypercall.h (100%) rename {hypervisor/arch/arm64/include => include/arch/arm64}/asm/jailhouse_hypercall.h (63%) rename {hypervisor/arch/x86/include => include/arch/x86}/asm/jailhouse_hypercall.h (100%) rename {hypervisor/include => include}/jailhouse/hypercall.h (100%) diff --git a/configs/Makefile b/configs/Makefile index fc15086f..7a0224de 100644 --- a/configs/Makefile +++ b/configs/Makefile @@ -13,11 +13,12 @@ subdir-y := dts LINUXINCLUDE := -I$(src)/../hypervisor/arch/$(SRCARCH)/include \ - -I$(src)/../hypervisor/include + -I$(src)/../hypervisor/include \ + -I$(src)/../include KBUILD_CFLAGS := -Wextra -ifneq ($(wildcard $(obj)/../hypervisor/include/jailhouse/config.h),) -KBUILD_CFLAGS += -include $(obj)/../hypervisor/include/jailhouse/config.h +ifneq ($(wildcard $(obj)/../include/jailhouse/config.h),) +KBUILD_CFLAGS += -include $(obj)/../include/jailhouse/config.h endif OBJCOPYFLAGS := -O binary diff --git a/driver/Makefile b/driver/Makefile index 9febfe26..609e07a9 100644 --- a/driver/Makefile +++ b/driver/Makefile @@ -14,7 +14,10 @@ obj-m := jailhouse.o ccflags-y := -I$(src)/../hypervisor/arch/$(SRCARCH)/include \ - -I$(src)/../hypervisor/include + -I$(src)/../hypervisor/include \ + -I$(src)/../include/arch/$(SRCARCH) \ + -I$(src)/../include + jailhouse-y := cell.o main.o sysfs.o jailhouse-$(CONFIG_PCI) += pci.o diff --git a/hypervisor/Makefile b/hypervisor/Makefile index 279c4c4e..92c39221 100644 --- a/hypervisor/Makefile +++ b/hypervisor/Makefile @@ -20,7 +20,9 @@ LINUXINCLUDE := -I$(src)/arch/$(SRCARCH)/include \ -I$(src)/arch/$(SRCARCH)/include/generated \ - -I$(src)/include + -I$(src)/include \ + -I$(src)/../include/arch/$(SRCARCH) \ + -I$(src)/../include KBUILD_CFLAGS := -g -Os -Wall -Wstrict-prototypes -Wtype-limits \ -Wmissing-declarations -Wmissing-prototypes \ -fno-strict-aliasing -fno-pic -fno-common \ diff --git a/hypervisor/arch/arm/include/asm/jailhouse_hypercall.h b/include/arch/arm/asm/jailhouse_hypercall.h similarity index 100% rename from hypervisor/arch/arm/include/asm/jailhouse_hypercall.h rename to include/arch/arm/asm/jailhouse_hypercall.h diff --git a/hypervisor/arch/arm64/include/asm/jailhouse_hypercall.h b/include/arch/arm64/asm/jailhouse_hypercall.h similarity index 63% rename from hypervisor/arch/arm64/include/asm/jailhouse_hypercall.h rename to include/arch/arm64/asm/jailhouse_hypercall.h index 3a1b2c42..d9a9f693 100644 --- a/hypervisor/arch/arm64/include/asm/jailhouse_hypercall.h +++ b/include/arch/arm64/asm/jailhouse_hypercall.h @@ -8,6 +8,32 @@ * * This work is licensed under the terms of the GNU GPL, version 2. See * the COPYING file in the top-level directory. + * + * Alternatively, you can use or redistribute this file under the following + * BSD license: + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGE. */ #define JAILHOUSE_CALL_INS "hvc #0x4a48" diff --git a/hypervisor/arch/x86/include/asm/jailhouse_hypercall.h b/include/arch/x86/asm/jailhouse_hypercall.h similarity index 100% rename from hypervisor/arch/x86/include/asm/jailhouse_hypercall.h rename to include/arch/x86/asm/jailhouse_hypercall.h diff --git a/hypervisor/include/jailhouse/hypercall.h b/include/jailhouse/hypercall.h similarity index 100% rename from hypervisor/include/jailhouse/hypercall.h rename to include/jailhouse/hypercall.h diff --git a/inmates/Makefile b/inmates/Makefile index 7f3ee742..47c630da 100644 --- a/inmates/Makefile +++ b/inmates/Makefile @@ -17,7 +17,9 @@ export INMATES_LIB INCLUDES := -I$(INMATES_LIB) \ -I$(src)/../hypervisor/arch/$(SRCARCH)/include \ - -I$(src)/../hypervisor/include + -I$(src)/../hypervisor/include \ + -I$(src)/../include/arch/$(SRCARCH) \ + -I$(src)/../include ifeq ($(subst arm64,arm,$(SRCARCH)),arm) INCLUDES += -I$(src)/../hypervisor/arch/arm-common/include -- 2.15.1 -- You received this message because you are subscribed to the Google Groups "Jailhouse" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
