Received: by 2002:ab2:69cc:0:b0:1f4:be93:e15a with SMTP id n12csp1431158lqp; Mon, 15 Apr 2024 06:32:28 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW7V8xUyqw2Js8mSeqE2mjCU2f9+x2RHqtWZ9VsUZKJyhlvxeKOwiQP0+DsATev8DofTvPK7eAqk5YYMfe6mIHlUEW/Wwa1MGbk5/ccSg== X-Google-Smtp-Source: AGHT+IH8OLie+tZi6124scU2++ds1JQCr26Fdl3K8gK84aTQki9ZPvemEGukCc/+UYvTaKc5jaYK X-Received: by 2002:a05:6a20:2446:b0:1a9:7bd:845b with SMTP id t6-20020a056a20244600b001a907bd845bmr11143675pzc.0.1713187948169; Mon, 15 Apr 2024 06:32:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713187948; cv=pass; d=google.com; s=arc-20160816; b=vD+l6Wg+ye9RxD+nXQOiKouV2wG5RGQKhP/yeRU2yDRqP1FMp/Ks7qK09R9yhT4VBs dEha9QGwJ5Kf2WzBDwnfvI1hp44Gp36lNrxMMFBvOErOxDpWMCcupPJuCNN2r74j+V7o dyfML7xAzKkrRvhA2oB8UA1aLGeWn6McIHqnR6qGi+BFPxnFlxYYs3cwbSlnVp/1sEZ/ AoN4pSAfMy54/1+XB/i6jBe097D7W4nBlVdMFhEo5Qqh9EJ+7rjd958IFoQ5l4ixU6Sy 7Bn79qCavIEdmpyWi44JxtEyq92AMIuExJ+XTqd5POzXoK1dtX7N6MtbzMPrwaAmG3df KWJw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=SXmg35GKlfduv7MXmhtmlNfK7GX2Rv8iwiDs44M8/A8=; fh=0qSLV9AqI6DfSKYlBcT4EOqioreHJ9ziUZfg3kErA9g=; b=G7DpvnMvBaDkAUfU2WhQBNI/hSYJ27jdabeJlX2vdvtdwk1MxXj/j6HqKkZCis+yUe lxogfBMDjWWkRNtWnYNtx1sbqYjmYqggCyUtck05FFe+STgw8qW3OMX1jPdViEimfKrH JfSq7N9XsRouDH4VRNoBHGVWFJ6vYdofY4FafjDdPrifR4MKPWixtp1Hep23qo3K/dDM KtfhC3xDw53AdiMhN8AmIM1d7dqrBsu0lxXMINvpTPfWxLmRTxHi8puWP4rUFuOL/LZq h8FLp8JZBiGeucFomK2c3VWrz3fuzupZ9Rr2f63uLgyjPV+AxuH8HktzRxtBAryoU2eR udcQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=ly2DVh5d; arc=pass (i=1 spf=pass spfdomain=ventanamicro.com dkim=pass dkdomain=ventanamicro.com); spf=pass (google.com: domain of linux-kernel+bounces-145237-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-145237-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id i18-20020a63cd12000000b005dcbb9ab5b7si7643947pgg.277.2024.04.15.06.32.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Apr 2024 06:32:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-145237-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=ly2DVh5d; arc=pass (i=1 spf=pass spfdomain=ventanamicro.com dkim=pass dkdomain=ventanamicro.com); spf=pass (google.com: domain of linux-kernel+bounces-145237-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-145237-linux.lists.archive=gmail.com@vger.kernel.org" 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 1CF4D284A37 for ; Mon, 15 Apr 2024 13:27:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 78E30757FB; Mon, 15 Apr 2024 13:20:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ventanamicro.com header.i=@ventanamicro.com header.b="ly2DVh5d" Received: from mail-lj1-f169.google.com (mail-lj1-f169.google.com [209.85.208.169]) (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 2BC2374E0C for ; Mon, 15 Apr 2024 13:20:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.169 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713187204; cv=none; b=BfzISTZwM6iEL6W+gvhg1ktEg/F75jjBreI+f+yDT72rOvrtdd5tOIhsuNZ+qVqrILv2qKxfOviNTRrKPz4iwWbB+iE6D87v+QwERmJGzd6sJfeZ5d6hxCoGB+2nTXVVttqubTyYeqUpeOVHnQgu/2D1vfEpMq1Y7m4faY6WiKw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713187204; c=relaxed/simple; bh=xdTgOzFrIrINaykwQW5f5NzvyMD3au3ek0a7qZ3i9fk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=VDBUZSrgDi1aW+0Jn7YDMw4if6zcD4PnkDD25NOGTT8CeFTxpqT5E+/HSsusledhtzHZmwH843i9+HDUylS4mbt5agHk2FMmbKGikCvoJYizD4Zwrb8C4t4pCbM+7oPN8DeDxanzA/c1STpIaAzyE10rBwsKNlxM3tJTMqDikDY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ventanamicro.com; spf=pass smtp.mailfrom=ventanamicro.com; dkim=pass (2048-bit key) header.d=ventanamicro.com header.i=@ventanamicro.com header.b=ly2DVh5d; arc=none smtp.client-ip=209.85.208.169 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ventanamicro.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ventanamicro.com Received: by mail-lj1-f169.google.com with SMTP id 38308e7fff4ca-2d895e2c6efso40557541fa.0 for ; Mon, 15 Apr 2024 06:20:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1713187201; x=1713792001; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=SXmg35GKlfduv7MXmhtmlNfK7GX2Rv8iwiDs44M8/A8=; b=ly2DVh5dlTjCL3gQnVXeKbGjAKC4t6dnPDYNPDY6vcU3SLeDyPJvnbZrrannOYIwsF PpMYWWww8TIpXMXtLSxb5Mx2qbyLX6dz10RXd4uwLBFYqcyeJLhPes61wyG2WCiyeoIY elimqGJMeCCNjSPMhvZ+IJaAJ39QZjyRd+B7YfSv6jOg1M+Xcvo9JJQJqHVRYnMHkOYy AssW8jxJJ9u1zz5adcHnqBqhaZClRUSuySbvQLUZj0OmvuqMQ9zA1VZyMiOqvQCz/ErL biqahfdnJiyd8WPKcCqC3Aq048cB2sYygKg452r/n5tIazsMzKRbT9EjtmsKmSNDGAfy 2ePw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713187201; x=1713792001; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=SXmg35GKlfduv7MXmhtmlNfK7GX2Rv8iwiDs44M8/A8=; b=LGwkzSA93jy8rfPhj2BxEEyrWdcATGJtuatp8iKdV+OL6E2q1VEZjPunwBN8DFjJSZ p85B9VDoU+fRvSjJqXBxkSeKUGf5G0aMArdSR8XbW02CCytrUmGDPj52vle54uhOEK19 PTthaxIsDQgjy9076Pcm7dp9m4tQuNzugsiCIRApj/xjhSpAvBqKA6H5AzjlmZ2Q5+cg h3IFEErGwxyU88JzHCpZwiinE3LutMNcPuI9sCmrlceKq+3y3IR8vi1S6iaXD7vkT2B1 Ev/Te/6HPu6fSORPSyhuHW+wqHgX/LaAEBtO5dqTGHeVTtPO+6vuqjGfDApcxooou62f 8Mug== X-Gm-Message-State: AOJu0Yz75qAtNomsrAlYjPq4mqbT41G8QoPqeYlc1WJEPpJ39cctv6Pb lMPJTze55yRZo1BL61EUVhIVpLY7mDo9t3pG4HrywHJEdivdpEQQKmQEG8HquOg= X-Received: by 2002:a2e:9b1a:0:b0:2d8:b2e:7bf3 with SMTP id u26-20020a2e9b1a000000b002d80b2e7bf3mr5838228lji.0.1713187201312; Mon, 15 Apr 2024 06:20:01 -0700 (PDT) Received: from localhost (cst2-173-16.cust.vodafone.cz. [31.30.173.16]) by smtp.gmail.com with ESMTPSA id j19-20020a05600c191300b0041663c75ef1sm16363175wmq.32.2024.04.15.06.20.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Apr 2024 06:20:00 -0700 (PDT) Date: Mon, 15 Apr 2024 15:19:59 +0200 From: Andrew Jones To: Atish Patra Cc: linux-kernel@vger.kernel.org, Anup Patel , Ajay Kaher , Albert Ou , Alexandre Ghiti , Alexey Makhalov , Atish Patra , Broadcom internal kernel review list , Conor Dooley , Juergen Gross , kvm-riscv@lists.infradead.org, kvm@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-riscv@lists.infradead.org, Mark Rutland , Palmer Dabbelt , Paolo Bonzini , Paul Walmsley , Shuah Khan , virtualization@lists.linux.dev, Will Deacon , x86@kernel.org Subject: Re: [PATCH v6 13/24] RISC-V: KVM: Implement SBI PMU Snapshot feature Message-ID: <20240415-74754b02ead9b89dcaef6d3a@orel> References: <20240411000752.955910-1-atishp@rivosinc.com> <20240411000752.955910-14-atishp@rivosinc.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240411000752.955910-14-atishp@rivosinc.com> On Wed, Apr 10, 2024 at 05:07:41PM -0700, Atish Patra wrote: > PMU Snapshot function allows to minimize the number of traps when the > guest access configures/access the hpmcounters. If the snapshot feature > is enabled, the hypervisor updates the shared memory with counter > data and state of overflown counters. The guest can just read the > shared memory instead of trap & emulate done by the hypervisor. > > This patch doesn't implement the counter overflow yet. > > Reviewed-by: Anup Patel > Signed-off-by: Atish Patra > --- > arch/riscv/include/asm/kvm_vcpu_pmu.h | 7 ++ > arch/riscv/kvm/vcpu_pmu.c | 121 +++++++++++++++++++++++++- > arch/riscv/kvm/vcpu_sbi_pmu.c | 3 + > 3 files changed, 130 insertions(+), 1 deletion(-) > Reviewed-by: Andrew Jones