From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.1 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8A81DC48BDF for ; Thu, 24 Jun 2021 09:44:10 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BB5E2613C3 for ; Thu, 24 Jun 2021 09:44:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BB5E2613C3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4G9Zw86kDhz3bwD for ; Thu, 24 Jun 2021 19:44:08 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=N2dmpoXd; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=N2dmpoXd; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=redhat.com (client-ip=216.205.24.124; helo=us-smtp-delivery-124.mimecast.com; envelope-from=pbonzini@redhat.com; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=N2dmpoXd; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=N2dmpoXd; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4G9Zvd65NQz2yy9 for ; Thu, 24 Jun 2021 19:43:41 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1624527817; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qkxHw284a/HcUQKczqJcr3hZxs0a/eNZzaMIqcieCR4=; b=N2dmpoXd8h1tJ/1jVQ8EadWoXvdJ00hsKd76ingRURI7ArP7YM3OVAqgd5iCcGtLbxK3C7 J0rwSiQGm1W62yubsHJcsSZWAiwG+R6YTX3bMtLXDw+7oAc+B11Z/3FqYtBXdPD45Pcc9x UB6haCnVbw5AnTQduuhTYeNyrGJRGKk= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1624527817; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qkxHw284a/HcUQKczqJcr3hZxs0a/eNZzaMIqcieCR4=; b=N2dmpoXd8h1tJ/1jVQ8EadWoXvdJ00hsKd76ingRURI7ArP7YM3OVAqgd5iCcGtLbxK3C7 J0rwSiQGm1W62yubsHJcsSZWAiwG+R6YTX3bMtLXDw+7oAc+B11Z/3FqYtBXdPD45Pcc9x UB6haCnVbw5AnTQduuhTYeNyrGJRGKk= Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-213-7na6HJe3Mz2pYS546FefiA-1; Thu, 24 Jun 2021 05:43:36 -0400 X-MC-Unique: 7na6HJe3Mz2pYS546FefiA-1 Received: by mail-ed1-f70.google.com with SMTP id j19-20020aa7c4130000b029039497d5cdbeso3022433edq.15 for ; Thu, 24 Jun 2021 02:43:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=qkxHw284a/HcUQKczqJcr3hZxs0a/eNZzaMIqcieCR4=; b=e0+fqKtzJYxcA1IszEoTV437ksFLEfaJVALDUvOMzKMVJS+vuPTCklL5Yv7m8ukjpv jCECxtWTinCwR7mleCbrjfSG9lWLihr80B4WLcoauTdJ+9v9IRpOvIFpOi+85M+RO6X8 XyoOzmXceDxHCvcEbFdiGNBM9EefjFTO9wSpXBUecGbOjaZevXJUsxnepXw7G3+BIF+S 4LZfmz+7+mD9truG3da7CmWsQbckG1xFtWvcnXt5mEYO0CXwEc88cC+pzB7uI+EIiudR 9mJr+our0+TfdhBF6k2I/L3Iuo6FyPZhopS1jyESdKBSC3179tjDMEV4ri30Ss7Gvw3Q IUeg== X-Gm-Message-State: AOAM533cV7++hNk1+nHz7W1q7ehZqj7jDtL6mBAMdqe/AKKagmomLF2F 49oX4X1Q64QXtNuD50XBt8X5omcqdmlCl6Vlgd1uclPcrFptiZKFu9u6jBx8np8zGrjytrsu94n n67zquSboeDkmzmg3Lr48YQ33Wg== X-Received: by 2002:a05:6402:944:: with SMTP id h4mr5798146edz.76.1624527815210; Thu, 24 Jun 2021 02:43:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwD6cFFU4Uspcy5dTYBfn7A0VR+4loxnlaoo/QjHY9IN1nmjQ4mSQ+4egclMkG5+RC1oGdqOg== X-Received: by 2002:a05:6402:944:: with SMTP id h4mr5798117edz.76.1624527814999; Thu, 24 Jun 2021 02:43:34 -0700 (PDT) Received: from ?IPv6:2001:b07:6468:f312:c8dd:75d4:99ab:290a? ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id t17sm1544705edv.75.2021.06.24.02.43.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 24 Jun 2021 02:43:34 -0700 (PDT) Subject: Re: [PATCH 1/6] KVM: x86/mmu: release audited pfns To: Nicholas Piggin , Aleksandar Markovic , Huacai Chen , Marc Zyngier , Paul Mackerras , David Stevens , Zhenyu Wang , Zhi Wang References: <20210624035749.4054934-1-stevensd@google.com> <20210624035749.4054934-2-stevensd@google.com> <1624524156.04etgk7zmz.astroid@bobo.none> From: Paolo Bonzini Message-ID: <4816287a-b9a9-d3f4-f844-06922d696e06@redhat.com> Date: Thu, 24 Jun 2021 11:43:32 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <1624524156.04etgk7zmz.astroid@bobo.none> Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Wanpeng Li , kvm@vger.kernel.org, Suzuki K Poulose , Alexandru Elisei , intel-gfx@lists.freedesktop.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, kvmarm@lists.cs.columbia.edu, Will Deacon , James Morse , kvm-ppc@vger.kernel.org, Sean Christopherson , Vitaly Kuznetsov , linux-mips@vger.kernel.org, intel-gvt-dev@lists.freedesktop.org, Joerg Roedel , linux-arm-kernel@lists.infradead.org, Jim Mattson Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On 24/06/21 10:43, Nicholas Piggin wrote: > Excerpts from David Stevens's message of June 24, 2021 1:57 pm: >> From: David Stevens > > Changelog? This looks like a bug, should it have a Fixes: tag? Probably has been there forever... The best way to fix the bug would be to nuke mmu_audit.c, which I've threatened to do many times but never followed up on. Paolo > Thanks, > Nick > >> >> Signed-off-by: David Stevens >> --- >> arch/x86/kvm/mmu/mmu_audit.c | 2 ++ >> 1 file changed, 2 insertions(+) >> >> diff --git a/arch/x86/kvm/mmu/mmu_audit.c b/arch/x86/kvm/mmu/mmu_audit.c >> index cedc17b2f60e..97ff184084b4 100644 >> --- a/arch/x86/kvm/mmu/mmu_audit.c >> +++ b/arch/x86/kvm/mmu/mmu_audit.c >> @@ -121,6 +121,8 @@ static void audit_mappings(struct kvm_vcpu *vcpu, u64 *sptep, int level) >> audit_printk(vcpu->kvm, "levels %d pfn %llx hpa %llx " >> "ent %llxn", vcpu->arch.mmu->root_level, pfn, >> hpa, *sptep); >> + >> + kvm_release_pfn_clean(pfn); >> } >> >> static void inspect_spte_has_rmap(struct kvm *kvm, u64 *sptep) >> -- >> 2.32.0.93.g670b81a890-goog >> >> >