<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/arch/s390/kvm, branch master</title>
<subtitle>Linux kernel source tree.</subtitle>
<id>https://git.ilvokhin.com/linux.git/atom/arch/s390/kvm?h=master</id>
<link rel='self' href='https://git.ilvokhin.com/linux.git/atom/arch/s390/kvm?h=master'/>
<link rel='alternate' type='text/html' href='https://git.ilvokhin.com/linux.git/'/>
<updated>2026-07-09T14:23:10Z</updated>
<entry>
<title>KVM: s390: pci: Fix handling of AIF enable without AISB</title>
<updated>2026-07-09T14:23:10Z</updated>
<author>
<name>Matthew Rosato</name>
<email>mjrosato@linux.ibm.com</email>
</author>
<published>2026-07-09T13:54:04Z</published>
<link rel='alternate' type='text/html' href='https://git.ilvokhin.com/linux.git/commit/?id=3e3aa6da87d30a0064a17b836685cd43c90a3572'/>
<id>urn:sha1:3e3aa6da87d30a0064a17b836685cd43c90a3572</id>
<content type='text'>
When a guest seeks to register IRQs without a summary bit specified,
ensure that the associated GAITE then stores 0 for the guest AISB
location instead of virt_to_phys(page_address(NULL)).

Fixes: 3c5a1b6f0a18 ("KVM: s390: pci: provide routines for enabling/disabling interrupt forwarding")
Cc: stable@vger.kernel.org
Reviewed-by: Farhan Ali &lt;alifm@linux.ibm.com&gt;
Signed-off-by: Matthew Rosato &lt;mjrosato@linux.ibm.com&gt;
Signed-off-by: Christian Borntraeger &lt;borntraeger@linux.ibm.com&gt;
</content>
</entry>
<entry>
<title>KVM: s390: Improve kvm_s390_vm_stop_migration()</title>
<updated>2026-07-09T08:26:10Z</updated>
<author>
<name>Claudio Imbrenda</name>
<email>imbrenda@linux.ibm.com</email>
</author>
<published>2026-07-02T15:24:06Z</published>
<link rel='alternate' type='text/html' href='https://git.ilvokhin.com/linux.git/commit/?id=9489220fe0e69d2ca141e5062dd3ef3e2e55959f'/>
<id>urn:sha1:9489220fe0e69d2ca141e5062dd3ef3e2e55959f</id>
<content type='text'>
There is no need to clear cmma-dirty state if the VM is not using CMMA.

Skip the CMMA-related code if CMMA is not in use.

Fixes: 6cfd47f91f6a ("KVM: s390: Fix cmma dirty tracking")
Fixes: 190df4a212a7 ("KVM: s390: CMMA tracking, ESSA emulation, migration mode")
Signed-off-by: Claudio Imbrenda &lt;imbrenda@linux.ibm.com&gt;
Reviewed-by: Christian Borntraeger &lt;borntraeger@linux.ibm.com&gt;
Signed-off-by: Christian Borntraeger &lt;borntraeger@linux.ibm.com&gt;
</content>
</entry>
<entry>
<title>KVM: s390: Fix dat_crste_walk_range() early return</title>
<updated>2026-07-09T08:26:10Z</updated>
<author>
<name>Claudio Imbrenda</name>
<email>imbrenda@linux.ibm.com</email>
</author>
<published>2026-07-02T15:24:05Z</published>
<link rel='alternate' type='text/html' href='https://git.ilvokhin.com/linux.git/commit/?id=4d4a21e38f1b87a76b3e63d4f837ff4e9b52d5a6'/>
<id>urn:sha1:4d4a21e38f1b87a76b3e63d4f837ff4e9b52d5a6</id>
<content type='text'>
If a walk entry handler for a lower level returns a value,
dat_crste_walk_range() will not return immediately, but instead loop
again and move to the next entry.

This means that some entries are potentially skipped, and early return
is ignored. Skipped entries might lead to all kinds of issues, given
that the caller expects them to not be skipped. Early return is often
used to interrupt a walk when a rescheduling is needed; if it is
ignored it can lead to stalls.

Fix by breaking from the loop immediately if the walk to a lower level
returned non-zero.

Fixes: 2db149a0a6c5 ("KVM: s390: KVM page table management functions: walks")
Signed-off-by: Claudio Imbrenda &lt;imbrenda@linux.ibm.com&gt;
Reviewed-by: Christian Borntraeger &lt;borntraeger@linux.ibm.com&gt;
Signed-off-by: Christian Borntraeger &lt;borntraeger@linux.ibm.com&gt;
</content>
</entry>
<entry>
<title>KVM: s390: vsie: Avoid potential deadlock with real spaces</title>
<updated>2026-07-09T08:26:10Z</updated>
<author>
<name>Claudio Imbrenda</name>
<email>imbrenda@linux.ibm.com</email>
</author>
<published>2026-07-02T15:23:59Z</published>
<link rel='alternate' type='text/html' href='https://git.ilvokhin.com/linux.git/commit/?id=866d03de6def89c386cdfd457b28a1f566e02565'/>
<id>urn:sha1:866d03de6def89c386cdfd457b28a1f566e02565</id>
<content type='text'>
The natural lock ordering is mmu_lock -&gt; children_lock, but in
gmap_create_shadow() the reverse order is used when handling shadowing
of real address spaces.

