From: Andrew Cooper Date: Mon, 18 Jan 2016 10:48:49 +0000 (+0000) Subject: Rename the {pv,hvm}32 environments to {pv,hvm}32pae X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=25307e2a0d09f2608a2e49cc0931aa8014023f97;p=people%2Froyger%2Fxen-test-framework.git Rename the {pv,hvm}32 environments to {pv,hvm}32pae to indicate the paging mode in use. More 32bit HVM environments will be introduced, using different paging modes. In principle, other 32bit PV environments exist, but are unable to run under a 64bit Xen, so are unlikely to be implemented. Signed-off-by: Andrew Cooper --- diff --git a/build/common.mk b/build/common.mk index 2708f5a..a0f3c71 100644 --- a/build/common.mk +++ b/build/common.mk @@ -2,17 +2,17 @@ ROOT := $(abspath $(CURDIR)/../..) DESTDIR ?= $(ROOT)/dist/ CC = gcc -ALL_ENVIRONMENTS := pv64 pv32 hvm64 hvm32 +ALL_ENVIRONMENTS := pv64 pv32pae hvm64 hvm32pae PV_ENVIRONMENTS := $(filter pv%,$(ALL_ENVIRONMENTS)) HVM_ENVIRONMENTS := $(filter hvm%,$(ALL_ENVIRONMENTS)) 32BIT_ENVIRONMENTS := $(filter pv32% hvm32%,$(ALL_ENVIRONMENTS)) 64BIT_ENVIRONMENTS := $(filter pv64% hvm64%,$(ALL_ENVIRONMENTS)) -pv64_arch := x86_64 -pv32_arch := x86_32 -hvm64_arch := x86_64 -hvm32_arch := x86_32 +pv64_arch := x86_64 +pv32pae_arch := x86_32 +hvm64_arch := x86_64 +hvm32pae_arch := x86_32 COMMON_FLAGS := -pipe -I$(ROOT)/include -MMD -MP @@ -29,18 +29,18 @@ COMMON_AFLAGS-x86_64 := -m64 COMMON_CFLAGS-x86_32 := -m32 COMMON_CFLAGS-x86_64 := -m64 -head-pv64 := $(ROOT)/arch/x86/boot/head_pv64.o -head-pv32 := $(ROOT)/arch/x86/boot/head_pv32.o -head-hvm64 := $(ROOT)/arch/x86/boot/head_hvm64.o -head-hvm32 := $(ROOT)/arch/x86/boot/head_hvm32.o +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 defcfg-pv := $(ROOT)/config/default-pv.cfg.in defcfg-hvm := $(ROOT)/config/default-hvm.cfg.in -defcfg-pv64 := $(defcfg-pv) -defcfg-pv32 := $(defcfg-pv) -defcfg-hvm64 := $(defcfg-hvm) -defcfg-hvm32 := $(defcfg-hvm) +defcfg-pv64 := $(defcfg-pv) +defcfg-pv32pae := $(defcfg-pv) +defcfg-hvm64 := $(defcfg-hvm) +defcfg-hvm32pae := $(defcfg-hvm) obj-perarch := obj-perenv := @@ -66,12 +66,12 @@ DEPS-$(1) = $(head-$(1)) \ # Generate head with approprate flags ifneq ($(findstring $(1),$(PV_ENVIRONMENTS)),) -# PV guests generate head_pv64.o and head_pv32.o from head_pv.S +# PV guests generate head_$(env).o from head_pv.S %/head_$(1).o: %/head_pv.S $$(CC) $$(AFLAGS_$(1)) -c $$< -o $$@ endif ifneq ($(findstring $(1),$(HVM_ENVIRONMENTS)),) -# HVM guests generate head_hvm64.o and head_hvm32.o from head_hvm.S +# HVM guests generate head_$(env).o from head_hvm.S %/head_$(1).o: %/head_hvm.S $$(CC) $$(AFLAGS_$(1)) -c $$< -o $$@ endif diff --git a/docs/mainpage.dox b/docs/mainpage.dox index 3fa3044..eea5a07 100644 --- a/docs/mainpage.dox +++ b/docs/mainpage.dox @@ -17,10 +17,15 @@ easy to write code once and compile it for multiple different environments (virtual machines). The current environments supported are: -- `pv32` - 32bit PV guest (PAE paging). -- `pv64` - 64bit PV guest. -- `hvm32` - 32bit HVM guest (PAE paging). -- `hvm64` - 64bit HVM guest. + +Environment | Guest | Width | Paging +:-----------|:------|:------|:--------- +`pv32pae` | PV | 32bit | PAE +`pv64` | PV | 64bit | Long mode +`hvm32pae` | HVM | 32bit | PAE +`hvm64` | HVM | 64bit | Long mode + +@todo Possibly implement `hvm32`, `hvm32pg`, `hvm32pse` and `hvm16`. @section getting-started Getting Started @@ -34,17 +39,17 @@ To obtain and build: To run tests: (see @ref errata first) # cd tests/example - # xl create test-pv32-example.cfg - # cat /var/log/xen/console/guest-test-pv32-example.log + # xl create test-pv64-example.cfg + # cat /var/log/xen/console/guest-test-pv64-example.log --- Xen Test Framework --- - Environment: PV 32bit + Environment: PV 64bit Hello World Test result: SUCCESS @section errata Errata -- Running `pv32` tests requires booting Xen with `"smep=0"` on IvyBridge and +- Running 32bit PV tests requires booting Xen with `"smep=0"` on IvyBridge and newer hardware, and with `"smap=0"` on Broadwell and newer hardware, as there is not clean separation between the paging settings of Xen and the guest. diff --git a/include/arch/x86/config.h b/include/arch/x86/config.h index 2d970fd..33fd848 100644 --- a/include/arch/x86/config.h +++ b/include/arch/x86/config.h @@ -1,9 +1,9 @@ #ifndef XTF_X86_CONFIG_H #define XTF_X86_CONFIG_H -#if defined(CONFIG_ENV_pv64) || defined(CONFIG_ENV_pv32) +#if defined(CONFIG_ENV_pv64) || defined(CONFIG_ENV_pv32pae) # define CONFIG_PV -#elif defined(CONFIG_ENV_hvm64) || defined(CONFIG_ENV_hvm32) +#elif defined(CONFIG_ENV_hvm64) || defined(CONFIG_ENV_hvm32pae) # define CONFIG_HVM #endif diff --git a/tests/swint-emulation/Makefile b/tests/swint-emulation/Makefile index 6a14774..4bff60d 100644 --- a/tests/swint-emulation/Makefile +++ b/tests/swint-emulation/Makefile @@ -3,7 +3,7 @@ ROOT := $(abspath $(CURDIR)/../..) include $(ROOT)/build/common.mk NAME := swint-emulation -TEST-ENVS := hvm64 hvm32 +TEST-ENVS := $(HVM_ENVIRONMENTS) obj-perenv += main.o lowlevel.o