From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f73.google.com (mail-pj1-f73.google.com [209.85.216.73]) (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 E82A024DCEF for ; Tue, 14 Oct 2025 19:06:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.73 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760468796; cv=none; b=gaaFpcZp9KYB/brlKl4fy3VxqPRrrt5sr+Pm1+VuDsoGMAMiG/ZNWu/1zjXjJtQBQcJl26rFI85ZWD9r7arkOoAuaN5mwMkSYXQieg6YTkXmAR9z7eh+DJL8vr7xCZKrQqNLrGbpCNpmiNQ6uG70XDonR/JuqZFN7xQ8CTULgSM= 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.216.73 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-pj1-f73.google.com with SMTP id 98e67ed59e1d1-339d5dbf58aso22048149a91.3 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=HcFjvXztPn5B4mMiKLAYpK8bXyZqiyr7G0WePt8KeTDH2Y3Bc8VU8UuZOQ8ziEBPfE IopMCTLZwtura8akPwOQRUkXZf1onus2Ld+ln8Bs1DMELwledKlip4G1QqllLKYZiX76 lqB5CGdol3hAWLu85KGhkFW/Ru8Aq1QorKlqAi6CqsMMdDEkPNPSk4KLXvmK4kScFhPM jcymmraywRft2fMMWzbxd/jGsyD4NiewB2yNZwWjyj34l0VDCDoM4IMC0yPeKgnwzbr0 236l933d3A0+XiFP89vbSXNlpoT+SogYZI9kP+nXXA/z4Jd04CpvSeWdxVcMyBfmEy28 y1rQ== X-Forwarded-Encrypted: i=1; AJvYcCUGUqcfnEHZalprYmpoOUuy/UGSfRwalxa8mQi9/QLCrTlnaBwcCk9P09Hy3Vi2GOLt0ps=@vger.kernel.org X-Gm-Message-State: AOJu0YwK1HF5aAjqdqFyzptbYRooUMrc65yrM0iPMnSkx0/KHrvyzeZs R5i6gghzX630adusgAPSD87xZ7m9EFrf6T8NSlaOT2d11BENypqy4rAjiH/s1vKln5AS+VcYT82 JKXICMA== 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: rcu@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