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 E1F52239E63 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=1760468797; cv=none; b=oE0PvimuP1I/74wqnYiDWgZvv0PF1790LyiGn3JfP/OsoG86KR3g0hpJytIwby3/wNOMxjG1SfzLG+c9JOQBhXlFd5ZOt3zC5LJOyDG+wxRhSX4cqLPxyA3iCsVqmsso5clsVmYyE1Sa57z5r407Sjf8efE0+7cbaM6jddSmESo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760468797; c=relaxed/simple; bh=YHkoBXMGobkLQ8o+PhxXHefddsG1ieCfaB2d71pVtoU=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=Yy93ViAqr/1DL6kMZiJkVaU8g2oLYH5KBUwPzE1pNQfS7FTyOBSKKspQ3y/rWJCG9Q523F3PkovO4Fcl5zW2wTvUiajoECPRTEsTD1EMwCZedz+EkHK/nlLUN0adKIAmXp8IdqoXpQkx9rE1M7e0q/lYSWOamGGw20Ff5vHoOgs= 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=NcOobYXt; 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="NcOobYXt" Received: by mail-pg1-f202.google.com with SMTP id 41be03b00d2f7-b630753cc38so15611194a12.1 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=lists.linux.dev; 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=NcOobYXtU9AutDy6rLclSnE7jbXML4J9pPXSMrzFfdMVMLOsswUZZ/X3B9ornnAVUT 8+7VaJN0CF1MCP64IYgd3gj6lqNglBbXdOb2k1s9JClffmdyEFf0wsvLx+UCZCRFrAn4 M3sMimb2dxyHMavYT+n8nZ7TU1nExo16vW684nUv2iy2Hqyh6xnyKS8IBvfI01hrsffN FFjWFJ/g88uH71s2gNmdBq96Uj2RhLzXMP+549ro9NBHPyjp6St4xLIFP9aFuFI+YZRs mXRYhEOoNjZxNlC8WipPRE9MplxXE+hx6dS8NHA8UXShA5lIZYOWN2t3zCVtX6RRfhYN Di9w== 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=P2uGlb8h2heeafs+Zo9q9h/YbP9Q/u+vLi2MsnAdVHn8cRlUgqwdbBu3+33NJWR7uS CD+WHybDp+78GYo0pnbeEVd+icTS8v6OgquSdlmOa8HFTmii98Ft9fQByxYLpC9in5tc hu9iNvXDW0R+gRMFQ8ws9u7HL91ZNrEllbTLcn7a7Z6eRfHJ6TbqVNmsy5Lgp6b/3wA0 TVsFqYFNiVCHbrTS6WPCTYscpSgyop1GJiZ/3kHS4j9Djdr0kxjk1GodKf3DVePjd6Ga hfmTcYNluR1eeXcMWmZmz0hM9ho+OyHVENI9+OYPqsrjftLSoooXPfhPjPrCBN0o+I/d nzFA== X-Forwarded-Encrypted: i=1; AJvYcCU/hUt4OpYkudpJxxEB4RUdl2Le5lJYlAyiuTJz8Ctw9cz118QYDLBEHUsPiBO7cybdeCX2s4YAC0I=@lists.linux.dev X-Gm-Message-State: AOJu0YwJ/m8CNLqmCnATF+TSRvg7C6tObDlVlvEcbKJ+3NFT+ERHIXDr GjW5eU8ROnfv7e768iBN9k7suuZlI/gr1WV0D+7mmQX7tIBnoUViXcJGLTX4zOD5JQdDne1tabT bbbO1lA== 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: loongarch@lists.linux.dev 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