]> xenbits.xensource.com Git - people/royger/xen-test-framework.git/commitdiff
Implement the hvm32 environment; a 32bit HVM guest without paging
authorAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 18 Jan 2016 10:48:56 +0000 (10:48 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 18 Jan 2016 10:48:56 +0000 (10:48 +0000)
The test_NULL_unmapped() selftest is not applicable in an unpaged environment,
so is made conditional.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
build/common.mk
docs/mainpage.dox
include/arch/x86/config.h
tests/selftest/main.c

index a0f3c71dc0de3aaa8dce65575605f107ba881557..cd495825446d7c1d4d258def6d54a0ae9cbe4582 100644 (file)
@@ -2,7 +2,7 @@ ROOT := $(abspath $(CURDIR)/../..)
 DESTDIR ?= $(ROOT)/dist/
 CC = gcc
 
-ALL_ENVIRONMENTS   := pv64 pv32pae hvm64 hvm32pae
+ALL_ENVIRONMENTS   := pv64 pv32pae hvm64 hvm32pae hvm32
 
 PV_ENVIRONMENTS    := $(filter pv%,$(ALL_ENVIRONMENTS))
 HVM_ENVIRONMENTS   := $(filter hvm%,$(ALL_ENVIRONMENTS))
@@ -13,6 +13,7 @@ pv64_arch     := x86_64
 pv32pae_arch  := x86_32
 hvm64_arch    := x86_64
 hvm32pae_arch := x86_32
+hvm32_arch    := x86_32
 
 COMMON_FLAGS := -pipe -I$(ROOT)/include -MMD -MP
 
@@ -33,6 +34,7 @@ head-pv64     := $(ROOT)/arch/x86/boot/head_pv64.o
 head-pv32pae  := $(ROOT)/arch/x86/boot/head_pv32pae.o
 head-hvm64    := $(ROOT)/arch/x86/boot/head_hvm64.o
 head-hvm32pae := $(ROOT)/arch/x86/boot/head_hvm32pae.o
+head-hvm32    := $(ROOT)/arch/x86/boot/head_hvm32.o
 
 defcfg-pv    := $(ROOT)/config/default-pv.cfg.in
 defcfg-hvm   := $(ROOT)/config/default-hvm.cfg.in
@@ -41,6 +43,7 @@ defcfg-pv64     := $(defcfg-pv)
 defcfg-pv32pae  := $(defcfg-pv)
 defcfg-hvm64    := $(defcfg-hvm)
 defcfg-hvm32pae := $(defcfg-hvm)
+defcfg-hvm32    := $(defcfg-hvm)
 
 obj-perarch :=
 obj-perenv  :=
index c099ae34904497f859e0afe6a80935b14f0b1cf5..de7e211d698bbfa288221465d19abd4615ea9f1c 100644 (file)
@@ -22,10 +22,11 @@ Environment | Guest | Width | Paging
 :-----------|:------|:------|:---------
 `pv32pae`   | PV    | 32bit | PAE
 `pv64`      | PV    | 64bit | Long mode
+`hvm32`     | HVM   | 32bit | None
 `hvm32pae`  | HVM   | 32bit | PAE
 `hvm64`     | HVM   | 64bit | Long mode
 
-@todo Possibly implement `hvm32`, `hvm32pg`, `hvm32pse` and `hvm16`.
+@todo Possibly implement `hvm32pg`, `hvm32pse` and `hvm16`.
 
 
 @section getting-started Getting Started
index 48bdf304c814b5b2d3da948ea1c139bb2a76e116..e251944e51375c5b022d9974bc527b736f238894 100644 (file)
 
 #undef CONFIG_ENV_hvm32pae
 
+#elif defined(CONFIG_ENV_hvm32)
+
+#define CONFIG_HVM
+#define CONFIG_PAGING_LEVELS 0
+#define ENVIRONMENT_DESCRIPTION "HVM 32bit (No paging)"
+
+#undef CONFIG_ENV_hvm32
+
 #else
 # error Bad environment
 #endif
index fc917a6c1a96b63ed21133fed2507dd820804a80..0440b79be6fce9e744cdf1a34526ccf4a539a723 100644 (file)
@@ -172,6 +172,7 @@ static void test_exec_user(void)
     }
 }
 
+#ifdef CONFIG_PAGING
 static void test_NULL_unmapped(void)
 {
     extern unsigned long label_test_NULL_unmapped[];
@@ -192,6 +193,7 @@ static void test_NULL_unmapped(void)
 
     xtf_exlog_stop();
 }
+#endif
 
 static bool local_unhandled_exception_hook(struct cpu_regs *regs)
 {
@@ -228,7 +230,9 @@ void test_main(void)
     test_extable();
     test_exlog();
     test_exec_user();
+#ifdef CONFIG_PAGING
     test_NULL_unmapped();
+#endif
     test_unhandled_exception_hook();
 
     xtf_success();