#
8a078df4 |
| 20-Sep-2022 |
Thomas Huth <thuth@redhat.com> |
Merge branch 's390x-pull-2022-20-09' into 'master'
s390x: LPAR boot fix and additional tests
See merge request kvm-unit-tests/kvm-unit-tests!35
|
#
e5ce7b94 |
| 18-Aug-2022 |
Claudio Imbrenda <imbrenda@linux.ibm.com> |
lib/s390x: fix SMP setup bug
The lowcore pointer pointing to the current CPU (THIS_CPU) was not initialized for the boot CPU. The pointer is needed for correct interrupt handling, which is needed in
lib/s390x: fix SMP setup bug
The lowcore pointer pointing to the current CPU (THIS_CPU) was not initialized for the boot CPU. The pointer is needed for correct interrupt handling, which is needed in the setup process before the struct cpu array is allocated.
The bug went unnoticed because some environments (like qemu/KVM) clear all memory and don't write anything in the lowcore area before starting the payload. The pointer thus pointed to 0, an area of memory also not used. Other environments will write to memory before starting the payload, causing the unit tests to crash at the first interrupt.
Fix by assigning a temporary struct cpu before the rest of the setup process, and assigning the pointer to the correct allocated struct during smp initialization.
Fixes: 4e5dd758 ("lib: s390x: better smp interrupt checks") Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com> Reviewed-by: Nico Boehr <nrb@linux.ibm.com> Reviewed-by: Janosch Frank <frankja@linux.ibm.com> Tested-by: Nico Boehr <nrb@linux.ibm.com> Reported-by: Janosch Frank <frankja@linux.ibm.com> Link: https://lore.kernel.org/r/20220818152114.213135-1-imbrenda@linux.ibm.com Message-Id: <20220818152114.213135-1-imbrenda@linux.ibm.com> Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
show more ...
|
#
7b2e4176 |
| 21-Jul-2022 |
Paolo Bonzini <bonzini@gnu.org> |
Merge branch 's390x-next-2022-07' into 'master'
s390x: Fix sclp facility bit numbers
See merge request kvm-unit-tests/kvm-unit-tests!34
|
#
4e5dd758 |
| 21-Feb-2022 |
Claudio Imbrenda <imbrenda@linux.ibm.com> |
lib: s390x: better smp interrupt checks
Use per-CPU flags and callbacks for Program and Extern interrupts, instead of global variables.
This allows for more accurate error handling; a CPU waiting f
lib: s390x: better smp interrupt checks
Use per-CPU flags and callbacks for Program and Extern interrupts, instead of global variables.
This allows for more accurate error handling; a CPU waiting for an interrupt will not have it "stolen" by a different CPU that was not supposed to wait for one, and now two CPUs can wait for interrupts at the same time.
This will significantly improve error reporting and debugging when things go wrong.
Both program interrupts and external interrupts are now CPU-bound, even though some external interrupts are floating (notably, the SCLP interrupt). In those cases, the testcases should mask interrupts and/or expect them appropriately according to need.
Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com> Reviewed-by: Janosch Frank <frankja@linux.ibm.com>
show more ...
|
#
1a4529ce |
| 01-Apr-2022 |
Thomas Huth <thuth@redhat.com> |
Merge branch 's390x-next-2022-04' from imbrenda into 'master'
s390x: smp, vm lib updates; I/O and smp tests
See merge request kvm-unit-tests/kvm-unit-tests!29
|
#
6531c0b8 |
| 11-Mar-2022 |
Eric Farman <farman@linux.ibm.com> |
lib: s390x: smp: Remove smp_sigp_retry
The SIGP instruction presents a CC0 when an order is accepted, though the work for the order may be performed asynchronously. While any such work is outstandin
lib: s390x: smp: Remove smp_sigp_retry
The SIGP instruction presents a CC0 when an order is accepted, though the work for the order may be performed asynchronously. While any such work is outstanding, nearly any other SIGP order sent to the same CPU will be returned with a CC2.
Currently, there are two library functions that perform a SIGP, one which retries a SIGP that gets a CC2, and one which doesn't. In practice, the users of this functionality want the CC2 to be handled by the library itself, rather than determine whether it needs to retry the request or not.
To avoid confusion, let's convert the smp_sigp() routine to perform the sigp_retry() logic, and then convert any users of smp_sigp_retry() to smp_sigp(). This of course means that the external _retry() interface can be removed for simplicity.
Signed-off-by: Eric Farman <farman@linux.ibm.com> Reviewed-by: Nico Boehr <nrb@linux.ibm.com> Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
show more ...
|
#
f1cdb032 |
| 11-Mar-2022 |
Eric Farman <farman@linux.ibm.com> |
s390x: smp: Create and use a non-waiting CPU restart
The kvm-unit-tests infrastructure for a CPU restart waits for the SIGP RESTART to complete. In order to test the restart itself, create a variati
s390x: smp: Create and use a non-waiting CPU restart
The kvm-unit-tests infrastructure for a CPU restart waits for the SIGP RESTART to complete. In order to test the restart itself, create a variation that does not wait, and test the state of the CPU directly.
While here, add some better report prefixes/messages, to clarify which condition is being examined (similar to test_stop_store_status()).
Signed-off-by: Eric Farman <farman@linux.ibm.com> Reviewed-by: Janosch Frank <frankja@linux.ibm.com> Reviewed-by: Nico Boehr <nrb@linux.ibm.com> Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
show more ...
|
#
1dac4f3c |
| 11-Mar-2022 |
Eric Farman <farman@linux.ibm.com> |
s390x: smp: Create and use a non-waiting CPU stop
When stopping a CPU, kvm-unit-tests serializes/waits for everything to finish, in order to get a consistent result whenever those functions are used
s390x: smp: Create and use a non-waiting CPU stop
When stopping a CPU, kvm-unit-tests serializes/waits for everything to finish, in order to get a consistent result whenever those functions are used.
But to test the SIGP STOP itself, these additional measures could mask other problems. For example, did the STOP work, or is the CPU still operating?
Let's create a non-waiting SIGP STOP and use it here, to ensure that the CPU is correctly stopped. A smp_cpu_stopped() call will still be used to see that the SIGP STOP has been processed, and the state of the CPU can be used to determine whether the test passes/fails.
Signed-off-by: Eric Farman <farman@linux.ibm.com> Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com> Reviewed-by: Nico Boehr <nrb@linux.ibm.com> Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
show more ...
|
#
5b8d55c8 |
| 11-Mar-2022 |
Eric Farman <farman@linux.ibm.com> |
lib: s390x: smp: Retry SIGP SENSE on CC2
The routine smp_cpu_stopped() issues a SIGP SENSE, and returns true if it received a CC1 (STATUS STORED) with the STOPPED or CHECK STOP bits enabled. Otherwi
lib: s390x: smp: Retry SIGP SENSE on CC2
The routine smp_cpu_stopped() issues a SIGP SENSE, and returns true if it received a CC1 (STATUS STORED) with the STOPPED or CHECK STOP bits enabled. Otherwise, it returns false.
This is misleading, because a CC2 (BUSY) merely indicates that the order code could not be processed, not that the CPU is operating. It could be operating but in the process of being stopped.
Convert the invocation of the SIGP SENSE to retry when a CC2 is received, so we get a more definitive answer.
Signed-off-by: Eric Farman <farman@linux.ibm.com> Reviewed-by: Janosch Frank <frankja@linux.ibm.com> Reviewed-by: Nico Boehr <nrb@linux.ibm.com> Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
show more ...
|
#
257c962f |
| 17-Feb-2022 |
Paolo Bonzini <bonzini@gnu.org> |
Merge branch 's390x-next-20220217' into 'master'
s390x: smp lib improvements and more
See merge request kvm-unit-tests/kvm-unit-tests!25
|
#
9e1e188c |
| 04-Feb-2022 |
Claudio Imbrenda <imbrenda@linux.ibm.com> |
lib: s390x: smp: refactor smp functions to accept indexes
Refactor all the smp_* functions to accept CPU indexes instead of CPU addresses.
Add SIGP wrappers to use indexes instead of addresses. Raw
lib: s390x: smp: refactor smp functions to accept indexes
Refactor all the smp_* functions to accept CPU indexes instead of CPU addresses.
Add SIGP wrappers to use indexes instead of addresses. Raw SIGP calls using addresses are still possible. Some of the reworked functions also use the new wrappers internally, for clarity, even though that will cause unnecessary redundant checks on the validity of the CPU index.
Add a few other useful functions to deal with CPU indexes.
Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com> Reviewed-by: Steffen Eiden <seiden@linux.ibm.com> Reviewed-by: Nico Boehr <nrb@linux.ibm.com>
show more ...
|
#
5a6a5506 |
| 28-Jan-2022 |
Claudio Imbrenda <imbrenda@linux.ibm.com> |
lib: s390x: smp: guarantee that boot CPU has index 0
Guarantee that the boot CPU has index 0. This simplifies the implementation of tests that require multiple CPUs.
Also fix a small bug in the all
lib: s390x: smp: guarantee that boot CPU has index 0
Guarantee that the boot CPU has index 0. This simplifies the implementation of tests that require multiple CPUs.
Also fix a small bug in the allocation of the cpus array.
Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com> Fixes: f77c0515 ("s390x: Add initial smp code") Fixes: 52076a63 ("s390x: Consolidate sclp read info") Reviewed-by: Nico Boehr <nrb@linux.ibm.com> Reviewed-by: Steffen Eiden <seiden@linux.ibm.com>
show more ...
|
#
8fdb51a1 |
| 09-Dec-2021 |
Thomas Huth <thuth@redhat.com> |
Merge branch 'misc_fixes_and_firq_test' into 'master'
s390x: I/O allocation fixes and firq test
See merge request kvm-unit-tests/kvm-unit-tests!21
|
#
a50f185b |
| 02-Dec-2021 |
David Hildenbrand <david@redhat.com> |
s390x: make smp_cpu_setup() return 0 on success
Properly return "0" on success so callers can check if the setup was successful.
The return value is yet unused, which is why this wasn't noticed so
s390x: make smp_cpu_setup() return 0 on success
Properly return "0" on success so callers can check if the setup was successful.
The return value is yet unused, which is why this wasn't noticed so far.
Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com> Reviewed-by: Janosch Frank <frankja@linux.ibm.com> Signed-off-by: David Hildenbrand <david@redhat.com> Message-Id: <20211202123553.96412-2-david@redhat.com> Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
show more ...
|
#
3ac97f8f |
| 18-Oct-2021 |
Paolo Bonzini <bonzini@gnu.org> |
Merge branch 's390x-pull-2021-10-18' into 'master'
s390x-pull-2021-10-18
See merge request kvm-unit-tests/kvm-unit-tests!18
|
#
d34d3250 |
| 06-Aug-2021 |
Janosch Frank <frankja@linux.ibm.com> |
lib: s390x: Control register constant cleanup
We had bits and masks defined and don't necessarily need both.
Signed-off-by: Janosch Frank <frankja@linux.ibm.com> Reviewed-by: Claudio Imbrenda <imbr
lib: s390x: Control register constant cleanup
We had bits and masks defined and don't necessarily need both.
Signed-off-by: Janosch Frank <frankja@linux.ibm.com> Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com> Reviewed-by: Thomas Huth <thuth@redhat.com>
show more ...
|
#
0c259cf3 |
| 16-Aug-2021 |
Paolo Bonzini <bonzini@gnu.org> |
Merge branch 's390x-pull-2021-16-08' into 'master'
s390x-pull-2021-16-08
See merge request kvm-unit-tests/kvm-unit-tests!15
|
#
44026818 |
| 06-Aug-2021 |
Janosch Frank <frankja@linux.ibm.com> |
lib: s390x: Add PSW_MASK_64
Let's replace the magic 0x0000000180000000ULL numeric constants with PSW_MASK_64 as it's used more often since the introduction of smp and sie.
Signed-off-by: Janosch Fr
lib: s390x: Add PSW_MASK_64
Let's replace the magic 0x0000000180000000ULL numeric constants with PSW_MASK_64 as it's used more often since the introduction of smp and sie.
Signed-off-by: Janosch Frank <frankja@linux.ibm.com> Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
show more ...
|
#
c9a34447 |
| 20-Jan-2021 |
Paolo Bonzini <pbonzini@redhat.com> |
Merge tag 's390x-2021-20-01' of https://gitlab.com/frankja/kvm-unit-tests into HEAD
* Moved to SPDX license identifiers and cleaning up license * Added test_bit(_inv)() & SCLP feature bit checking *
Merge tag 's390x-2021-20-01' of https://gitlab.com/frankja/kvm-unit-tests into HEAD
* Moved to SPDX license identifiers and cleaning up license * Added test_bit(_inv)() & SCLP feature bit checking * Added first SIE lib and test for nesting tests * Added diag318 emulation test * Small UV fix
show more ...
|
#
52076a63 |
| 17-Nov-2020 |
Janosch Frank <frankja@linux.ibm.com> |
s390x: Consolidate sclp read info
Let's only read the information once and pass a pointer to it instead of calling sclp multiple times.
Signed-off-by: Janosch Frank <frankja@linux.ibm.com> Reviewed
s390x: Consolidate sclp read info
Let's only read the information once and pass a pointer to it instead of calling sclp multiple times.
Signed-off-by: Janosch Frank <frankja@linux.ibm.com> Reviewed-by: Cornelia Huck <cohuck@redhat.com> Acked-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
show more ...
|
#
6c9f99df |
| 07-Dec-2020 |
Janosch Frank <frankja@linux.ibm.com> |
s390x: lib: Move to GPL 2 and SPDX license identifiers
In the past we had some issues when developers wanted to use code snippets or constants from the kernel in a test or in the library. To remedy
s390x: lib: Move to GPL 2 and SPDX license identifiers
In the past we had some issues when developers wanted to use code snippets or constants from the kernel in a test or in the library. To remedy that the s390x maintainers decided to move all files to GPL 2 (if possible).
At the same time let's move to SPDX identifiers as they are much nicer to read.
Signed-off-by: Janosch Frank <frankja@linux.ibm.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Cornelia Huck <cohuck@redhat.com> Acked-by: David Hildenbrand <david@redhat.com> Acked-by: Pierre Morel <pmorel@linux.ibm.com>
show more ...
|
#
550b4683 |
| 15-Jan-2021 |
Claudio Imbrenda <imbrenda@linux.ibm.com> |
lib/alloc: replace areas with more generic flags
Replace the areas parameter with a more generic flags parameter. This allows for up to 16 allocation areas and 16 allocation flags.
This patch intro
lib/alloc: replace areas with more generic flags
Replace the areas parameter with a more generic flags parameter. This allows for up to 16 allocation areas and 16 allocation flags.
This patch introduces the flags and changes the names of the funcions, subsequent patches will actually wire up the flags to do something.
The first two flags introduced are: - FLAG_DONTZERO to ask the allocated memory not to be zeroed - FLAG_FRESH to indicate that the allocated memory should have not been touched (READ or written to) in any way since boot.
This patch also fixes the order of arguments to consistently have alignment first and then size, thereby fixing a bug where the two values would get swapped.
Fixes: 8131e91a4b61 ("lib/alloc_page: complete rewrite of the page allocator")
Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com> Reviewed-by: Krish Sadhukhan <krish.sadhukhan@oracle.com> Message-Id: <20210115123730.381612-10-imbrenda@linux.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
#
f90ddba3 |
| 02-Oct-2020 |
Claudio Imbrenda <imbrenda@linux.ibm.com> |
lib/alloc: simplify free and malloc
Remove the size parameter from the various free functions
Since the backends can handle the allocation sizes on their own, simplify the generic malloc wrappers.
lib/alloc: simplify free and malloc
Remove the size parameter from the various free functions
Since the backends can handle the allocation sizes on their own, simplify the generic malloc wrappers.
Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com> Message-Id: <20201002154420.292134-6-imbrenda@linux.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
#
8131e91a |
| 02-Oct-2020 |
Claudio Imbrenda <imbrenda@linux.ibm.com> |
lib/alloc_page: complete rewrite of the page allocator
This is a complete rewrite of the page allocator.
This will bring a few improvements: * no need to specify the size when freeing * allocate sm
lib/alloc_page: complete rewrite of the page allocator
This is a complete rewrite of the page allocator.
This will bring a few improvements: * no need to specify the size when freeing * allocate small areas with a large alignment without wasting memory * ability to initialize and use multiple memory areas (e.g. DMA) * more sanity checks
A few things have changed: * initialization cannot be done with free_pages like before, page_alloc_init_area has to be used instead
Arch-specific changes: * s390x now uses the area below 2GiB for SMP lowcore initialization.
Details: Each memory area has metadata at the very beginning. The metadata is a byte array with one entry per usable page (so, excluding the metadata itself). Each entry indicates if the page is special (unused for now), if it is allocated, and the order of the block. Both free and allocated pages are part of larger blocks.
Some more fixed size metadata is present in a fixed-size static array. This metadata contains start and end page frame numbers, the pointer to the metadata array, and the array of freelists. The array of freelists has an entry for each possible order (indicated by the macro NLISTS, defined as BITS_PER_LONG - PAGE_SHIFT).
On allocation, if the free list for the needed size is empty, larger blocks are split. When a small allocation with a large alignment is requested, an appropriately large block is split, to guarantee the alignment.
When a block is freed, an attempt will be made to merge it into the neighbour, iterating the process as long as possible.
Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com> Message-Id: <20201002154420.292134-5-imbrenda@linux.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
#
a3307eb5 |
| 04-May-2020 |
Paolo Bonzini <pbonzini@redhat.com> |
Merge tag 's390x-2020-04-30' of https://github.com/davidhildenbrand/kvm-unit-tests
New maintainer, reviewer, and cc list. New STSI test. Lots of minor fixes and cleanups
|