Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp2769755iog; Mon, 20 Jun 2022 04:32:31 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tXcQ66P94Md1h3/R2kkIRjF98RFQtjFeSfyv9OHs1SonY5R7wfBEKWrcgw3+8KKY0rC5Qd X-Received: by 2002:a17:902:d718:b0:168:d9df:4f1c with SMTP id w24-20020a170902d71800b00168d9df4f1cmr23479562ply.41.1655724750839; Mon, 20 Jun 2022 04:32:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655724750; cv=none; d=google.com; s=arc-20160816; b=xfujk3V0Qc4gc4hTiJ+lROIODCLWX2+prrLJoesnne3lEOzixZtNYgCkYrZhushWFy Ixsk+1On9LWmNtbTAqsS6/06gij1AS7c1P7JE3BIfFhTHY7sTBsNHwzBsCbGGU5+KYhz WjYWGplI4Fjgol0yvR6u8KqI8M5t+tIoJRaF0RDwERf631bZE8C5w3jLbyajwO5fSrt9 E1gn+YRv/I2SR2J/SoznaFTzOdSF7br9Z7ZTAzxM/kZGHu9T2GCXt1uejDH8kjDwDOyc eR5rOY6SiIya7XMbI385zha5ofT7GCf/lppGUMaBAWsz1mJAftnoqMG5GL7qgj94qlrF 774g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=4pM0n0NnhjvHVyoz73OZsIHFJqQytomiV5pDZ2zB4SY=; b=LQNS5op5BiCpFNPTPopDsffi7nI9UcV4xuCc7oAiY7KO65difu1jStVxCk2jMkcKdD r2pBoztFeMoTmB4uuw35iYAaRyU3oHyqDJ4jchrU2EbL8v/ujqmcYYT0t1g1n2vZb9dl /KI7EiQMkk5HJXQiCXcR179Vq7VuSvXevDjHLqBtvC3oWvY5+JPZHiSrxuIK5v62k6+s A/7z0A5s9D0kPUwgh4bE00HWirwfEbGMHW2HFJS3rlajs5I9PhZq9g8LrgAy1Rje6ePD kAu75RpclQPsX4oj8Hsh3ErapevXEepuZ6inX921a76owoGKKqTDHkqik4DZBQ5bkmpL UipQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Mo1UGGSh; 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=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u17-20020a170902e21100b0015852f2a130si5215890plb.620.2022.06.20.04.32.14; Mon, 20 Jun 2022 04:32:30 -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=@intel.com header.s=Intel header.b=Mo1UGGSh; 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241167AbiFTLA0 (ORCPT + 99 others); Mon, 20 Jun 2022 07:00:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51498 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240411AbiFTLAW (ORCPT ); Mon, 20 Jun 2022 07:00:22 -0400 Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3331C55AE; Mon, 20 Jun 2022 04:00:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1655722822; x=1687258822; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=5kEN8LEeudPIKeDQ20lyx4aW7nBMG8/Yp54OnqCaljs=; b=Mo1UGGShxIdhLR/5PXFaiZ5T4YOS7UFIqLlOPzPhqJOAbgpFE4gudmnG h4LEeijUb3fif4jZfJUHPMHxT08kG8wr+HSCvmPUHIk3QG60s7QqpTt1p 8YpILD9uZhaW+b3AZsXoiutNr1A4COuNtQtLtoYp4rRaeZBAibqLZv+QN XPpQfUYH4ZS1GWcKCistBJOpGl7wownbei32xmffEjFT4FdtIS74aAK7z 3YfUaMIwa6GQPaZxyrn7ZZsPuhHh4Wmfl6IUFIYio5TToZgh69agZhSi1 ooafz6SgFCRXJuSwGbhKAUkIrjkzG3y1IOC/9XGDEF06FGOXnQvRZjbxd g==; X-IronPort-AV: E=McAfee;i="6400,9594,10380"; a="341547247" X-IronPort-AV: E=Sophos;i="5.92,306,1650956400"; d="scan'208";a="341547247" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Jun 2022 04:00:21 -0700 X-IronPort-AV: E=Sophos;i="5.92,306,1650956400"; d="scan'208";a="591125969" Received: from gao-cwp.sh.intel.com (HELO gao-cwp) ([10.239.159.23]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Jun 2022 04:00:16 -0700 Date: Mon, 20 Jun 2022 19:00:02 +0800 From: Chao Gao To: Shenming Lu Cc: Zeng Guang , Paolo Bonzini , Sean Christopherson , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , kvm@vger.kernel.org, Dave Hansen , Tony Luck , Kan Liang , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , Kim Phillips , Jarkko Sakkinen , Jethro Beekman , Kai Huang , x86@kernel.org, linux-kernel@vger.kernel.org, Robert Hu , zhouyibo@bytedance.com Subject: Re: [External] [PATCH v9 9/9] KVM: VMX: enable IPI virtualization Message-ID: <20220620105957.GA9496@gao-cwp> References: <20220419154510.11938-1-guang.zeng@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, 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 Mon, Jun 20, 2022 at 06:02:32PM +0800, Shenming Lu wrote: >> + if (enable_ipiv) >> + tertiary_exec_controls_clearbit(vmx, TERTIARY_EXEC_IPI_VIRT); >> + } >> vmx_update_msr_bitmap_x2apic(vcpu); >> } > >Hi, just a small question here: > >It seems that we clear the TERTIARY_EXEC_IPI_VIRT bit before enabling >interception for APIC_ICR when deactivating APICv on some reason. >Is there any problem with this sequence? Both are done before the next vCPU entry. As long as no guest code can run between them (APICv setting takes effect in guest), this sequence shouldn't have any problem.