Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp781667rwe; Wed, 31 Aug 2022 10:52:14 -0700 (PDT) X-Google-Smtp-Source: AA6agR7dvCMV2StUaB7pBLV+7DVu2CbcrSTjA53ALmI1hUlaeXkaWZQIu5lugFZZMScfHLcBwSGN X-Received: by 2002:a05:6a00:1393:b0:536:5b8a:c35b with SMTP id t19-20020a056a00139300b005365b8ac35bmr27891314pfg.5.1661968334512; Wed, 31 Aug 2022 10:52:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661968334; cv=none; d=google.com; s=arc-20160816; b=L9eMVwTXKrfigNPrmB4ujg2KI+WpggFJJ+J5udQr4JrlTwxY+offbRJn83loPuv5zc 6tL69Zocnvn4FvWVmE+OV3j/OezeeNWSQqwdM3DDyz0wdLv08E5q6Gqey3+TvDnQGFvq QNtklgnLTRc32+w9cSvvB/zBZ100OxWNJEaukjv6ezOkwDNX7rHfxe8cyYrDCuzbPWpT nOzR4ehkLRaKGJPItMMM5O3F59swZOUI5MsCmHz+PZunTCA64Si8qDMt9joU1AFYN5JW SbX6T6DqeMbjTGj96S7e9l32q5kAO29xTcLVSIt4z5MGw7m7v5+IaAmfq4K+KMUhV3SO P1Ew== 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=Ng3kNHM++fJXXW5T0+rcub8oXdzUFxLTshdz07gNM6Q=; b=VHZoRB4mT1CLopHbQ8WwnLhwOKapQLvFWQduhavj0ub40fVPXwlTZizutp52ZIYa2F i2mp08oNmtXV1wYWpaUq62qBNvu9hqmA2RJv1jlc20DhW3MPajdRNPL34lNBKZl5FFLg DSLagxLeQcXozI9erOfXvbmxrI/2DGsvSIFiCnvr5LOS4wdd7Q5pDoDk/lBAxpKf7+zW 5NCzAB96NJ/Q30+dIC4IKatthTA+916/gGwszJlVNTg+KJYVma1VAtDvbeMAP6Nf8XyR olO73HoTcuc/wAtnBwQVDTXJjbTL0QlJbh0VQzvWXjkQYIePWkz4673/qlxnpDoQLwCO 2xfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=FYig2DCu; 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 h71-20020a63834a000000b0042b92636a4fsi4119501pge.80.2022.08.31.10.51.57; Wed, 31 Aug 2022 10:52:14 -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=FYig2DCu; 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 S231302AbiHaRsD (ORCPT + 99 others); Wed, 31 Aug 2022 13:48:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33964 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229692AbiHaRsB (ORCPT ); Wed, 31 Aug 2022 13:48:01 -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 40F20BB914 for ; Wed, 31 Aug 2022 10:48:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1661968079; 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=Ng3kNHM++fJXXW5T0+rcub8oXdzUFxLTshdz07gNM6Q=; b=FYig2DCum/fdyMbCddB/EJKeeA6ELGBUjFsPSGqGB9ZeqEk4gMZ85nF23Ct4ActDwI7fRI jMWeJ+/dAWYba375MtcXnNCBn+1GQ42zPajowRnKVaNKOq7dEiDkT+IBS937aDHdvvsLEO Z8kiyjzdXQNT0EOE3NqDW+WUqGhnh8E= 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-280-nybyaUwMO1acLZusPPq0eQ-1; Wed, 31 Aug 2022 13:47:56 -0400 X-MC-Unique: nybyaUwMO1acLZusPPq0eQ-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id ECF8D1C14B61; Wed, 31 Aug 2022 17:47:55 +0000 (UTC) Received: from starship (unknown [10.40.194.96]) by smtp.corp.redhat.com (Postfix) with ESMTP id 579562026D4C; Wed, 31 Aug 2022 17:47:54 +0000 (UTC) Message-ID: Subject: Re: [PATCH 03/19] Revert "KVM: SVM: Introduce hybrid-AVIC mode" From: Maxim Levitsky To: Sean Christopherson Cc: Paolo Bonzini , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Suravee Suthikulpanit , Li RongQing Date: Wed, 31 Aug 2022 20:47:53 +0300 In-Reply-To: References: <20220831003506.4117148-1-seanjc@google.com> <20220831003506.4117148-4-seanjc@google.com> <17e776dccf01e03bce1356beb8db0741e2a13d9a.camel@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 2.78 on 10.11.54.4 X-Spam-Status: No, score=-2.1 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,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 On Wed, 2022-08-31 at 16:19 +0000, Sean Christopherson wrote: > On Wed, Aug 31, 2022, Maxim Levitsky wrote: > > On Wed, 2022-08-31 at 00:34 +0000, Sean Christopherson wrote: > > > Remove SVM's so called "hybrid-AVIC mode" and reinstate the restriction > > > where AVIC is disabled if x2APIC is enabled. The argument that the > > > "guest is not supposed to access xAPIC mmio when uses x2APIC" is flat out > > > wrong. Activating x2APIC completely disables the xAPIC MMIO region, > > > there is nothing that says the guest must not access that address. > > > > > > Concretely, KVM-Unit-Test's existing "apic" test fails the subtests that > > > expect accesses to the APIC base region to not be emulated when x2APIC is > > > enabled. > > > > > > Furthermore, allowing the guest to trigger MMIO emulation in a mode where > > > KVM doesn't expect such emulation to occur is all kinds of dangerous. > > > > > > Tweak the restriction so that it only inhibits AVIC if x2APIC is actually > > > enabled instead of inhibiting AVIC is x2APIC is exposed to the guest. > > > > > > This reverts commit 0e311d33bfbef86da130674e8528cc23e6acfe16. > > > > I don't agree with this patch. > > > > When reviewing this code I did note that MMIO is left enabled which is kind > > of errata on KVM side, and nobody objected to this. > > I didn't object because I didn't read the patch. I'm very much objecting now. > And I am *very* much objecting to reverting this patch. Best regards, Maxim Levitsky