Message ID | 20241010182427.1434605-24-seanjc@google.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 36E2BD2444F for <linux-arm-kernel@archiver.kernel.org>; Thu, 10 Oct 2024 21:01:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Reply-To:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: Content-Transfer-Encoding:Content-Type:Cc:To:From:Subject:Message-ID: References:Mime-Version:In-Reply-To:Date:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=UxQVf2h1B1ZgTBX9bfQB+O4u0WEdBy2E8BNaXtNQtEc=; b=M3Ns+spVHK+wmP BdnBxAjYh6ocUpnaFLsrOXuTO6OwHXQiaLS6j8wkImXS0FnrqXXkeETC0a6DtgHA8iTzCgDA2thip B9aTPH/MYhYnH0Ax8MVLTiAIb9w349OfeBwxDUN+iY9fA42qZ2CZw8CwtTzsN/aVUzADdxccRpro6 RDNgo9UedyBJf2wNaTNflBbuXVbjyJdnY9oT8AY7kThgBRmuUwhcznQ0ogDqEV9hxR+0wv3u/IEge fopQA1XJE22fEkUpp3mnZy/YX3aHUWtreX7uJRC9IIoyjmBrJbGZCO7lCGPkmp1sg8crueydteWIm sVt8Z7OX2NeVkn+d126w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1sz0Hl-0000000ELiw-3C9D; Thu, 10 Oct 2024 21:01:25 +0000 Received: from mail-pl1-x649.google.com ([2607:f8b0:4864:20::649]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1syxr4-0000000DqEb-0kz4 for linux-arm-kernel@lists.infradead.org; Thu, 10 Oct 2024 18:25:44 +0000 Received: by mail-pl1-x649.google.com with SMTP id d9443c01a7336-204e310e050so14823115ad.0 for <linux-arm-kernel@lists.infradead.org>; Thu, 10 Oct 2024 11:25:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1728584741; x=1729189541; darn=lists.infradead.org; h=content-transfer-encoding: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=UxQVf2h1B1ZgTBX9bfQB+O4u0WEdBy2E8BNaXtNQtEc=; b=cHCxW9OvZGr1yBq6iVLuom+7EfZOc2EiXI7ygoBxdL22tnMY4Rj8QktPQoH9Zvi7rY qyOcJSNL56bk8CzNNK18Qv8diJFnIWO5chCmwCAkSlGhhfKd2k9jLijI97GeNIR3JSb5 KDlg64BqicYf/HRueE0w1SDL7nCmZA4NdT6OUJajraX/1Si4XFYP/vdmBM232nIzJ/Vg 6B+M47Y5OHDhvCmF/DpY/dTExiOIuOVDanc++9fpYZHB1avwuohYC45mdc78wc8C+odL PzeJTkRQxew5bIRj0u4rP3K84+JAXK/nVdKxY+zRIlu3rMcO5RHJD0zj3yKwqUl7by/Z hxkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728584741; x=1729189541; h=content-transfer-encoding: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=UxQVf2h1B1ZgTBX9bfQB+O4u0WEdBy2E8BNaXtNQtEc=; b=pCtVdxvxtrbDWPETdMDEGvmOGNIIMpfGw94ORA9t6+0yERvdNkapAABz9sh/s9B61Q 7+JJ1s+hcKTeT5fjShKDEbnr74PJkWDSbSpnzwRubvsGcUVU8RyMpgsC9yf7IhVGkP8q mi+oaMUSRw5NaVIB84twMCQ9cJMhdV3YNJZhkv6J/pQjhi+6VY7mjVocdv6vh6VpYaUq 04P+T8z1rRXPLrAHcXMEPOXrOYcnZzEXotFzTnL7yiWLYsjqUf0lcWd2bCvAWRcIgiXi shhkHip8BOymRAUK4dboAK1akobjkln4wSBq4B6Adt2VYiAzcQ0bWMKs7iZvQjUNtg0S MseQ== X-Forwarded-Encrypted: i=1; AJvYcCUKtYXvtrXSAmzbw/C4vYtyOWuS1k64A4euDN5yaFaBXk0Rlas0YhAqwC2/5KPpaAydXP6qF1UVCD8gcPm9pBda@lists.infradead.org X-Gm-Message-State: AOJu0YyzZyg1mePTWrr5WgJ/bel3r5FAPatsWq+xdLbg0LX2C0VQOg0Y owoSsHNpItTMLVHa3YwQhhVYwH+yecon0ZJTjq7DJ4GI6japwhj9KArIVLW8Ihef/ZE/+JC3FEo zDQ== X-Google-Smtp-Source: AGHT+IFSsaj7YGs0xXvL7KvHpo4OHZS23TfW901WnGn1dNBw4UEq8HUBbyPz7tDSJuBwPv672jv+MkN6+4M= X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:9d:3983:ac13:c240]) (user=seanjc job=sendgmr) by 2002:a17:903:2349:b0:20b:9365:e6e4 with SMTP id d9443c01a7336-20c63782bdcmr1094885ad.9.1728584740809; Thu, 10 Oct 2024 11:25:40 -0700 (PDT) Date: Thu, 10 Oct 2024 11:23:25 -0700 In-Reply-To: <20241010182427.1434605-1-seanjc@google.com> Mime-Version: 1.0 References: <20241010182427.1434605-1-seanjc@google.com> X-Mailer: git-send-email 2.47.0.rc1.288.g06298d1525-goog Message-ID: <20241010182427.1434605-24-seanjc@google.com> Subject: [PATCH v13 23/85] KVM: nVMX: Rely on kvm_vcpu_unmap() to track validity of eVMCS mapping 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> Cc: kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, loongarch@lists.linux.dev, linux-mips@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, " =?utf-8?q?Alex_Benn=C3=A9e?= " <alex.bennee@linaro.org>, Yan Zhao <yan.y.zhao@intel.com>, David Matlack <dmatlack@google.com>, David Stevens <stevensd@chromium.org>, Andrew Jones <ajones@ventanamicro.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241010_112542_344517_7914AC0C X-CRM114-Status: GOOD ( 11.25 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Reply-To: Sean Christopherson <seanjc@google.com> Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
KVM: Stop grabbing references to PFNMAP'd pages
|
expand
|
diff --git a/arch/x86/kvm/vmx/nested.c b/arch/x86/kvm/vmx/nested.c index a8e7bc04d9bf..e94a25373a59 100644 --- a/arch/x86/kvm/vmx/nested.c +++ b/arch/x86/kvm/vmx/nested.c @@ -231,11 +231,8 @@ static inline void nested_release_evmcs(struct kvm_vcpu *vcpu) struct kvm_vcpu_hv *hv_vcpu = to_hv_vcpu(vcpu); struct vcpu_vmx *vmx = to_vmx(vcpu); - if (nested_vmx_is_evmptr12_valid(vmx)) { - kvm_vcpu_unmap(vcpu, &vmx->nested.hv_evmcs_map, true); - vmx->nested.hv_evmcs = NULL; - } - + kvm_vcpu_unmap(vcpu, &vmx->nested.hv_evmcs_map, true); + vmx->nested.hv_evmcs = NULL; vmx->nested.hv_evmcs_vmptr = EVMPTR_INVALID; if (hv_vcpu) {