#
1f08a91a |
| 03-Feb-2025 |
Thomas Huth <thuth@redhat.com> |
Merge branch 'pr-2025-01-31' into 'master'
s390x: new edat, diag258 and STFLE tests; fixes for genprotimg >= 2.36.0; cleanups for snippets and makefiles
See merge request kvm-unit-tests/kvm-unit-te
Merge branch 'pr-2025-01-31' into 'master'
s390x: new edat, diag258 and STFLE tests; fixes for genprotimg >= 2.36.0; cleanups for snippets and makefiles
See merge request kvm-unit-tests/kvm-unit-tests!73
show more ...
|
#
b313eae8 |
| 16-Oct-2024 |
Nina Schoetterl-Glausch <nsg@linux.ibm.com> |
s390x: Add sie_is_pv
Add a function to check if a guest VM is currently running protected.
Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com> Reviewed-by: Janosch Frank <frankja@linux.ibm.com>
s390x: Add sie_is_pv
Add a function to check if a guest VM is currently running protected.
Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com> Reviewed-by: Janosch Frank <frankja@linux.ibm.com> Reviewed-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Nina Schoetterl-Glausch <nsg@linux.ibm.com> Link: https://lore.kernel.org/r/20241016180320.686132-3-nsg@linux.ibm.com Signed-off-by: Nico Boehr <nrb@linux.ibm.com>
show more ...
|
#
4b7a5658 |
| 16-Oct-2024 |
Nina Schoetterl-Glausch <nsg@linux.ibm.com> |
s390x: lib: Remove double include
libcflat.h was included twice.
Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com> Reviewed-by: Janosch Frank <frankja@linux.ibm.com> Signed-off-by: Nina Schoet
s390x: lib: Remove double include
libcflat.h was included twice.
Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com> Reviewed-by: Janosch Frank <frankja@linux.ibm.com> Signed-off-by: Nina Schoetterl-Glausch <nsg@linux.ibm.com> Link: https://lore.kernel.org/r/20241016180320.686132-2-nsg@linux.ibm.com Signed-off-by: Nico Boehr <nrb@linux.ibm.com>
show more ...
|
#
d1e2a8e2 |
| 10-Nov-2023 |
Thomas Huth <thuth@redhat.com> |
Merge branch 'pr-2023-11-09' into 'master'
s390x: multiline unittests.cfg, sclp enhancements, topology fixes and improvements, sie without MSO/MSL, 2G guest alignment, bug fixes
See merge request k
Merge branch 'pr-2023-11-09' into 'master'
s390x: multiline unittests.cfg, sclp enhancements, topology fixes and improvements, sie without MSO/MSL, 2G guest alignment, bug fixes
See merge request kvm-unit-tests/kvm-unit-tests!48
show more ...
|
#
54674bae |
| 06-Nov-2023 |
Nico Boehr <nrb@linux.ibm.com> |
s390x: lib: sie: don't reenter SIE on pgm int
At the moment, when a PGM int occurs while in SIE, we will just reenter SIE after the interrupt handler was called.
This is because sie() has a loop wh
s390x: lib: sie: don't reenter SIE on pgm int
At the moment, when a PGM int occurs while in SIE, we will just reenter SIE after the interrupt handler was called.
This is because sie() has a loop which checks icptcode and re-enters SIE if it is zero.
However, this behaviour is quite undesirable for SIE tests, since it doesn't give the host the chance to assert on the PGM int. Instead, we will just re-enter SIE, on nullifing conditions even causing the exception again.
In sie(), check whether a pgm int code is set in lowcore. If it has, exit the loop so the test can react to the interrupt. Add a new function read_pgm_int_code() to obtain the interrupt code.
Note that this introduces a slight oddity with sie and pgm int in certain cases: If a PGM int occurs between a expect_pgm_int() and sie(), we will now never enter SIE until the pgm_int_code is cleared by e.g. clear_pgm_int().
Also add missing include of facility.h to mem.h.
Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com> Reviewed-by: Janosch Frank <frankja@linux.ibm.com> Link: https://lore.kernel.org/r/20231106163738.1116942-6-nrb@linux.ibm.com Signed-off-by: Nico Boehr <nrb@linux.ibm.com>
show more ...
|
#
4e8880d6 |
| 06-Nov-2023 |
Nico Boehr <nrb@linux.ibm.com> |
s390x: sie: switch to home space mode before entering SIE
This is to prepare for running guests without MSO/MSL, which is currently not possible.
We already have code in sie64a to setup a guest pri
s390x: sie: switch to home space mode before entering SIE
This is to prepare for running guests without MSO/MSL, which is currently not possible.
We already have code in sie64a to setup a guest primary ASCE before entering SIE, so we can in theory switch to the page tables which translate gpa to hpa.
But the host is running in primary space mode already, so changing the primary ASCE before entering SIE will also affect the host's code and data.
To make this switch useful, the host should run in a different address space mode. Hence, set up and change to home address space mode before installing the guest ASCE.
The home space ASCE is just copied over from the primary space ASCE, so no functional change is intended, also for tests that want to use MSO/MSL. If a test intends to use a different primary space ASCE, it can now just set the guest.asce in the save_area.
Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Janosch Frank <frankja@linux.ibm.com> Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com> Link: https://lore.kernel.org/r/20231106163738.1116942-4-nrb@linux.ibm.com Signed-off-by: Nico Boehr <nrb@linux.ibm.com>
show more ...
|
#
ae337a39 |
| 06-Nov-2023 |
Nico Boehr <nrb@linux.ibm.com> |
s390x: sie: ensure guests are aligned to 2GB
Until now, kvm-unit-tests has aligned guests to 1 MB in the host virtual address space. Unfortunately, some s390x environments require guests to be 2GB a
s390x: sie: ensure guests are aligned to 2GB
Until now, kvm-unit-tests has aligned guests to 1 MB in the host virtual address space. Unfortunately, some s390x environments require guests to be 2GB aligned in the host virtual address space, preventing kvm-unit-tests which act as a hypervisor from running there.
We can't easily put guests at address 0, since we want to be able to run with MSO/MSL without having to maintain separate page tables for the guest physical memory. 2GB is also not a good choice, since the alloc_pages allocator will place its metadata there when the host has more than 2GB of memory. In addition, we also want a bit of space after the end of the host physical memory to be able to catch accesses beyond the end of physical memory.
The vmalloc allocator unfortunately allocates memory starting at the highest virtual address which is not suitable for guest memory either due to additional constraints of some environments.
The physical page allocator in memalign_pages() is also not a optimal choice, since every test running SIE would then require at least 4GB+1MB of physical memory.
This results in a few quite complex allocation requirements, hence add a new function sie_guest_alloc() which allocates memory for a guest and then establishes a properly aligned virtual space mapping.
Rework snippet test and sie tests to use the new sie_guest_alloc() function.
Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com> Link: https://lore.kernel.org/r/20231106170849.1184162-3-nrb@linux.ibm.com Signed-off-by: Nico Boehr <nrb@linux.ibm.com>
show more ...
|
#
90cacd85 |
| 11-Jul-2023 |
Thomas Huth <thuth@redhat.com> |
Merge branch 's390x-2023-07' into 'master'
s390x: topology tests, SCLP fixes, UV host test improvements, PV test improvements and validity/IPL test and some small maintanence fixes
See merge reques
Merge branch 's390x-2023-07' into 'master'
s390x: topology tests, SCLP fixes, UV host test improvements, PV test improvements and validity/IPL test and some small maintanence fixes
See merge request kvm-unit-tests/kvm-unit-tests!45
show more ...
|
#
a680af75 |
| 19-Jun-2023 |
Janosch Frank <frankja@linux.ibm.com> |
lib: s390x: sie: Fix sie_get_validity() no validity handling
Rather than asserting, we can return a value that's designated as a programming only value to indicate that there has been no validity.
lib: s390x: sie: Fix sie_get_validity() no validity handling
Rather than asserting, we can return a value that's designated as a programming only value to indicate that there has been no validity.
The SIE instruction will never write 0xffff as a validity code so let's just use that constant.
Signed-off-by: Janosch Frank <frankja@linux.ibm.com> Reviewed-by: Nico Boehr <nrb@linux.ibm.com> Link: https://lore.kernel.org/r/20230619083329.22680-2-frankja@linux.ibm.com Signed-off-by: Nico Boehr <nrb@linux.ibm.com>
show more ...
|
#
e3c5c3ef |
| 16-Feb-2023 |
Thomas Huth <thuth@redhat.com> |
Merge branch 's390x-next-2023-02' into 'master'
s390x: storage key migration tests, snippets and linker cleanups
See merge request kvm-unit-tests/kvm-unit-tests!40
|
#
93f65abc |
| 12-Jan-2023 |
Janosch Frank <frankja@linux.ibm.com> |
lib: s390x: sie: Set guest memory pointer
Seems like it was introduced but never set. It's nicer to have a pointer than to cast the MSO of a VM.
Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
lib: s390x: sie: Set guest memory pointer
Seems like it was introduced but never set. It's nicer to have a pointer than to cast the MSO of a VM.
Signed-off-by: Janosch Frank <frankja@linux.ibm.com> Reviewed-by: Nico Boehr <nrb@linux.ibm.com> Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com> Link: https://lore.kernel.org/r/20230112154548.163021-6-frankja@linux.ibm.com Message-Id: <20230112154548.163021-6-frankja@linux.ibm.com>
show more ...
|
#
5bf99cb3 |
| 25-Oct-2022 |
Paolo Bonzini <bonzini@gnu.org> |
Merge branch 's390x-next-2022-10' into 'master'
* library fixes to allow multi-cpu PV guests
* additional tests and fixes for uv-host
* timing tests and library improvements
* misc fixes
|
#
4e53a1d0 |
| 21-Oct-2022 |
Janosch Frank <frankja@linux.ibm.com> |
lib: s390x: sie: Properly populate SCA
CPU0 is the only cpu that's being used but we should still mark it as online and set the SDA in the SCA.
Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
lib: s390x: sie: Properly populate SCA
CPU0 is the only cpu that's being used but we should still mark it as online and set the SDA in the SCA.
Signed-off-by: Janosch Frank <frankja@linux.ibm.com> Reviewed-by: Nico Boehr <nrb@linux.ibm.com> Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com> Message-Id: <20221021063902.10878-7-frankja@linux.ibm.com> Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
show more ...
|
#
9e3cff66 |
| 21-Oct-2022 |
Janosch Frank <frankja@linux.ibm.com> |
lib: s390x: Use a new asce for each PV guest
Every PV guest needs its own ASCE so let's copy the topmost table designated by CR1 to create a new ASCE for the PV guest. Before and after SIE we now ne
lib: s390x: Use a new asce for each PV guest
Every PV guest needs its own ASCE so let's copy the topmost table designated by CR1 to create a new ASCE for the PV guest. Before and after SIE we now need to switch ASCEs to and from the PV guest / test ASCE. The SIE assembly function does that automatically.
Signed-off-by: Janosch Frank <frankja@linux.ibm.com> Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com> Message-Id: <20221021063902.10878-5-frankja@linux.ibm.com> Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
show more ...
|
#
1e19c3ed |
| 21-Oct-2022 |
Janosch Frank <frankja@linux.ibm.com> |
lib: s390x: sie: Improve validity handling and make it vm specific
The current library doesn't support running multiple vms at once as it stores the validity once and not per vm. Let's move the vali
lib: s390x: sie: Improve validity handling and make it vm specific
The current library doesn't support running multiple vms at once as it stores the validity once and not per vm. Let's move the validity handling into the vm and introduce a new function to retrieve the vir.
Signed-off-by: Janosch Frank <frankja@linux.ibm.com> Reviewed-by: Steffen Eiden <seiden@linux.ibm.com> Reviewed-by: Nico Boehr <nrb@linux.ibm.com> Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com> Message-Id: <20221021063902.10878-4-frankja@linux.ibm.com> Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
show more ...
|
#
3df30161 |
| 20-Jan-2022 |
Thomas Huth <thuth@redhat.com> |
Merge branch 's390x-next-20220117' from imbrenda into 'master'
s390x: 2022-01-17 update
See merge request https://gitlab.com/kvm-unit-tests/kvm-unit-tests/-/merge_requests/22
|
#
e9a5c8b6 |
| 20-May-2021 |
Janosch Frank <frankja@linux.ibm.com> |
lib: s390: sie: Add PV guest register handling
Protected guests have their registers stored to / loaded from offset 0x380 of the sie control block. So we need to copy over the GRs to/from that offse
lib: s390: sie: Add PV guest register handling
Protected guests have their registers stored to / loaded from offset 0x380 of the sie control block. So we need to copy over the GRs to/from that offset for format 4 (PV) guests before and after we enter SIE.
Signed-off-by: Janosch Frank <frankja@linux.ibm.com> Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com> Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
show more ...
|
#
6d1cb286 |
| 15-Apr-2021 |
Janosch Frank <frankja@linux.ibm.com> |
lib: s390x: sie: Add sca allocation and freeing
For protected guests we always need a ESCA so let's add functions to create and destroy SCAs on demand. We don't have scheduling and I don't expect mu
lib: s390x: sie: Add sca allocation and freeing
For protected guests we always need a ESCA so let's add functions to create and destroy SCAs on demand. We don't have scheduling and I don't expect multiple VCPU SIE in the next few months so SCA content handling is not added.
Signed-off-by: Janosch Frank <frankja@linux.ibm.com> Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com> Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.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
|
#
ab68f968 |
| 29-Jul-2021 |
Janosch Frank <frankja@linux.ibm.com> |
lib: s390x: sie: Move sie function into library
Time to deduplicate more code.
Signed-off-by: Janosch Frank <frankja@linux.ibm.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Claudio
lib: s390x: sie: Move sie function into library
Time to deduplicate more code.
Signed-off-by: Janosch Frank <frankja@linux.ibm.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
show more ...
|
#
a58e5546 |
| 15-Apr-2021 |
Janosch Frank <frankja@linux.ibm.com> |
s390x: lib: sie: Add struct vm (de)initialization functions
Before I start copying the same code over and over lets move this into the library.
Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
s390x: lib: sie: Add struct vm (de)initialization functions
Before I start copying the same code over and over lets move this into the library.
Signed-off-by: Janosch Frank <frankja@linux.ibm.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
show more ...
|
#
d75fac5f |
| 23-Feb-2021 |
Janosch Frank <frankja@linux.ibm.com> |
s390x: sie: Add sie lib validity handling
Let's start off the SIE lib with validity handling code since that has the least amount of dependencies to other files.
Signed-off-by: Janosch Frank <frank
s390x: sie: Add sie lib validity handling
Let's start off the SIE lib with validity handling code since that has the least amount of dependencies to other files.
Signed-off-by: Janosch Frank <frankja@linux.ibm.com> Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
show more ...
|