Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp10982482rwr; Fri, 12 May 2023 16:42:53 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ42a7XQd1YCoowP2516lgE2KquH3HYCAOVhLjTOuYviDxDWkPVsMDDiKhAdOep7Y4o+jIQx X-Received: by 2002:a05:6a21:3284:b0:100:9a80:2e90 with SMTP id yt4-20020a056a21328400b001009a802e90mr24924414pzb.59.1683934972788; Fri, 12 May 2023 16:42:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683934972; cv=none; d=google.com; s=arc-20160816; b=aHqOgOZVca9PXyN8yLiacsLxDfnBaJ2xrmbKR+NgPnbZAL+fyD1tcNjPWY0ZHs0haY a1yY3hwvempA52Qw6AOz3bJ/eU6FX+i7Q9t1+MHE6Q1RLTs0SB9C+N7zd5TvX8a/E0Sq 0mdCSIE/W5aYLHY6exb7GcRUH7LI/0uUffSWaQtjEEg1Pvb4f5LcEYHF5YOg4Q1Xv5ei TlWS99XjZhhI9Nv6YBGWzK/O6JLMdJ3IsWvWGRlhsnlL3Q6fTRBc631zQSOITOLvxKFV 4ZW1gTT/z7wYjaMsvS1TE+abtdzevgxRdbJyknC7nO+LZhLb1XeG16VxjS2X1B500bXu l6YQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=W8ljHnrY6VdN7PYdreXu26+ii27Kp3emVsixsuksMV4=; b=zCDRfzm5ym5YdqpHH6Sy3MxzCmOyPubT4MvI2sPTtF8VpBDY4KpEQTzz4BPmBKoOkt ZnFPpy7pGC7wI+N0kJ/qFMWxk7pu/SXABTkWd2wElDE+BQbyyNsoQADeFU2fPbTcZT7C nPuz/QshQAoEnX/X7Qyq9YNq6ysrPWJjwMqyeep8i2IbOW27UzOf5c09pedkr7bzHOY9 urnb6rVpMhKiyGPwRVecVvK0a2nPHjFQeAQfQCjolZ7L12+96aXINzK6EsHowZUK6R+n 5UJkDnI9++GCvIuwTd8JP5J3o6iHjiFJJUDoDcUWTqOcWf/SrderBXYQN48N8k/ELHnJ nUqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=1AcbTCG9; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f3-20020a637543000000b0051372ec9316si9239494pgn.166.2023.05.12.16.42.41; Fri, 12 May 2023 16:42:52 -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=@google.com header.s=20221208 header.b=1AcbTCG9; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240614AbjELXXd (ORCPT + 99 others); Fri, 12 May 2023 19:23:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38032 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240275AbjELXXc (ORCPT ); Fri, 12 May 2023 19:23:32 -0400 Received: from mail-pf1-x432.google.com (mail-pf1-x432.google.com [IPv6:2607:f8b0:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9D892273D for ; Fri, 12 May 2023 16:23:31 -0700 (PDT) Received: by mail-pf1-x432.google.com with SMTP id d2e1a72fcca58-643465067d1so7876553b3a.0 for ; Fri, 12 May 2023 16:23:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1683933811; x=1686525811; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=W8ljHnrY6VdN7PYdreXu26+ii27Kp3emVsixsuksMV4=; b=1AcbTCG9to2+VB/AW4VUY/jUl5B6kV/vGeEKSZuYfBfpFOKACrD2ld1bfbB5ibzUXe XRiY4Dq0oV4bQM86oSZLHKmZ+J5j67QbDFzyLEaLY86co4PhiypJYjSZIgMeyAqtQ+WD Rz8zkt0aYmeGCC87auXIgg6O4KZoTAb1yuZpusUiHxQiZCWAnCo+QoOyxbwjYVf8lfbi PABPYcsFinm6Z56fiHkxxxP6zrb7NoiXdDEAET086BE4T9F9tSEYNkjYnPu9dccMF/Wc LAu1ckS75VjcWmgbC+sAAa9KIrsU0+bMH8RkGJ24AOl/mB+cgDtBT7799Z7cm7ntuH1p 8Igw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683933811; x=1686525811; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=W8ljHnrY6VdN7PYdreXu26+ii27Kp3emVsixsuksMV4=; b=CNQ/SLD1K7HePdYy4PYM1HYE6hhOlBiBU1ms9NWWe9K8yyO1edG2hKHRveSEra3zv0 viDRBc+z5kMUYUJ7Ym78y9PIWOUOZxs6JCHAFaprIIohjAholEr7Qp/AhOVQmjSwKCJM o2Cl+etxGeisteqVVTlG36VW4raxGGR048c9KH929ZPBQhZhQ9VQGaX4Fh13On00MT6z MURcEgbCGsrjWRsnXm+bgIAdPoiOMyXxFwX93sMzSpbR4ZrsckXbWgbomgmrODm8itCX yNygeYNxAsJn62ToDpqRTXy6hM9k+uN6FJHO+WMhGnSCy62mCBVEEOc9OUz+WBYxuYy7 zp2w== X-Gm-Message-State: AC+VfDwbUJ+LobYvRRZkFwwUqY+sP0Q/PTVB4qy772DzH1HLU4CGW0Yj kWs+rdwonSsrZvizWdTO1JZhKg== X-Received: by 2002:a05:6a20:8e19:b0:f3:67da:9db5 with SMTP id y25-20020a056a208e1900b000f367da9db5mr30909564pzj.38.1683933810925; Fri, 12 May 2023 16:23:30 -0700 (PDT) Received: from google.com (223.103.125.34.bc.googleusercontent.com. [34.125.103.223]) by smtp.gmail.com with ESMTPSA id c25-20020a62e819000000b0063f172b1c47sm1353990pfi.35.2023.05.12.16.23.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 May 2023 16:23:30 -0700 (PDT) Date: Fri, 12 May 2023 16:23:26 -0700 From: David Matlack To: Sean Christopherson Cc: Paolo Bonzini , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Mingwei Zhang , Jim Mattson Subject: Re: [PATCH 4/9] KVM: x86/mmu: Rename MMU_WARN_ON() to KVM_MMU_WARN_ON() Message-ID: References: <20230511235917.639770-1-seanjc@google.com> <20230511235917.639770-5-seanjc@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230511235917.639770-5-seanjc@google.com> X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=ham 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 On Thu, May 11, 2023 at 04:59:12PM -0700, Sean Christopherson wrote: > Rename MMU_WARN_ON() to make it super obvious that the assertions are > all about KVM's MMU, not the primary MMU. I think adding KVM is a step in the right direction but I have 2 remaining problems with KVM_MMU_WARN_ON(): - Reminds me of VM_WARN_ON(), which toggles between WARN_ON() and BUG_ON(), whereas KVM_MMU_WARN_ON() toggles between no-op and WARN_ON(). - It's not obvious from the name that it's a no-op most of the time. Naming is hard so I might just make things worse by trying but... How about KVM_MMU_PROVE(condition). That directly pairs it with the new CONFIG_KVM_PROVE_MMU(), makes it sufficiently different from VM_WARN_ON() and WARN_ON() that readers will not make assumptions about what's happening under the hood. Also "PROVE" sounds like a high bar which conveys this might not always be enabled. That also will allow us to convert this to a WARN_ON_ONCE() (my suggestion on the other patch) without having to make the name any longer.