Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp77231imw; Tue, 12 Jul 2022 15:00:42 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vsL8xQ3DjvW/AUUhTZfT1HTpiyHafLOmGSFWodwhrX304mbirSGWmcEasF17a+TyE7HeiT X-Received: by 2002:a05:6402:2b8d:b0:43a:5410:a9fc with SMTP id fj13-20020a0564022b8d00b0043a5410a9fcmr312885edb.99.1657663242063; Tue, 12 Jul 2022 15:00:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657663242; cv=none; d=google.com; s=arc-20160816; b=yUSsQYrvIgx8Q+GPY4s+3qmGSfFYwug3rc0LVFpbtrxb6IkCJVqgnnuJUsevsP/fvm 5LAfjYbeFquv177z/PUwDnF83UgDxmg9NQyWCSF2tH9lw3a8W7nz3lyJWsxfvv190RsV C+BNMwwxJa5PXGPJpAWYDg8KkHHXimfbD5Mm5q4xq8WM6Tbpkhu+xzBx2uLM/CfFAHB1 JRsQuSLDSw9yf9nQWziIZb7dItAPbnDQhZgWsezxqr65m3z3fT+8S4gPewlJ+PfVa5CJ OCjwXNDIQlBdaVrkGF2G9jCbdIlcvyGzvegE3rd8LMjuCzgpUBfgrutgHsiG6fl4slZq 6V5A== 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=s/3T4vxNFVONPISbNOnbcOQJiMW1pUHoPXX64SqOHNQ=; b=hTRZPgZACm11xy+1etTx+KUJPADMwEsSZKV2oxOcIRXSALAfkezxyIlAyiZLazyVTr +6mu62W5eP0FYcij+8Eu0AuOmll3JldmHPedXlKM+dp0+BooTc87XHOHoKbDp7gGcmIi 8auwl5RRMY6cF5b4MJhvdOLEk7qWa00VZU7qz0D/4QXdx/jUMH2JmaA9A3/Vt2C7v+Xl lxhAIrAusSdg3z6TPz2ePNPH5hwXqfDkBTAQY4v4qNM6u3kqeAMp3rVWdbO6tBIp54sr vu+1kOkfuPSuqSfJ9bsFCA+fpSetnSjFpmhNtB/9m/9qcb7YXk/uKV4d9u855gu5nuii NMxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=YJyEoWoU; 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 gi15-20020a1709070c8f00b00718d0604af6si2155160ejc.700.2022.07.12.15.00.16; Tue, 12 Jul 2022 15:00:42 -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=YJyEoWoU; 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 S231230AbiGLV4e (ORCPT + 99 others); Tue, 12 Jul 2022 17:56:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51874 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229881AbiGLV4e (ORCPT ); Tue, 12 Jul 2022 17:56:34 -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 8705A49B57 for ; Tue, 12 Jul 2022 14:56:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1657662991; 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: in-reply-to:in-reply-to:references:references; bh=s/3T4vxNFVONPISbNOnbcOQJiMW1pUHoPXX64SqOHNQ=; b=YJyEoWoUEyPhKwnS91fBy/Aeiaxn95j1fQeV3i0F6vTCaaNNcBbLBm3jlgVQ/lx0mN9Qr3 MNYHOc3K0fF8OW7ORqiETaDe8JkhYOwa9Q9tw3x8yAL15/o7Lg807x34tqX+x8S7UCDs64 muVyBDD1RCT9vvmL4uCt2GoOV4ktBqA= Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-621-YhmgqhUjMbC1THjfYwF2bQ-1; Tue, 12 Jul 2022 17:56:30 -0400 X-MC-Unique: YhmgqhUjMbC1THjfYwF2bQ-1 Received: by mail-qk1-f199.google.com with SMTP id br43-20020a05620a462b00b006b5833f8132so6348221qkb.22 for ; Tue, 12 Jul 2022 14:56:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=s/3T4vxNFVONPISbNOnbcOQJiMW1pUHoPXX64SqOHNQ=; b=PkugZqieU04CqX13VJUxA7h6TjGFZQFMMguQDFEHhOhtFIff5wFfUWk9geY9rDxTT3 Hhj8fcRPH8LBErGX5DN/Ic3O2FJZZG1FC4xcVsreuS/QsgWND3u9ziINrf9j6SFsG8kC 0MeA90un6bUw9Mv2wCe6PDE3Wm1yMDP4qsY+SBp6FIVAXq7EWxj0udreCTjYHM5aVQNv LH+elKUGY+hPMNvipfBJuE/omfiDrt9G0EEIs6FfkiWuXHvDImXJnDfU8ngLTi2lvc5w jWDB262npKY2AWpFwBJw4IcLsM4Tvc/UwwIN4ar6VLQrApZiI1e7q1HBSsqD3Y49Lo5+ GxKQ== X-Gm-Message-State: AJIora86ggo08N82dtupgpTyY3WscDBemXx+KOWYk2q+RfDIKDVJ4dir yqt/qhU/LBfpl7szgUb0pAXhylsFCEdg9oUntcv8DDIriMOQ4ai4v7FwAnQT2jFG9vEp6OO1uXO faKO+QH8w53oDjkKBilbvY7Rf X-Received: by 2002:ac8:4e94:0:b0:31b:f600:b59f with SMTP id 20-20020ac84e94000000b0031bf600b59fmr79258qtp.527.1657662990012; Tue, 12 Jul 2022 14:56:30 -0700 (PDT) X-Received: by 2002:ac8:4e94:0:b0:31b:f600:b59f with SMTP id 20-20020ac84e94000000b0031bf600b59fmr79250qtp.527.1657662989829; Tue, 12 Jul 2022 14:56:29 -0700 (PDT) Received: from xz-m1.local (bras-base-aurron9127w-grc-37-74-12-30-48.dsl.bell.ca. [74.12.30.48]) by smtp.gmail.com with ESMTPSA id cm23-20020a05622a251700b0031bed25394csm8390535qtb.3.2022.07.12.14.56.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Jul 2022 14:56:29 -0700 (PDT) Date: Tue, 12 Jul 2022 17:56:28 -0400 From: Peter Xu To: Sean Christopherson Cc: Paolo Bonzini , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , kvm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/4] KVM: x86/mmu: Defer "full" MMU setup until after vendor hardware_setup() Message-ID: References: <20220624232735.3090056-1-seanjc@google.com> <20220624232735.3090056-3-seanjc@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20220624232735.3090056-3-seanjc@google.com> 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 On Fri, Jun 24, 2022 at 11:27:33PM +0000, Sean Christopherson wrote: > @@ -11937,6 +11932,10 @@ int kvm_arch_hardware_setup(void *opaque) > > kvm_ops_update(ops); > > + r = kvm_mmu_hardware_setup(); > + if (r) > + goto out_unsetup; > + > kvm_register_perf_callbacks(ops->handle_intel_pt_intr); > > if (!kvm_cpu_cap_has(X86_FEATURE_XSAVES)) > @@ -11960,12 +11959,18 @@ int kvm_arch_hardware_setup(void *opaque) > kvm_caps.default_tsc_scaling_ratio = 1ULL << kvm_caps.tsc_scaling_ratio_frac_bits; > kvm_init_msr_list(); > return 0; > + > +out_unsetup: > + static_call(kvm_x86_hardware_unsetup)(); Should this be kvm_mmu_hardware_unsetup()? Or did I miss something?.. -- Peter Xu