From patchwork Thu Dec 19 16:22:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Matthew Wilcox (Oracle)" X-Patchwork-Id: 13915210 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 741A4E77184 for ; Thu, 19 Dec 2024 16:23:05 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 060206B008C; Thu, 19 Dec 2024 11:23:05 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 00FE86B0092; Thu, 19 Dec 2024 11:23:04 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DF4266B0093; Thu, 19 Dec 2024 11:23:04 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id C18DE6B008C for ; Thu, 19 Dec 2024 11:23:04 -0500 (EST) Received: from smtpin25.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 76661A1875 for ; Thu, 19 Dec 2024 16:23:04 +0000 (UTC) X-FDA: 82912226586.25.2E9ECA8 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf18.hostedemail.com (Postfix) with ESMTP id BB3731C0014 for ; Thu, 19 Dec 2024 16:22:47 +0000 (UTC) Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b="PPsTMJ/B"; spf=none (imf18.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1734625345; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=O7XYqGGLGp/IKnTrXx+UwDKU51QHYdhcYEERHhuMXew=; b=sDtVyNpNTnGZU12V2t0+33pXTIfQnwTCSew+TJk4JCf9TtpuLScLkPh7nPLT06qGf5L+9i bwgJIuYlLQL4eAuKxStr6mTEupKIUkpEhCQd9tX69v0Jt9l0kgNyX70pMZ6vlPo44cT5re eV6DPNv1B/8RBJi3y4WpyWuM4SbpnCg= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1734625345; a=rsa-sha256; cv=none; b=BMxRiodWMxV9IuYj/ehC/9rSc2VZ9w2aV12vOeI+63epZZeEfQbyQnoJEMhFin19bpGHoZ Y9u49oreMJ8UfY06B+6HBwSbusLsgMjvaDZpvyZi0yqPTJgCnbAQhA6EILaLdmQs5hg9U9 gr+8hoGrTmtoTwGZEwmQmPuYyIwX12g= ARC-Authentication-Results: i=1; imf18.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b="PPsTMJ/B"; spf=none (imf18.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=O7XYqGGLGp/IKnTrXx+UwDKU51QHYdhcYEERHhuMXew=; b=PPsTMJ/BWB4POeS+3ZcO9ryAJ/ 0jyOiaNXcZnahPQUZt/GrYjHnZqfKk50A+fVG/tdfDSvkpJBcnBpUIG84JV5Xx2YbP8s7gA7fWoUs JRyB+lKM+G09FprA2eWcTGuoER1xcxVmvVBjBRc0AsyhBguxy8QV6ohdA99mXu4FdJgEpSaB05iRM vISrI2RPQ92txLMMZIrhhC9Jkl3b1IT5g37ABCZkA1g6wWVwjDeT0hAXbBVLjk9HfIW4gYcDXmXsN LCNIFf6iwDsxk7Dusmzj707mENsE6VC2mMTvdW9JV0vQgOYb/+KU5V8YZVXmp7Th91nqPllXSVUFX y7j5Aqmw==; Received: from willy by casper.infradead.org with local (Exim 4.98 #2 (Red Hat Linux)) id 1tOJIc-00000004Ijy-1ged; Thu, 19 Dec 2024 16:22:54 +0000 From: "Matthew Wilcox (Oracle)" To: Claudio Imbrenda Cc: "Matthew Wilcox (Oracle)" , David Hildenbrand , linux-mm@kvack.org, linux-s390@vger.kernel.org Subject: [PATCH 2/2] s390: Convert vsie code to use page->private Date: Thu, 19 Dec 2024 16:22:50 +0000 Message-ID: <20241219162252.1025317-3-willy@infradead.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241219162252.1025317-1-willy@infradead.org> References: <20241219162252.1025317-1-willy@infradead.org> MIME-Version: 1.0 X-Rspamd-Queue-Id: BB3731C0014 X-Rspam-User: X-Rspamd-Server: rspam07 X-Stat-Signature: ht4bjoogttg188ueg4gx3y6z5734upq3 X-HE-Tag: 1734625367-494361 X-HE-Meta: U2FsdGVkX1+rmyhv0VjOFpURDe2ymxqFw1l2TSW/kfP/qBWvhfLtR/an+n5nz6fgwzmc09jAQq6Bi9zpHkebQYPDofgDT/M8JJTvveYoxwSFRNW0JWYSEeYV6WTeZjEZpuhJT+U79TQEtbH8pZKPHw2rgd67MwXskmOSepxFKnkPtK4JmSXs0JhqfLgAXSua4VW91h7bBypjP4ff5P94K+CdVOCIL2JDtF5S4UCF19zKqxUAD9u9eqBbC6pvjQ81IBAT8xE5I0cfgvRTlYoKawrXX71peyXluYDzKr8h4qdiZlMp6WlRvRkJ+N71D6o0VLv4Z3Aim7iytyrpoksNDpP02RLZuef9QJDG1z/NcNPkwiGy/ONDM1sUE/+/ahVR/DxezCbAtJRPIRMjncB48t6+T3OU39Suwxt1uOZeag0GwCQW1FLLvCnX7jMeqDyGh42T89disRq4A8YPy1Nn0MhJMiktOWxc4nhjDFhUHKQilhwcHQbtHoROiP5VbdKsh5SLwwnYY7O9bGitmSzxgDME+2i6RJzS6ACyWD9FjSHUL5jGPYuUtKX0cfZv1viIhWx0pKpzLH6HpAEwvSproV3PAbyrUB5pGIz+Uenx5sH39b/+cYY2G2u2GRvRussm8VACcFMxiT1pjMtR8NdK9Vvxb1POKPDvnkkVOnZ2rt+ibBk6feloH9E3w4hzQ9xYaAUd7Ob6EHPh1uSmhKefHvyD8PaPeQSWpccQ7BigJcFo3FHDB8j3HKQV+tr3sZjOrVDIPN3vvUz5b9I+5dcRGzo63Q7PK5ig3n3+YBBJnOYUsML7t8HE0LrPQU6SedP6BJrOfyAvJcX0tgaztHyKGDdGvhgQKrzIXw16Z37ZiIn9dabuVzKTDhJsKt/GdY3utLFLu3RDWq5SnPXltaECKx5s9XX3rm0RUCBtCBAb82iAFGu+hiLIY5GAqp/Zb0sQSPqec0/rlXUzg8XxWhh F1hP+Ya3 Ayjsn51kAPzzA45AZeNs0unAD7ftKFKEyLEGozvHa6AIDSRkik0/vgInc7YUAGcLYcD2bBH16Yu5fSCMaVlkYyuPk88aAqTGaBiHuOotTZ8Q7UGUrRs2tebUuPfQ2SoJHIe5dUYXWZJAVlDqM+NgP0w1RPzNsJlbBZBI4CBM9zUSHiKOCDFpUTYdhekajAerQBnYI/pFk+NT1Jg09CdMg9K0jNMzA+0JCtiArzKUd0faCmkQ= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: The vsie pages are not standard page tables, so do not convert them to use ptdesc. Howver, page->index is going away so use page->private to store the address rather than page->index. Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: David Hildenbrand --- arch/s390/kvm/vsie.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/s390/kvm/vsie.c b/arch/s390/kvm/vsie.c index 150b9387860a..26cbd69eb06d 100644 --- a/arch/s390/kvm/vsie.c +++ b/arch/s390/kvm/vsie.c @@ -1393,9 +1393,9 @@ static struct vsie_page *get_vsie_page(struct kvm *kvm, unsigned long addr) kvm->arch.vsie.next++; kvm->arch.vsie.next %= nr_vcpus; } - radix_tree_delete(&kvm->arch.vsie.addr_to_page, page->index >> 9); + radix_tree_delete(&kvm->arch.vsie.addr_to_page, page->private >> 9); } - page->index = addr; + page->private = addr; /* double use of the same address */ if (radix_tree_insert(&kvm->arch.vsie.addr_to_page, addr >> 9, page)) { page_ref_dec(page); @@ -1496,7 +1496,7 @@ void kvm_s390_vsie_destroy(struct kvm *kvm) vsie_page = page_to_virt(page); release_gmap_shadow(vsie_page); /* free the radix tree entry */ - radix_tree_delete(&kvm->arch.vsie.addr_to_page, page->index >> 9); + radix_tree_delete(&kvm->arch.vsie.addr_to_page, page->private >> 9); __free_page(page); } kvm->arch.vsie.page_count = 0;