From: Claudio Imbrenda <imbrenda@linux.ibm.com>
To: David Hildenbrand <david@redhat.com>
Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org,
linux-s390@vger.kernel.org,
Christian Borntraeger <borntraeger@linux.ibm.com>,
Janosch Frank <frankja@linux.ibm.com>,
Heiko Carstens <hca@linux.ibm.com>,
Vasily Gorbik <gor@linux.ibm.com>,
Alexander Gordeev <agordeev@linux.ibm.com>,
Sven Schnelle <svens@linux.ibm.com>,
Thomas Huth <thuth@redhat.com>,
"Matthew Wilcox (Oracle)" <willy@infradead.org>
Subject: Re: [PATCH v1 4/4] KVM: s390: vsie: stop using "struct page" for vsie page
Date: Wed, 8 Jan 2025 19:17:21 +0100 [thread overview]
Message-ID: <20250108191721.4d842c4a@p-imbrenda> (raw)
In-Reply-To: <20250107154344.1003072-5-david@redhat.com>
On Tue, 7 Jan 2025 16:43:44 +0100
David Hildenbrand <david@redhat.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);
next prev parent reply other threads:[~2025-01-08 18:21 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-07 15:43 [PATCH v1 0/4] KVM: s390: vsie: vsie page handling fixes + rework David Hildenbrand
2025-01-07 15:43 ` [PATCH v1 1/4] KVM: s390: vsie: fix some corner-cases when grabbing vsie pages David Hildenbrand
2025-01-07 15:43 ` [PATCH v1 2/4] KVM: s390: vsie: stop using page->index David Hildenbrand
2025-01-07 15:43 ` [PATCH v1 3/4] KVM: s390: vsie: stop messing with page refcount David Hildenbrand
2025-01-07 15:43 ` [PATCH v1 4/4] KVM: s390: vsie: stop using "struct page" for vsie page David Hildenbrand
2025-01-08 18:17 ` Claudio Imbrenda [this message]
2025-01-08 18:21 ` [PATCH v1 0/4] KVM: s390: vsie: vsie page handling fixes + rework Claudio Imbrenda
2025-01-08 20:42 ` David Hildenbrand
2025-01-14 9:18 ` Christoph Schlameuss
2025-01-14 9:37 ` David Hildenbrand
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250108191721.4d842c4a@p-imbrenda \
--to=imbrenda@linux.ibm.com \
--cc=agordeev@linux.ibm.com \
--cc=borntraeger@linux.ibm.com \
--cc=david@redhat.com \
--cc=frankja@linux.ibm.com \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=svens@linux.ibm.com \
--cc=thuth@redhat.com \
--cc=willy@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox