Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp5131469iog; Wed, 22 Jun 2022 12:40:43 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tPDz9PxeRLBuo+GexcZBoBphydKK+Tzi36eRCkFLHJCR+xVb0S98jDX+0S5VUR3eCrDNLY X-Received: by 2002:a65:64c8:0:b0:3fa:91bf:a5d8 with SMTP id t8-20020a6564c8000000b003fa91bfa5d8mr4373316pgv.473.1655926843523; Wed, 22 Jun 2022 12:40:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655926843; cv=none; d=google.com; s=arc-20160816; b=OtIXYeGQIlPPv8QGS3SvzWpEqcnXA3d4L786i7KTvE3DW59TUKCVmSp09pZITabgpc C82L/l+HRMSL0qZ5cHejOtjRKwS3+c6w0NB+un0TNnLsNuXRRpKXkebPnZmeNWSkP3/Y vQBW1YEa0mEv15ifipSoDvgVJ5vma7dJIHm0y2RLoFFdDuKWm6UTzzACDyqyiWgLCi6b PiSz/PEZ5nwXkUGmzQRMvx4XaGuJ4//x+Y3R8D1g/NCacnezrZgf/S3iLzPjzoDPaVFf hgj5Mfn/VkGSD1izlPphGoEs2PMUfKEhrhHC5DGoK9Zwl+684OMK9sShyDd1InZLKSGq FA2w== 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=2kItQM/cRpS0FZ1TtSe+3txCMcE2niKoJ8Hcd5NrfAY=; b=tVSsmq7nn4shNnCw1NpnTJwQow/TaX47ZsSl2XmlHjYS2wQG8A33H98d8pcQ+OJEQz iyAJEfNDsW3M6qNl9aX5LOuIj2QlNMhEKrmDutwTM2Il2o17pM0ItNVQpPZG9l4Sytkg PQEzDTJMxW9F2SYXO17dUPTv1Ng2KHDq4kNDMxmktmMXrN/5WBezzqrpvTZpWg6kLw7r tA18Gvju4lE129Yf/Y28WrtLk3i55pY5HktAlECawiZg1udfdJvaGZ5+Ek2BzragOVD8 FAp8mZCdQhRLqRnmSUSOl20yneWZwjKHBiE/joE6tp3EFZ2jWhtXgVkP364n7+3sLo4Z kNxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=XMpoJrdj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j71-20020a63804a000000b0040d44b05722si1216489pgd.575.2022.06.22.12.40.31; Wed, 22 Jun 2022 12:40:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=XMpoJrdj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S1358224AbiFVT1c (ORCPT + 99 others); Wed, 22 Jun 2022 15:27:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33432 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237166AbiFVT1X (ORCPT ); Wed, 22 Jun 2022 15:27:23 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0B0B5DAD for ; Wed, 22 Jun 2022 12:27:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1655926037; 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=2kItQM/cRpS0FZ1TtSe+3txCMcE2niKoJ8Hcd5NrfAY=; b=XMpoJrdj5Xxoj+oU9o1LJirkiu4RpdIM6TWCW9McxWAnXZeo/GaR2FZ7wkj9kajf2PP1ze ibYFhtItZYetLs2y7oxZJQVdiBRqlQhO0GQalYB4uNOvxBdq8v+ALWAitYNw2g8zSBSgaY PN0wTdYofo27vf/Q08pJ1M57ZcZtFG4= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-463-GFk2Rc8VNGe5eImtWf-Tow-1; Wed, 22 Jun 2022 15:27:12 -0400 X-MC-Unique: GFk2Rc8VNGe5eImtWf-Tow-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id EFB7B294EDC5; Wed, 22 Jun 2022 19:27:11 +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 95B7C1121314; Wed, 22 Jun 2022 19:27:11 +0000 (UTC) From: Paolo Bonzini To: linux-kernel@vger.kernel.org, kvm@vger.kernel.org Cc: maz@kernel.org, anup@brainfault.org, seanjc@google.com, bgardon@google.com, peterx@redhat.com, maciej.szmigiero@oracle.com, kvmarm@lists.cs.columbia.edu, linux-mips@vger.kernel.org, kvm-riscv@lists.infradead.org, pfeiner@google.com, jiangshanlai@gmail.com, dmatlack@google.com Subject: [PATCH v7 02/23] KVM: x86/mmu: Use a bool for direct Date: Wed, 22 Jun 2022 15:26:49 -0400 Message-Id: <20220622192710.2547152-3-pbonzini@redhat.com> In-Reply-To: <20220622192710.2547152-1-pbonzini@redhat.com> References: <20220622192710.2547152-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: David Matlack The parameter "direct" can either be true or false, and all of the callers pass in a bool variable or true/false literal, so just use the type bool. No functional change intended. Reviewed-by: Lai Jiangshan Reviewed-by: Sean Christopherson Signed-off-by: David Matlack Message-Id: <20220516232138.1783324-3-dmatlack@google.com> Signed-off-by: Paolo Bonzini --- arch/x86/kvm/mmu/mmu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/kvm/mmu/mmu.c b/arch/x86/kvm/mmu/mmu.c index c0afb4f1c8ae..844b58ddb3bb 100644 --- a/arch/x86/kvm/mmu/mmu.c +++ b/arch/x86/kvm/mmu/mmu.c @@ -1664,7 +1664,7 @@ static void drop_parent_pte(struct kvm_mmu_page *sp, mmu_spte_clear_no_track(parent_pte); } -static struct kvm_mmu_page *kvm_mmu_alloc_page(struct kvm_vcpu *vcpu, int direct) +static struct kvm_mmu_page *kvm_mmu_alloc_page(struct kvm_vcpu *vcpu, bool direct) { struct kvm_mmu_page *sp; @@ -1997,7 +1997,7 @@ static struct kvm_mmu_page *kvm_mmu_get_page(struct kvm_vcpu *vcpu, gfn_t gfn, gva_t gaddr, unsigned level, - int direct, + bool direct, unsigned int access) { union kvm_mmu_page_role role; -- 2.31.1