Message ID | 20240726235234.228822-80-seanjc@google.com (mailing list archive) |
---|---|
State | Handled Elsewhere, archived |
Headers | show
Return-Path: <linuxppc-dev-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20230601 header.b=Q6Oiuof0; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=2404:9400:2:0:216:3eff:fee1:b9f1; helo=lists.ozlabs.org; envelope-from=linuxppc-dev-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=patchwork.ozlabs.org) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2404:9400:2:0:216:3eff:fee1:b9f1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WW5Yw4NMwz1ybY for <incoming@patchwork.ozlabs.org>; Sat, 27 Jul 2024 10:47:32 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20230601 header.b=Q6Oiuof0; dkim-atps=neutral Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4WW5Yw3M5hz30Vv for <incoming@patchwork.ozlabs.org>; Sat, 27 Jul 2024 10:47:32 +1000 (AEST) X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20230601 header.b=Q6Oiuof0; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=flex--seanjc.bounces.google.com (client-ip=2607:f8b0:4864:20::1149; helo=mail-yw1-x1149.google.com; envelope-from=3atekzgykdkqwierngksskpi.gsqpmrybttg-hizpmwxw.sdpefw.svk@flex--seanjc.bounces.google.com; receiver=lists.ozlabs.org) Received: from mail-yw1-x1149.google.com (mail-yw1-x1149.google.com [IPv6:2607:f8b0:4864:20::1149]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4WW4Pm0lZYz3fVN for <linuxppc-dev@lists.ozlabs.org>; Sat, 27 Jul 2024 09:55:23 +1000 (AEST) Received: by mail-yw1-x1149.google.com with SMTP id 00721157ae682-66c0f57549fso7730647b3.0 for <linuxppc-dev@lists.ozlabs.org>; Fri, 26 Jul 2024 16:55:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1722038122; x=1722642922; darn=lists.ozlabs.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:reply-to:from:to:cc:subject:date:message-id:reply-to; bh=dTOlfH+mhloY9mYg+/p0IQai80b+6RXS/WhBEV7av3U=; b=Q6Oiuof0MqMKTa+QE1w4VoknZ6imipw3dTgYdL8UxxsJOyO8Llmjv5o7FKNiNEHC7D UGE329eYT0uElfByXw4fBnKg5eyOJ3gC7/X9dHkPQfc6OIrtBiGK3x6NAqWBOBfLamWv zj6opCQVp0hcamQefKXBANuu7sUddofej2D9DtTPvxIQZ6KMgamaEEuGdlsUEYe28Yeq qOLElSsUK5tjWEgzhR5cFGaz6VfDupz80vhyHe1ERf3SyS6vTEYW7ZJPQc8+6Bp1egC8 Fyqa5y2SL4/k8r9glpTmsFkZteiGv2aHGjYK3vNRKgof06cC+gB2JAqKnPdhyDkrg4RH CJuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722038122; x=1722642922; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:reply-to:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=dTOlfH+mhloY9mYg+/p0IQai80b+6RXS/WhBEV7av3U=; b=tjwfdpZ8sj5ZYMAhWFMLWcQi9tyRKo2V3jKBAq64W3jVuf7JGqRAKhmV2UlSrIpwBF EoZucLywRTwc+RN4YzaHRLBBkz2aljsvLOD4JlZP6c6vfrcdYu/4u+K9ohbmepF9wyve VGdHCEUTlxeAb7k6MET0tT+EJpn6qxc/AR7ghUMgrIfoIzFjujDtPAgZXP+Kcgzt36O9 Df2oLRaumRpYMSZai9cYKh/wb8Irf8wingQHCnCF84Ix37Gm2RoAPR53iO0iGYw5ha+k V3wk5zXQczoo6XerFu2S6giVIYfN0eAHcv+GQvg8rCqXIVoO2TWK0aj69Rw9M4nd//zG lkKQ== X-Forwarded-Encrypted: i=1; AJvYcCVI3cZs91BHXrfDfDEZ5+tEJIlQB511OiDOH664lQHFNr8tMkVk5s8dFVLDwC8EKGwrirw/d8gfMUGAvYNv/DSbX18hbF2KHMhRFrSZBg== X-Gm-Message-State: AOJu0YwmpsZcodyVKH0LnaYhswh4mJ2m6odqKvP5jXNwejjjfVVaf1o8 4AuCy8DzpOc9Cu5oYxc3oZ3e+f7aFvb4c/PqiflJcskW0FgrCTPLTeZ9qvJeeZE4PYede5CVqDH kWg== X-Google-Smtp-Source: AGHT+IGgifSFTGz9fVU5jdzVocA5wMp2MITnk/v5MkueXs++Udesz0kCsEkHm8VEDJpbtR+Hv7uv12YKgg8= X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a05:690c:f0a:b0:62f:1f63:ae4f with SMTP id 00721157ae682-67a052e5dccmr429907b3.1.1722038121721; Fri, 26 Jul 2024 16:55:21 -0700 (PDT) Date: Fri, 26 Jul 2024 16:52:28 -0700 In-Reply-To: <20240726235234.228822-1-seanjc@google.com> Mime-Version: 1.0 References: <20240726235234.228822-1-seanjc@google.com> X-Mailer: git-send-email 2.46.0.rc1.232.g9752f9e123-goog Message-ID: <20240726235234.228822-80-seanjc@google.com> Subject: [PATCH v12 79/84] KVM: s390: Use kvm_release_page_dirty() to unpin "struct page" memory From: Sean Christopherson <seanjc@google.com> To: Paolo Bonzini <pbonzini@redhat.com>, Marc Zyngier <maz@kernel.org>, Oliver Upton <oliver.upton@linux.dev>, Tianrui Zhao <zhaotianrui@loongson.cn>, Bibo Mao <maobibo@loongson.cn>, Huacai Chen <chenhuacai@kernel.org>, Michael Ellerman <mpe@ellerman.id.au>, Anup Patel <anup@brainfault.org>, Paul Walmsley <paul.walmsley@sifive.com>, Palmer Dabbelt <palmer@dabbelt.com>, Albert Ou <aou@eecs.berkeley.edu>, Christian Borntraeger <borntraeger@linux.ibm.com>, Janosch Frank <frankja@linux.ibm.com>, Claudio Imbrenda <imbrenda@linux.ibm.com>, Sean Christopherson <seanjc@google.com> Content-Type: text/plain; charset="UTF-8" X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List <linuxppc-dev.lists.ozlabs.org> List-Unsubscribe: <https://lists.ozlabs.org/options/linuxppc-dev>, <mailto:linuxppc-dev-request@lists.ozlabs.org?subject=unsubscribe> List-Archive: <http://lists.ozlabs.org/pipermail/linuxppc-dev/> List-Post: <mailto:linuxppc-dev@lists.ozlabs.org> List-Help: <mailto:linuxppc-dev-request@lists.ozlabs.org?subject=help> List-Subscribe: <https://lists.ozlabs.org/listinfo/linuxppc-dev>, <mailto:linuxppc-dev-request@lists.ozlabs.org?subject=subscribe> Reply-To: Sean Christopherson <seanjc@google.com> Cc: kvm-riscv@lists.infradead.org, kvm@vger.kernel.org, linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, David Matlack <dmatlack@google.com>, David Stevens <stevensd@chromium.org>, loongarch@lists.linux.dev, kvmarm@lists.linux.dev, linux-riscv@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org Errors-To: linuxppc-dev-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" <linuxppc-dev-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org> |
Series |
KVM: Stop grabbing references to PFNMAP'd pages
|
expand
|
diff --git a/arch/s390/kvm/vsie.c b/arch/s390/kvm/vsie.c index 566697ee37eb..f6f1569be1cc 100644 --- a/arch/s390/kvm/vsie.c +++ b/arch/s390/kvm/vsie.c @@ -670,7 +670,7 @@ static int pin_guest_page(struct kvm *kvm, gpa_t gpa, hpa_t *hpa) /* Unpins a page previously pinned via pin_guest_page, marking it as dirty. */ static void unpin_guest_page(struct kvm *kvm, gpa_t gpa, hpa_t hpa) { - kvm_release_pfn_dirty(hpa >> PAGE_SHIFT); + kvm_release_page_dirty(pfn_to_page(hpa >> PAGE_SHIFT)); /* mark the page always as dirty for migration */ mark_page_dirty(kvm, gpa_to_gfn(gpa)); }
Use kvm_release_page_dirty() when unpinning guest pages, as the pfn was retrieved via pin_guest_page(), i.e. is guaranteed to be backed by struct page memory. This will allow dropping kvm_release_pfn_dirty() and friends. Signed-off-by: Sean Christopherson <seanjc@google.com> --- arch/s390/kvm/vsie.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)