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 23105C04A6A for ; Thu, 3 Aug 2023 00:06:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233351AbjHCAGu (ORCPT ); Wed, 2 Aug 2023 20:06:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52842 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232350AbjHCAGc (ORCPT ); Wed, 2 Aug 2023 20:06:32 -0400 Received: from mail-yb1-xb49.google.com (mail-yb1-xb49.google.com [IPv6:2607:f8b0:4864:20::b49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C01E23A9F for ; Wed, 2 Aug 2023 17:06:03 -0700 (PDT) Received: by mail-yb1-xb49.google.com with SMTP id 3f1490d57ef6-d114bc2057fso368748276.3 for ; Wed, 02 Aug 2023 17:06:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1691021154; x=1691625954; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=24xpWy5jqWvnaUWcLSAqh6x2b0mz42plt2nZzdQyqhk=; b=J0wDGRo3GVgo0cQOQvYi6z+1Z9xEECkzTI0o3sOeSAfztMRUBv0/edPKcXdVgWCJoN bUCDfFYNfaRLtCy+y43YvhRDbIoeD4FrXPn0QCerDk0zwiIa77efRqrzAOpKZ1lpHnTo XT+it1KSz15jDTo69J0uHerP9G7HuXFQZGLDa/fpIwCKafjhUpaShneLrzRcRyUD/85l 71nmJqWRNT9PhBXMISpzibjMCVWN22es9FNI8OCdF0YX/8G2Loi0sgWJTm9G6vo8SutM bFe76GDNCL9EJk2+gVB4Nz4hpnV8MKjJh692U6w6wVr9AgD5Fr6/rGTaOis2kViFzGBr 8HxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691021154; x=1691625954; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=24xpWy5jqWvnaUWcLSAqh6x2b0mz42plt2nZzdQyqhk=; b=ImJlSL7wxhnt+f3AW2NnfUjDpgSdmUm3IyyVK/Qv676csi9e4nDUTxlfonWzqk06F7 WsLkiaXH1q5GMKc7jCWdIgQGZkTG8NuBtRuhS6PCw3Pc8u4ofzTRSHMbS6y2BUyMEKzc mFDZkiEnVdw2TG+PWiOkYilW3C8VTIwtaRApzYWXWd5JhcLLZp8XTlLOAVRAXRlBpGix QvfnztfOmUiTvCzswUQTzBfkyorC2fDyup2Q74JzfcwHTncbh3Cnftpji+Jd9KRq/cFW cp94mQ2feueQLO0i31MryJyp7t+VtPBg5cISZBEvtu4aUUmU9tohBl+/tsFAnNpbu/9E kujg== X-Gm-Message-State: ABy/qLY+/pBQC4Fk5EW9/Crk2fXkJY16gzf15/A42jqiA9QCqAqCAlo2 TwIHkBwMOh6FE7DIaxsmaVtbSCgR9NU= X-Google-Smtp-Source: APBJJlEmoDryPaAQoynG+0QllaP7SCbPdVOfYdjwezb/OIO5nbMPPapZeNIsHeV5kRXSKPVLYXRDkBg6IHU= X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a05:6902:1582:b0:d0a:353b:b93b with SMTP id k2-20020a056902158200b00d0a353bb93bmr144582ybu.3.1691021154336; Wed, 02 Aug 2023 17:05:54 -0700 (PDT) Date: Wed, 2 Aug 2023 17:05:51 -0700 In-Reply-To: <20230721233858.2343941-1-seanjc@google.com> Mime-Version: 1.0 References: <20230721233858.2343941-1-seanjc@google.com> X-Mailer: git-send-email 2.41.0.585.gd2178a4bd4-goog Message-ID: <169101967698.1829360.6805677761713115883.b4-ty@google.com> Subject: Re: [PATCH] KVM: VMX: Drop manual TLB flush when migrating vmcs.APIC_ACCESS_ADDR From: Sean Christopherson To: Sean Christopherson , Paolo Bonzini Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Yu Zhang , Jim Mattson Content-Type: text/plain; charset="utf-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 21 Jul 2023 16:38:58 -0700, Sean Christopherson wrote: > Remove the superfluous flush of the current TLB in VMX's handling of > migration of the APIC-access page, as a full TLB flush on all vCPUs will > have already been performed in response to kvm_unmap_gfn_range() *if* > there were SPTEs pointing at the APIC-access page. And if there were no > valid SPTEs, then there can't possibly be TLB entries to flush. > > The extra flush was added by commit fb6c81984313 ("kvm: vmx: Flush TLB > when the APIC-access address changes"), with the justification of "because > the SDM says so". The SDM said, and still says: > > [...] Applied to kvm-x86 vmx, thanks! [1/1] KVM: VMX: Drop manual TLB flush when migrating vmcs.APIC_ACCESS_ADDR https://github.com/kvm-x86/linux/commit/775bc098657b -- https://github.com/kvm-x86/linux/tree/next https://github.com/kvm-x86/linux/tree/fixes