Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp329677pxb; Mon, 25 Oct 2021 09:06:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxPtHsASi0pvQZZxfOYGPIqxX7vPI2eOg/G4ZwSe85Emf0UW/6kCmtEn8PXldCJo/R0lqhC X-Received: by 2002:a50:d802:: with SMTP id o2mr26242336edj.331.1635177989807; Mon, 25 Oct 2021 09:06:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635177989; cv=none; d=google.com; s=arc-20160816; b=Zr2+7jVG58GIgTxi7jrR6/MKNchyo8BPh4BMx/7SUPMBJJXvo4wtWSvgdjLHcUblS2 hVgA9pGTdpUMeqUuc6qRR9nYt6rLGaEn3L3+wye13yC6LZ16bvyUoX+RZtlZKq+I/Unx MGEFnvocnW9AZ0I/TVrgzCZ5Jlo8j29vvVF7MnY5MmHZKnceQjMcoya3fcdcgR54SsmP fBv/0ETgqBV17lOQilVf0n6HjOzGdfC2K3j+mRaNOj3dmrNkurhKnkSc/x4f2KTg53Cu nTAToafnR5XgBGAp/LnsqmejlzkX8u2fc3mKpJVvGoPQvIiga58kBaf+i+aAyvkjDQWJ ZqIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=x6eNl6O1fSvFYqdMcRuePT95mvtM6NDjKvqXNkc5pYY=; b=Ehmxj5J8JdqrA7ksnowsT6IFjYpMYwzLG4iGSbbuEUFNdOQVo9ZHA7D3bxq/D4Ovxs KLG/rFCHq8zs+eAjUbJM0lFGXcn02onWjLjDDHvo+JCPXRVeW/6lB8DmapObdeBLi6vU 1nr3fxGN9WpqaNrcWaY+YHnjWP1nkLiGm1N0UVbT/pyCCVSukiWihTfaLKVY8GOxQXGe pCTiF08hCNzH0TWxqH0V6ncurXP2wt0KPcx9JaNdPHfUzSzJ6cQRjk3AXRy5x1g8Vhbi cCZk8grPws/n4KyV2rC1Yyv8pcmG6ie00SJEqVaKhyTIDyRaauVv1hTuCXcKneQVhk9p TU8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=W66VdzQA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cu17si22523002ejb.676.2021.10.25.09.06.04; Mon, 25 Oct 2021 09:06:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=W66VdzQA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233351AbhJYQDY (ORCPT + 99 others); Mon, 25 Oct 2021 12:03:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33484 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233734AbhJYQDX (ORCPT ); Mon, 25 Oct 2021 12:03:23 -0400 Received: from mail-pg1-x529.google.com (mail-pg1-x529.google.com [IPv6:2607:f8b0:4864:20::529]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5E4FCC061348 for ; Mon, 25 Oct 2021 09:01:01 -0700 (PDT) Received: by mail-pg1-x529.google.com with SMTP id t7so11367798pgl.9 for ; Mon, 25 Oct 2021 09:01:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=x6eNl6O1fSvFYqdMcRuePT95mvtM6NDjKvqXNkc5pYY=; b=W66VdzQAiFa1xER7EM1CT10+Eh4wcd9TMpOSeNztU9mQ/b+ICWh6L1ynZPC3b8cWCA wuqZ3JuK0JGehSxVwtqEbTHwrBlvK53p1U6E/+mtZAETvvOLRtbYFjLFwI5UloPxv8BN XlYir//YmeaaWdnkVyW1uxNuSu55EoKM4Sw+NhmN68wnM6lSDD7jC6Cq+yKsA+BDT9S7 LYFfhy6YQg08/t+jqQY9xY27FLq7qZME+IYTw4bo6b7p4vRP0wxorg/00RAZqr4kWqI+ VviR3lssvu74tKK3FhhWMgst1k6Zz5l/r1ahbN8uJfV8tyf6Q1Oq93E9u1/e6tuuAmnW 0NsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=x6eNl6O1fSvFYqdMcRuePT95mvtM6NDjKvqXNkc5pYY=; b=t+EDAiVjebVZvUdViKKq0buhILXls/KP9QC/7vIKoJLobo+rMknK5ioefa/BbUclVD 0N5PnAl2Qs4ak1UasIvs+6M1UMTakUcHK2SXypQkm3HiaCQcoE711eE/FM1PNN1Y37Si oVCXYMoouLdSkSFp+WZN07jv+5UBqn5FZZmGgAzSgrx24h3Ng1HVSs1rmFv5jZqIckjN J4E6u/VyGPIHZYOsFyNYDCxE4chL3ovqwoKXbBWXyzuhvmNsOytw7BgrJiU3zCNc6sV8 vI9FNBjaRvb42uIwSJG8Kh4fqOtqDI3qGrP2Jshg6QTiu7HZzgaDdcg+KHFudjoZK0zU 68pQ== X-Gm-Message-State: AOAM530jZMng7SA9OWa5i7a9BrEdHMj7KPW2pQqpRQYEVxUYIenkYe1F 8+tteGIIS/Mz7XbaqPIlj8RwVw== X-Received: by 2002:a63:e613:: with SMTP id g19mr14679139pgh.12.1635177660627; Mon, 25 Oct 2021 09:01:00 -0700 (PDT) Received: from google.com (157.214.185.35.bc.googleusercontent.com. [35.185.214.157]) by smtp.gmail.com with ESMTPSA id a124sm2589630pgc.15.2021.10.25.09.00.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Oct 2021 09:01:00 -0700 (PDT) Date: Mon, 25 Oct 2021 16:00:56 +0000 From: Sean Christopherson To: Paolo Bonzini Cc: Marc Zyngier , Huacai Chen , Aleksandar Markovic , Paul Mackerras , Anup Patel , Paul Walmsley , Palmer Dabbelt , Albert Ou , Christian Borntraeger , Janosch Frank , James Morse , Alexandru Elisei , Suzuki K Poulose , Atish Patra , David Hildenbrand , Cornelia Huck , Claudio Imbrenda , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-mips@vger.kernel.org, kvm@vger.kernel.org, kvm-ppc@vger.kernel.org, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, David Matlack , Oliver Upton , Jing Zhang Subject: Re: [PATCH v2 37/43] KVM: SVM: Unconditionally mark AVIC as running on vCPU load (with APICv) Message-ID: References: <20211009021236.4122790-1-seanjc@google.com> <20211009021236.4122790-38-seanjc@google.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, Oct 25, 2021, Paolo Bonzini wrote: > On 25/10/21 17:48, Sean Christopherson wrote: > > On Mon, Oct 25, 2021, Paolo Bonzini wrote: > > > On 09/10/21 04:12, Sean Christopherson wrote: > > > > + /* TODO: Document why the unblocking path checks for updates. */ > > > > > > Is that a riddle or what? :) > > > > Yes? I haven't been able to figure out why the unblocking path explicitly > > checks and handles an APICv update. > > > > Challenge accepted. In the original code, it was because without it > avic_vcpu_load would do nothing, and nothing would update the IS_RUNNING > flag. > > It shouldn't be necessary anymore since commit df7e4827c549 ("KVM: SVM: call > avic_vcpu_load/avic_vcpu_put when enabling/disabling AVIC", 2021-08-20), > where svm_refresh_apicv_exec_ctrl takes care of the avic_vcpu_load on the > next VMRUN. Aha! Thanks, I'll work in a removal for the next version.