Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp480453rwe; Thu, 1 Sep 2022 02:56:32 -0700 (PDT) X-Google-Smtp-Source: AA6agR6SLm/0BNisD2zBNhmWFH6HkeCkjNAyXrjkYqbNJ81ex2kzky8MfC+/Yxo6pEB/eKyVsQzf X-Received: by 2002:a17:907:9625:b0:730:ad62:9c86 with SMTP id gb37-20020a170907962500b00730ad629c86mr23073746ejc.281.1662026191947; Thu, 01 Sep 2022 02:56:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662026191; cv=none; d=google.com; s=arc-20160816; b=rNPb1AWALWdIo+zBiibexNQiTUg3CiCagOczE744HtNi+3q0jVhs3zSjXaKMbpB4y+ /wHDF9KogNaozxWsot0bgkLnKbi+/kR9R5/pZzCs6ue5lSrgkBXht2s9dpLt09CQMlLz iW7P3NMA5EW7raoisLTkL/xH8Xr/F0CtqTCz06tdDTdbmYifXD3pHuylnz9NbsEz3FhQ vklKKz+L7yCmaky2CjW4VV3HILWMNfk+KCTQlGsU07/r7Mv7/XE18kdEW5YA3GH31p5Y 7HJmvN2D9Eg0Hu2sPkx89I0vSXBKPQtseoDdMxQqd3urAmU2A5fwdmWne94IxIPtJ2FM HD3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :subject:cc:to:from:message-id:date:dkim-signature; bh=K/Yxfnnbr/wkG2QKp6SP2wVqOLNazgtltOY5L0WAemc=; b=k3kgF4pTxKSmsw3uXwuZXijKQGRPuQAIONXFQrJPO6mv3f+hW/d+JbWj9BAT9UgNRi vqLeifos4Db3skX7/HuFpO7nR78hf03bJMX1gAV0YywJGazRPGmnEbIyfBOnxGqS9Rm/ KzUPyrE0hnjBQOx+pG1TziGP4zsnZ+Ge/ZludVYlPlbB96BdRmp/AaHNqNcVGo0HiJO/ GYl/t6Lw4wUBzxnPNzIfWDxpE0BTRHN38QvLvyJa0qAZzM8BUR83MsTFolGmLvLEt+AW 9ZKP6bhZXthKHznEwvoDuXAgDbPgwj/FVNuKtZpd0kzDVwNgDXZVgEWsrwOHG40bZ8w5 ivng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=gLmONwx6; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n11-20020a17090695cb00b0073121897f6esi9390706ejy.222.2022.09.01.02.56.06; Thu, 01 Sep 2022 02:56:31 -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=@kernel.org header.s=k20201202 header.b=gLmONwx6; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234462AbiIAJFU (ORCPT + 99 others); Thu, 1 Sep 2022 05:05:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43238 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234458AbiIAJEY (ORCPT ); Thu, 1 Sep 2022 05:04:24 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1EB5F134D58; Thu, 1 Sep 2022 02:03:21 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id A3F37B824F7; Thu, 1 Sep 2022 09:03:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 64527C433D6; Thu, 1 Sep 2022 09:03:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1662022999; bh=F8rr54ynDkiAk122+iZ4WVXked8recuKxxS5se5pHy0=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=gLmONwx6Kqr0v6S0ElWGrlSZVEVr3Kz12w0vrk2/Ozicvi2zr3W/7kggFpuHzAwlW W0VtkjbZBXNad5Ae9zN9DdRBLe8VQdwG521Eew7lxEbeOdXewgpVu+yh40swwc9eGO kZ0De3giB9QNwL6aPWPtckjlfFWM8Vi/a/CxeZ84UdUyuMGnh/Cil7ckaHfVFhpLF8 GBPDBFq38LakBs3Jl1RJbJtqENKlTbIbrOrGZVKKGmvuJi/fGTXDBG1Cp24M9pHTf3 m4X2nU/aNbVnddlXP3eAFY9R5ynXreAgYXIxhK1a0w3uHC8DAMjdz+LtY7PuGae4+X i7g8x9yD787dw== Received: from sofa.misterjones.org ([185.219.108.64] helo=why.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1oTg6X-007GUo-1Y; Thu, 01 Sep 2022 10:03:17 +0100 Date: Thu, 01 Sep 2022 10:03:16 +0100 Message-ID: <87y1v3v54b.wl-maz@kernel.org> From: Marc Zyngier To: Sean Christopherson Cc: "Huang, Kai" , "kvm@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "Yamahata, Isaku" , "pbonzini@redhat.com" , "Shahar, Sagi" , "Aktas, Erdem" , "isaku.yamahata@gmail.com" , Will Deacon Subject: Re: [PATCH v8 003/103] KVM: Refactor CPU compatibility check on module initialization In-Reply-To: References: <4092a37d18f377003c6aebd9ced1280b0536c529.1659854790.git.isaku.yamahata@intel.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: seanjc@google.com, kai.huang@intel.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, isaku.yamahata@intel.com, pbonzini@redhat.com, sagis@google.com, erdemaktas@google.com, isaku.yamahata@gmail.com, will@kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Sean, On Thu, 11 Aug 2022 18:39:53 +0100, Sean Christopherson wrote: > > +Will (for arm crud) When it comes to KVM/arm64, I'd appreciate if you could Cc me. > arm64 is also quite evil and circumvents KVM's hardware enabling > logic to some extent. kvm_arch_init() => init_subsystems() > unconditionally enables hardware, and for pKVM _leaves_ hardware > enabled. And then hyp_init_cpu_pm_notifier() disables/enables > hardware across lower power enter+exit, except if pKVM is enabled. > The icing on the cake is "disabling" hardware doesn't even do > anything (AFAICT) if the kernel is running at EL2 (which I think is > nVHE + not-pKVM?). In the cases where disabling doesn't do anything (which are the exact opposite of the cases you describe), that's because there is absolutely *nothing* to do: - If VHE, the kernel is the bloody hypervisor: disable virtualisation, kill the kernel. - if pKVM, the kernel is basically a guest, and has no business touching anything at all. So much the 'evil' behaviour. M. -- Without deviation from the norm, progress is not possible.