Convert the inner locking of kvm-&gt;mmu_lock to a trylock; return -EAGAIN
if the lock is busy, and let the caller try again.

This path is not expected to happen in real-life scenarios, so its
performance is not important.

Fixes: a2c17f9270cc ("KVM: s390: New gmap code")
Signed-off-by: Claudio Imbrenda &lt;imbrenda@linux.ibm.com&gt;
Reviewed-by: Christian Borntraeger &lt;borntraeger@linux.ibm.com&gt;
Signed-off-by: Christian Borntraeger &lt;borntraeger@linux.ibm.com&gt;
</content>
</entry>
<entry>
<title>KVM: s390: pci: Fix GISC refcount leak on AIF enable failure</title>
<updated>2026-07-09T08:25:56Z</updated>
<author>
<name>Haoxiang Li</name>
<email>haoxiang_li2024@163.com</email>
</author>
<published>2026-06-24T06:19:10Z</published>
<link rel='alternate' type='text/html' href='https://git.ilvokhin.com/linux.git/commit/?id=7b69729046a4c58f4cb457184e5ac4aaa179bff4'/>
<id>urn:sha1:7b69729046a4c58f4cb457184e5ac4aaa179bff4</id>
<content type='text'>
kvm_s390_gisc_register() registers the guest ISC before pinning
the guest interrupt forwarding pages and allocating the AISB bit.
If any of the later setup steps fails, the function unwinds the
pinned pages and other local state, but does not unregister the
GISC reference. Add the missing kvm_s390_gisc_unregister() to the
error unwind path.

Fixes: 3c5a1b6f0a18 ("KVM: s390: pci: provide routines for enabling/disabling interrupt forwarding")
Cc: stable@vger.kernel.org
Signed-off-by: Haoxiang Li &lt;haoxiang_li2024@163.com&gt;
Reviewed-by: Matthew Rosato &lt;mjrosato@linux.ibm.com&gt;
Tested-by: Matthew Rosato &lt;mjrosato@linux.ibm.com&gt;
Acked-by: Claudio Imbrenda &lt;imbrenda@linux.ibm.com&gt;
Reviewed-by: Christian Borntraeger &lt;borntraeger@linux.ibm.com&gt;
Signed-off-by: Claudio Imbrenda &lt;imbrenda@linux.ibm.com&gt;
Message-ID: &lt;20260624061910.2794734-1-haoxiang_li2024@163.com&gt;
Signed-off-by: Christian Borntraeger &lt;borntraeger@linux.ibm.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'kvm-s390-next-7.2-2' of https://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into HEAD</title>
<updated>2026-06-24T11:41:41Z</updated>
<author>
<name>Paolo Bonzini</name>
<email>pbonzini@redhat.com</email>
</author>
<published>2026-06-24T11:40:39Z</published>
<link rel='alternate' type='text/html' href='https://git.ilvokhin.com/linux.git/commit/?id=91b16b53a08c3684ea2b0ad3cbf8ecd48c0f8b77'/>
<id>urn:sha1:91b16b53a08c3684ea2b0ad3cbf8ecd48c0f8b77</id>
<content type='text'>
* Fix S390_USER_OPEREXEC so it can now be enabled regardless of other
  unrelated capabilities

* Fix handling of the _PAGE_UNUSED pte bit that could lead to guest
  memory corruption in some scenarios

* A bunch of misc gmap fixes (locking, behaviour under memory pressure)

* Fix CMMA dirty tracking
</content>
</entry>
<entry>
<title>KVM: s390: Return failure in case of failure in kvm_s390_set_cmma_bits()</title>
<updated>2026-06-24T08:08:57Z</updated>
<author>
<name>Claudio Imbrenda</name>
<email>imbrenda@linux.ibm.com</email>
</author>
<published>2026-06-23T15:33:30Z</published>
<link rel='alternate' type='text/html' href='https://git.ilvokhin.com/linux.git/commit/?id=babe08404e1993697a523e60bc0f9d096ffe1ef8'/>
<id>urn:sha1:babe08404e1993697a523e60bc0f9d096ffe1ef8</id>
<content type='text'>
If the allocation of the bits array failed, kvm_s390_set_cmma_bits()
would return 0 instead of an error code.

Rework the function to use the __free() macros and thus simplify the
code flow; when the above mentioned allocation fails, simply return
-ENOMEM.

