Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp1710890lqe; Mon, 8 Apr 2024 19:02:36 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV9JaoJ2QMj2N46Ap1A0VGljCYHHGmd9rkSsykgITF0YmRuit5/IHLYkaR8P2xG+tuZ10juTZEt1//zTOP/XL4h3NUBo6g/c02/RK6GFw== X-Google-Smtp-Source: AGHT+IHBd37x2Kq6v1Y+aThghZe0FcPE33fAtagaSTcX0yyWiz9Mgzj32FWvQuJ4GJW5zC6qQ39s X-Received: by 2002:a05:622a:15d4:b0:434:bf44:34bd with SMTP id d20-20020a05622a15d400b00434bf4434bdmr2325228qty.25.1712628155921; Mon, 08 Apr 2024 19:02:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712628155; cv=pass; d=google.com; s=arc-20160816; b=Im0ZddrfOEb7klikr6TGm+q312s9z/Kt+mM4xxyUJUY2Kc0DGArGEcDkGPaZOhRHn9 GpoBkEXkSXp9tQjdMkX/CBIjRVEdy+p4Gj25l7SVs1n0ROdO4h3wd6/vt0Fw/Le8/CT4 NJcPcafRIdCYQ6VDcVe1gN9K7sAXLhrEq/gMrvKVRCDFx+vmZHNoFKcWvkBFMbVu8A0D 4B5l+BH+3crzdZpj04hzQDmmzJZVSTT3TLdHm7mZw1uFI2WVeYEkjejnUVC6cXDE0vOD oU8AZYiUldt1hTAlCl0IW4YhsgoUUvyNIVWPnXnzM5bAi/8gK6ZGS7EEkP6Etc/AdCiA 6JhQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:from:subject:message-id:references:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:in-reply-to:date :dkim-signature; bh=I/9Qg7KGNzFHHNKyCZNdrvRxR6/vuhSy2raPKaP9KdQ=; fh=X16Dhxvz79I3u41UdDM9cH9a4PKu+Wb/MKtUCrOEsqY=; b=mciGM2yOckxf8AVtHmpGHGz2r5Z34imVzoB066UoLBRX+3PSlEkwIXp++H2anO6fYZ hxE7wjhssVDFscUySk/LYngiX5NlZWLkqXOEiYPUqNdbOyKOiJldNCPSK7gb/jiVgugM 1WFpqfHps40+vNXH5FT3coMOAWw6YK3aI9jEz1ijGGIGPb6Owe4PGVBLQ5Utr+yQrsdk NKUNxwgf2Y/5eeNxYK3W4zewT8gFKUrbyuf4WcSAn+Bpl8qMaU5AINxBQIFxkAYkLNej 0oh74whkbuvKHUrnsDEfehe4wEHakh2+HMu+e6l4hXyM7fLM1fsQ+BC8iLljh1lTC7jx AY+g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=o7zPDv37; arc=pass (i=1 spf=pass spfdomain=flex--seanjc.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-136116-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-136116-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id x9-20020a05622a000900b00434ccb9854esi1193922qtw.108.2024.04.08.19.02.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Apr 2024 19:02:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-136116-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=o7zPDv37; arc=pass (i=1 spf=pass spfdomain=flex--seanjc.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-136116-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-136116-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id D75721C24248 for ; Tue, 9 Apr 2024 02:02:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0722E54277; Tue, 9 Apr 2024 02:02:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="o7zPDv37" Received: from mail-yw1-f202.google.com (mail-yw1-f202.google.com [209.85.128.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9E77353E32 for ; Tue, 9 Apr 2024 02:02:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.202 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712628131; cv=none; b=ffT1LLRc36AF43JEOb4lT8nKJyLMQrpfr1phEwyCb1sB3jpeYHHgUACuAaijD5K4wmRFdmCpZllRTPhtfgxOVX+YRlOoz0pE9R7dceaj71wvA7TCXXhX37D10Et9InA51Hi//yIuK50h0u+N3QJfqZeprnKfW+3lpKXJcXmPaaQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712628131; c=relaxed/simple; bh=jI+s4ADLS0AUp2OuvikaP10RD+xAePIr1NB6aWES2II=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=ixo0ZrCJ38E1asu+kJgXq2+RINB5ZGmz203tKhDZqGieM1uC079Dogz5YuZPqHPtm78H97E6FZT9o63ii55EAAZwh1Xnhg4hqMNzfgoN6xtZWWRw9xSWKPrqrkEvgQfuUF9nIVKaq1cecpN5b1KpKY1CZVQQUm/99t6FKnZsmnU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=o7zPDv37; arc=none smtp.client-ip=209.85.128.202 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com Received: by mail-yw1-f202.google.com with SMTP id 00721157ae682-6180514a5ffso17045987b3.0 for ; Mon, 08 Apr 2024 19:02:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1712628128; x=1713232928; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=I/9Qg7KGNzFHHNKyCZNdrvRxR6/vuhSy2raPKaP9KdQ=; b=o7zPDv37XnfjaFI22DXRMSGIqvsuAFE8ySW9vMA7ciOLro0n/inKeP7nzJ0HYXQlD5 kRpdRuUapEvjLvc5TTeAteUb1VZs/R2faRsYQvBmdY+cyZt/mcnzhFY4lDCUvKuxaQDj Of0plm7BDVfo7+ToDcYGefyHuwcHH8QM9eqxaqAz2RYsdP+FSTCj6SOw5iNc/27V5s/Y AEf2O8b1x2LX1xJ2QSEHR1FGwfBj8A1x6U8rRJ/KTkgzQlv2SpybajnV9Wbo8SfIX9An GzZaZpVN8+VIZE/T3jTlcDs+KkxNrfPoNyjYU+A619ZxE2Ccqm4tTqf72zB/aNccEnA7 lJgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712628128; x=1713232928; 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=I/9Qg7KGNzFHHNKyCZNdrvRxR6/vuhSy2raPKaP9KdQ=; b=QOtHwjMlh8qImc6xhkemMmtpOt4SIUmQ4ypR8uYdtQNwp7Ca2Gk6YyskrLjN2NIClg bLwmsA0knS4s/g4K/c+5193DehyMc4oXU9OlI/nZr+0aLRxlR+twTWiXFHrQgU+5Kwna whU5QUDw41az05W4Nwbd4t/9jkC5hSPAIrAtT+ijAjz1AK7Pre+hAbHXn2Nv5ZRNWX9c R9TecfewxSzxngHdP0KGlC1sXjWWVRau4O7l2jFTUZOeo1IB3SFq7vaP6ttqIYsQN4Oz Fwfyj11lUQjLpbfYB9j/2MQZltustECLpCjmtWDuuUzie9ecD1sE+gBlPTttIalE4w0P 4O1g== X-Forwarded-Encrypted: i=1; AJvYcCWLst8u/e3A6L9s5JI5x3zhuyRjk0Z1bCZ5cLGrs4Ep1Dx8nl2TrV8aaiJ+9adv5ta+79B94d4hmbFxyKpPpn8MnWqi/kngueOM0GUh X-Gm-Message-State: AOJu0YzCOKl/JWs12w8GcvbY7ilFdjCMcLXtugGjt/z4Ank6eb/7z4TC rHZb81q101sDMXwMpboLAXrqLnoxOYrxz8xColpeKWY9KY2iSKB0yxtdfNckPjgVszHf1FUVvYF bPg== X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a81:c74d:0:b0:615:1c63:417e with SMTP id i13-20020a81c74d000000b006151c63417emr319167ywl.1.1712628128689; Mon, 08 Apr 2024 19:02:08 -0700 (PDT) Date: Mon, 8 Apr 2024 19:01:29 -0700 In-Reply-To: <20240309013641.1413400-1-seanjc@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20240309013641.1413400-1-seanjc@google.com> X-Mailer: git-send-email 2.44.0.478.gd926399ef9-goog Message-ID: <171262712105.1419825.3878505678593336929.b4-ty@google.com> Subject: Re: [PATCH 0/2] KVM: x86/pmu: Globally enable GP counters at "RESET" From: Sean Christopherson To: Sean Christopherson , Paolo Bonzini Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Babu Moger , Sandipan Das , Like Xu , Mingwei Zhang , Dapeng Mi Content-Type: text/plain; charset="utf-8" On Fri, 08 Mar 2024 17:36:39 -0800, Sean Christopherson wrote: > Globally enable GP counters in PERF_GLOBAL_CTRL when refreshing a vCPU's > PMU to emulate the architecturally defined post-RESET behavior of the MSR. > > Extend pmu_counters_test.c to verify the behavior. > > Note, this is slightly different than what I "posted" before: it keeps > PERF_GLOBAL_CTRL '0' if there are no counters. That's technically not > what the SDM dictates, but I went with the common sense route of > interpreting the SDM to mean "globally enable all GP counters". > > [...] Applied to kvm-x86 fixes, thanks! [1/2] KVM: x86/pmu: Set enable bits for GP counters in PERF_GLOBAL_CTRL at "RESET" https://github.com/kvm-x86/linux/commit/de120e1d692d [2/2] KVM: selftests: Verify post-RESET value of PERF_GLOBAL_CTRL in PMCs test https://github.com/kvm-x86/linux/commit/08a828249b16 -- https://github.com/kvm-x86/linux/tree/next