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 7FFF3C433F5 for ; Thu, 29 Sep 2022 22:44:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230114AbiI2WoA (ORCPT ); Thu, 29 Sep 2022 18:44:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39440 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230246AbiI2WnK (ORCPT ); Thu, 29 Sep 2022 18:43:10 -0400 Received: from mail-pj1-x102f.google.com (mail-pj1-x102f.google.com [IPv6:2607:f8b0:4864:20::102f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7F23917DC2E for ; Thu, 29 Sep 2022 15:38:48 -0700 (PDT) Received: by mail-pj1-x102f.google.com with SMTP id gf8so79371pjb.5 for ; Thu, 29 Sep 2022 15:38:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date; bh=uRYofiYnG47hAF2aDgziR8isJuYRbsZpgovud56j32A=; b=JZPVhVcSMWJOlPWPeuO7TIk2QE8xzCYuAuPJMIvNL9e/7DEG7nT1s/j0a++TuIXoJt W5tOkUQ3APGpHGPx2aDs0EQFmPuIgBA+4T0avm1Lg0UJhYZ3xUC1RzFzgaGhbslD+zEA 8NgZgevTkenFB0f0XOWYHbeCZsUerfUuHJ0MRFMwXM5XuUFT0t5SADRdJ0rMU3iZnQpx iMve53x366pyZVcyz/wlrlsM3/1JBISjrdscSFwoyHMKAyPnzbLjIdZA8bJqQmwrTVBh qX5XlvQpPaLRv1P2ont+Bp7rvzNsL9me5BwcB/JytVGVWSrVmlRW7tys/zv1TCWNsOeo isHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date; bh=uRYofiYnG47hAF2aDgziR8isJuYRbsZpgovud56j32A=; b=XTemdimQ6D2Rt6Y8+ShL1Yf8Gpd9XrTY+dN8YScC/vFS9ovgeOOfxJ+KuGGVJWr8cp nue+KXnZJe163W7awEqAMlTxPWU5fnGKua6Rv+BVs5wky6lFGVLByd0F5Qd4P96y6+4y o4YBd4IZ2uJ4YBvxgEO5aOBRLbepul3CxzFuiC0VTTXZEKvk6OzPpVKA/2fIbcgyF7mg DSP41jIEI6gtK+Nuk7LOkNOm9FXPKNp5bkN15W/oZRe6IZYvYqQSzXTPy7bFXd6T8a4k M6CUOJbQp+L41OLcBm8aDXwNrpYE6MLgvuEZpbXS9THvs8u5wyZaVG25yKkSIY0JFfKj ht6w== X-Gm-Message-State: ACrzQf3GvD6nw8eRjPEWgL69jIAwSIHQX0DBKRvIHDTr4dowAIcDHbqF YZet/J+a24X8g9PSM+JAWtzJ0A== X-Google-Smtp-Source: AMsMyM6yC6NkaBuBd+HCYZGGqRfzh1aqwwfKXWPEPMxkZ/E1X0XuzRLSKCq/ziAdT/GnArgh0pqgvg== X-Received: by 2002:a17:903:441:b0:179:f1cc:ba89 with SMTP id iw1-20020a170903044100b00179f1ccba89mr5683259plb.146.1664491089036; Thu, 29 Sep 2022 15:38:09 -0700 (PDT) Received: from google.com (7.104.168.34.bc.googleusercontent.com. [34.168.104.7]) by smtp.gmail.com with ESMTPSA id w2-20020a170902e88200b0017829a3df46sm384797plg.204.2022.09.29.15.38.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Sep 2022 15:38:08 -0700 (PDT) Date: Thu, 29 Sep 2022 22:38:04 +0000 From: Sean Christopherson To: Maxim Levitsky Cc: kvm@vger.kernel.org, Wanpeng Li , Vitaly Kuznetsov , Jani Nikula , Paolo Bonzini , Tvrtko Ursulin , Rodrigo Vivi , Zhenyu Wang , Joonas Lahtinen , Tom Lendacky , Ingo Molnar , David Airlie , Thomas Gleixner , Dave Hansen , x86@kernel.org, intel-gfx@lists.freedesktop.org, Daniel Vetter , Borislav Petkov , Joerg Roedel , linux-kernel@vger.kernel.org, Jim Mattson , Zhi Wang , Brijesh Singh , "H. Peter Anvin" , intel-gvt-dev@lists.freedesktop.org, dri-devel@lists.freedesktop.org Subject: Re: Nested AVIC design (was:Re: [RFC PATCH v3 04/19] KVM: x86: mmu: allow to enable write tracking externally) Message-ID: References: <20220427200314.276673-1-mlevitsk@redhat.com> <20220427200314.276673-5-mlevitsk@redhat.com> <5ed0d0e5a88bbee2f95d794dbbeb1ad16789f319.camel@redhat.com> <7c4cf32dca42ab84bdb427a9e4862dbf5509f961.camel@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 08, 2022, Maxim Levitsky wrote: > Hi Sean, Paolo, and everyone else who wants to review my nested AVIC work. Before we dive deep into design details, I think we should first decide whether or not nested AVIC is worth pursing/supporting. - Rome has a ucode/silicon bug with no known workaround and no anticipated fix[*]; AMD's recommended "workaround" is to disable AVIC. - AVIC is not available in Milan, which may or may not be related to the aforementioned bug. - AVIC is making a comeback on Zen4, but Zen4 comes with x2AVIC. - x2APIC is likely going to become ubiquitous, e.g. Intel is effectively requiring x2APIC to fudge around xAPIC bugs. - It's actually quite realistic to effectively force the guest to use x2APIC, at least if it's a Linux guest. E.g. turn x2APIC on in BIOS, which is often (always?) controlled by the host, and Linux will use x2APIC. In other words, given that AVIC is well on its way to becoming a "legacy" feature, IMO there needs to be a fairly strong use case to justify taking on this much code and complexity. ~1500 lines of code to support a feature that has historically been buggy _without_ nested support is going to require a non-trivial amount of effort to review, stabilize, and maintain. [*] 1235 "Guest With AVIC (Advanced Virtual Interrupt Controller) Enabled May Fail to Process IPI (Inter-Processor Interrupt) Until Guest Is Re-Scheduled" in https://www.amd.com/system/files/TechDocs/56323-PUB_1.00.pdf