Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp1711314lqe; Mon, 8 Apr 2024 19:03:42 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXA39u7EkbHv1m5idT0EjJdXHKkLoeiqpISsfTR/wKt0rXMAHuPL8D1STeMtinSF3B34GsMNQqBMmNB6GfABVMMxGXBbxL/Om4eeomiqw== X-Google-Smtp-Source: AGHT+IE2aNnBh5oWPnwNKzCtyEx2term+5KVJJxoSrSoPc4jbZT1w/h5w+2Ycbx2DujFY3i+6ksG X-Received: by 2002:a17:906:412:b0:a51:9916:ba77 with SMTP id d18-20020a170906041200b00a519916ba77mr6020382eja.51.1712628222049; Mon, 08 Apr 2024 19:03:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712628222; cv=pass; d=google.com; s=arc-20160816; b=yXnD44K0f7qN/Fk/g79Z9+7mfarxjSY6i6aO1yGhPwQQjIAJHxXlQTIi/Ui1zVyYlq tIxl4L9/kS9eJpBgOennq5ZibCwuihtDaAp9eEGctb5f/BPSvBhRk7ziOUf7RmVN1+Vx TZ8IO487rAehQcCZt59V3vRa838JGR1zZu76BrWzFdUYeZciD+142bcH4pwhF1rCQlPQ Dqouq144bxOO6xuEMjcAUu5eyRAxKytdFBNu17jwnGVcyPPehodwztnHXcgsYG279WM2 2x7be36Fs9gxivce9OYEbmZRnLmgxHaihfLZtBZkL/xSBOS+sziYijti6sKZ1HmDKuCW e2RQ== 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=+dYGiBB5WEe23eQKCk+AT9ArmcLUKHwTSwwrcv8shC4=; fh=D10ovMCbrfuZxtkjxMkSjN5AaQzUiPeIBfYkREKolq8=; b=0tLEEOgbHt8G7VAyC64wnq0UjkC4XXYyYPJGsu9fXqf1ZRd9oeD8BRfuuicVh2yPuH kRMgZG/kLSvUTal/vtWYJ9lyDZcr2OX19Idbc2nC/xmC8fOcI/9FuZrXNdOLNEkqw0bB P7QatOdu4ghqKm+J6UkM94aNsESRDXWGxAufRiYY1YNFTv0gjLndMX2z+5ubVctB7kUt ATF+3R6yFTJHo1lJIs/YUftmgfgY2dCRO78fws1qmrbXUupoCDAQgRtNp3PVNn2YB2Kk l0yMNpLwcTD2LvogvIF3251MfZpEGbxxkFjGOPpWLZ3lew1ByYP1+VKH6ZI11AbjJKC8 e5jw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=HFnE3gBV; 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-136120-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-136120-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id gs35-20020a1709072d2300b00a51b7582475si3373550ejc.1049.2024.04.08.19.03.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Apr 2024 19:03:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-136120-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=HFnE3gBV; 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-136120-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-136120-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 am.mirrors.kernel.org (Postfix) with ESMTPS id C562A1F21862 for ; Tue, 9 Apr 2024 02:03:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 392E851C54; Tue, 9 Apr 2024 02:03:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="HFnE3gBV" Received: from mail-yb1-f201.google.com (mail-yb1-f201.google.com [209.85.219.201]) (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 0031D51031 for ; Tue, 9 Apr 2024 02:03:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712628192; cv=none; b=cXAO65Q6J9DTWecvGuI065HvI8rcU9f2xkZp8hn1EJaeNbI3WD3rseZGa3WBNaOCWnVLM3L9ctePZx2lM7/A0BhOs6eJX4RSKxmIZYeQXF4bXB91kBC/a2Sfwj8N3pF8WlEcWNuJ90rPU95F9hsPwZFi6bcqfcF3931dfyrBs0w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712628192; c=relaxed/simple; bh=s6JCMHopGKvv+h6UvSK6+8Hj2XBavUOyse9O+LcG2qU=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=aVDX3PdwZhECNYynf2AgwuHWfcJDpZKdhOQI0LH4vrKWjlc2a8zCt9AEcBUtnybzzeMdGzUsBbHDXAkG/Hy+LyINvHJ5poE+D6zFDDMkc07IGMK2fs5kEG0YtaQmXRq31bOzxErVW/GclRGu+8Sp81EVvJEDmxxfAQzX84bATkw= 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=HFnE3gBV; arc=none smtp.client-ip=209.85.219.201 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-yb1-f201.google.com with SMTP id 3f1490d57ef6-dcdc3db67f0so7392506276.1 for ; Mon, 08 Apr 2024 19:03:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1712628190; x=1713232990; 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=+dYGiBB5WEe23eQKCk+AT9ArmcLUKHwTSwwrcv8shC4=; b=HFnE3gBVl/mU9wjEUWKjq/JG+yIuzC/Ep1bP4K4/4I4yGSqa7hhfcJUMxehygdlN2b K7oUNEOTXCQAwN2WSPdY6ApV8Urhp5QMbuHSSEfYhSzIZr+oCpHKuIX6G28fwakpi1+J +K4sFsRL7VelshO/Xfq5YuIOWUQt0v176Wk4Sku3Pex3NOXphjtMDBoXcV3YVumAMsvz DmLEMzce0FdPLGVPH8tjpcKrEUqHHFrFF6NIxxlObaKaL6Ihue9MfmjsTLUuBJ3gDYeF KjhTuF04jkK84hGe0tH4Mq5aofyKj8MqCVu3n1aYjqniXdAKq5IWlB8cfbq92RC5iWMB Gj9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712628190; x=1713232990; 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=+dYGiBB5WEe23eQKCk+AT9ArmcLUKHwTSwwrcv8shC4=; b=LTagYGrgL3OY5tsCEYaI8ETHjDCe5MipEepsnGp7MP4MDr8tvbqWqOIo+FMDYsVxT5 7VncW4pqy9PHjbzwiH0fj/Hb4nPFuYwoH7bAMyH7gEwa7nCbZoHVN8u2/n543RPBBOxo J8OcpJ/1Zx2OmKzwwlJpvWSHLT8GeaeVbfVbzQkCzM6PXPYP+Yz0lw88gihfz5SQENNO knEWITODT86ovbiS9ja3eCIGxLquJRQjmHY/M7Oof5zjA/jISIfoI884GC5BoyEHSp+p uS9cK/fRfBqjLwkjjarVqtj9oCc++c7H0s5MGxez0+3VZoA6IF/BysDE/rA34xiuPSzr SvoA== X-Forwarded-Encrypted: i=1; AJvYcCVxCs4FZAL7NecXn79a3GyTSgWUie34vZ41CBEk+2PXVo7Sv9jSE9xc2ZYHR42J09AcHQtujPbu2s+yQ+lCjS/3IBxgV13nQtfpM17z X-Gm-Message-State: AOJu0Yy1m34IySPJQINcxTGigwa2nGYkFA0Rp0u745vaLE98/65tLtdF bb5cKw8Kogj59BzP3a+0l+NySMAJiVxbBNUD9xKZWaNhTtJP364OwYCTd29Rvrp53Qu/fgy5HUL 9SQ== X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a25:8b88:0:b0:dc7:463a:46d2 with SMTP id j8-20020a258b88000000b00dc7463a46d2mr306086ybl.0.1712628190038; Mon, 08 Apr 2024 19:03:10 -0700 (PDT) Date: Mon, 8 Apr 2024 19:01:37 -0700 In-Reply-To: <20240307005833.827147-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: <20240307005833.827147-1-seanjc@google.com> X-Mailer: git-send-email 2.44.0.478.gd926399ef9-goog Message-ID: <171262710736.1419672.15334456430797702599.b4-ty@google.com> Subject: Re: [PATCH] KVM: x86/pmu: Disable support for adaptive PEBS From: Sean Christopherson To: Sean Christopherson , Paolo Bonzini Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Like Xu , Mingwei Zhang , Zhenyu Wang , Zhang Xiong , Lv Zhiyuan , Dapeng Mi , Jim Mattson Content-Type: text/plain; charset="utf-8" On Wed, 06 Mar 2024 16:58:33 -0800, Sean Christopherson wrote: > Drop support for virtualizing adaptive PEBS, as KVM's implementation is > architecturally broken without an obvious/easy path forward, and because > exposing adaptive PEBS can leak host LBRs to the guest, i.e. can leak > host kernel addresses to the guest. > > Bug #1 is that KVM doesn't doesn't account for the upper 32 bits of > IA32_FIXED_CTR_CTRL when (re)programming fixed counters, e.g > fixed_ctrl_field() drops the upper bits, reprogram_fixed_counters() > stores local variables as u8s and truncates the upper bits too, etc. > > [...] Applied to kvm-x86 fixes, thanks! [1/1] KVM: x86/pmu: Disable support for adaptive PEBS https://github.com/kvm-x86/linux/commit/9e985cbf2942 -- https://github.com/kvm-x86/linux/tree/next