On Thu, May 08, 2025 at 11:05:32AM +0100, Alexandru Elisei wrote:
> Hi Drew,
>
> On Thu, May 08, 2025 at 11:39:54AM +0200, Andrew Jones wrote:
> > On Thu, May 08, 2025 at 09:52:38AM +0100, Alexandru Elisei wrote:
> > > Hi Drew,
> > >
> > > On Wed, May
On Thu, May 08, 2025 at 09:52:38AM +0100, Alexandru Elisei wrote:
> Hi Drew,
>
> On Wed, May 07, 2025 at 06:02:31PM +0200, Andrew Jones wrote:
> > On Wed, May 07, 2025 at 04:12:43PM +0100, Alexandru Elisei wrote:
> > > Only arm and arm64 are allowed to set --target to
een tested to work with kvmtool.
>
> Signed-off-by: Alexandru Elisei
> ---
> README.md| 18 +-
> arm/efi/run | 5 +
> configure| 1 -
> scripts/vmm.bash | 2 +-
> 4 files changed, 23 insertions(+), 3 deletions(-)
>
Reviewed-by: Andrew Jones
ugh in my opinion this
> semantic is somewhat better conveyed with the name 'excluded_targets'.
excluded_targets sounds good, but disabled_if is growing on me. So, unless
you or others also prefer excluded_targets, then
Reviewed-by: Andrew Jones
Thanks,
drew
7;-smp'
> [qemu:kernel]='-kernel'
> @@ -122,6 +144,7 @@ declare -A vmm_opts=(
> [qemu:default_opts]=''
> [qemu:fixup_return_code]=qemu_fixup_return_code
> [qemu:parse_premature_failure]=qemu_parse_premature_failure
> + [qemu:probe_maxsmp]=qemu_probe_maxsmp
>
> [kvmtool:nr_cpus]='--cpus'
> [kvmtool:kernel]='--kernel'
> @@ -130,6 +153,7 @@ declare -A vmm_opts=(
> [kvmtool:default_opts]="$KVMTOOL_DEFAULT_OPTS"
> [kvmtool:fixup_return_code]=kvmtool_fixup_return_code
> [kvmtool:parse_premature_failure]=kvmtool_parse_premature_failure
> + [kvmtool:probe_maxsmp]=kvmtool_probe_maxsmp
> )
>
> function check_vmm_supported()
> --
> 2.49.0
>
Reviewed-by: Andrew Jones
@ declare -A vmm_opts=(
> [qemu:initrd]='-initrd'
> [qemu:default_opts]=''
> [qemu:fixup_return_code]=qemu_fixup_return_code
> + [qemu:parse_premature_failure]=qemu_parse_premature_failure
>
> [kvmtool:nr_cpus]='--cpus'
> [kvmtool:kernel]='--kernel'
> @@ -107,6 +129,7 @@ declare -A vmm_opts=(
> [kvmtool:initrd]='--initrd'
> [kvmtool:default_opts]="$KVMTOOL_DEFAULT_OPTS"
> [kvmtool:fixup_return_code]=kvmtool_fixup_return_code
> + [kvmtool:parse_premature_failure]=kvmtool_parse_premature_failure
> )
>
> function check_vmm_supported()
> --
> 2.49.0
>
Reviewed-by: Andrew Jones
kvmtool="$kvmtoolcmd"
> break
> @@ -381,6 +381,7 @@ search_kvmtool_binary ()
>
> if [ -z "$kvmtool" ]; then
> echo "A kvmtool binary was not found." >&2
> + echo "You can set a custom location by using the KVMTOOL=
> environment variable." >&2
> return 2
> fi
>
> --
> 2.49.0
>
Reviewed-by: Andrew Jones
evel=warning"}"
> +
>
> ######
> # qemu_fixup_return_code translates the ambiguous exit status in Table1 to
> that
> # in Table2. Table3 simply documents the complete status table.
> @@ -87,12 +98,14 @@ declare -A vmm_opts=(
> [qemu:kernel]='-kernel'
> [qemu:args]='-append'
> [qemu:initrd]='-initrd'
> + [qemu:default_opts]=''
> [qemu:fixup_return_code]=qemu_fixup_return_code
>
> [kvmtool:nr_cpus]='--cpus'
> [kvmtool:kernel]='--kernel'
> [kvmtool:args]='--params'
> [kvmtool:initrd]='--initrd'
> + [kvmtool:default_opts]="$KVMTOOL_DEFAULT_OPTS"
> [kvmtool:fixup_return_code]=kvmtool_fixup_return_code
> )
>
> --
> 2.49.0
Reviewed-by: Andrew Jones
; powerpc/run | 4 +-
> riscv/run | 4 +-
> s390x/run | 2 +-
> scripts/arch-run.bash | 112 +++--
> scripts/vmm.bash | 89 +++
> x86/run | 4 +-
> 7 files changed, 236 insertions(+), 140 deletions(-)
>
Reviewed-by: Andrew Jones
On Wed, May 07, 2025 at 04:12:48PM +0100, Alexandru Elisei wrote:
> arm/arm64 supports running tests under kvmtool, but kvmtool's syntax for
> running and configuring a virtual machine is different to qemu. To run
> tests using the automated test infrastructure, add a new test parameter,
> 'kvmtool
e same VM
> configuration parameters.
>
> Suggested-by: Andrew Jones
> Signed-off-by: Alexandru Elisei
> ---
> scripts/common.bash | 10 +++---
> scripts/runtime.bash | 7 +--
> scripts/vmm.bash | 7 +++
> 3 files changed, 15 insertions(+), 9 deletions(-)
>
On Wed, May 07, 2025 at 04:12:46PM +0100, Alexandru Elisei wrote:
> Arm and arm64 support running the tests under kvmtool. kvmtool has a
> different command line syntax for configuring and running a virtual
> machine, and the automated scripts know only how to use qemu.
>
> One issue with that is
local check="${CHECK:-$9}"
> +local accel="${10}"
> +local timeout="${11:-$TIMEOUT}" # unittests.cfg overrides the default
> +
> +# If $test_args is empty, qemu will interpret the first option after
> -append
> +# as a kernel parameter instead of a qemu option, so make sure the
> -append
> +# option is used only if $test_args is not empy.
^ empty
Otherwise,
Reviewed-by: Andrew Jones
++
> 1 file changed, 24 insertions(+), 12 deletions(-)
>
Reviewed-by: Andrew Jones
> powerpc/unittests.cfg | 18 +++---
> riscv/unittests.cfg | 2 +-
> s390x/unittests.cfg | 50 +++
> scripts/common.bash | 8 +--
> scripts/runtime.bash | 6 +-
> x86/unittests.cfg | 140 +++++-
> 8 files changed, 160 insertions(+), 155 deletions(-)
>
Reviewed-by: Andrew Jones
On Fri, Mar 07, 2025 at 10:18:29AM +0100, Andrew Jones wrote:
> When cross compiling with clang we need to specify the target in
> CFLAGS and cc-option will fail to recognize target-specific options
> without it. Add CFLAGS to the CC invocation in cc-option.
>
> The intr
CFLAGS referencing itself.
Signed-off-by: Andrew Jones
---
v2:
- Fixed x86 builds with the realmode_bits variable
Makefile| 2 +-
x86/Makefile.common | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index 78352fced9d4..9dc5d2234e2a 100644
--- a
On Fri, Mar 07, 2025 at 09:42:03AM +0100, Thomas Huth wrote:
> On 07/03/2025 09.39, Andrew Jones wrote:
> > When cross compiling with clang we need to specify the target in
> > CFLAGS and cc-option will fail to recognize target-specific options
> > without it. Add CFLAGS to th
When cross compiling with clang we need to specify the target in
CFLAGS and cc-option will fail to recognize target-specific options
without it. Add CFLAGS to the CC invocation in cc-option.
Signed-off-by: Andrew Jones
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff
that replaced, for riscv and arm
Reviewed-by: Andrew Jones
Thanks,
drew
On Wed, Feb 12, 2025 at 04:34:44PM +, Alexandru Elisei wrote:
> Hi Drew,
>
> On Wed, Feb 12, 2025 at 04:56:42PM +0100, Andrew Jones wrote:
> > On Tue, Feb 11, 2025 at 03:03:09PM +, Alexandru Elisei wrote:
> > > Hi Drew,
> > >
> > > On Thu, Jan
On Tue, Feb 11, 2025 at 03:03:09PM +, Alexandru Elisei wrote:
> Hi Drew,
>
> On Thu, Jan 23, 2025 at 04:53:29PM +0100, Andrew Jones wrote:
> > On Mon, Jan 20, 2025 at 04:43:13PM +, Alexandru Elisei wrote:
> > > arm/arm64 supports running tests under kvmtool,
On Wed, Feb 12, 2025 at 01:40:51PM +, Alexandru Elisei wrote:
...
> > > @@ -80,7 +80,7 @@ function run()
> > > local groups="$2"
> > > local smp="$3"
> > > local kernel="$4"
> > > -local opts="$5"
> > > +local qemu_opts="$5"
> > > local arch="$6"
> > > local mac
On Mon, Feb 10, 2025 at 10:41:53AM +, Alexandru Elisei wrote:
> Hi Drew,
>
> On Tue, Jan 21, 2025 at 03:48:55PM +0100, Andrew Jones wrote:
> > On Mon, Jan 20, 2025 at 04:43:01PM +, Alexandru Elisei wrote:
>
> > > ---
> > > arm/efi/run
x27;!"
> usage
> diff --git a/run_tests.sh b/run_tests.sh
> index d38954be9093..3921dcdcb344 100755
> --- a/run_tests.sh
> +++ b/run_tests.sh
> @@ -110,7 +110,7 @@ while [ $# -gt 0 ]; do
> done
>
> case "$TARGET" in
> -qemu)
> +qemu | kvmtool)
> ;;
> *)
> echo "$0 does not support '$TARGET'"
> diff --git a/scripts/mkstandalone.sh b/scripts/mkstandalone.sh
> index 10abb5e191b7..16383b05adfa 100755
> --- a/scripts/mkstandalone.sh
> +++ b/scripts/mkstandalone.sh
> @@ -8,7 +8,7 @@ source config.mak
> source scripts/common.bash
>
> case "$TARGET" in
> -qemu)
> +qemu | kvmtool)
> ;;
> *)
> echo "'$TARGET' not supported for standlone tests"
> --
> 2.47.1
>
Reviewed-by: Andrew Jones
On Mon, Jan 20, 2025 at 04:43:15PM +, Alexandru Elisei wrote:
> The pci-test is qemu specific. Other tests perform migration, which
> isn't supported by kvmtool. In general, kvmtool is not as feature-rich
> as qemu, so add a new unittest parameter, disabled_if, that causes a
> test to be skippe
ort ARCH_NAME
> config_export PROCESSOR
> + config_export TARGET
>
> echo "echo BUILD_HEAD=$(cat build-head)"
>
> --
> 2.47.1
>
Reviewed-by: Andrew Jones
On Mon, Jan 20, 2025 at 04:43:13PM +, Alexandru Elisei wrote:
> arm/arm64 supports running tests under kvmtool, but kvmtool's syntax for
> running a virtual machine is different than qemu's. To run tests using the
> automated test infrastructure, add a new test parameter, kvmtool_params.
> The
On Mon, Jan 20, 2025 at 04:43:12PM +, Alexandru Elisei wrote:
> kvmtool is often used for prototyping new features, and a developer might
> not want to install it system-wide. Add a KVMTOOL environment variable to
> make it easier for tests to use a binary not in $PATH.
>
> Signed-off-by: Alex
kvmtool)
> +echo "kvmtool automatically limits the number of VCPUs to
> maximum supported"
> +echo "The 'smp' test parameter won't be modified"
> +;;
> +esac
> ;;
>
t;--nodefaults --network mode=none
> --loglevel=warning"}"
> +
> PASS() { echo -ne "\e[32mPASS\e[0m"; }
> SKIP() { echo -ne "\e[33mSKIP\e[0m"; }
> FAIL() { echo -ne "\e[31mFAIL\e[0m"; }
> @@ -103,7 +114,7 @@ function run()
> opts="-smp $smp $qemu_opts"
> ;;
> kvmtool)
> -opts="--cpus $smp $kvmtool_opts"
> +opts="$KVMTOOL_DEFAULT_OPTS --cpus $smp $kvmtool_opts"
> ;;
> esac
>
> --
> 2.47.1
>
Otherwise,
Reviewed-by: Andrew Jones
On Mon, Jan 20, 2025 at 04:43:04PM +, Alexandru Elisei wrote:
> kvmtool has a different command line parameter to specify the number of
> VCPUs (-c/--cpus). To make it easier to accommodate it, merge the qemu
> specific parameter -smp into $qemu_opts when passing it to the
> $RUNTIME_arch_run s
On Tue, Jan 21, 2025 at 03:54:17PM +, Alexandru Elisei wrote:
> Hi Drew,
>
> On Tue, Jan 21, 2025 at 03:48:55PM +0100, Andrew Jones wrote:
> > On Mon, Jan 20, 2025 at 04:43:01PM +, Alexandru Elisei wrote:
> > > Arm and arm64 support running the tests under
L" = "kvm" ] || [ "$ACCEL" = "hvf" ]; then
> - if [ "$HOST" = "aarch64" ] || [ "$HOST" = "arm" ]; then
> - processor="host"
> - if [ "$ARCH" = "arm" ] && [ "$HOST" = "aarch64" ]; then
> - processor+=",aarch64=off"
> - fi
> - fi
> -fi
> -
> -if [ "$ARCH" = "arm" ]; then
> - M+=",highmem=off"
> -fi
> -
> -if ! $qemu $M -device '?' | grep -q virtconsole; then
> - echo "$qemu doesn't support virtio-console for chr-testdev. Exiting."
> - exit 2
> -fi
> -
> -if ! $qemu $M -chardev '?' | grep -q testdev; then
> - echo "$qemu doesn't support chr-testdev. Exiting."
> - exit 2
> -fi
> -
> -if [ "$UEFI_SHELL_RUN" != "y" ] && [ "$EFI_USE_ACPI" != "y" ]; then
> - chr_testdev='-device virtio-serial-device'
> - chr_testdev+=' -device virtconsole,chardev=ctd -chardev testdev,id=ctd'
> -fi
> -
> -pci_testdev=
> -if $qemu $M -device '?' | grep -q pci-testdev; then
> - pci_testdev="-device pci-testdev"
> -fi
> -
> -A="-accel $ACCEL$ACCEL_PROPS"
> -command="$qemu -nodefaults $M $A -cpu $processor $chr_testdev $pci_testdev"
> -command+=" -display none -serial stdio"
> -command="$(migration_cmd) $(timeout_cmd) $command"
> -
> -if [ "$UEFI_SHELL_RUN" = "y" ]; then
> - ENVIRON_DEFAULT=n run_test_status $command "$@"
> -elif [ "$EFI_USE_ACPI" = "y" ]; then
> - run_test_status $command -kernel "$@"
> -else
> - run_qemu $command -kernel "$@"
> -fi
> +case "$TARGET" in
> +qemu)
> +arch_run_qemu "$@"
> +;;
> +kvmtool)
> +arch_run_kvmtool "$@"
> +;;
> +esac
> --
> 2.47.1
>
>
Reviewed-by: Andrew Jones
On Mon, Jan 20, 2025 at 04:43:08PM +, Alexandru Elisei wrote:
> Add two new functions, search_kvmtool_binary(), which, like the name
> suggests, searches for the location of the kvmtool binary, and
> run_kvmtool(), which runs a test with kvmtool as the VMM.
>
> initrd_create() has also been mo
$accel"
> +return 2
> +fi
> +
> # check a file for a particular value before running a test
> # the check line can contain multiple files to check separated by a space
> # but each check parameter needs to be of the form =
> --
> 2.47.1
Reviewed-by: Andrew Jones
On Mon, Jan 20, 2025 at 04:43:06PM +, Alexandru Elisei wrote:
> kvm-unit-tests assumes that if the VMM is able to get to where it tries to
> load the kernel, then the VMM and the configuration parameters will also
> work for running the test. All of this is done in premature_failure().
>
> Tea
On Mon, Jan 20, 2025 at 04:43:05PM +, Alexandru Elisei wrote:
> In preparation for supporting kvmtool, create and pass the variable
> 'kvmtool_opts' to the arch run script $RUNTIME_arch_run.
>
> Signed-off-by: Alexandru Elisei
> ---
> scripts/common.bash | 6 --
> scripts/runtime.bash
On Mon, Jan 20, 2025 at 04:43:03PM +, Alexandru Elisei wrote:
> From: Alexandru Elisei
>
> For the arm/arm64 architectures, kvm-unit-tests can also be run using the
> kvmtool virtual machine manager. Rename run_qemu_status to run_test_status
> to make it more generic, in preparation to add su
On Mon, Jan 20, 2025 at 04:43:02PM +, Alexandru Elisei wrote:
> Tests for the arm and arm64 architectures can also be run with kvmtool, and
> work is under way to have it supported by the run_tests.sh test runner. Not
> suprisingly, kvmtool has a different syntax than qemu when configuring and
On Mon, Jan 20, 2025 at 04:43:01PM +, Alexandru Elisei wrote:
> Arm and arm64 support running the tests under kvmtool. Unsurprisingly,
> kvmtool and qemu have a different command line syntax for configuring and
> running a virtual machine.
>
> On top of that, when kvm-unit-tests has been confi
On Mon, Jan 20, 2025 at 04:43:00PM +, Alexandru Elisei wrote:
> Document the environment variables that influence how a test is executed
> by the run_tests.sh test runner.
>
> Suggested-by: Andrew Jones
> Signed-off-by: Alexandru Elisei
> ---
> docs/unittests.txt | 5
tests in parallel
> +-t, --tap13 Output test results in TAP format
> +-l, --list Only output all tests list
> +--probe-maxsmp Update the maximum number of VCPUs supported by host
>
> Set the environment variable QEMU=/path/to/qemu-system-ARCH to
> specify the appropriate qemu binary for ARCH-run.
> --
> 2.47.1
>
>
Reviewed-by: Andrew Jones
On Wed, Jan 15, 2025 at 09:55:14AM +, Alexandru Elisei wrote:
> Hi Drew,
>
> On Tue, Jan 14, 2025 at 07:51:04PM +0100, Andrew Jones wrote:
> > On Tue, Jan 14, 2025 at 05:17:28PM +, Alexandru Elisei wrote:
> > ...
> > > > > +# $arch will have changed w
On Tue, Jan 14, 2025 at 05:17:28PM +, Alexandru Elisei wrote:
...
> > > +# $arch will have changed when cross-compiling.
> > > +[ -z "$processor" ] && processor=$(get_default_processor $arch)
> >
> > The fact that $arch and $processor are wrong until they've had a chance to
>
> $processor is
On Tue, Jan 14, 2025 at 05:03:20PM +, Alexandru Elisei wrote:
...
> diff --git a/configure b/configure
> index 86cf1da36467..1362b68dd68b 100755
> --- a/configure
> +++ b/configure
> @@ -15,8 +15,8 @@ objdump=objdump
> readelf=readelf
> ar=ar
> addr2line=addr2line
> -arch=$(uname -m | sed -e
On Fri, Jan 10, 2025 at 01:58:48PM +, Alexandru Elisei wrote:
> Newer architecture features are supported by qemu TCG on newer CPUs. When
> writing a test for such architecture features, it is necessary to pass the
> correct -cpu argument to qemu. Make it easier on users and test authors
> alik
On Fri, Jan 10, 2025 at 01:58:47PM +, Alexandru Elisei wrote:
> For arm64, newer architecture features are supported only on newer CPUs.
> Instead of expecting the user to know which CPU model supports which
> feature when using the TCG accelerator for qemu, let's make it easier and
> add suppo
k.o relies on frame pointers.
> KEEP_FRAME_POINTER := y
>
> +CFLAGS += -mcpu=$(PROCESSOR)
> CFLAGS += -std=gnu99
> CFLAGS += -ffreestanding
> CFLAGS += -O2
> --
> 2.47.1
>
Reviewed-by: Andrew Jones
On Fri, Jan 10, 2025 at 01:58:44PM +, Alexandru Elisei wrote:
> $arch, on arm64, defaults to 'aarch64', and later in the script is replaced
> by 'arm64'. Intentional or not, document that the name 'aarch64' is also
> supported when configuring for the arm64 architecture. This has been the
> cas
On Fri, Jan 10, 2025 at 01:58:45PM +, Alexandru Elisei wrote:
> The help text for the --processor option displays the architecture name as
> the default processor type. But the default for arm is cortex-a15, and for
> arm64 is cortex-a57. Teach configure to display the correct default
> process
On Wed, Sep 11, 2024 at 11:14:07AM +0200, Andrew Jones wrote:
> Modify configure to allow --cc=clang and a cross-prefix to be specified
> together (as well as --cflags). This allows compiling with clang, but
> using cross binutils for everything else, including the linker. So far
> tes
Test building 32 and 64-bit with clang. Throw a test of in- and out-
of-tree building in too by swapping which is done to which (32-bit
vs. 64-bit) with respect to the gcc build tests.
Acked-by: Thomas Huth
Acked-by: Nicholas Piggin
Signed-off-by: Andrew Jones
---
.gitlab-ci.yml | 43
Add configure command line examples for cross-compiling, for
compiling with clang, and for cross-compiling with clang.
Signed-off-by: Andrew Jones
---
README.md | 22 ++
1 file changed, 22 insertions(+)
diff --git a/README.md b/README.md
index 2d6f7db5605c..be07dc28a094
ble to cross compile for riscv with
clang after configuring with
./configure --arch=riscv64 --cc=clang --cflags='--target=riscv64' \
--cross-prefix=riscv64-linux-gnu-
Reviewed-by: Thomas Huth
Reviewed-by: Nicholas Piggin
Signed-off-by: Andrew Jones
---
configure | 11
r the initrd_dev_path struct. (Eliminating the
warning is preferred to reworking the struct, because the
implementation is imported verbatim from Linux.)
Reviewed-by: Nicholas Piggin
Signed-off-by: Andrew Jones
---
Makefile | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Makefile b/Makefile
gnore warnings vs. fix code to commit message of
patch2
- Picked up Nick's tags
v2:
- fix building with clang and --config-efi by suppressing a warning
- added riscv clang efi build to CI
- picked up Thomas's tags
Andrew Jones (5):
riscv: Drop mstrict-align
Makefile: Prepare for c
The spec says unaligned accesses are supported, so this isn't required
and clang doesn't support it. A platform might have slow unaligned
accesses, but kvm-unit-tests isn't about speed anyway.
Reviewed-by: Thomas Huth
Signed-off-by: Andrew Jones
---
riscv/Makefile | 4 +++-
1
On Wed, Sep 11, 2024 at 10:24:34AM GMT, Nicholas Piggin wrote:
> On Wed Sep 4, 2024 at 8:50 PM AEST, Andrew Jones wrote:
> > When a user specifies the compiler with --cc assume it's already
> > fully named, even if the user also specifies a cross-prefix. This
> > allow
On Wed, Sep 11, 2024 at 10:21:39AM GMT, Nicholas Piggin wrote:
> On Wed Sep 4, 2024 at 8:50 PM AEST, Andrew Jones wrote:
> > clang complains about GNU extensions such as variable sized types not
> > being at the end of structs unless -Wno-gnu is used. We may
> > eventually w
On Wed, Sep 11, 2024 at 10:08:23AM GMT, Nicholas Piggin wrote:
> On Wed Sep 4, 2024 at 8:50 PM AEST, Andrew Jones wrote:
> > The spec says unaligned accesses are supported, so this isn't required
> > and clang doesn't support it. A platform might have slow unaligned
&
On Wed, Sep 11, 2024 at 10:39:03AM GMT, Nicholas Piggin wrote:
> On Wed Sep 4, 2024 at 12:39 AM AEST, Andrew Jones wrote:
> > Allow users to add additional CONFIG_* and override defaults
> > by concatenating a given file with #define's and #undef's to
> > lib/config.
Test building 32 and 64-bit with clang. Throw a test of in- and out-
of-tree building in too by swapping which is done to which (32-bit
vs. 64-bit) with respect to the gcc build tests.
Acked-by: Thomas Huth
Signed-off-by: Andrew Jones
---
.gitlab-ci.yml | 43
ble to cross compile for riscv with
clang after configuring with
./configure --arch=riscv64 --cc=clang --cflags='--target=riscv64' \
--cross-prefix=riscv64-linux-gnu-
Reviewed-by: Thomas Huth
Signed-off-by: Andrew Jones
---
configure | 11 ---
1 file changed
r the initrd_dev_path struct.
Signed-off-by: Andrew Jones
---
Makefile | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Makefile b/Makefile
index 3d51cb726120..7471f7285b78 100644
--- a/Makefile
+++ b/Makefile
@@ -50,6 +50,8 @@ EFI_CFLAGS += -fshort-wchar
# EFI applications use PIC as they are l
The spec says unaligned accesses are supported, so this isn't required
and clang doesn't support it. A platform might have slow unaligned
accesses, but kvm-unit-tests isn't about speed anyway.
Reviewed-by: Thomas Huth
Signed-off-by: Andrew Jones
---
riscv/Makefile | 2 +-
1
compile - which is why there's no gitlab-ci patch for aarch64
in this series). I suspect it should work for other architectures too.
v2:
- fix building with clang and --config-efi by suppressing a warning
- added riscv clang efi build to CI
- picked up Thomas's tags
Andrew Jones (4
On Tue, Sep 03, 2024 at 06:30:47PM GMT, Andrew Jones wrote:
> Modify configure to allow --cc=clang and a cross-prefix to be specified
> together (as well as --cflags). This allows compiling with clang, but
> using cross binutils for everything else, including the linker. So far
> tes
ble to cross compile for riscv with
clang after configuring with
./configure --arch=riscv64 --cc=clang --cflags='--target=riscv64' \
--cross-prefix=riscv64-linux-gnu-
Signed-off-by: Andrew Jones
---
configure | 11 ---
1 file changed, 8 insertions(+), 3 deletion
Test building 32 and 64-bit with clang. Throw a test of in- and out-
of-tree building in too by swapping which is done to which (32-bit
vs. 64-bit) with respect to the gcc build tests.
Signed-off-by: Andrew Jones
---
.gitlab-ci.yml | 28
1 file changed, 28
The spec says unaligned accesses are supported, so this isn't required
and clang doesn't support it. A platform might have slow unaligned
accesses, but kvm-unit-tests isn't about speed anyway.
Signed-off-by: Andrew Jones
---
riscv/Makefile | 2 +-
1 file changed, 1 insertion
compile - which is why there's no gitlab-ci patch for aarch64
in this series). I suspect it should work for other architectures too.
Andrew Jones (3):
riscv: Drop mstrict-align
configure: Support cross compiling with clang
riscv: gitlab-ci: Add clang build tests
.gitlab-ci.yml
,
$ cat < 256.config
#undef CONFIG_NR_CPUS
#define CONFIG_NR_CPUS 256
EOF
$ ./configure --arch=riscv64 --cross-prefix=riscv64-linux-gnu-
--add-config=256.config
Signed-off-by: Andrew Jones
---
configure | 3 ++-
lib/riscv/asm/setup.h | 3 ++-
2 files changed, 4 insertions(+)
Allow users to add additional CONFIG_* and override defaults
by concatenating a given file with #define's and #undef's to
lib/config.h
Signed-off-by: Andrew Jones
---
configure | 14 ++
1 file changed, 14 insertions(+)
diff --git a/configure b/configure
index 27
branch). Add support for extending config.h with a
manually provided config.h-type file and also add support for using it
for CONFIG_NR_CPUS for riscv.
Andrew Jones (2):
configure: Introduce add-config
riscv: Make NR_CPUS configurable
configure | 17 -
lib/riscv/asm
ST) && writable)
> kvm_set_pfn_dirty(hfn);
> + else
> + kvm_release_pfn_clean(hfn);
>
> spin_unlock(&kvm->mmu_lock);
> - kvm_set_pfn_accessed(hfn);
> - kvm_release_pfn_clean(hfn);
> return ret;
> }
>
> --
> 2.46.0.rc1.232.g9752f9e123-goog
>
Reviewed-by: Andrew Jones
err("Failed to map in G-stage\n");
>
> out_unlock:
> + if ((!ret || ret == -EEXIST) && writable)
> + kvm_set_pfn_dirty(hfn);
> +
> spin_unlock(&kvm->mmu_lock);
> kvm_set_pfn_accessed(hfn);
> kvm_release_pfn_clean(hfn);
> --
> 2.46.0.rc1.232.g9752f9e123-goog
>
Reviewed-by: Andrew Jones
m_release_pfn_clean(hfn);
> -
> + kvm_release_faultin_page(kvm, page, ret && ret != -EEXIST, writable);
> spin_unlock(&kvm->mmu_lock);
> return ret;
> }
> --
> 2.46.0.rc1.232.g9752f9e123-goog
>
>
Reviewed-by: Andrew Jones
gt; else
> # some QEMU versions report multiple panic events
> echo "PASS: guest panicked"
> + echo "EXIT: STATUS=1"
> ret=1
> fi
>
> --
> 2.45.1
>
Acked-by: Andrew Jones
On Fri, Jun 14, 2024 at 10:56:02AM GMT, Nicholas Piggin wrote:
> On Wed Jun 12, 2024 at 5:26 PM AEST, Andrew Jones wrote:
> > On Wed, Jun 12, 2024 at 03:23:17PM GMT, Nicholas Piggin wrote:
> > > run_qemu_status() looks for "EXIT: STATUS=%d" if the harness command
> &
On Wed, Jun 12, 2024 at 03:23:17PM GMT, Nicholas Piggin wrote:
> run_qemu_status() looks for "EXIT: STATUS=%d" if the harness command
> returned 1, to determine the final status of the test. In the case of
> panic tests, QEMU should terminate before successful exit status is
> known, so the run_pan
2 +-
> riscv/Makefile | 2 +-
> s390x/Makefile | 2 +-
> 4 files changed, 4 insertions(+), 4 deletions(-)
>
Acked-by: Andrew Jones
+1,111 @@
> > -include $(SRCDIR)/$(TEST_DIR)/Makefile.$(ARCH)
> > +#
> > +# powerpc makefile
> > +#
> > +# Authors: Andrew Jones
>
> I'd maybe drop that e-mail address now since it it not valid anymore.
> Andrew, do want to see your new mail address here?
No n
check
> -
> -check = =<
> +check = =
>
> Check a file for a particular value before running a test. The check line
> can contain multiple files to check separated by a space, but each check
> parameter needs to be of the form =
> +
> +The path and value can not contain space, =, or shell wildcard characters.
> --
> 2.43.0
>
Reviewed-by: Andrew Jones
On Mon, May 06, 2024 at 09:25:37AM GMT, Thomas Huth wrote:
> On 04/05/2024 14.28, Nicholas Piggin wrote:
> > There are times we would like to test a function that is known to fail
> > in some conditions due to a bug in implementation (QEMU, KVM, or even
> > hardware). It would be nice to count thes
On Fri, Apr 05, 2024 at 06:35:14PM +1000, Nicholas Piggin wrote:
> Consolidate unittests.cfg documentation in one place.
>
> Suggested-by: Andrew Jones
> Signed-off-by: Nicholas Piggin
> ---
> arm/unittests.cfg | 26 ++---
> docs/
> previously.
>
> Reviewed-by: Thomas Huth
> Signed-off-by: Nicholas Piggin
> ---
> arm/gic.c | 21 -
> s390x/migration-cmm.c | 8
> s390x/migration-skey.c | 4 +++-
> s390x/migration.c | 1 +
> 4 files changed, 20 insertio
weak, such that an architecture may
override it when necessary, to accommodate the image layout. Then,
immediately supply the riscv override.
Signed-off-by: Andrew Jones
---
lib/riscv/stack.c | 18 ++
lib/stack.c | 8
lib/stack.h | 2 ++
3 files changed, 24
trace printing")
Acked-by: Claudio Imbrenda
Reviewed-by: Nicholas Piggin
Signed-off-by: Andrew Jones
---
lib/arm/stack.c | 13 +
lib/arm64/stack.c | 12 +---
lib/riscv/stack.c | 12 +---
lib/s390x/stack.c | 12 +---
lib/stack.h | 24 +--
On Tue, Mar 05, 2024 at 07:26:18AM +0100, Thomas Huth wrote:
> On 05/03/2024 03.19, Nicholas Piggin wrote:
> > On Fri Mar 1, 2024 at 10:41 PM AEST, Thomas Huth wrote:
> > > On 26/02/2024 11.12, Nicholas Piggin wrote:
> > > > Add basic testing of various kinds of interrupts, machine check,
> > > > p
On Mon, Mar 04, 2024 at 07:17:35AM +0100, Thomas Huth wrote:
> On 26/02/2024 10.38, Nicholas Piggin wrote:
> > The cooperative migration protocol is very good to control precise
> > pre and post conditions for a migration event. However in some cases
> > its intrusiveness to the test program, can m
On Fri, Mar 01, 2024 at 02:57:04PM +0100, Thomas Huth wrote:
> On 01/03/2024 14.45, Andrew Jones wrote:
> > On Fri, Mar 01, 2024 at 01:41:22PM +0100, Thomas Huth wrote:
> > > On 26/02/2024 11.12, Nicholas Piggin wrote:
> > > > Add basic testing of various kind
On Fri, Mar 01, 2024 at 01:41:22PM +0100, Thomas Huth wrote:
> On 26/02/2024 11.12, Nicholas Piggin wrote:
> > Add basic testing of various kinds of interrupts, machine check,
> > page fault, illegal, decrementer, trace, syscall, etc.
> >
> > This has a known failure on QEMU TCG pseries machines w
On Thu, Feb 29, 2024 at 01:49:58PM +1000, Nicholas Piggin wrote:
> On Thu Feb 29, 2024 at 1:04 AM AEST, Andrew Jones wrote:
> > Calculating the offset of an address is image specific, which is
> > architecture specific. Until now, all architectures and architecture
> > config
On Thu, Feb 29, 2024 at 01:31:52PM +1000, Nicholas Piggin wrote:
> On Thu Feb 29, 2024 at 1:04 AM AEST, Andrew Jones wrote:
...
> > diff --git a/lib/stack.h b/lib/stack.h
> > index 10fc2f793354..6edc84344b51 100644
> > --- a/lib/stack.h
> > +++ b/lib/stack.h
> >
architecture specific, since the
architecture's image layout already is.
Signed-off-by: Andrew Jones
---
lib/arm64/stack.c | 17 +
lib/riscv/stack.c | 18 ++
lib/stack.c | 19 ++-
lib/stack.h | 2 ++
lib/x86/stack.c
trace printing")
Signed-off-by: Andrew Jones
---
lib/arm/stack.c | 13 +
lib/arm64/stack.c | 12 +---
lib/riscv/stack.c | 12 +---
lib/s390x/stack.c | 12 +---
lib/stack.h | 24 +---
lib/x86/stack.c | 12 +---
6 files c
On Mon, Feb 26, 2024 at 08:12:18PM +1000, Nicholas Piggin wrote:
> This adds testing for the powernv machine, and adds a gitlab-ci test
> group instead of specifying all tests in .gitlab-ci.yml.
>
> Signed-off-by: Nicholas Piggin
> ---
> .gitlab-ci.yml| 16 ++--
> powerpc/uni
ir heuristic and just require
> everybody sets arch_libdir correctly. Fail if the lib/arch or
> lib/arch/asm directories can not be found.
>
> Cc: Alexandru Elisei
> Cc: Andrew Jones
> Cc: Claudio Imbrenda
> Cc: David Hildenbrand
> Cc: Eric Auger
> Cc: Janosch Fr
a missing test directory to disambiguate
> the error in out of tree builds.
>
> Cc: Alexandru Elisei
> Cc: Andrew Jones
> Cc: Claudio Imbrenda
> Cc: David Hildenbrand
> Cc: Eric Auger
> Cc: Janosch Frank
> Cc: Laurent Vivier
> Cc: Nico Böhr
> Cc: Paolo Bonzini
&g
1 - 100 of 142 matches
Mail list logo