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 7CBACC433FE for ; Thu, 3 Nov 2022 17:59:10 +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-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=dO1/GD/T6p3d3es/aL7G6qDZacW9+v2eboS7RaoslIQ=; b=OLAay0SAku1Zp/ IjiIV1zkvAazfxQJQr/BE/A9f9UFW551NvRoORcH2GCgknsJBzrAXXpZ5dVAimgFPZMBL3WOn6P4a +dm+89jGfgIRT8E2Dapw2poNC+y9kgaHOh4LoYXvA/4QBjOmkxVxg+RF1faVCSX7hbJYck8KX5Yxz KAsaqD+SGkmg+6l91uW4OI9GCPrzOeMvG7kdPdDj+q66SPWHK/d3Mv9R3N40Jw8kx6PfDQC8rWku4 p+MUycrFReYvffQ7OIy5kk0uXbnwdA6qQ68T50S4gxqp1dUMnKo7Z9qpObCZoR3UqnQrzsKB+pwJx vjez55zdQOfSJLyYsNhQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oqeTg-0019Zq-7X; Thu, 03 Nov 2022 17:58:08 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oqeTb-0019Xv-FR for linux-arm-kernel@lists.infradead.org; Thu, 03 Nov 2022 17:58:05 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1667498282; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yqxXm7t2WOic9y4ISYxOwK8KmYTr1cBIHzcg/Vydbzs=; b=JO0fY+VMuNNNhB9GwqiOZKCp7OisVtjP792TK1lpPDIfzSzbT7aAJufF3oHGhVTVFyZUGQ ypXwi8rVRS4QmQA6Lg0x3F8li1VJ7ovfimxJHpMQGE6P6HtY23MmbmBQro9xR8QSBVNE47 UJ/Be44vj5/GmEQJYh7tSZhvW+53jI8= Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-533-i0vGPT0ROwOuRjdO-44l4Q-1; Thu, 03 Nov 2022 13:58:01 -0400 X-MC-Unique: i0vGPT0ROwOuRjdO-44l4Q-1 Received: by mail-ej1-f71.google.com with SMTP id dt6-20020a170907728600b007adc3ab275aso1763700ejc.20 for ; Thu, 03 Nov 2022 10:58:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=yqxXm7t2WOic9y4ISYxOwK8KmYTr1cBIHzcg/Vydbzs=; b=7Td7GVhFzesV0eBB7rRfqy6/Bt53YokXLGOGsNRApF9xI/XnabBAG2XsOMEtpQMKPg XiNBYhFjlHP63PUV+1+wEroAoLS3ZYLj7AWIWF1/6Oz0WuZmRT3G3jHoVxiMC5utErVI QI6fwmK80YYebQMoNygO6YzxFZ7EtPlOlVR661x19Z37ZmFe4ChI2pUyI0VPtSJJBqBN Kh4Qritso/GwzlrQYxoXQp+7P0wtmG8wE1eaxhx/Chx7H6lhFd/9OUAOq7qud9cFllj5 2Oz+0FtO0M6vDqIMwvsdYBLro0PyN8cquNICi4/XEBTzBaL3SAcO0oljiTep/odvyMkk eNqg== X-Gm-Message-State: ACrzQf0I7iaWnqZG7UjlJ6LVtPjc3EWSRO998CuoY36WIEdgXYZ7Xqos lRvE1ILAMdr8IVlajfPQYS/fgKEGLGhSqnNvRj4bq7mYg1OVSaEsbjwNgCypi4n+dNst6z9saVT h9bnbc624HXGdtWXFwr4oLYA80Nir848p0TU= X-Received: by 2002:a17:907:a087:b0:7ad:a2ec:1afa with SMTP id hu7-20020a170907a08700b007ada2ec1afamr30061854ejc.151.1667498280031; Thu, 03 Nov 2022 10:58:00 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6QZmNq5hCph1jlllZl0PdTQdpFjKynjhfU4TqqXsTy2ri356CZrCrEtJkVH+I+gMfL+O9fNA== X-Received: by 2002:a17:907:a087:b0:7ad:a2ec:1afa with SMTP id hu7-20020a170907a08700b007ada2ec1afamr30061831ejc.151.1667498279805; Thu, 03 Nov 2022 10:57:59 -0700 (PDT) Received: from ?IPV6:2001:b07:6468:f312:1c09:f536:3de6:228c? ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.googlemail.com with ESMTPSA id l3-20020a170907914300b0078d76ee7543sm734215ejs.222.2022.11.03.10.57.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 03 Nov 2022 10:57:58 -0700 (PDT) Message-ID: <1fd2e729-6e46-b0bf-d89e-f5d1b4dbde77@redhat.com> Date: Thu, 3 Nov 2022 18:57:55 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.0 Subject: Re: [PATCH 36/44] KVM: x86: Do compatibility checks when onlining CPU To: Sean Christopherson 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 References: <20221102231911.3107438-1-seanjc@google.com> <20221102231911.3107438-37-seanjc@google.com> <23bfd709-f99a-5a74-e4b9-1381b88453f1@redhat.com> From: Paolo Bonzini In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221103_105803_644765_F3E6C1ED X-CRM114-Status: GOOD ( 16.67 ) 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-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 11/3/22 18:44, Sean Christopherson wrote: >>> 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: It's not a problem to keep the ordering in this v1, just fix the commit message like "Do compatibility checks when enabling hardware to effectively add compatibility checks on CPU hotplug. For now KVM is using a STARTING hook, which makes it impossible to abort the hotplug if the new CPU is incompatible with the known good setup; switching to an ONLINE hook will fix this." Paolo > 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