History log of /kvm-unit-tests/powerpc/emulator.c (Results 1 – 14 of 14)
Revision Date Author Comments
# cd27b4ba 04-May-2024 Nicholas Piggin <npiggin@gmail.com>

powerpc: Fix emulator illegal instruction test for powernv

Illegal instructions cause 0xe40 (HEAI) interrupts rather
than program interrupts.

Acked-by: Thomas Huth <thuth@redhat.com>
Signed-off-by:

powerpc: Fix emulator illegal instruction test for powernv

Illegal instructions cause 0xe40 (HEAI) interrupts rather
than program interrupts.

Acked-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Message-ID: <20240504122841.1177683-11-npiggin@gmail.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>

show more ...


# 62cdf7a5 06-Nov-2023 Nico Boehr <nrb@linux.ibm.com>

powerpc: properly format non-kernel-doc comments

These comments do not follow the kernel-doc style, hence they should not
start with /**.

Signed-off-by: Nico Boehr <nrb@linux.ibm.com>
Reviewed-by:

powerpc: properly format non-kernel-doc comments

These comments do not follow the kernel-doc style, hence they should not
start with /**.

Signed-off-by: Nico Boehr <nrb@linux.ibm.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20231106125352.859992-3-nrb@linux.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>

show more ...


# 0c111b37 26-Oct-2021 Thomas Huth <thuth@redhat.com>

powerpc/emulator: Fix compilation with recent versions of GCC

New versions of GCC (e.g. version 11.2 from Fedora 34) refuse to compile
assembly with the lswx and lswi mnemonics in little endian mode

powerpc/emulator: Fix compilation with recent versions of GCC

New versions of GCC (e.g. version 11.2 from Fedora 34) refuse to compile
assembly with the lswx and lswi mnemonics in little endian mode since the
instruction is only allowed in big endian mode, thus emulator.c cannot be
compiled anymore. Re-arrange the tests a little bit to use hand-crafted
instructions in little endian mode to fix this issue. Additionally, the lswx
and lswi instructions generate an alignment exception with recent versions
of QEMU, too (see https://gitlab.com/qemu-project/qemu/-/commit/5817355ed0),
so we can turn the report_xfail() into proper report() statements now.

Message-Id: <20211026061532.117368-1-thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>

show more ...


# a299895b 06-Dec-2019 Thomas Huth <thuth@redhat.com>

Switch the order of the parameters in report() and report_xfail()

Commit c09c54c66b1df ("lib: use an argument which doesn't require
default argument promotion") fixed a warning that occurs with Clan

Switch the order of the parameters in report() and report_xfail()

Commit c09c54c66b1df ("lib: use an argument which doesn't require
default argument promotion") fixed a warning that occurs with Clang,
but introduced a regression: If the "pass" parameter is a value
which has only set the condition bits in the upper 32 bits of a
64 bit value, the condition is now false since the value is truncated
to "unsigned int" so that the upper bits are simply discarded.

We fixed it by reverting the commit, but that of course also means
trouble with Clang again. We can not use "bool" if it is the last
parameter before the variable argument list. The proper fix is to
swap the parameters around and make the format string the last
parameter.

This patch (except the changes in lib/libcflat.h and lib/report.c
and some rebase conflicts along the way) has basically been created
with following coccinelle script (with some additional manual tweaking
of long and disabled lines afterwards):

@@
expression fmt;
expression pass;
expression list args;
@@
report(
-fmt, pass
+pass, fmt
, args);

@@
expression fmt;
expression pass;
expression list args;
@@
report_xfail(
-fmt, xfail, pass
+xfail, pass, fmt
, args);

Tested-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20191206113102.14914-1-thuth@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

show more ...


# fd6aada0 17-May-2017 Radim Krčmář <rkrcmar@redhat.com>

use %# instead of 0x% in all format strings

It's one character shorter, properly prefixed, and also provides error
detection: %#d triggers a warning.

Done with `sed -i 's/0x%/%#/g' **/*.[ch]` to mo

use %# instead of 0x% in all format strings

It's one character shorter, properly prefixed, and also provides error
detection: %#d triggers a warning.

Done with `sed -i 's/0x%/%#/g' **/*.[ch]` to motivate the use of %#,
existing padding was raised by 2 to account for the counted "0x" (output
should be the same).

Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>

show more ...


# a9abb1b8 12-Jun-2016 Andrew Jones <drjones@redhat.com>

powerpc/ppc64: reserve argv[0] for prognam

Signed-off-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


# c2abe9e3 25-Apr-2016 Radim Krčmář <rkrcmar@redhat.com>

Merge branch 'ppc-next' of https://github.com/huth/kvm-unit-tests


# 15181c7f 20-Apr-2016 Laurent Vivier <lvivier@redhat.com>

powerpc: don't fail if QEMU does not support alignment exception

As for lswi, lswx is supposed to cause an alignment exception in
little endian mode, but QEMU does not support it. So in case we do
n

powerpc: don't fail if QEMU does not support alignment exception

As for lswi, lswx is supposed to cause an alignment exception in
little endian mode, but QEMU does not support it. So in case we do
not get an exception, this is an expected failure and we run the other
tests.

Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Thomas Huth <thuth@redhat.com>

show more ...


# 1672d173 14-Apr-2016 Thomas Huth <thuth@redhat.com>

powerpc: Add emulator test for the lswi instruction

This test checks some special cases of the lswi instruction. Test
works fine on real hardware, but in QEMU, this reveals a bug with
the final "don

powerpc: Add emulator test for the lswi instruction

This test checks some special cases of the lswi instruction. Test
works fine on real hardware, but in QEMU, this reveals a bug with
the final "don't overwrite Ra" test (RA gets destroyed since the
check in QEMU is still wrong).
The code is based on the lswx test by Laurent Vivier.

Reviewed-by: Laurent Vivier <lvivier@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>

show more ...


# 0fd70fe3 30-Mar-2016 Laurent Vivier <lvivier@redhat.com>

powerpc: display alignment exception in verbose mode only

In the emulator test, the illegal exception is displayed
only in verbose mode, do the same thing for the alignment
exception.

Signed-off-by

powerpc: display alignment exception in verbose mode only

In the emulator test, the illegal exception is displayed
only in verbose mode, do the same thing for the alignment
exception.

Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Message-Id: <1459350381-23387-1-git-send-email-lvivier@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

show more ...


# c6699676 21-Mar-2016 Laurent Vivier <lvivier@redhat.com>

powerpc: Check lswx in little-endian mode.

For lswx in little-endian mode, an alignment interrupt occurs.

Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.c

powerpc: Check lswx in little-endian mode.

For lswx in little-endian mode, an alignment interrupt occurs.

Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <1458560014-28862-6-git-send-email-lvivier@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

show more ...


# a46c6196 21-Mar-2016 Laurent Vivier <lvivier@redhat.com>

powerpc: check lswx

Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Message-Id: <1458560014-28862-5-git-send-email-lvivier@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


# 8260a156 21-Mar-2016 Laurent Vivier <lvivier@redhat.com>

powerpc: check 64bit mode

Check in MSR if the SF bit is set (64bit mode is enabled)

Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: David Gibson <dgibson@redhat.com>
Reviewed-by: Th

powerpc: check 64bit mode

Check in MSR if the SF bit is set (64bit mode is enabled)

Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: David Gibson <dgibson@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <1458560014-28862-4-git-send-email-lvivier@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

show more ...


# be9b007b 21-Mar-2016 Laurent Vivier <lvivier@redhat.com>

powerpc: add test to check invalid instruction trap

Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: David Gibson <dgibson@redhat.com>
Message-Id: <1458560014-28862-3-git-send-email-l

powerpc: add test to check invalid instruction trap

Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: David Gibson <dgibson@redhat.com>
Message-Id: <1458560014-28862-3-git-send-email-lvivier@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

show more ...