From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) (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 C4F7D3A6B6A for ; Mon, 13 Jul 2026 08:11:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783930296; cv=none; b=vB3Qks/6koodWIT4TaSpsJMa+wRtdbIA/axOczea4XPgx3uDbCW9FcQh77+cm0yZoWaustihXbDOiJYoFBs5mXfAutqkZB0xRABS27jqPwy7w/CQaJ8hNAy6mmjUoh7hM1JCHdxPJeCVQpWviJGy+Omia0iNMx7ffMNu+Y74y8k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783930296; c=relaxed/simple; bh=7fGvB6bzcOTWAqweHpDYYnksgwceMbol98TCrcOi5NQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=JvLfJZGXAq9B03kNPnJeBJ4FFPKEx9t67s/EiPwGytnXwwJOVWzopdR4ECjQRzEA7oIRkkUFX4bsFyNJkpOoM5oaWnXJxD1j8exlehqrX2XF58adM7EI0D9f0ZUWTInzBfGkkZpHi0yzWOQClRxPmvDN2MdbNk1IQ/NSZYcYjQ8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=BXK5fYhi; arc=none smtp.client-ip=209.85.128.52 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=google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="BXK5fYhi" Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-493ba701891so26668775e9.3 for ; Mon, 13 Jul 2026 01:11:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1783930293; x=1784535093; darn=vger.kernel.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=aajWRHDOthkA/KlC0AepuzgzDYNF7pkxm830mYVcHJI=; b=BXK5fYhi3XykqRaijkCcbsDhhz3JUVSizSMMUiZyZzWsvuOrdIqkFn1gpjsNYpuXIg hhPi9mKgvXm7hE/gIhAK0cjiMzXSFEqo0qxPZcZAYblUYemOxfc947AhVCVP2e6WzPev in6TfiIOT0RaCIT6WRvdFK7F6rUf66L+Z3K49Mw4Qzq/D5VgsTfYfKivWPwq3k0Piviw h34ARcnaAAM/x5ciawbuxeR5EY0I08Njvk1m/CWrMbQv/ZYijVtwxh/mF2nrBkuMG1LX 6hMkHBfnqtaBTxldrSeAAGbKVjyZMJbVqpabbdqcGV99vLGGdGUUgf7TNNDmN+15fj/G SOtw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783930293; x=1784535093; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=aajWRHDOthkA/KlC0AepuzgzDYNF7pkxm830mYVcHJI=; b=G4l/zy+whqfcycuZ3dkn2UhYQi2Qay00rxyxaAn9c/cu4F4wkjHLPc78S7hTA5soe9 1xgZ5n4lrYK51izBcKW1QjzZrhA409I6Fdy/HkjCn1ZMhcVXMkD4X3bNZcO9Fx2tAbpR 9kcWQSURpTlPcMsslHcZODfkuDytW6gUc7QfChFj4ieIAUeEIy8DnI3uq4zoxLPoFLpB 3g8IvvlZ5M9jboq4/0Lz+asf5MN7xFOkEupmQTbc2+5qrAcdEtH9TOLov5XuJjj8QsVA Jpsv53XTwG/NocMK6gSSMA3FwY/TEOPmSrDm6TMBC9v9f6GQRxyaFVpGWRuQhNe0THaU mWMA== X-Forwarded-Encrypted: i=1; AHgh+Rpdqi8Qf4v0/8hy/T139xhy2bGlnJLdFgPZCqXCM2pUpEtg3yjopEjHdu1JqIjci5AVHu3bxZH6Jsxft68=@vger.kernel.org X-Gm-Message-State: AOJu0YzIMoKdXg6I+VPwde1QAvx1qJXlFvGOqMzGQt34+XjKlNvfavFK ctN2VQ0DviGd3kZDbCsOnxGDDdQ7J1BJEM2RdGGe0AgNS9Z+8vBn61DtmkWsffgaqw== X-Gm-Gg: AfdE7cmAzakW1fDf7sOZGqcltuKKRY0oMrg2I9j4e8PRTD3/ejK4A5Q636u+VetNJuB v3ZpVFa8e+3WKsm8WtwyXlMwlSL/p0i2AJZpi4ZeNiIK8XLmzk1JsDEDlOWohONFgc1dHnYN/ZB rcI5tOEkvKEXksu5ll+eCdOyWC0R2jpMZNRx1E67SCNFatYct7EPhcSS+EbSSDstDbw2HVkNkbT IeL76n+VhAU1+lY9x/RD8Y+yqBHVDNxxwqloc7IxkPBHxKdUpRFimoG12W6GmofN7CxAJnju75f oAgRld3uUFRDRK2Jhco8RhTOHskL7IBaJlOeu2fljyD8bhBoPRW2NDY8/6C1+EbcL/3MC8HhzV/ d1jtmQWGllfYMpMT0b3W+AFApS8OV51fwS2WFIINWzUSs6FWrO9AYV43TsO2t6OjDUrWmzEbRcO wTU4QYmS/GssHavxdSXm0IPAYSPRYv53SmfhVhMvKdG+RK8uVhUcUh2MYOmH/uTQ== X-Received: by 2002:a05:600c:6387:b0:492:3e69:a86f with SMTP id 5b1f17b1804b1-493f87d89d2mr74807055e9.1.1783930292492; Mon, 13 Jul 2026 01:11:32 -0700 (PDT) Received: from google.com (137.69.77.34.bc.googleusercontent.com. [34.77.69.137]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-493f2c8de2asm255552645e9.1.2026.07.13.01.11.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jul 2026 01:11:31 -0700 (PDT) Date: Mon, 13 Jul 2026 09:11:27 +0100 From: Vincent Donnefort To: Fuad Tabba Cc: Mostafa Saleh , linux-kernel@vger.kernel.org, kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org, maz@kernel.org, oupton@kernel.org, seiden@linux.ibm.com, joey.gouly@arm.com, suzuki.poulose@arm.com, yuzenghui@huawei.com, catalin.marinas@arm.com, will@kernel.org Subject: Re: [PATCH] KVM: arm64: Avoid naming collision in tracing Message-ID: References: <20260712153835.2264905-1-smostafa@google.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: [...] > > > > > > I did not add Fixes tag as this is currently dormant and not breaking > > > > anything. > > > > --- > > > > arch/arm64/kvm/hyp/include/nvhe/clock.h | 8 ++++---- > > > > arch/arm64/kvm/hyp/nvhe/clock.c | 4 ++-- > > > > arch/arm64/kvm/hyp/nvhe/trace.c | 4 ++-- > > > > 3 files changed, 8 insertions(+), 8 deletions(-) > > > > > > > > diff --git a/arch/arm64/kvm/hyp/include/nvhe/clock.h b/arch/arm64/kvm/hyp/include/nvhe/clock.h > > > > index 9f429f5c0664..c2ccd0e8bf22 100644 > > > > --- a/arch/arm64/kvm/hyp/include/nvhe/clock.h > > > > +++ b/arch/arm64/kvm/hyp/include/nvhe/clock.h > > > > @@ -6,11 +6,11 @@ > > > > #include > > > > > > > > #ifdef CONFIG_NVHE_EL2_TRACING > > > > -void trace_clock_update(u32 mult, u32 shift, u64 epoch_ns, u64 epoch_cyc); > > > > -u64 trace_clock(void); > > > > +void hyp_trace_clock_update(u32 mult, u32 shift, u64 epoch_ns, u64 epoch_cyc); > > > > +u64 hyp_trace_clock(void); > > > > > > hyp_trace_clock overlaps the host side: arch/arm64/kvm/hyp_trace.c > > > already has a struct hyp_trace_clock and static helpers > > > hyp_trace_clock_enable() / hyp_trace_clock_show() for the debugfs view > > > of the same clock. No actual collision, so this is only a readability > > > point, but a reader grepping hyp_trace_clock now gets two unrelated > > > things. Maybe you'd want to consider a different name, but naming is > > > hard :) If we were to rename: the clock is a "hyp_clock" so probably trace_hyp_clock() is the right thing here. while the "hyp_trace_" is the prefix for hyp_trace.c file content. Although I would like to see why we pull trace_clock() from the kernel into EL2. That bit sounds wrong and if we have a way around perhaps that's better? > > > > Yes, that shouldn't be a problem, I just added hyp_ prefix, but I > > am ok with any suggestions! > > Didn't I say naming is hard? :) How about, el2_? Not really happy with > that either tbh... but can't think of a better one... > > /fuad > > > > > Thanks, > > Mostafa > > > > > > > > Reviewed-by: Fuad Tabba > > > Tested-by: Fuad Tabba < fuad.tabba@linux.dev> > > > > > > Test: builds fine with the different config enables. > > > > > > Cheers, > > > /fuad