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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A9F95ECAAD1 for ; Wed, 31 Aug 2022 17:48:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231315AbiHaRsE (ORCPT ); Wed, 31 Aug 2022 13:48:04 -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 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