Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp3251352rwd; Mon, 29 May 2023 07:48:30 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4clJbAmuQ5jyWh9SWRyNLS9euvxUHo1gDtTERZRZl5oo8gyBmH88dS1L5dpW4O3N3KQieX X-Received: by 2002:a05:6a21:339c:b0:10b:92b8:9845 with SMTP id yy28-20020a056a21339c00b0010b92b89845mr11357710pzb.7.1685371710211; Mon, 29 May 2023 07:48:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685371710; cv=none; d=google.com; s=arc-20160816; b=fT823SEY4qIKQMDc4lk0g67RP9eRo8H6V5lxQwhjb74AGbagqmpR9/RAxzu8WmMdYn HHZ/F24uoANl9CgIERWWDLi45MB5enJITrXGYKVW8VCecozAqsKkuuF8s/uvKT+zG07l cW9G+pxbUcd05lna46urvjPERQflYQ0RVROEcu2YRIiybPkeY9E4ZJFKRiFi0/nx3kb8 FZxZMLlyBp/le2j5f8OYVsaktHK3lTI9lUOEk7xyjOU3engmJqySvXMFSsROegGahB8T DIvCt35jSea/CgWeuhyYsACY0U/oVu0ahGvXdY7NHstZvh+fHJP/9gLhfvnZdSOzWGkD pjhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=3G0tjgLaByKBQEVUEO/ofZvDTdqBJJR2GepbSwtmumE=; b=AspPEKlUjYTFnwr6yYBu3Hynto0mH7V0WyekoEx7wjfehikmR8zHcgLjpNpEKuMSTv JakNXhsTtX6hGgnLNsi5luhc8gRyKFF1rvTGjK5fNeicSjlhSB6Iw2BNnDHQWiI579u+ Du/8jfKBht0/L2PELsKs/Fa5P6AyUg6jmrXUg0GfgDk341pHUWiMqpiIQuseRKsx7lkd jdgRT+YRvjcMppKaGWgce4+fsPXh8BLK9+luShEOg0rzlKeilr5u2x7DdzT5I1QMCxc6 otKIiVLbnSzV18jd93xjagoYMjm+75QT9CMw2KnLBFsv/uveakJgMQY8WCi9+FLpTNvP TnCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=LAjzeJHA; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x5-20020a654145000000b00530b3b98fc5si9374419pgp.417.2023.05.29.07.48.09; Mon, 29 May 2023 07:48: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=@gmail.com header.s=20221208 header.b=LAjzeJHA; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230092AbjE2OhM (ORCPT + 99 others); Mon, 29 May 2023 10:37:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38500 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229939AbjE2Ogu (ORCPT ); Mon, 29 May 2023 10:36:50 -0400 Received: from mail-pj1-x1036.google.com (mail-pj1-x1036.google.com [IPv6:2607:f8b0:4864:20::1036]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 46691EA; Mon, 29 May 2023 07:36:48 -0700 (PDT) Received: by mail-pj1-x1036.google.com with SMTP id 98e67ed59e1d1-2563ca70f64so1805171a91.0; Mon, 29 May 2023 07:36:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685371007; x=1687963007; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=3G0tjgLaByKBQEVUEO/ofZvDTdqBJJR2GepbSwtmumE=; b=LAjzeJHAA9CM5w69GeU03Cn5J1WovnzG2udh0exv2HAtoBqx3a8F4DMeyE/rvVn1m6 Obdk1pGH2qKn2ejazQ6Vse6THwSrnfa6XwrlBy6X5nv7ujPxZXeaesNH6dSwrX7yCDQj pHo5yGLvkCoC//hNjQSmO4zkq3ZM8a6fHkj2yWNkjqATc4exiHFqkkkN20/WcRANLf3A 5VO7ubcH2Q5wcXhHIA/d2QLz0TAQrezn6IQHyrH3AZWwFnBIv26LW/A9M7EGlTQFrqRY TKvOB9MiRJKoZsDlTmvysmXI5Or6kTElIsDcMp3RQEy8+E5aXSm78mkZ6m3r4dJM0EyL CdDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685371007; x=1687963007; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=3G0tjgLaByKBQEVUEO/ofZvDTdqBJJR2GepbSwtmumE=; b=W/FcKwMuXQ6fOsgG8Xz3Te3IZl77lbPEMRcIxMlFbEpCB2RkrSHdElQnKEe8VrBL9V /wiFeu1d1juTSln78jyCXMDHW8h9j7SjKpYPf6KOuIic619VivGx2JsGRdVlMc0TJowh FSHa/rZxRbmyaxPnXL1IoOFYgcR74muJ/X945f+3HGNKMVxj3ukj32xRdHHdKH0yKB2m TMXfiCcVqOMn6PnrmnYvuEF6g9Kj9+j41kl/BovNGDhNDnoesx+VA1FeQYUzCtxhComz vSGVCxe0F9KF7q5On+I+SatSz8DJOxNIoVEeBXg/OH5ZlzPA1M4mR6w8uhVt7W2H3xlM v5UA== X-Gm-Message-State: AC+VfDzpg0x1ZKI3/juMJ5wGCOQUfxHhHswt/XrOkJstXseJtfdI7CuN tC2+1HzBtDfA9kV691h0VFo= X-Received: by 2002:a17:90a:2a49:b0:256:4196:f722 with SMTP id d9-20020a17090a2a4900b002564196f722mr9121877pjg.47.1685371007630; Mon, 29 May 2023 07:36:47 -0700 (PDT) Received: from [192.168.255.10] ([103.7.29.32]) by smtp.gmail.com with ESMTPSA id t3-20020a17090aba8300b00256833cd9a4sm1743987pjr.54.2023.05.29.07.36.45 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 29 May 2023 07:36:47 -0700 (PDT) Message-ID: <7f3842a2-879b-2460-229e-745b7122b36a@gmail.com> Date: Mon, 29 May 2023 22:36:39 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH 5/5] KVM: x86/pmu: Hide guest counter updates from the VMRUN instruction Content-Language: en-US To: Jim Mattson , Sean Christopherson Cc: Paolo Bonzini , Ravi Bangoria , kvm@vger.kernel.org, linux-kernel@vger.kernel.org References: <20230310105346.12302-1-likexu@tencent.com> <20230310105346.12302-6-likexu@tencent.com> From: Like Xu In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,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 25/5/2023 5:30 am, Jim Mattson wrote: > Note that there's a bug in the original code for this that has > probably never been fixed: it ignores CMASK and INV in the PerfEvtSel. Regarding the emulation of CMASK, INV and PIN_CONTROL bits on vPMU, please forgive me for never having the right expectations (so there will be no correct emulation), an share more *architecture* descriptions of those hw behavior, and it would be great to have corresponding selftests as a bug report.