Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp1118541ybg; Thu, 11 Jun 2020 01:09:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzdCW522V/E3dqnfg6y154QlquByzZfp2d9REeDVgj/7LLD4DnFzBuhgnG8bes22eexSmTw X-Received: by 2002:a17:906:2c07:: with SMTP id e7mr7167713ejh.172.1591862979841; Thu, 11 Jun 2020 01:09:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591862979; cv=none; d=google.com; s=arc-20160816; b=EwGs9Fwc7Woo4Tra0xW+ofFNOfDuK8muvWHdrOfwq0fZJ7w9eAIr63rkahjtui8Cyg EtaifnidLS6B3Z/DZ07zpuFNJ5ueb8kDtbXMhe8y3A/BeagSEk2Ql/wzW2uknYhY6Vqy yewEX+dqb5fTC+QEn9QTFsAe00+tR7EBNtaFjQRLK9j0uQ6VMLhqpdwktCj3ZWcUaNkR MVwSKY3sL/xS02zqIgdsKyh4jy5AAo+tAYfYroGzP/hbdfZwk7vx1t54mOzephHbWN3f uq5ZbJ5bNJVuJKSw3XWikbbtpNpdW6R0Wmblhy/miDmhQ4Lm58+3VSVNIyA8R8SAsSyL XRtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:user-agent:references :in-reply-to:subject:cc:to:from:date:content-transfer-encoding :mime-version:dkim-signature; bh=7fFFixajHd5ZXU/oR+wMAtk8fAGOWXcDcMX/z0A1k7U=; b=U/l+GQPoLIq18XGoBkA8DoXusmN99VvGD1TpJXRd4N5cWEEmm9XDHBv8Y2aSogBVHS UN+7oNK7t0PctBCvSHPhjl/1jqfqgF2GCkGiG5UXn+wSkkt2EsXffEDLo6jg5NFMtmJs 3J9mW4HFSvuw93HruN+3/gzHEkpFHx48XTGskQx9Ll/3bEZBhKPNIwi9m6XttPWEAfRN KNtYJEDrZbtQQmI9is8OwRO6vGwP6iGl2Th3ZNeR/2koDic3VkbVjXXbej8UmsP9PFPx fldJS0WSfiDE9L+5vsgacSKU+pqQpMOaJCQ/4UJDHX/54y1Fs2uWRugDBreFICSpiq4T ibDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=fM3iQGrB; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n25si1570771ejc.60.2020.06.11.01.09.17; Thu, 11 Jun 2020 01:09:39 -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=@kernel.org header.s=default header.b=fM3iQGrB; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726945AbgFKIGx (ORCPT + 99 others); Thu, 11 Jun 2020 04:06:53 -0400 Received: from mail.kernel.org ([198.145.29.99]:50658 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726720AbgFKIGw (ORCPT ); Thu, 11 Jun 2020 04:06:52 -0400 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E6D4A2074B; Thu, 11 Jun 2020 08:06:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591862812; bh=c0zbTaBdIyfBYHMbVLwq48idCED4RJbRflyqGdC0K5I=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=fM3iQGrBseiVVoOOA7lzVDDThz+MiyAGJ3OAf4hwCs1yjKcFgJ81l7yITe79GF4n2 LkKEwYH+yZmvNv/zMU0waQ1zKjn/HpTPXIk6SN6kvpC7KFpuaLuXBHg65vRQw68oAL OLoKHtUw+jx/rmHTSOGST2f9KCACyq7jNQMYGoTc= Received: from disco-boy.misterjones.org ([51.254.78.96] helo=www.loen.fr) by disco-boy.misterjones.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jjIEc-0021ee-Gz; Thu, 11 Jun 2020 09:06:50 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Thu, 11 Jun 2020 09:06:50 +0100 From: Marc Zyngier To: Sean Christopherson Cc: Paul Mackerras , Christian Borntraeger , Janosch Frank , Paolo Bonzini , James Morse , Julien Thierry , Suzuki K Poulose , David Hildenbrand , Cornelia Huck , Claudio Imbrenda , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-mips@vger.kernel.org, kvm@vger.kernel.org, kvm-ppc@vger.kernel.org, linux-kernel@vger.kernel.org, Peter Feiner , Peter Shier , Junaid Shahid , Ben Gardon , Christoffer Dall Subject: Re: [PATCH 00/21] KVM: Cleanup and unify kvm_mmu_memory_cache usage In-Reply-To: <20200605213853.14959-1-sean.j.christopherson@intel.com> References: <20200605213853.14959-1-sean.j.christopherson@intel.com> User-Agent: Roundcube Webmail/1.4.4 Message-ID: X-Sender: maz@kernel.org X-SA-Exim-Connect-IP: 51.254.78.96 X-SA-Exim-Rcpt-To: sean.j.christopherson@intel.com, paulus@ozlabs.org, borntraeger@de.ibm.com, frankja@linux.ibm.com, pbonzini@redhat.com, james.morse@arm.com, julien.thierry.kdev@gmail.com, suzuki.poulose@arm.com, david@redhat.com, cohuck@redhat.com, imbrenda@linux.ibm.com, vkuznets@redhat.com, wanpengli@tencent.com, jmattson@google.com, joro@8bytes.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-mips@vger.kernel.org, kvm@vger.kernel.org, kvm-ppc@vger.kernel.org, linux-kernel@vger.kernel.org, pfeiner@google.com, pshier@google.com, junaids@google.com, bgardon@google.com, christoffer.dall@arm.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Sean, On 2020-06-05 22:38, Sean Christopherson wrote: > This series resurrects Christoffer Dall's series[1] to provide a common > MMU memory cache implementation that can be shared by x86, arm64 and > MIPS. > > It also picks up a suggested change from Ben Gardon[2] to clear shadow > page tables during initial allocation so as to avoid clearing entire > pages while holding mmu_lock. > > The front half of the patches do house cleaning on x86's memory cache > implementation in preparation for moving it to common code, along with > a > fair bit of cleanup on the usage. The middle chunk moves the patches > to > common KVM, and the last two chunks convert arm64 and MIPS to the > common > implementation. > > Cleanup aside, the notable difference from Christoffer and Ben's > proposed > patches is to make __GFP_ZERO optional, e.g. to allow x86 to skip > zeroing > for its gfns array and to provide line of sight for my > cannot-yet-be-discussed-in-detail use case for non-zero initialized > shadow > page tables[3]. > > Tested on x86 only, no testing whatsoever on arm64 or MIPS. I've given it a go on a small bunch of arm64 boxes, and nothing caught fire! As Ben noticed, the series isn't bisectable (easily fixed) and there is some nagging conflicts with the current state of mainline. Overall, a very welcome cleanup. The only point of contention is the change in allocation accounting on arm64, but there is an easy fix for that. Thanks, M. -- Jazz is not dead. It just smells funny...