[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250108191721.4d842c4a@p-imbrenda>
Date: Wed, 8 Jan 2025 19:17:21 +0100
From: Claudio Imbrenda <imbrenda@...ux.ibm.com>
To: David Hildenbrand <david@...hat.com>
Cc: linux-kernel@...r.kernel.org, kvm@...r.kernel.org,
linux-s390@...r.kernel.org,
Christian Borntraeger
<borntraeger@...ux.ibm.com>,
Janosch Frank <frankja@...ux.ibm.com>,
Heiko
Carstens <hca@...ux.ibm.com>, Vasily Gorbik <gor@...ux.ibm.com>,
Alexander
Gordeev <agordeev@...ux.ibm.com>,
Sven Schnelle <svens@...ux.ibm.com>, Thomas Huth <thuth@...hat.com>,
"Matthew Wilcox (Oracle)"
<willy@...radead.org>
Subject: Re: [PATCH v1 4/4] KVM: s390: vsie: stop using "struct page" for
vsie page
On Tue, 7 Jan 2025 16:43:44 +0100
David Hildenbrand <david@...hat.com> wrote:
[...]
> @@ -1438,7 +1432,8 @@ static struct vsie_page *get_vsie_page(struct kvm *kvm, unsigned long addr)
> vsie_page->scb_gpa = ULONG_MAX;
>
> /* Double use of the same address or allocation failure. */
> - if (radix_tree_insert(&kvm->arch.vsie.addr_to_page, addr >> 9, page)) {
> + if (radix_tree_insert(&kvm->arch.vsie.addr_to_page, addr >> 9,
> + vsie_page)) {
this is less than 100 columns, could have staid on one line
> put_vsie_page(vsie_page);
> mutex_unlock(&kvm->arch.vsie.mutex);
> return NULL;
> @@ -1519,20 +1514,18 @@ void kvm_s390_vsie_init(struct kvm *kvm)
> void kvm_s390_vsie_destroy(struct kvm *kvm)
> {
> struct vsie_page *vsie_page;
> - struct page *page;
> int i;
>
> mutex_lock(&kvm->arch.vsie.mutex);
> for (i = 0; i < kvm->arch.vsie.page_count; i++) {
> - page = kvm->arch.vsie.pages[i];
> + vsie_page = kvm->arch.vsie.pages[i];
> kvm->arch.vsie.pages[i] = NULL;
> - vsie_page = page_to_virt(page);
> release_gmap_shadow(vsie_page);
> /* free the radix tree entry */
> if (vsie_page->scb_gpa != ULONG_MAX)
> radix_tree_delete(&kvm->arch.vsie.addr_to_page,
> vsie_page->scb_gpa >> 9);
> - __free_page(page);
> + free_page((unsigned long)vsie_page);
> }
> kvm->arch.vsie.page_count = 0;
> mutex_unlock(&kvm->arch.vsie.mutex);
Powered by blists - more mailing lists