Move it out to a header that can be included by a tool, without pulling in too many hypervisor internals. That will be used by the gcov tool so we do not need to include the value in the hypervisor binary.
Signed-off-by: Henning Schild <[email protected]> Tested-by: Ralf Ramsauer <[email protected]> diff --git a/hypervisor/arch/arm/include/asm/jailhouse_header.h b/hypervisor/arch/arm/include/asm/jailhouse_header.h new file mode 100644 --- /dev/null +++ b/hypervisor/arch/arm/include/asm/jailhouse_header.h @@ -0,0 +1,13 @@ +/* + * Jailhouse, a Linux-based partitioning hypervisor + * + * Copyright (C) Siemens AG, 2017 + * + * Authors: + * Henning Schild <[email protected]> + * + * This work is licensed under the terms of the GNU GPL, version 2. See + * the COPYING file in the top-level directory. + */ + +#define JAILHOUSE_BASE 0xf0000000 diff --git a/hypervisor/arch/arm/include/asm/jailhouse_hypercall.h b/hypervisor/arch/arm/include/asm/jailhouse_hypercall.h --- a/hypervisor/arch/arm/include/asm/jailhouse_hypercall.h +++ b/hypervisor/arch/arm/include/asm/jailhouse_hypercall.h @@ -1,7 +1,7 @@ /* * Jailhouse, a Linux-based partitioning hypervisor * - * Copyright (c) Siemens AG, 2013-2015 + * Copyright (c) Siemens AG, 2013-2017 * * Authors: * Jan Kiszka <[email protected]> @@ -36,7 +36,6 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -#define JAILHOUSE_BASE 0xf0000000 #define JAILHOUSE_BORROW_ROOT_PT 1 #define JAILHOUSE_CALL_INS ".arch_extension virt\n\t" \ diff --git a/hypervisor/arch/arm64/include/asm/jailhouse_header.h b/hypervisor/arch/arm64/include/asm/jailhouse_header.h new file mode 100644 --- /dev/null +++ b/hypervisor/arch/arm64/include/asm/jailhouse_header.h @@ -0,0 +1,13 @@ +/* + * Jailhouse, a Linux-based partitioning hypervisor + * + * Copyright (C) Siemens AG, 2017 + * + * Authors: + * Henning Schild <[email protected]> + * + * This work is licensed under the terms of the GNU GPL, version 2. See + * the COPYING file in the top-level directory. + */ + +#define JAILHOUSE_BASE 0xffffc0200000 diff --git a/hypervisor/arch/x86/include/asm/jailhouse_header.h b/hypervisor/arch/x86/include/asm/jailhouse_header.h new file mode 100644 --- /dev/null +++ b/hypervisor/arch/x86/include/asm/jailhouse_header.h @@ -0,0 +1,19 @@ +/* + * Jailhouse, a Linux-based partitioning hypervisor + * + * Copyright (C) Siemens AG, 2017 + * + * Authors: + * Henning Schild <[email protected]> + * + * This work is licensed under the terms of the GNU GPL, version 2. See + * the COPYING file in the top-level directory. + */ + +#ifdef __ASSEMBLY__ +#define __MAKE_UL(x) x +#else /* !__ASSEMBLY__ */ +#define __MAKE_UL(x) x ## UL +#endif + +#define JAILHOUSE_BASE __MAKE_UL(0xfffffffff0000000) diff --git a/hypervisor/arch/x86/include/asm/jailhouse_hypercall.h b/hypervisor/arch/x86/include/asm/jailhouse_hypercall.h --- a/hypervisor/arch/x86/include/asm/jailhouse_hypercall.h +++ b/hypervisor/arch/x86/include/asm/jailhouse_hypercall.h @@ -1,7 +1,7 @@ /* * Jailhouse, a Linux-based partitioning hypervisor * - * Copyright (c) Siemens AG, 2013-2015 + * Copyright (c) Siemens AG, 2013-2017 * * Authors: * Jan Kiszka <[email protected]> @@ -36,7 +36,6 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -#define JAILHOUSE_BASE __MAKE_UL(0xfffffffff0000000) #define JAILHOUSE_BORROW_ROOT_PT 1 /* @@ -71,14 +70,6 @@ #define JAILHOUSE_CPUID_SIGNATURE 0x40000000 #define JAILHOUSE_CPUID_FEATURES 0x40000001 -#ifdef __ASSEMBLY__ - -#define __MAKE_UL(x) x - -#else /* !__ASSEMBLY__ */ - -#define __MAKE_UL(x) x ## UL - /** * @defgroup Hypercalls Hypercall Subsystem * @@ -203,5 +194,3 @@ jailhouse_send_reply_from_cell(struct ja } /** @} **/ - -#endif /* !__ASSEMBLY__ */ diff --git a/hypervisor/hypervisor.lds.S b/hypervisor/hypervisor.lds.S --- a/hypervisor/hypervisor.lds.S +++ b/hypervisor/hypervisor.lds.S @@ -1,7 +1,7 @@ /* * Jailhouse, a Linux-based partitioning hypervisor * - * Copyright (c) Siemens AG, 2013 + * Copyright (c) Siemens AG, 2013-2017 * * Authors: * Jan Kiszka <[email protected]> @@ -13,7 +13,7 @@ #include <asm/paging.h> #include <asm/sections.h> -#include <asm/jailhouse_hypercall.h> +#include <asm/jailhouse_header.h> SECTIONS { diff --git a/hypervisor/include/jailhouse/header.h b/hypervisor/include/jailhouse/header.h --- a/hypervisor/include/jailhouse/header.h +++ b/hypervisor/include/jailhouse/header.h @@ -1,7 +1,7 @@ /* * Jailhouse, a Linux-based partitioning hypervisor * - * Copyright (c) Siemens AG, 2013 + * Copyright (c) Siemens AG, 2013-2017 * * Authors: * Jan Kiszka <[email protected]> @@ -10,6 +10,8 @@ * the COPYING file in the top-level directory. */ +#include <asm/jailhouse_header.h> + #define JAILHOUSE_SIGNATURE "JAILHOUS" /** -- 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.
