From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 089F0C433FE for ; Thu, 3 Nov 2022 17:46:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=iW5YExnwRVgqAOEOIyteo0P8Evq8qinsh1WAiqgOe7g=; b=2fNEhhgnga56zP T6XVGt4wddtg+djao15Pq5S5Qc6S/K9xxXBpO+Y8Mc3Dj2LT1MlNZVnG+1cZVzXLVqk01bqeBjX7U FStYnbYal/v8DvL/Qb8usDpfi0p/v9MSl/OGiEM+LpNJirLXe/BYuHeE8eC04z0bC5fqy3ZGrdG19 BvM18Q/iqdmBKk/EstyGdGZ1LvlvIgsv2OGP2R3x7+0ckS44df2X3sseG95rahGFA+8oE7o4EfMza Tq6oQse0r/0qJZtbWI9Q+gY9M1+yWqP9uKdJy25fAChxzHQXapnHuDhy0/1NFrXUAe6MSAAtfZs4S HSmuqG+/y5SrnbZxuP5A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oqeH2-0017Jq-Nj; Thu, 03 Nov 2022 17:45:04 +0000 Received: from mail-pj1-x102e.google.com ([2607:f8b0:4864:20::102e]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oqeGv-0017G6-Td for linux-arm-kernel@lists.infradead.org; Thu, 03 Nov 2022 17:45:00 +0000 Received: by mail-pj1-x102e.google.com with SMTP id h14so2347895pjv.4 for ; Thu, 03 Nov 2022 10:44:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; 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=cK19xZ8r/JxZ6zrZk59CGRO4XALiFfw/k+DEo690ifc=; b=AMXkMgBJe864E9ylH4eLhcV4DnnmpnUZQciwStcW/fWfVy8vl8xbyLHXqWoh/4n8QF bRAhsfNtOcglKLMhK6Nb/v5AF7HvdYNYuPv80cwXOHPX5E9n4f4rIwmSH2XAdpFIqhuj sSsx/7sAKHM3fmeDS7xyNpoxOPMcbkwOVVWM5XBPQcjHKuBxYoH5JxFh6oDyEgClSLr4 VePL27iqi0rk5/s+JivkXFUi7OtMXJLNacJQMnJ3M4obYSjfplMj8jxI5D4RNhWTNCit VmDRgbq4Pt+ph415Zp0hH77zR2JN9eVpsj1xI6CTZrVgir1QKlQnpGg6QTPI6wKdJ0ls 3hyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=cK19xZ8r/JxZ6zrZk59CGRO4XALiFfw/k+DEo690ifc=; b=K/dm6CxBl8p1TA5NLpEDPaTd3l47eCvSMSHsT4h3gP7Zlm5uxGEGHpSWVeB3VZ30BL I9h4zfZUqjRfTONv5ayu7Lo5tQPrr/lAD2WzkAF89aiWNsmeK+jCRXq1vAh70ZENhFPj fPC3kb4SHXdgp7d4+HE+vPTUOQy+UH7dtPmyq76v6QsQgo2a5ZwgUThOCrsh3UouTR/S KuaYOqTbwK8Qt3zm9iO3n5lgTra9GI+sCG4AhT6upSaFZRBpmpRMo0Jb/Wnuf/7dgE3b fl7tOwrVin9IuBEJwzpjN37q5P9Gf5Y/3mgvQd8j56lWkuRITawQJA3ys8Rwh1/GkZTQ zUZQ== X-Gm-Message-State: ACrzQf3V8UM+eK+ELm8qFs2VZ7dENVEeURGNFN8gU8l4IjDuR9X319BY z6zIy3AkPlMQAElxvT5SaXmBUg== X-Google-Smtp-Source: AMsMyM7Vi7ErqJmqrzHt1bwsO7Jfw+kVc4w4lCdxf/cK5b8KZHYV39XlOvASF4Eye8GSeC7ZJ2rbFQ== X-Received: by 2002:a17:90a:d24d:b0:213:d3e4:677a with SMTP id o13-20020a17090ad24d00b00213d3e4677amr24629292pjw.101.1667497496277; Thu, 03 Nov 2022 10:44:56 -0700 (PDT) Received: from google.com (7.104.168.34.bc.googleusercontent.com. [34.168.104.7]) by smtp.gmail.com with ESMTPSA id i7-20020a17090332c700b00178aaf6247bsm1004862plr.21.2022.11.03.10.44.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Nov 2022 10:44:55 -0700 (PDT) Date: Thu, 3 Nov 2022 17:44:51 +0000 From: Sean Christopherson To: Paolo Bonzini Cc: Marc Zyngier , Huacai Chen , Aleksandar Markovic , Anup Patel , Paul Walmsley , Palmer Dabbelt , Albert Ou , Christian Borntraeger , Janosch Frank , Claudio Imbrenda , Matthew Rosato , Eric Farman , Vitaly Kuznetsov , James Morse , Alexandru Elisei , Suzuki K Poulose , Oliver Upton , Atish Patra , David Hildenbrand , kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, kvmarm@lists.cs.columbia.edu, linux-mips@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, Isaku Yamahata , Fabiano Rosas , Michael Ellerman , Chao Gao , Thomas Gleixner , Yuan Yao Subject: Re: [PATCH 36/44] KVM: x86: Do compatibility checks when onlining CPU Message-ID: References: <20221102231911.3107438-1-seanjc@google.com> <20221102231911.3107438-37-seanjc@google.com> <23bfd709-f99a-5a74-e4b9-1381b88453f1@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <23bfd709-f99a-5a74-e4b9-1381b88453f1@redhat.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221103_104459_567329_34086759 X-CRM114-Status: GOOD ( 12.73 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Nov 03, 2022, Paolo Bonzini wrote: > On 11/3/22 00:19, Sean Christopherson wrote: > > From: Chao Gao > > > > Do compatibility checks when enabling hardware to effectively add > > compatibility checks when onlining a CPU. Abort enabling, i.e. the > > online process, if the (hotplugged) CPU is incompatible with the known > > good setup. > > This paragraph is not true with this patch being before "KVM: Rename and > move CPUHP_AP_KVM_STARTING to ONLINE section". Argh, good eyes. Getting the ordering correct in this series has been quite the struggle. Assuming there are no subtle dependencies between x86 and common KVM, the ordering should be something like this: KVM: Opt out of generic hardware enabling on s390 and PPC KVM: Register syscore (suspend/resume) ops early in kvm_init() KVM: x86: Do compatibility checks when onlining CPU KVM: SVM: Check for SVM support in CPU compatibility checks KVM: VMX: Shuffle support checks and hardware enabling code around KVM: x86: Do VMX/SVM support checks directly in vendor code KVM: x86: Unify pr_fmt to use module name for all KVM modules KVM: x86: Use KBUILD_MODNAME to specify vendor module name KVM: Make hardware_enable_failed a local variable in the "enable all" path KVM: Use a per-CPU variable to track which CPUs have enabled virtualization KVM: Remove on_each_cpu(hardware_disable_nolock) in kvm_exit() KVM: Drop kvm_count_lock and instead protect kvm_usage_count with kvm_lock KVM: Disable CPU hotplug during hardware enabling KVM: Rename and move CPUHP_AP_KVM_STARTING to ONLINE section KVM: Drop kvm_arch_check_processor_compat() hook _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel