Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2013644pxb; Fri, 24 Sep 2021 17:59:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzB/Fy3s4+ClyAjuS4JbYgv53LB2AfGQUJ1xcmqnHAtX9aJ6YOiqXYcb70vyRlbiwu1cacQ X-Received: by 2002:a05:6402:697:: with SMTP id f23mr8305230edy.253.1632531566216; Fri, 24 Sep 2021 17:59:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632531566; cv=none; d=google.com; s=arc-20160816; b=bgOHqPtpe3WqW/ZS0OMFIZ5gY7Zn+Tf/pRYafXO16vNne8O9N84VpvYplNZA7feoPO TKuUOIwd0WKC4R9q2X/ExkZ2ZUCwnV1aHYgSJ9YtAFoiSBEoz2w2kMOM2+AuOynIKVlo bOopXp4rwfKjiP8MFRRqd445FE8BSJRGrI3FifXDF5Vn5aeckuWuKjKmSTQ2JgezYjbh aHjeRkb31dpM2//vBZDA5806Y1PcJvz0LnWcSHK93THNDr2hhM/o/feSuGC5IzEvw1se FB4ktuSuaGtr95RuWPeX7H19oJPHrqLLqkFctIdtRqrglRXO/N75+bBitVv9GwDHAAq6 JHww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=qL/Fo69qHh5c5R89ouXW2U4KuN8yDIZo4UXDpb1Egt8=; b=b/ituQEA5WZorzzHYrY71E8afEtci9oiWXVhMWjVdcrOyTwLPfKpNbuQLLob7kDZVt C6LaBXfqzoJl7W5EgNw8Q322NRxjWqwAayXR94gVlKMOtmPFHavJT05SczGBARcEyu45 49iyx5L6jRws9WNJbr0PeAN2jNXO1wtPx+AFzkNoP3qA3bS/cHm8suutNnQsyweCfVqX yBHJFzk8V2f7IeSUPR99TRZeXK6Mdbt3CHkc8YhAq6oO5hWebZDbEUk3oAXEA7VvyK1z APEP3jr2e0D2Avx/gcAPl8QNF4kIpoaETjA9/2K5WBEj2+v5qnDZ+epfRsVpkcCEibB1 u8Yg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=cf9fT9i8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i19si403677edc.236.2021.09.24.17.59.02; Fri, 24 Sep 2021 17:59:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=cf9fT9i8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238899AbhIXQeb (ORCPT + 99 others); Fri, 24 Sep 2021 12:34:31 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:53902 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347560AbhIXQdo (ORCPT ); Fri, 24 Sep 2021 12:33:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1632501131; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qL/Fo69qHh5c5R89ouXW2U4KuN8yDIZo4UXDpb1Egt8=; b=cf9fT9i8QvVoABs+cfimqXqzXiRuVu+MIC1o+hoNQbGsJqP54bjt1W9NYbJnXLQmWS6qGI 7hWxdr7e1eQ174IHvvltu8+P2uBoBcv2EZ8tlehQ1r4JbkZVgxIvbDphFKI1rjdt6dIEnw 8xtcARSUH7UlM83IGyVOSVjv72ko/QM= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-398-jQ6UNi3MPOa6GFVeQ7x5pw-1; Fri, 24 Sep 2021 12:32:09 -0400 X-MC-Unique: jQ6UNi3MPOa6GFVeQ7x5pw-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id BBDBE802EDD; Fri, 24 Sep 2021 16:32:08 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id 19DEC79452; Fri, 24 Sep 2021 16:32:08 +0000 (UTC) From: Paolo Bonzini To: linux-kernel@vger.kernel.org, kvm@vger.kernel.org Cc: dmatlack@google.com, seanjc@google.com Subject: [PATCH v3 26/31] KVM: MMU: set ad_disabled in TDP MMU role Date: Fri, 24 Sep 2021 12:31:47 -0400 Message-Id: <20210924163152.289027-27-pbonzini@redhat.com> In-Reply-To: <20210924163152.289027-1-pbonzini@redhat.com> References: <20210924163152.289027-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Prepare for removing the ad_disabled argument of make_spte; instead it can be found in the role of a struct kvm_mmu_page. First of all, the TDP MMU must set the role accurately. Signed-off-by: Paolo Bonzini --- arch/x86/kvm/mmu/tdp_mmu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/kvm/mmu/tdp_mmu.c b/arch/x86/kvm/mmu/tdp_mmu.c index 6de2c957edd6..1cdb5618bb76 100644 --- a/arch/x86/kvm/mmu/tdp_mmu.c +++ b/arch/x86/kvm/mmu/tdp_mmu.c @@ -167,6 +167,7 @@ static union kvm_mmu_page_role page_role_for_level(struct kvm_vcpu *vcpu, role.direct = true; role.gpte_is_8_bytes = true; role.access = ACC_ALL; + role.ad_disabled = !shadow_accessed_mask; return role; } -- 2.27.0