[PATCH v1 0/4] KVM: s390: vsie: vsie page handling fixes + rework

David Hildenbrand posted 4 patches 11 months, 2 weeks ago
arch/s390/include/asm/kvm_host.h |   4 +-
arch/s390/kvm/vsie.c             | 104 ++++++++++++++++++++-----------
2 files changed, 69 insertions(+), 39 deletions(-)
[PATCH v1 0/4] KVM: s390: vsie: vsie page handling fixes + rework
Posted by David Hildenbrand 11 months, 2 weeks ago
We want to get rid of page->index, so let's make vsie code stop using it
for the vsie page.

While at it, also remove the usage of page refcount, so we can stop messing
with "struct page" completely.

... of course, looking at this code after quite some years, I found some
corner cases that should be fixed.

Briefly sanity tested with kvm-unit-tests running inside a KVM VM, and
nothing blew up.

Cc: Christian Borntraeger <borntraeger@linux.ibm.com>
Cc: Janosch Frank <frankja@linux.ibm.com>
Cc: Claudio Imbrenda <imbrenda@linux.ibm.com>
Cc: Heiko Carstens <hca@linux.ibm.com>
Cc: Vasily Gorbik <gor@linux.ibm.com>
Cc: Alexander Gordeev <agordeev@linux.ibm.com>
Cc: Sven Schnelle <svens@linux.ibm.com>
Cc: Thomas Huth <thuth@redhat.com>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>

David Hildenbrand (4):
  KVM: s390: vsie: fix some corner-cases when grabbing vsie pages
  KVM: s390: vsie: stop using page->index
  KVM: s390: vsie: stop messing with page refcount
  KVM: s390: vsie: stop using "struct page" for vsie page

 arch/s390/include/asm/kvm_host.h |   4 +-
 arch/s390/kvm/vsie.c             | 104 ++++++++++++++++++++-----------
 2 files changed, 69 insertions(+), 39 deletions(-)


base-commit: fbfd64d25c7af3b8695201ebc85efe90be28c5a3
-- 
2.47.1
Re: [PATCH v1 0/4] KVM: s390: vsie: vsie page handling fixes + rework
Posted by Christoph Schlameuss 11 months, 1 week ago
On Tue Jan 7, 2025 at 4:43 PM CET, David Hildenbrand wrote:
> We want to get rid of page->index, so let's make vsie code stop using it
> for the vsie page.
>
> While at it, also remove the usage of page refcount, so we can stop messing
> with "struct page" completely.
>
> ... of course, looking at this code after quite some years, I found some
> corner cases that should be fixed.
>
> Briefly sanity tested with kvm-unit-tests running inside a KVM VM, and
> nothing blew up.

Reviewed and tested the whole series.

Reviewed-by: Christoph Schlameuss <schlameuss@linux.ibm.com>
Tested-by: Christoph Schlameuss <schlameuss@linux.ibm.com>

>
> Cc: Christian Borntraeger <borntraeger@linux.ibm.com>
> Cc: Janosch Frank <frankja@linux.ibm.com>
> Cc: Claudio Imbrenda <imbrenda@linux.ibm.com>
> Cc: Heiko Carstens <hca@linux.ibm.com>
> Cc: Vasily Gorbik <gor@linux.ibm.com>
> Cc: Alexander Gordeev <agordeev@linux.ibm.com>
> Cc: Sven Schnelle <svens@linux.ibm.com>
> Cc: Thomas Huth <thuth@redhat.com>
> Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
>
> David Hildenbrand (4):
>   KVM: s390: vsie: fix some corner-cases when grabbing vsie pages
>   KVM: s390: vsie: stop using page->index
>   KVM: s390: vsie: stop messing with page refcount
>   KVM: s390: vsie: stop using "struct page" for vsie page
>
>  arch/s390/include/asm/kvm_host.h |   4 +-
>  arch/s390/kvm/vsie.c             | 104 ++++++++++++++++++++-----------
>  2 files changed, 69 insertions(+), 39 deletions(-)
>
>
> base-commit: fbfd64d25c7af3b8695201ebc85efe90be28c5a3
Re: [PATCH v1 0/4] KVM: s390: vsie: vsie page handling fixes + rework
Posted by David Hildenbrand 11 months, 1 week ago
On 14.01.25 10:18, Christoph Schlameuss wrote:
> On Tue Jan 7, 2025 at 4:43 PM CET, David Hildenbrand wrote:
>> We want to get rid of page->index, so let's make vsie code stop using it
>> for the vsie page.
>>
>> While at it, also remove the usage of page refcount, so we can stop messing
>> with "struct page" completely.
>>
>> ... of course, looking at this code after quite some years, I found some
>> corner cases that should be fixed.
>>
>> Briefly sanity tested with kvm-unit-tests running inside a KVM VM, and
>> nothing blew up.
> 
> Reviewed and tested the whole series.