Fixes: e38c884df921 ("KVM: s390: Switch to new gmap")
Reviewed-by: Christian Borntraeger &lt;borntraeger@linux.ibm.com&gt;
Signed-off-by: Claudio Imbrenda &lt;imbrenda@linux.ibm.com&gt;
Message-ID: &lt;20260623153331.233784-10-imbrenda@linux.ibm.com&gt;
</content>
</entry>
<entry>
<title>KVM: s390: Fix cmma dirty tracking</title>
<updated>2026-06-24T08:08:57Z</updated>
<author>
<name>Claudio Imbrenda</name>
<email>imbrenda@linux.ibm.com</email>
</author>
<published>2026-06-23T15:33:28Z</published>
<link rel='alternate' type='text/html' href='https://git.ilvokhin.com/linux.git/commit/?id=6cfd47f91f6aa3bcf9fe15388be52feb4b180440'/>
<id>urn:sha1:6cfd47f91f6aa3bcf9fe15388be52feb4b180440</id>
<content type='text'>
It is possible that some guest memory areas have not been touched yet
when starting migration mode, and thus have no ptes allocated. Only
existing and allocated ptes should count toward the total of dirty cmma
entries.

When starting migration mode, enable the migration_mode flag
immediately, so that any subsequent ESSA will trap in the host and
cause cmma_dirty_pages to be increased as needed.
Subsequently, set the cmma_d bit on all existing cmma-clean PGSTEs,
increasing cmma_dirty_pages as needed. Skipping cmma-dirty pages
prevents double counting.

Conversely, when disabling migration mode, set cmma_dirty_pages to 0
and clear the cmma_d bit in all existing PGSTEs.

The invariant is that when migration mode is off, no PGSTE has its
cmma_d bit set, and cmma_dirty_pages is 0. kvm-&gt;slots_lock protects
kvm_s390_vm_start_migration() and kvm_s390_vm_stop_migration() from
each other and from kvm_s390_get_cmma_bits().

Also fix dat_get_cmma() to properly wrap around if the first attempt
reached the end of guest memory without finding cmma-dirty pages.

[ imbrenda: Moved kvm_s390_sync_request_broadcast() before gmap_set_cmma_all_dirty() ]

Fixes: e38c884df921 ("KVM: s390: Switch to new gmap")
Signed-off-by: Claudio Imbrenda &lt;imbrenda@linux.ibm.com&gt;
Message-ID: &lt;20260623153331.233784-8-imbrenda@linux.ibm.com&gt;
</content>
</entry>
<entry>
<title>KVM: s390: Fix locking in kvm_s390_set_mem_control()</title>
<updated>2026-06-24T08:08:57Z</updated>
<author>
<name>Claudio Imbrenda</name>
<email>imbrenda@linux.ibm.com</email>
</author>
<published>2026-06-23T15:33:27Z</published>
<link rel='alternate' type='text/html' href='https://git.ilvokhin.com/linux.git/commit/?id=9b0bf9b93cbff50764713b62d0f38d5238eea8c8'/>
<id>urn:sha1:9b0bf9b93cbff50764713b62d0f38d5238eea8c8</id>
<content type='text'>
Add the missing locking around dat_reset_cmma().

Fixes: e38c884df921 ("KVM: s390: Switch to new gmap")
Signed-off-by: Claudio Imbrenda &lt;imbrenda@linux.ibm.com&gt;
Message-ID: &lt;20260623153331.233784-7-imbrenda@linux.ibm.com&gt;
</content>
</entry>
<entry>
<title>KVM: s390: Fix handle_{sske,pfmf} under memory pressure</title>
<updated>2026-06-24T08:08:57Z</updated>
<author>
<name>Claudio Imbrenda</name>
<email>imbrenda@linux.ibm.com</email>
</author>
<published>2026-06-23T15:33:26Z</published>
<link rel='alternate' type='text/html' href='https://git.ilvokhin.com/linux.git/commit/?id=2bd74dce0814acc382cfd6903ec902fdcd7b0fed'/>
<id>urn:sha1:2bd74dce0814acc382cfd6903ec902fdcd7b0fed</id>
<content type='text'>
Under heavy memory pressure, handle_sske() and handle_pfmf() might
cause an endless loop if the mmu cache runs empty, the atomic
allocations fail, and the top-up function also fails. While quite
unlikely, that scenario is not impossible.

Fix the issue by not ignoring the return value of
kvm_s390_mmu_cache_topup(), and appropriately returning an error code
in case of failure.

Fixes: e38c884df921 ("KVM: s390: Switch to new gmap")
Reviewed-by: Christian Borntraeger &lt;borntraeger@linux.ibm.com&gt;
Signed-off-by: Claudio Imbrenda &lt;imbrenda@linux.ibm.com&gt;
Message-ID: &lt;20260623153331.233784-6-imbrenda@linux.ibm.com&gt;
</content>
</entry>
</feed>
