Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp1455350rwi; Thu, 3 Nov 2022 05:37:24 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7i4yDq8n3cn5G63ZLvghgIF9Ds8zmX4lYYCHKatcgKSa+l+xZ6qZ8H1iTjzmQS0Hi5Anrn X-Received: by 2002:a17:90b:1c8c:b0:203:89fb:ba79 with SMTP id oo12-20020a17090b1c8c00b0020389fbba79mr48433807pjb.92.1667479044716; Thu, 03 Nov 2022 05:37:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667479044; cv=none; d=google.com; s=arc-20160816; b=lwqltN7VQld2ef0XT7I64RlBnKMl2X32CJfoMPyf1h4Mw7A2GmY+uuZCuxvU+pJAwp ZdQAE+wEtw8Il21i5VdxAAOFLdoB9Va/EGbqoHNbnP0cT6GA0uQtsAb+VOId1op4Tq3T sgAbg9qIRJqC1vPT11Jz9kPYFhuRo+UK5Ofgc9Ehh+Yy+adIUfFHzBls5SsUlf/9wnul cwUOBJedeZQ4/LVGQ0Ih1rv0+0hFW5EuUe3gjxZtQYMmA4yKKnIl0Emrc0QY0QYc37Ga o57LT0xEU0GHUBPPoHE8k1cTctrRCdgwyQXVzCeyRVHmy5fwQVWiIAHmKpWglrAOY15Y i0gQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=tRd+Sf4ESzYxXeduPYDhAWunMH0Pov2R0lxSdKxbbNc=; b=YIh5cUbp+jijm4A7iuxU6JHSerUGMXAs7YnRj9BQZiLOkewsyZ9id43N+2JDV5P+Hp xNbEC+DRwnsEStTeQtkZfuDc2REqDdM8aXolLvi5TPWi/SGvWTrW0B/VMeVyR5cY2M7d 6zBDZUp+Xn/5arZoaSPdNAcP0uplnQ0N9wGSk10+3OI5TYAnsjZojtUbcvdJ9ue9csPK XN0XLIlyKSBFbUDa5kUyiXgEDXp6Yf7wrz/zllLGlnwcp7zL4ZLJ+xm2A1IsbEKz0NqG zA9U3dsle0goiYNlHbDzprMPtaKASzbkygfH3kDCzft0f/VW2r6B6JXs9Lu6IKkoUx6s mqeg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=VRfTy5In; 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=ibm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z16-20020a63e550000000b00470075c0faesi1015100pgj.266.2022.11.03.05.37.05; Thu, 03 Nov 2022 05:37:24 -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=@ibm.com header.s=pp1 header.b=VRfTy5In; 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=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231487AbiKCMI7 (ORCPT + 97 others); Thu, 3 Nov 2022 08:08:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37756 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230388AbiKCMI6 (ORCPT ); Thu, 3 Nov 2022 08:08:58 -0400 Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0FC84DD6; Thu, 3 Nov 2022 05:08:57 -0700 (PDT) Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 2A3B0Gq9021170; Thu, 3 Nov 2022 12:08:12 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=pp1; bh=tRd+Sf4ESzYxXeduPYDhAWunMH0Pov2R0lxSdKxbbNc=; b=VRfTy5Inlafk+/Jp+RulvFawqvi/rSVV5WzgD4Q1ylYH5YYV6rkSt9im3XzzAdVhyA1S pvZsUgzws4pR0NmM9t9h3jocHcktl8DGqfhgFSLrxlknEcccU5fUwG0weOUeZmhOa+v5 /TFIiNm4imhOJWsZbUA3gE1G3WJq3v1g1w94vinZPPz+bPMUjHFVAQVWDh4M5o1yB8nr CkL0Og3cF1BgO+0JO95fWHkydv9kJ87DI6b+gpdqCKQU6YCXb72iPx1NOlLixNYoO4Le By84c4Q99oNNnMAvCX2FNua/g8RbEyUfgdWXfOnEc+5/w1mAKOkACyhntrGE3j92Ekby jg== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3km6pgvku9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 03 Nov 2022 12:08:11 +0000 Received: from m0098417.ppops.net (m0098417.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 2A3Aw71f011008; Thu, 3 Nov 2022 12:08:10 GMT Received: from ppma03ams.nl.ibm.com (62.31.33a9.ip4.static.sl-reverse.com [169.51.49.98]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3km6pgvksp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 03 Nov 2022 12:08:10 +0000 Received: from pps.filterd (ppma03ams.nl.ibm.com [127.0.0.1]) by ppma03ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 2A3C5slO006357; Thu, 3 Nov 2022 12:08:08 GMT Received: from b06avi18626390.portsmouth.uk.ibm.com (b06avi18626390.portsmouth.uk.ibm.com [9.149.26.192]) by ppma03ams.nl.ibm.com with ESMTP id 3kgut90qww-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 03 Nov 2022 12:08:07 +0000 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06avi18626390.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 2A3C2WEU47645072 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 3 Nov 2022 12:02:32 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7331F11C050; Thu, 3 Nov 2022 12:08:04 +0000 (GMT) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 019D711C04A; Thu, 3 Nov 2022 12:08:03 +0000 (GMT) Received: from [9.179.10.27] (unknown [9.179.10.27]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 3 Nov 2022 12:08:02 +0000 (GMT) Message-ID: Date: Thu, 3 Nov 2022 13:08:02 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.0 Subject: Re: [PATCH 00/44] KVM: Rework kvm_init() and hardware enabling Content-Language: en-US To: Sean Christopherson , Paolo Bonzini , Marc Zyngier , Huacai Chen , Aleksandar Markovic , Anup Patel , Paul Walmsley , Palmer Dabbelt , Albert Ou , Janosch Frank , Claudio Imbrenda , Matthew Rosato , Eric Farman , Vitaly Kuznetsov Cc: 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> From: Christian Borntraeger In-Reply-To: <20221102231911.3107438-1-seanjc@google.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: kDz4IlUkdMl5dt80_ZCu6z1wzI39hakX X-Proofpoint-GUID: KA9oP9_xjNfF3-IlHpu6OGKikLeeqdHZ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-11-03_02,2022-11-03_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1011 lowpriorityscore=0 priorityscore=1501 phishscore=0 spamscore=0 impostorscore=0 mlxlogscore=999 mlxscore=0 malwarescore=0 adultscore=0 suspectscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2211030083 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE, SPF_PASS 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 Am 03.11.22 um 00:18 schrieb Sean Christopherson: > Non-x86 folks, please test on hardware when possible. I made a _lot_ of > mistakes when moving code around. Thankfully, x86 was the trickiest code > to deal with, and I'm fairly confident that I found all the bugs I > introduced via testing. But the number of mistakes I made and found on > x86 makes me more than a bit worried that I screwed something up in other > arch code. > > This is a continuation of Chao's series to do x86 CPU compatibility checks > during virtualization hardware enabling[1], and of Isaku's series to try > and clean up the hardware enabling paths so that x86 (Intel specifically) > can temporarily enable hardware during module initialization without > causing undue pain for other architectures[2]. It also includes one patch > from another mini-series from Isaku that provides the less controversial > patches[3]. > > The main theme of this series is to kill off kvm_arch_init(), > kvm_arch_hardware_(un)setup(), and kvm_arch_check_processor_compat(), which > all originated in x86 code from way back when, and needlessly complicate > both common KVM code and architecture code. E.g. many architectures don't > mark functions/data as __init/__ro_after_init purely because kvm_init() > isn't marked __init to support x86's separate vendor modules. > > The idea/hope is that with those hooks gone (moved to arch code), it will > be easier for x86 (and other architectures) to modify their module init > sequences as needed without having to fight common KVM code. E.g. I'm > hoping that ARM can build on this to simplify its hardware enabling logic, > especially the pKVM side of things. > > There are bug fixes throughout this series. They are more scattered than > I would usually prefer, but getting the sequencing correct was a gigantic > pain for many of the x86 fixes due to needing to fix common code in order > for the x86 fix to have any meaning. And while the bugs are often fatal, > they aren't all that interesting for most users as they either require a > malicious admin or broken hardware, i.e. aren't likely to be encountered > by the vast majority of KVM users. So unless someone _really_ wants a > particular fix isolated for backporting, I'm not planning on shuffling > patches. > > Tested on x86. Lightly tested on arm64. Compile tested only on all other > architectures. Some sniff tests seem to work ok on s390.