Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp6240390ybv; Wed, 12 Feb 2020 08:30:48 -0800 (PST) X-Google-Smtp-Source: APXvYqxuTv6uRaH8u6dO9FBAialyPLtKsAmIib0IjWq8pXeZtNaH+84lw8gayir1lvC2mg0CSwbD X-Received: by 2002:a05:6830:12c3:: with SMTP id a3mr10245398otq.341.1581525048670; Wed, 12 Feb 2020 08:30:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581525048; cv=none; d=google.com; s=arc-20160816; b=SITTscLUpeSeQdDNfsUz6vLaaisuZAG3Wau9+MUhJiX7IK8Hhwav2elWxdjuI0IBVI ZnyYCuI58d7jrud6hPGtRasJzrSiv8UI3s6I5h0lqeWRcgJpKYRxVQGW7jGOxfuiG2ks ezCxtWC9ZSHA0Jlgtlys661d/z+zgDSjM1isXt6LR96tQe4xb6JCTFbe2T3FnVIQy0WG cR4x2AwN2GF77DaG5UWW1kxDh0a1u+f6flEqWcpQ850POee1AlKr2bT0DcQRfeXzDz1Z zXYrRb40Jqt3j5hIyKLF9fM28PwSpyO2jv5DUBuZ+D+2MBqR22wMrMKyl79IOKHHm/AX dFLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=1IlVs+PoyqskVeOryq4nWg0BV3ImUVF+jcq3kxeboTk=; b=gXk5M0WCjidpAXiLAh+/NOfdVfd3J7tu41Ixrwyu/XKWRvk1qLB3lXQ13E4Lfo0nhU 27nV4aHQ1D1KPP8l4aNN5GTtcmM9WdreetBTIZR8i/6ci3QrYtLsURIvALHpvOoXythj 6+aQtZuvVexEJuC2Ezcn8t3zxuR4boU96rd0Zj5i9ZebKEoK7/xa2qRGwsNKnJ0JX5Az 3Dap+xdasmuSGyV+gwh8t8Tk8acxmsZbrG1OmOlIJpGs9MXIgDyezMqiLq9v7vLx5cqw wmpQn+WRCF5fleTzz7vlQM9NgTusElkzJPPD8yrFCEoybNvpVJ+3BFEpjAz3TfDFbUql e7zA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j25si3476121oij.242.2020.02.12.08.30.33; Wed, 12 Feb 2020 08:30:48 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728650AbgBLQaO (ORCPT + 99 others); Wed, 12 Feb 2020 11:30:14 -0500 Received: from mail-pl1-f195.google.com ([209.85.214.195]:38628 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727439AbgBLQaN (ORCPT ); Wed, 12 Feb 2020 11:30:13 -0500 Received: by mail-pl1-f195.google.com with SMTP id t6so1150603plj.5; Wed, 12 Feb 2020 08:30:12 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=1IlVs+PoyqskVeOryq4nWg0BV3ImUVF+jcq3kxeboTk=; b=jgjqfu+MGvVk/djwqmpMh+YXZSNvoqlNm7J1vPLx6BjvwWiupsIax8Rfuj01WRBSzE Q5bnRMRZzTulTZifiRb66wgYUbJEEBT7KxbE9uS5mbfVA0lwRmr7aUXUPLn39jtRGcCH 6ZjxCftEQI09ldAaWF9X9htWJIZBAZGpC5ytkHexgDUbW2NXcGYLKXElRKLAg5HRGCth lu+0F7c/7USoLo6uylTzLIl+Czj/lT2iPI7WvfrWtuhAfy5UdC4U3Amp8co/EmgsIXaj 8TxYmGPkWr+P+khIhzBEPepji1QakrW/U7Lb93qJNRTP3OVZaxddoltw2z/uu1iHYSc5 ceVg== X-Gm-Message-State: APjAAAXA++fLwSJVg0QVMTSe+4G95EhkJQc0PtsW+ErVO0RUgey2zZSp GO2MK7+gAqNNWUQqXtg5Mb0= X-Received: by 2002:a17:902:d692:: with SMTP id v18mr9369625ply.9.1581525011511; Wed, 12 Feb 2020 08:30:11 -0800 (PST) Received: from localhost ([2601:646:8a00:9810:5af3:56d9:f882:39d4]) by smtp.gmail.com with ESMTPSA id j14sm968499pgs.57.2020.02.12.08.30.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Feb 2020 08:30:10 -0800 (PST) Date: Wed, 12 Feb 2020 08:30:04 -0800 From: Paul Burton To: Paolo Bonzini , Mike Rapoport Cc: Peter Xu , linux-kernel@vger.kernel.org, kvm@vger.kernel.org, Sean Christopherson , linux-mips@vger.kernel.org, Vitaly Kuznetsov Subject: Re: [PATCH RFC 0/4] KVM: MIPS: Provide arch-specific kvm_flush_remote_tlbs() Message-ID: <20200212163004.cpd33ux4zslfc3es@lantea.localdomain> References: <20200207223520.735523-1-peterx@redhat.com> <44ba59d6-39a5-4221-1ae6-41e5a305d316@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <44ba59d6-39a5-4221-1ae6-41e5a305d316@redhat.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Paolo, On Wed, Feb 12, 2020 at 01:25:30PM +0100, Paolo Bonzini wrote: > MIPS folks, I see that arch/mips/kvm/mmu.c uses pud_index, so it's not > clear to me if it's meant to only work if CONFIG_PGTABLE_LEVELS=4 or > it's just bit rot. Should I add a "depends on PGTABLE_LEVEL=4" to > arch/mips/Kconfig? I'm no expert on this bit of code, but I'm pretty sure the systems KVM/VZ has been used on the most internally had PGTABLE_LEVEL=3. I suspect this is actually a regression from commit 31168f033e37 ("mips: drop __pXd_offset() macros that duplicate pXd_index() ones"). Whilst that commit is correct that pud_index() & __pud_offset() are the same when pud_index() is actually provided, it doesn't take into account the __PAGETABLE_PUD_FOLDED case. There __pud_offset() was available but would always evaluate to zero, whereas pud_index() isn't defined... Thanks, Paul