Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp157557rwb; Wed, 28 Sep 2022 00:25:41 -0700 (PDT) X-Google-Smtp-Source: AMsMyM50kpyuI+zJl62EKZtc/c6+809p1wQ8kGfnyOv7L1LJBb/lYCrDXR0R6wWpJWQVydHRShOI X-Received: by 2002:a62:1a8d:0:b0:544:1309:19f3 with SMTP id a135-20020a621a8d000000b00544130919f3mr33280822pfa.37.1664349940839; Wed, 28 Sep 2022 00:25:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664349940; cv=none; d=google.com; s=arc-20160816; b=Y7CvXsGpgpypOnOFzyUFeM1KpfUONSxwDYJ8IRMq0EkO3L/3ilRpvE5Y+iAqcbI1cK vBf28YNpx36fgmb256+IE6qPDjatB2j9uwaTpJ/En2/DFl5ue5N/yi93CTU37gnjJJK5 cx5bPiZ+unlWhvFECpPqdS+7d0k95Bu2UBHtMujEbgEGZLwmHePxjX1Hj4JClN6yeqvC uDW1+LwYIN6CNpOvWxuav/dpcLuQxwBswLQkdNd14FeOV3ExAeoGx41oLN8pWx2IlSpC HqAz1U0AHkJq2sPv+231TG/9gxA5JGniEk9VC5kycrHVbgIlOg0ooIRvxYIPcvQLB8T6 ed3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:dkim-signature; bh=wnwp0ICYi0IL1E+eNZ2+WEbweWyAgkGiqxsj7EWaexk=; b=Hc5EhBzNKptHsyDutopHtsGgpLs1UeUKvwZWEc0LM4gnSIxW5DxwGoKSGgzbMBf2Wl FxZSvi/pYUdbARGIm/E0NQHcWdJwLv18CDl+zKAtX2F04Mm+8Gyg98hSxg5uI4NlEIRB PTwGK8xaGz+Cut8HCiIBe7azqYsRz8oX57zD6fArbGI/zHk3giOoLAWHBEIA8B/z+70U cFwaEQm5JQFixzUMoaPWN374sCSxV1CvRVkNinFVnhjrrjMfPw8pxiAFEWcUeiRNAdA5 5RmQi/AjElDCcSBQmiHVBFb0a4buMjed2bY3elWrZQZWQhgNHlTx3cnRgYyhcX0OOzF5 PoGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=fy9K0mLM; 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 ip11-20020a17090b314b00b00205b38a17casi1772940pjb.9.2022.09.28.00.25.29; Wed, 28 Sep 2022 00:25:40 -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=fy9K0mLM; 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 S233208AbiI1HLH (ORCPT + 99 others); Wed, 28 Sep 2022 03:11:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51494 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229951AbiI1HLD (ORCPT ); Wed, 28 Sep 2022 03:11:03 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 350FB12AE7 for ; Wed, 28 Sep 2022 00:10:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1664349058; 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=wnwp0ICYi0IL1E+eNZ2+WEbweWyAgkGiqxsj7EWaexk=; b=fy9K0mLMzv1+v2634hRF8xV6HDlNTvMBChxIhSjJfC5geBZBlx1AEJFW+NU/kKh9p54xKK RhSbJZx9g1PMF54sNf6ypnXcS63bMaXnrH4UXgwqMQ1C+CVtq1BnBvdIkC13oG5CsFnha7 zXKiz8TIaLvLix7xwuae4xBL7cgqt+k= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-510-crNMTAxROma0_8wVriaKgg-1; Wed, 28 Sep 2022 03:10:55 -0400 X-MC-Unique: crNMTAxROma0_8wVriaKgg-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 7202D3C0D188; Wed, 28 Sep 2022 07:10:55 +0000 (UTC) Received: from starship (unknown [10.40.193.233]) by smtp.corp.redhat.com (Postfix) with ESMTP id 35B681121315; Wed, 28 Sep 2022 07:10:54 +0000 (UTC) Message-ID: Subject: Re: [PATCH] KVM: x86: disable on 32-bit unless CONFIG_BROKEN From: Maxim Levitsky To: Sean Christopherson , Paolo Bonzini Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org Date: Wed, 28 Sep 2022 10:10:53 +0300 In-Reply-To: References: <20220926165112.603078-1-pbonzini@redhat.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.5 (3.36.5-2.fc32) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_NONE 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 On Tue, 2022-09-27 at 17:07 +0000, Sean Christopherson wrote: > On Mon, Sep 26, 2022, Paolo Bonzini wrote: > > 32-bit KVM has extra complications in the code due to: > > > > - different ways to write 64-bit values in VMCS > > > > - different handling of DS and ES selectors as well as FS/GS bases > > > > - lack of CR8 and EFER > > > > - lack of XFD > > > > More for the list: > > - SVM is effectively restricted to PAE kernels due to NX requirements > > > - impossibility of writing 64-bit PTEs atomically > > It's not impossible, just ugly. KVM could use CMPXCHG8B to do all of the accesses > for the TDP MMU, including the non-atomic reads and writes. > > > The last is the big one, because it prevents from using the TDP MMU > > unconditionally. > > As above, if the TDP MMU really is the sticking point, that's solvable. > > The real justification for deprecating 32-bit KVM is that, outside of KVM developers, > literally no one uses 32-bit KVM. I.e. any amount of effort that is required to > continue supporting 32-bit kernels is a complete waste of resources. > I also think that outside KVM developers nobody should be using KVM on 32 bit host. However for _developement_ I think that 32 bit KVM support is very useful, as it allows to smoke test the support for 32 bit nested hypervisors, which I do once in a while, and can even probably be useful to some users (e.g running some legacy stuff in a VM, which includes a hypervisor, especially to run really legacy OSes / custom bare metal software, using an old hypervisor) - or in other words, 32 bit nested KVM is mostly useless, but other 32 bit nested hypervisors can be useful. Yes, I can always use an older 32 bit kernel in a guest with KVM support, but as long as current kernel works, it is useful to use the same kernel on host and guest. Best regards, Maxim Levitsky