[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0e38a555-b7dc-4e5c-b0d9-ab3b447dd460@nvidia.com>
Date: Tue, 28 Oct 2025 20:24:07 +1100
From: Balbir Singh <balbirs@...dia.com>
To: Christian Borntraeger <borntraeger@...ux.ibm.com>,
Claudio Imbrenda <imbrenda@...ux.ibm.com>,
David Hildenbrand <david@...hat.com>
Cc: Liam.Howlett@...cle.com, airlied@...il.com, akpm@...ux-foundation.org,
apopple@...dia.com, baohua@...nel.org, baolin.wang@...ux.alibaba.com,
byungchul@...com, dakr@...nel.org, dev.jain@....com,
dri-devel@...ts.freedesktop.org, francois.dugast@...el.com,
gourry@...rry.net, joshua.hahnjy@...il.com, linux-kernel@...r.kernel.org,
linux-mm@...ck.org, lorenzo.stoakes@...cle.com, lyude@...hat.com,
matthew.brost@...el.com, mpenttil@...hat.com, npache@...hat.com,
osalvador@...e.de, rakie.kim@...com, rcampbell@...dia.com,
ryan.roberts@....com, simona@...ll.ch, ying.huang@...ux.alibaba.com,
ziy@...dia.com, kvm@...r.kernel.org, linux-s390@...r.kernel.org,
linux-next@...r.kernel.org, Heiko Carstens <hca@...ux.ibm.com>,
Vasily Gorbik <gor@...ux.ibm.com>, Alexander Gordeev <agordeev@...ux.ibm.com>
Subject: Re: linux-next: KVM/s390x regression
On 10/28/25 04:06, Christian Borntraeger wrote:
> Am 27.10.25 um 17:47 schrieb Claudio Imbrenda:
>> On Mon, 20 Oct 2025 10:41:28 +0200
>> David Hildenbrand <david@...hat.com> wrote:
>>
>>> On 20.10.25 09:00, Christian Borntraeger wrote:
>>>> Am 17.10.25 um 23:56 schrieb Balbir Singh:
>>>>
>>>>> In the meanwhile, does this fix/workaround work?
>>>>>
>>>>> diff --git a/mm/pgtable-generic.c b/mm/pgtable-generic.c
>>>>> index 0c847cdf4fd3..31c1754d5bd4 100644
>>>>> --- a/mm/pgtable-generic.c
>>>>> +++ b/mm/pgtable-generic.c
>>>>> @@ -290,7 +290,7 @@ pte_t *___pte_offset_map(pmd_t *pmd, unsigned long addr, pmd_t *pmdvalp)
>>>>> if (pmdvalp)
>>>>> *pmdvalp = pmdval;
>>>>> - if (unlikely(pmd_none(pmdval) || !pmd_present(pmdval)))
>>>>> + if (unlikely(pmd_none(pmdval) || is_pmd_non_present_folio_entry(pmdval)))
>>>>> goto nomap;
>>>>> if (unlikely(pmd_trans_huge(pmdval)))
>>>>> goto nomap;
>>>>>
>>>>
>>>> Yes, this seems to work.
>>>
>>> Right, but that's not what we will want here. We'll have to adjust s390x
>>> gmap code (which is getting redesigned either way) to only take the page
>>> lock.
>>>
>>> In the end, we'll want here later a single
>>>
>>> if (!pmd_present(pmdval))
>>> goto nomap;
>>>
>>
>> this seems to do the trick:
>>
>> diff --git a/arch/s390/mm/gmap.c b/arch/s390/mm/gmap.c
>> index 8ff6bba107e8..22c448b32340 100644
>> --- a/arch/s390/mm/gmap.c
>> +++ b/arch/s390/mm/gmap.c
>> @@ -599,8 +599,9 @@ int __gmap_link(struct gmap *gmap, unsigned long
>> gaddr, unsigned long vmaddr) | _SEGMENT_ENTRY_GMAP_UC
>> | _SEGMENT_ENTRY;
>> } else
>> - *table = pmd_val(*pmd) &
>> - _SEGMENT_ENTRY_HARDWARE_BITS;
>> + *table = (pmd_val(*pmd) &
>> + _SEGMENT_ENTRY_HARDWARE_BITS)
>> + | _SEGMENT_ENTRY;
>> }
>> } else if (*table & _SEGMENT_ENTRY_PROTECT &&
>> !(pmd_val(*pmd) & _SEGMENT_ENTRY_PROTECT)) {
>>
>>
>
> Tested-by: Christian Borntraeger <borntraeger@...ux.ibm.com>
> Acked-by: Christian Borntraeger <borntraeger@...ux.ibm.com>
>
> can you send a proper patch? I guess we should add it to Andrews mm true to keep it close to the patch that uncovered the issue.
> s390 maintainers cced.
Thanks for finding the fix. Ideally, we want this fix just before my series if possible!
Balbir
Powered by blists - more mailing lists