Thanks a bunch!

-- 
Cheers,

David / dhildenb
Re: [PATCH v1 0/4] KVM: s390: vsie: vsie page handling fixes + rework
Posted by Claudio Imbrenda 11 months, 2 weeks ago
On Tue,  7 Jan 2025 16:43:40 +0100
David Hildenbrand <david@redhat.com> wrote:

> We want to get rid of page->index, so let's make vsie code stop using it
> for the vsie page.
> 
> While at it, also remove the usage of page refcount, so we can stop messing
> with "struct page" completely.
> 
> ... of course, looking at this code after quite some years, I found some
> corner cases that should be fixed.
> 
> Briefly sanity tested with kvm-unit-tests running inside a KVM VM, and
> nothing blew up.

I like this! (aside from a very tiny nit in patch 4)

if a v2 is not needed, I'll put the split line in patch 4 back together
myself when picking, no need to send a v2 just for that.

whole series:
Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com>

> 
> Cc: Christian Borntraeger <borntraeger@linux.ibm.com>
> Cc: Janosch Frank <frankja@linux.ibm.com>
> Cc: Claudio Imbrenda <imbrenda@linux.ibm.com>
> Cc: Heiko Carstens <hca@linux.ibm.com>
> Cc: Vasily Gorbik <gor@linux.ibm.com>
> Cc: Alexander Gordeev <agordeev@linux.ibm.com>
> Cc: Sven Schnelle <svens@linux.ibm.com>
> Cc: Thomas Huth <thuth@redhat.com>
> Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
> 
> David Hildenbrand (4):
>   KVM: s390: vsie: fix some corner-cases when grabbing vsie pages
>   KVM: s390: vsie: stop using page->index
>   KVM: s390: vsie: stop messing with page refcount
>   KVM: s390: vsie: stop using "struct page" for vsie page
> 
>  arch/s390/include/asm/kvm_host.h |   4 +-
>  arch/s390/kvm/vsie.c             | 104 ++++++++++++++++++++-----------
>  2 files changed, 69 insertions(+), 39 deletions(-)
> 
> 
> base-commit: fbfd64d25c7af3b8695201ebc85efe90be28c5a3
Re: [PATCH v1 0/4] KVM: s390: vsie: vsie page handling fixes + rework
Posted by David Hildenbrand 11 months, 2 weeks ago
On 08.01.25 19:21, Claudio Imbrenda wrote:
> On Tue,  7 Jan 2025 16:43:40 +0100
> David Hildenbrand <david@redhat.com> wrote:
> 
>> We want to get rid of page->index, so let's make vsie code stop using it
>> for the vsie page.
>>
>> While at it, also remove the usage of page refcount, so we can stop messing
>> with "struct page" completely.
>>
>> ... of course, looking at this code after quite some years, I found some
>> corner cases that should be fixed.
>>
>> Briefly sanity tested with kvm-unit-tests running inside a KVM VM, and
>> nothing blew up.
> 
> I like this! (aside from a very tiny nit in patch 4)

Thanks for the review!

> 
> if a v2 is not needed, I'll put the split line in patch 4 back together
> myself when picking, no need to send a v2 just for that.

Yeah, that might be a case where "significantly increases readability" 
might still apply.

-- 
Cheers,

David / dhildenb