Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp3018401rdb; Fri, 22 Sep 2023 15:43:08 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGFR8++IjWJRCf/yCJvzNPBLPXXcnGhtHvXzD2YtK9AfH3BFYrzL52tBDDZoNPQck/4cSb0 X-Received: by 2002:a17:90a:bd97:b0:268:7be6:29a5 with SMTP id z23-20020a17090abd9700b002687be629a5mr1000196pjr.9.1695422588032; Fri, 22 Sep 2023 15:43:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695422588; cv=none; d=google.com; s=arc-20160816; b=rpS+/n6YkptkW+VWil//2FkDkKrlAKH5GvlmSBzGN6BBe8iSySu8JKA9i+n18eIuPN mg33T2DdBwfGHOaJzuJMUmZ08rj9oLtv2YXVv0pnWzoDHJ90L4yieo+ADmsU9hKufj59 MzAEPT3PptqS1dEUHRg8BL3AZ251GeIKYo31PZjpEtSH56G4rR3I0drJN5wfgqO2WjUB tTavWDIVHYmwu4vf772MDizsGEdxOEo7vhRNlKxD+eCnl1E/hwlYu/AkAD6k9k6BRu6M eiBidRzInigo7JkhS8MLb7rWch8GEScnpy35ykdWt0l1hDW4UGGmKXoJS6SSesA46vOy 6DiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=makqFmzriWHzRFEQqiRtYLztxtDFQhok61IdEbRa/ho=; fh=QXcc+4m3yBx8Hv8y4m7HwiZE58NT3uaF5KMylWkrkMc=; b=bswdHqDqPPqDWRRsFXAkxnFCzQqqMyCl1nKt8NURuo9FJbv4++/xqyVZc5edNjBF2y GbKf75e7glqN5Zl7zykdtJ+SFLR+GYaiOSeyUOkc9MNv37NIbstDzemH/Zbiq98k4JEo vuoyc/jaPMMtTksS1ETz6cn0IGITrTWl8bbWFXXv9bhQR+n0yx0Eeqw69JrJJcUpsLrl UQhMpUrAVWYiA34oYS38add8CFg3/vh+QeFJE7IbVI/6quDeGlV4XeO4Km7Z9Nr0zral co/iw/iBpxpuvtkN7On0F5UpQcwdp/taN5Y+XZG2caoiqmz7pCg/av5Y8R5IVrwEgGWq 59/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Q40ommVV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id o7-20020a17090aac0700b00276b35bc424si4580307pjq.26.2023.09.22.15.43.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Sep 2023 15:43:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Q40ommVV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 7A2E0838C58F; Fri, 22 Sep 2023 14:27:42 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229924AbjIVV1i (ORCPT + 99 others); Fri, 22 Sep 2023 17:27:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48682 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229705AbjIVV1h (ORCPT ); Fri, 22 Sep 2023 17:27:37 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D8E9AAF for ; Fri, 22 Sep 2023 14:26:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695418005; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=makqFmzriWHzRFEQqiRtYLztxtDFQhok61IdEbRa/ho=; b=Q40ommVVyH+mEfnhMUl349vVeQAMelJvivYjAq5LODemKBaoLd8Sv7a7yQ7jp+bMqmVmk5 vzE6l1bfj0a7zlklkJSFBLTi9U5Ed+G6ec2mb7Kb1R5y4Sp2H8mF+DtBgfpUrNEqqH+QsA Qy03dWvIzwSXzyuMMFwuOFdX6tNE/dk= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-192-8ndgFOH1N4SgOrxI_iqsFw-1; Fri, 22 Sep 2023 17:26:42 -0400 X-MC-Unique: 8ndgFOH1N4SgOrxI_iqsFw-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 66C48801779; Fri, 22 Sep 2023 21:26:41 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id 01BA449BB9A; Fri, 22 Sep 2023 21:26:40 +0000 (UTC) From: Paolo Bonzini To: Tom Lendacky Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, x86@kernel.org, Sean Christopherson , Borislav Petkov , Dave Hansen , Ingo Molnar , Thomas Gleixner , Babu Moger Subject: Re: [PATCH v2 0/3] SEV-ES TSC_AUX virtualization fix and optimization Date: Fri, 22 Sep 2023 17:24:55 -0400 Message-Id: <20230922212453.1115016-1-pbonzini@redhat.com> In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-Spam-Status: No, score=2.7 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Fri, 22 Sep 2023 14:27:44 -0700 (PDT) X-Spam-Level: ** Queued, thanks. The part that stood out in patch 2 is the removal of svm_clr_intercept(), which also applies when the initialization is done in the wrong place. Either way, svm_clr_intercept() is always going to be called by svm_recalc_instruction_intercepts() if guest has the RDTSC bit in its CPUID. So I extracted that into a separate patch and squashed the rest of patch 2 into patch 1. Paolo