From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 67621399358 for ; Fri, 26 Jun 2026 17:46:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782495989; cv=none; b=duyR8RBozoFi9km4Gcv3gC7hGrDH8jubg9lJdANgzVrnwilVJ3sUOHDP6ZG/Y5S0ZYRk8bvfP04V24dHy50HN6dWbiv5hxGTvUETJHls/Qk3K5Zu0n3Y8wgNUuO/OuIk7O9cx9OSXT6exjQgyi+Nut9unT22wWXA02JM4iocnPM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782495989; c=relaxed/simple; bh=/YwwEQLmxSbJMl1fdqSKJOWSf27TYniYxmWG9YBC5ys=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Fmn002KU3goflJwgdfZgDdC4CxMzReMyeeDNdu5E2YFSDogITDBlPn1nZ0hexPLXuD28UjYTv6flujoGHtFzjaeb4x42jyoq6WDhePYHP3LBXc1YkBz3FNmpzsvzeDV7RXMr3ohrQ3+fM7plY2eIHk8ENI79Y9CH8htJc565J/I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=FB3GUf+n; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b=trZpQ5cE; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="FB3GUf+n"; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b="trZpQ5cE" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1782495987; 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=c4gF95nZqrtR93Pl9LsImTmCg9YZxvVW+SYY7tw700E=; b=FB3GUf+nLbcSBMoo4sH8+Wbo2uAr3Dg8y3sFkjXy9f2d7tqr+mOOLOy4yseX8g5JJh/Mb3 NRJDUb0cbdVYLtBs76nn3lLXtrWOJrcdFZ3b5Zho9IWjZeJuICzygIwIQIt02cjZHUyfYs AX6J9UoGy6UAZDwIdNvBznkTCMc/3EM= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-301-E1zrtfppMqm4e6ygW8VPgA-1; Fri, 26 Jun 2026 13:46:26 -0400 X-MC-Unique: E1zrtfppMqm4e6ygW8VPgA-1 X-Mimecast-MFC-AGG-ID: E1zrtfppMqm4e6ygW8VPgA_1782495985 Received: by mail-wr1-f70.google.com with SMTP id ffacd0b85a97d-46010392f89so918964f8f.2 for ; Fri, 26 Jun 2026 10:46:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1782495985; x=1783100785; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=c4gF95nZqrtR93Pl9LsImTmCg9YZxvVW+SYY7tw700E=; b=trZpQ5cEHfhq21WrTiubFo9IQZTXG/e549d+UBZD+gS+oPRu+JDJbaRLw7ZloMDDGX vLLknEPIwHP9YvRuvf77utezJpuxYOEhUpGtsuGN43QgHB2XY8ef+4zffy+Cjripb1pD Z5qsVnrdLXPl8y9SJmEnluWay6mnm1Budim+Oxqa/mp/72gG9rEA+6Cb4sbdYauHBeBI y/mLGy5O2gpycLIp2tU6ztntCkpGVDORZ/8Rk7CDFDFju7WPVznwwHJVfJzjfe7w1hwg UCPeix4lsXWd90KgINkB4gPWz5oHhQ9d8lQZYyYxBrX6SH8IKKR6Znx9OrvNug/sPz7v CvGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782495985; x=1783100785; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=c4gF95nZqrtR93Pl9LsImTmCg9YZxvVW+SYY7tw700E=; b=VT/RxBF8ulyB1Nk11pJy2AAudGBvNraQ1/CI6eDNxiyoJv7aL0s7et/SwHckpfr+5s 9bQ3MMjRzViJVjvY7/Kl38M6J8JTm3kziVPfwiApR2XduQir1EDMpYLESfzyNkSFQ7yp YG257laLCYkbeCWs7WFTd2wa+5lt8V1lgRiR8KONM4Cisgi04UCp0DPndZtZJ0+k+rFP UjMxsA1GqjwU3ymm0A0OwgrSc4YV9z4X71QLiYAEQDdrDWbA19DkTC4RVJtkQW0HciTD jm34+ZPozeFQ3CtLjqdsh5sg1uOdnkobNbC+Zj02fzcLGw1fraL5cKlcqx0RyJh0QKmE ybOA== X-Gm-Message-State: AOJu0YyBiDrDlBRx/VdV4rsxbTKDIER40vU9ItY1aS4ndJ3lRy3lkDOw G4EwAjYVQPx853bpDTHpiU9jK8ieGsF0+vxsTbBNXLrjYXY15YKB2KTk9oFxT0bmywHwc1L/vTy mfCMET5PrcwOX2cKljA0cI4DOuwA9ZWJORNiPrhj6Jy27lK8nSPzd9XQXqpz7Pqmty9ctdtmpf5 l75zNka3Rjcb554hc8piCUduUaiYkr9EkjHiCyZ3rDktd4fcLZqw== X-Gm-Gg: AfdE7ckDO2lFbH/NZ/j1NqyYdeW8MwzjthoxOxVmqg5DwfeGpACL7DO3TCO/gPqKh9l 7mGyhMuLw2DsZoNpBGgQM02p8gQGETKIp60iGMP51gByUBI2cM5AsutRYeDU81OWTXXzwkkARam TPF4sB40n7UAuhl1zDX0BAZwU3f0w1j+Oj0lc4CtQOQc/qvAIMhk9zcvxrjI1f7B10SzWKHM0rG 2QFPbB01DLzcwKu3G9nCas4JtXnIPiaZO7j8aEzANrrX1SWLlMGOTBHKeKTSGxC3rzpXbhdvsuO LUPPfu7nqguJf0PtBwklQur4Nn3M7fkHQicLIzuOJDav2ZtwFC+gh1Eimu/nfhcJuwr/mgAIw9s 4EBr6PpoPM7Kn+0a85EQCIalry5iWc6xd668kgY9ljqgwYPj2adfB0ZxqPMUsVOMrpPrDJPK0mz Zphy6EGHLVi+KNxx+/ X-Received: by 2002:a5d:5f53:0:b0:43b:498f:dceb with SMTP id ffacd0b85a97d-46dbfca295emr12912577f8f.9.1782495985116; Fri, 26 Jun 2026 10:46:25 -0700 (PDT) X-Received: by 2002:a5d:5f53:0:b0:43b:498f:dceb with SMTP id ffacd0b85a97d-46dbfca295emr12912536f8f.9.1782495984640; Fri, 26 Jun 2026 10:46:24 -0700 (PDT) Received: from [192.168.10.48] ([151.95.124.208]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-46e3d6ba143sm13846549f8f.33.2026.06.26.10.46.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jun 2026 10:46:23 -0700 (PDT) From: Paolo Bonzini To: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, stable@vger.kernel.org Cc: David Matlack , Lai Jiangshan , Sean Christopherson Subject: [PATCH 5.15.y v2 1/8] KVM: x86/mmu: Use a bool for direct Date: Fri, 26 Jun 2026 19:46:12 +0200 Message-ID: <20260626174620.1819772-2-pbonzini@redhat.com> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260626174620.1819772-1-pbonzini@redhat.com> References: <20260626174620.1819772-1-pbonzini@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: David Matlack commit 27a59d57f073f21f029df1517c2c0a1abea5b0ce upstream. 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 e4813964bfa0..c03c4341a87f 100644 --- a/arch/x86/kvm/mmu/mmu.c +++ b/arch/x86/kvm/mmu/mmu.c @@ -1737,7 +1737,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; @@ -2074,7 +2074,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) { bool direct_mmu = vcpu->arch.mmu->direct_map; -- 2.54.0