From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-f202.google.com (mail-pg1-f202.google.com [209.85.215.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 E1EE5238C1B for ; Tue, 14 Oct 2025 19:06:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.202 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760468796; cv=none; b=ZNcvY9gWRuAFwP1IF5i3MLNKDPCZAes2xS+0oHLY6re9TBvnpTy85zV3HXuimpI3K3VLwdYct02jswOu+QHd9g5tBwObM9JFZgzK9HeU/MTj3RKFO8rRD2gHxwgIbznuBlK3uuJVk+ci1TIxDUUnRFF0J3tScWFOisOq+UDLKLw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760468796; c=relaxed/simple; bh=YHkoBXMGobkLQ8o+PhxXHefddsG1ieCfaB2d71pVtoU=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=rjJNuepkyonJ56TPSDwJ/p6VOaCmZMI0TxA8atV3eJ04C0KZBe8q6pLdY/wHIaJJFkOmagYeqZ2/QFiM2UQE7WqPthHNBfsMXcuKK7x9SwuuE54nWaVeXclrs6ipfncaSPG6uKwofhOvLXthSyNVvcMS5JBCzjW32K7nWeor4zY= 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=c9mTlzH3; arc=none smtp.client-ip=209.85.215.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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="c9mTlzH3" Received: by mail-pg1-f202.google.com with SMTP id 41be03b00d2f7-b5edecdf94eso15587229a12.2 for ; Tue, 14 Oct 2025 12:06:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1760468794; x=1761073594; 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=NJxlV+oNDwXk+z+h9rw/7gmtAEVoUIc/lNQpO7FKflY=; b=c9mTlzH33TKdq7MgxgmTSkLCArSuZg7B4e0qDn3gZNHjLLvsabhQeY6mzURYf+WPgU U5647dVwI4KzZYLv9uRGibfg6//ulkcGUwpkewXvmBp0ti2ZSUhZZt4Q21c0qwyRqJ82 xH93ynUJSLEwrYwZJHpUa9kS/B9OpxVbHi6GPzsPwo4FJbawEnCwPPqnNLfFRLM72280 GuEdjZ+duAelDUVm7l4HTRBCPcKwPwfFyRYHGzO4jfuRnNcAI8H7uugBYKRRe1A3LC0T JvPeqkkloEWlAOFkXO1ADiaKT4lsbmdrsQx6ptNtgnT51oOA0TZXe9CTALm9IR5uyo0V BMXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1760468794; x=1761073594; 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=NJxlV+oNDwXk+z+h9rw/7gmtAEVoUIc/lNQpO7FKflY=; b=vOhKotliYKCnlz0TO93j8eIMBveH1h4+4pVcGjmxXmgxe1D8cMsCrQ46jErpyI6siO kFMEf3YZG26c/evaHaW4Cxzo89SGxesDIbdo73sLXBD7P4UPbeXycrvJOM3LNQuGaq7R TKj9o/7Luvl3hhqTzYVpVf74DFcJfhtMsJ/bZfc+Fj4tQ/38Hwk68xXVhjtu1/yU1MDz lgmibDNElzCDV/Bk7JZnaG1fDyScHazGHXtHoZ6oe+Fx/HT+ghZi5B19VkCy9an4U9/z Bllgp2mRqQwdWaaRGlhTQX/oaHDOU2MRsL/mNFwOMsEPAB7/axcHKQ7FOJU3qquUTcIe dgTg== X-Forwarded-Encrypted: i=1; AJvYcCVRyUr6sMLn64v5QrZLwnrwZmvJgzQFO/aJ9VE1a8rZ8ko67HNyXTYyG8olDA7P1FYFDezw/uVnRzxVNH/BgLO+LSM=@vger.kernel.org X-Gm-Message-State: AOJu0YwQSolTWcu+/8YDmEOd9VC9v8OtdYVgH50XaJge4BziRL9N7h2U 0RNJeAJUxv6rqtBPwyDrpZfPbvB0mV1XjyY1l4zCsB7rAWQkRcnWIDmupy1ljaem6/MHjiwXkyG YJGqw6A== X-Google-Smtp-Source: AGHT+IG9Zd3t+86XRNhfr6MOl3z2x5n36Sr6uReq0nGSm2P7jNviBzkfzWGC0x9bWFlsxNGdGfsNX6JxluA= X-Received: from pjuj14.prod.google.com ([2002:a17:90a:d00e:b0:32b:95bb:dbc]) (user=seanjc job=prod-delivery.src-stubby-dispatcher) by 2002:a17:90b:3ec5:b0:327:e018:204a with SMTP id 98e67ed59e1d1-33b50f85081mr35201870a91.0.1760468794156; Tue, 14 Oct 2025 12:06:34 -0700 (PDT) Date: Tue, 14 Oct 2025 12:06:32 -0700 In-Reply-To: Precedence: bulk X-Mailing-List: linux-trace-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251010153839.151763-1-vschneid@redhat.com> <20251010153839.151763-20-vschneid@redhat.com> Message-ID: Subject: Re: [PATCH v6 19/29] KVM: VMX: Mark vmx_l1d_should flush and vmx_l1d_flush_cond keys as allowed in .noinstr From: Sean Christopherson To: Valentin Schneider Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, rcu@vger.kernel.org, x86@kernel.org, linux-arm-kernel@lists.infradead.org, loongarch@lists.linux.dev, linux-riscv@lists.infradead.org, linux-arch@vger.kernel.org, linux-trace-kernel@vger.kernel.org, Josh Poimboeuf , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , Andy Lutomirski , Peter Zijlstra , Arnaldo Carvalho de Melo , Paolo Bonzini , Arnd Bergmann , Frederic Weisbecker , "Paul E. McKenney" , Jason Baron , Steven Rostedt , Ard Biesheuvel , Sami Tolvanen , "David S. Miller" , Neeraj Upadhyay , Joel Fernandes , Josh Triplett , Boqun Feng , Uladzislau Rezki , Mathieu Desnoyers , Mel Gorman , Andrew Morton , Masahiro Yamada , Han Shen , Rik van Riel , Jann Horn , Dan Carpenter , Oleg Nesterov , Juri Lelli , Clark Williams , Yair Podemsky , Marcelo Tosatti , Daniel Wagner , Petr Tesarik Content-Type: text/plain; charset="us-ascii" On Tue, Oct 14, 2025, Valentin Schneider wrote: > On 13/10/25 17:01, Sean Christopherson wrote: > > On Fri, Oct 10, 2025, Valentin Schneider wrote: > >> Later commits will cause objtool to warn about static keys being used in > >> .noinstr sections in order to safely defer instruction patching IPIs > >> targeted at NOHZ_FULL CPUs. > >> > >> These keys are used in .noinstr code, and can be modified at runtime > >> (/proc/kernel/vmx* write). However it is not expected that they will be > >> flipped during latency-sensitive operations, and thus shouldn't be a source > >> of interference wrt the text patching IPI. > >> > >> Mark it to let objtool know not to warn about it. > > > > Can you elaborate in the changelog on what will happen if the key is toggle? > > IIUC, smp_text_poke_batch_finish() will force IPIs if noinstr code is being > > patched. > > Right! > > > Even just a small footnote like this: > > > > Note, smp_text_poke_batch_finish() never defers IPIs if noinstr code is > > being patched, i.e. this is purely about silencing objtool warnings. > > > > to make it clear that there's no bug/race being introduced. > > Good point. How about: > > """ > Later commits will cause objtool to warn about static keys being used in > .noinstr sections in order to safely defer instruction patching IPIs > targeted at NOHZ_FULL CPUs. > > The VMX keys are used in .noinstr code, and can be modified at runtime > (/proc/kernel/vmx* write). However it is not expected that they will be > flipped during latency-sensitive operations, and thus shouldn't be a source > of interference for NOHZ_FULL CPUs wrt the text patching IPI. > > Note, smp_text_poke_batch_finish() never defers IPIs if noinstr code is > being patched, i.e. this is purely to tell objtool we're okay with updates > to that key causing IPIs and to silence the associated objtool warning. > """ LGTM. With the updated changelog, Acked-by: Sean Christopherson