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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 41FA2C433F5 for ; Mon, 25 Oct 2021 16:01:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2856E60EB1 for ; Mon, 25 Oct 2021 16:01:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233843AbhJYQDZ (ORCPT ); Mon, 25 Oct 2021 12:03:25 -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-Google-Smtp-Source: ABdhPJxfd0U6TdkD95vRyewvEnv+pkmAbt8gRM1KdKD5w9N0+9AMKZEnnSCWoZvj6xIN71v2dvngIg== 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. 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1D11BC433FE for ; Mon, 25 Oct 2021 16:01:14 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C8BA760EB1 for ; Mon, 25 Oct 2021 16:01:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org C8BA760EB1 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=jLtBExcsxPnnI6QuK1+3q0RwBSLBgXgW52GyFOMTs3o=; b=HcWY1NnIPfDu/6 9CQeoQgPyWYFplLoTSsP4wqDOQeTzyuBscUvRfJdZ/zCOS1V8dSDAORTuXoOkCsZSvubmByQBCuLC B3EiW7u85xn0JICmP3kbynHs7kZ4hcCA7lN8lFF7MC6NWBr8+79DYaWGfXb5NkNjarDJFE60+A9NN wUzEPFVklIIKyn/XFhwXZD7jVLBM0+Nwki7AcGVvSoPxKQjp+wBwUe1rie5Iyxc3VYgRC9yL4gXE7 1spk37+EjELCOxWCX89RQ/CaUxD8QUKm/qp1rLibkII8aUI5CgbBvfBCamTsLnw44oD97mSREoKTy Y5E4k0nK3xYi3PHrU/rg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mf2PL-00GxUI-H8; Mon, 25 Oct 2021 16:01:07 +0000 Received: from mail-pg1-x536.google.com ([2607:f8b0:4864:20::536]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mf2PG-00GxQs-2d for linux-riscv@lists.infradead.org; Mon, 25 Oct 2021 16:01:06 +0000 Received: by mail-pg1-x536.google.com with SMTP id l186so4931485pge.7 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=C54Yhsn2hbhXc5SXjQ7LVD21t2uMagP/ZFF3qZycPmpfKDFeK9520W3zt2XI9tertF x9xuoI7xctWMG+jh95tkv1v/7LrLdJJZYpBFLdM4KYdT7V1yuJKadc7YA2TkoSscOnKs LZiUvKmclLG0MawTvd++32U/mpdNUvYd2LdfPObJqz3eHXnx85nP279xb6NtUFsaXTnw T412FNJtPJO1S6qDd3k7gWlkXN0NrToNdQvCYYyMuCTxjiE4g/PkocgKg0vDQ5I3dh7V jM4pGbZPWmcD00YO+7ZtvpEv140DWQ8Y6n90f52j+xWQWI5tw/jCrWrwDdh3s4q4cqT7 /lVg== X-Gm-Message-State: AOAM531UAfaXWvKH6CXv1ys6QLUZljkzfm9K7gBWjXoF1RuiSTTw+XJV dfWqCfxBx6nIoHOeGio0vXnOcg== X-Google-Smtp-Source: ABdhPJxfd0U6TdkD95vRyewvEnv+pkmAbt8gRM1KdKD5w9N0+9AMKZEnnSCWoZvj6xIN71v2dvngIg== 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-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211025_090104_725849_73BB0783 X-CRM114-Status: GOOD ( 14.47 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.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. _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A5B66C433EF for ; Mon, 25 Oct 2021 16:01:06 +0000 (UTC) Received: from mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by mail.kernel.org (Postfix) with ESMTP id 246DD60F70 for ; Mon, 25 Oct 2021 16:01:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 246DD60F70 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.cs.columbia.edu Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id A67E44B125; Mon, 25 Oct 2021 12:01:05 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Authentication-Results: mm01.cs.columbia.edu (amavisd-new); dkim=softfail (fail, message has been altered) header.i=@google.com Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id zscNWIevOUuV; Mon, 25 Oct 2021 12:01:04 -0400 (EDT) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 8C14E4B0BF; Mon, 25 Oct 2021 12:01:04 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 560744B08E for ; Mon, 25 Oct 2021 12:01:03 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BOah12uJQ-qF for ; Mon, 25 Oct 2021 12:01:02 -0400 (EDT) Received: from mail-pg1-f173.google.com (mail-pg1-f173.google.com [209.85.215.173]) by mm01.cs.columbia.edu (Postfix) with ESMTPS id 08FC64B0E6 for ; Mon, 25 Oct 2021 12:01:01 -0400 (EDT) Received: by mail-pg1-f173.google.com with SMTP id r2so11344748pgl.10 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=SCh0Ie3T9PBdhLT0cMQgsY1Q1ua7+5mMPhsec7VYWgVkv8osqQKtqGPhADexMHJsrn vgfAyfDZ+zgpOiFQ20YCgqTz8686MfWROTpaPjWvDUYupyezMy7l3cAbQHcJ2UboV0QZ c5eOM96iJvqMhals8KddH6GaetQzXAg85ElWIAMOK/wzCGhLEv2T0uX1/GJDmF6pUK0O 1/Ev+6qWkKQXyYg+rR1re4UqyJh2T1rTL9W3EWryfN8J6ywN5MrsyLGjlofrzQ7ogRQ0 x9avnAblPnva9CWNW/cg0MP4gRG5ISXML+0a1a2iHirsM9MHe1SwF4k8G0zPKonc/O4r ExdQ== X-Gm-Message-State: AOAM531ZaEvZnlqe2ffkineZmV0N4hSWrypmXlR0EA60BD8aXJryD6VZ 6QQOwhacYvrgQgENjtmU2LdBGA== X-Google-Smtp-Source: ABdhPJxfd0U6TdkD95vRyewvEnv+pkmAbt8gRM1KdKD5w9N0+9AMKZEnnSCWoZvj6xIN71v2dvngIg== 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 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-Disposition: inline In-Reply-To: Cc: Cornelia Huck , Wanpeng Li , kvm@vger.kernel.org, David Hildenbrand , linux-kernel@vger.kernel.org, Paul Mackerras , Atish Patra , linux-riscv@lists.infradead.org, Claudio Imbrenda , kvmarm@lists.cs.columbia.edu, Janosch Frank , Marc Zyngier , Joerg Roedel , Huacai Chen , Christian Borntraeger , Aleksandar Markovic , Albert Ou , kvm-ppc@vger.kernel.org, Paul Walmsley , David Matlack , linux-arm-kernel@lists.infradead.org, Jim Mattson , Anup Patel , linux-mips@vger.kernel.org, Palmer Dabbelt , kvm-riscv@lists.infradead.org, Vitaly Kuznetsov X-BeenThere: kvmarm@lists.cs.columbia.edu X-Mailman-Version: 2.1.14 Precedence: list List-Id: Where KVM/ARM decisions are made List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kvmarm-bounces@lists.cs.columbia.edu Sender: kvmarm-bounces@lists.cs.columbia.edu 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. _______________________________________________ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7645CC433EF for ; Mon, 25 Oct 2021 16:02:38 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3C33E60ED4 for ; Mon, 25 Oct 2021 16:02:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 3C33E60ED4 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=NvzA6dVG3hb9QeBs13jvWPgd4+4jurUkOG6DPvOMWTM=; b=k3oC8bfa68owVc TgSCIuHdYblxh94opzKqcxbVO1AtBQDB2FD9bcAf6iC5UfzH29C9B3B9mzFckBYlzPVH9M/r7G2VS 8aLkF8xJtqbDHNX9kHFvmpAzTY8jYRycPn82Q5Uten0TaM9ZBd7yIMxioskIJWI/zSGlq4et5/bl0 zc+ffivOIQj/AaRC5lpFDY4SNfdxifcjtjmZ+x0ZP9+JKhKBsOYLLZFCK8qv7eB/U32vloNup1G3Z 12tuCmMrsaeOrpuAohGUgdssCGaq7V+2HisdqSqOb2vbZr3qBQW9dm4I3dTnoCwb5BCKiXCVFVzmL MrnBhwLPEecISZ0fcYXQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mf2PO-00GxV1-Nw; Mon, 25 Oct 2021 16:01:10 +0000 Received: from mail-pg1-x52d.google.com ([2607:f8b0:4864:20::52d]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mf2PG-00GxQt-1N for linux-arm-kernel@lists.infradead.org; Mon, 25 Oct 2021 16:01:06 +0000 Received: by mail-pg1-x52d.google.com with SMTP id s136so11387062pgs.4 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=mV7vmTEM4v4OI2bZ7/FeouZBoSJXdh4KTOklvfVuwhvd6qm5qo6eSH32OLJDlVep2V uXkkLg78KQ4A1hpt5WCvK+G22WhX9K71DBTYgvbZ5V3ygLnM9PBTVNQze5wTI7gDbdit 3dveSj312DK5vviSKj+GIxjIYbSQrjPm12p5pLTVJQUFu4wguj1c/cJyiFtWb17Fe3kc cREsXWC4aw2LUWKE+C253F/vLB3n5upAqnv47pt39VqmoED6qX7MZ5mV1ILvdR2blsPC 2yfzS+gSWi9yAhdy0i92jVl67tiMu2Achh9TeSXXIT2ZLNJSkeCIOIEVuMHsBzIb2bWL UI3g== X-Gm-Message-State: AOAM533tadYOa4o8vjtU3mPfcWakdfWJfpmj30sp0vC4Kl14dtVqXIBN gsfb4rToIP86Q9agNlWsdjc9eQ== X-Google-Smtp-Source: ABdhPJxfd0U6TdkD95vRyewvEnv+pkmAbt8gRM1KdKD5w9N0+9AMKZEnnSCWoZvj6xIN71v2dvngIg== 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-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211025_090104_746944_6059BFDA X-CRM114-Status: GOOD ( 15.99 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel