From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com [209.85.221.49]) (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 42D8C3B47DE for ; Sun, 16 Aug 2026 15:14:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.49 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786893295; cv=none; b=IJV3O1ptEl/hprMo/cUTme5vB3eVW/RGKCVVbTdmIo6ATXRx+UYTYPAtQwkTRThVaOVbX2Jift8t5wq0TFhtvBxaHXzrcW6qWJzsPx1HIV81UueBZIDrah7z7XiZ0FH76n7VmZBDeULMgnDBsonEJaJ3U8iFn9/iap01cDDyFFI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786893295; c=relaxed/simple; bh=oHad1wyox8qdDpY81HM8XfWbSH7UCwe0GLxzkyCErM4=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=jgZ0d2Gggnag/CUYfRvI8cxwaMQX7hRheBKhUuopFMAIuStLlM+6NqDAB/6s/L8e2GL5e5UIBSgix9NGgHVTAuJO+y5qKI8OsLSbI2n5pjDVsoWArjFZ6vp3eFb1FNynR72Ii8RTBo5DU39r55orvL6AP1imBeHz7TQP+XBuK7M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=bfv+1QI4; arc=none smtp.client-ip=209.85.221.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="bfv+1QI4" Received: by mail-wr1-f49.google.com with SMTP id ffacd0b85a97d-47fe377a217so1663505f8f.1 for ; Sun, 16 Aug 2026 08:14:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1786893292; x=1787498092; darn=vger.kernel.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=oDn1zkAJTAhRzfQXoiRfUNpmt/wvhx4bAoFeaZmIx14=; b=bfv+1QI4UV37TIKxa1TGhmFpcxlnBRLXA3kdutOATbmkmxGlaVPInNN7+AJ/aywRBQ h9zunZb2XN2eK5jSWcZMZHo+tM0A+Yw5gYyjr8hCuzt9kWLFxsz2ATY7un6PO4sJz23t d2wFNByaLUh9s7W+1mi3dLFSnBjbwvrElqjBnA8V06L/SrfPaujtc10tRlb/F4Fkr9F2 de3HaQM1KhFuBk6SxL8tgAK1zbxOaRb8Apqu8xo28DVJpHVHPE7F/+d9m+wKMhhbsFYq 05Lh0y89uoNWSLMI+tv9hquMOn6QEJp4+fqoo00S+gb5yrTY7+nx1JNnYYM3CCAoJXem /Nkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786893292; x=1787498092; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to: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=oDn1zkAJTAhRzfQXoiRfUNpmt/wvhx4bAoFeaZmIx14=; b=T9Crp37tjxxsLvpq9yUttsv2XTHjziy713cvs+BaV+x7mIWTSoePJV/crqfOGYvsO9 Y311mPZOASMRlH7ZjHaZpy5cG1tsc0RTw/sjSF7R9QELatOGFBlju+P0YkLfIRd9mpJv 0pGH0FHZrfisOtlBcpWBs1nDqpKM5M285jRYS4U5B5kXbaSveL56VblMYizWPCL+xpTN S93WS8JGNbsUaUMduo7pJpdWTTO+PT6AKwXNYxzzTKVUuTtbIVMwRDAhws6Tbvo2I4wC kSyhQR0MmOxAYmTdiL65qzVMCaZtyQ5bOK7EP17GEPGQ6qH51CDW/5XmgQm/4JuI9QA2 zlEg== X-Forwarded-Encrypted: i=1; AHgh+RoecACD4gT4riRwPvaoT573CfmUweSYJ5/Kp5mbMkFKlcqmHVCc/TqO9nSBxGmYYFQXvr9KdjEr2sG4SiQ=@vger.kernel.org X-Gm-Message-State: AOJu0YxUS2rCm/mJeIQta8B4PnBYEIUVQ+z1WoZ1zcWworBgypJc3CYD x53iWmnvoeDMTphP/QYt0ggOvycN43KBSBfUAEr1qLWp5X2NYAHj9dCD X-Gm-Gg: AR+sD12UWYPoNqYRcHY3Y7T9+mW7a/lvNmv/uB4tELY85ZLQFFQlpYeAEYkHzGoCjq1 XduWw4eTp/yE6Jsy4zxvE3Wms54Orxjytf+XBKszWMlYSzvIe2y4fuq0WgZFVfKqGqWy8GrcKOj G9/j3D27IPIWj9XlQwiwfdJEpJDCdudhKUzHxPO0rG5Kq8EzKp3UrRsof26hGkk4LdfCWlPfGp6 M3WRPXETCln36I8n2tzSwgvy+I13k2i7OAjlWz9paCKyZdr4o98qf8X8nYa6P0l5CKf1VEg2ryg /bTLyBA+Amf+xKTM5kgtiiLHOc3OhLx7EDDKYqvr5Zx4BV9+wURVtM1G9O00X+bom4/t/mMW0wn 1mhX+7YIIq+yWqvCJ9qg6hjh1b5QJzUHng3YQd+vuV5kIlxlV6vBCKca7PVvQ+mrauIPOGBw0mE TwWfp6vVJVywGpCQukUicupj8P5p2A8DPseawD4G4oSZaHJLjuG5RVZEXVl/II1bvBOSD+AAqlO 8gLVjw1n9rw5vbmCfoEpn++lg== X-Received: by 2002:a05:600c:6a10:b0:499:79ba:a754 with SMTP id 5b1f17b1804b1-49987973094mr241171505e9.11.1786893292329; Sun, 16 Aug 2026 08:14:52 -0700 (PDT) Received: from pumpkin (82-69-66-36.dsl.in-addr.zen.co.uk. [82.69.66.36]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49987b2a176sm223938615e9.4.2026.08.16.08.14.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 16 Aug 2026 08:14:52 -0700 (PDT) Date: Sun, 16 Aug 2026 16:14:50 +0100 From: David Laight To: Eric Biggers Cc: x86@kernel.org, linux-kernel@vger.kernel.org, linux-raid@vger.kernel.org, Christoph Hellwig , linux-crypto@vger.kernel.org, Herbert Xu , Taehee Yoo , netfilter-devel@vger.kernel.org, Pablo Neira Ayuso , Florian Westphal , Phil Sutter Subject: Re: [PATCH 0/6] x86: add missing vzeroupper instructions Message-ID: <20260816161450.05fd24f2@pumpkin> In-Reply-To: <20260815205750.169336-1-ebiggers@kernel.org> References: <20260815205750.169336-1-ebiggers@kernel.org> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; arm-unknown-linux-gnueabihf) 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-Transfer-Encoding: 7bit On Sat, 15 Aug 2026 13:57:44 -0700 Eric Biggers wrote: > Assembly code using YMM or ZMM registers is supposed to end with the > vzeroupper instruction in order to avoid degrading the performance of > any later SSE code. Since this only affects performance and not > correctness, it is sometimes overlooked. Most kernel code does it > correctly, but a few cases were missed. This series fixes them. > > It should be easiest to take the full series through the x86 tree. Would it be better to an an unconditional vzeroupper in kernel_fpu_end()? It could go in kernel_fpu_start() but that might have a bigger effect on latency. (I assume there is one in kernel_fpu_start() if it actually saves the user registers?) Looking the latency/uops seems reasonably on everything 'recent' except zen-1 and knights-landing. Although the microcode patch for zen-2 might make that a lot worse. David > > Eric Biggers (6): > xor: add missing vzeroupper to AVX code > raid6: add missing vzeroupper to AVX2 code > raid6: add missing vzeroupper to AVX-512 code > crypto: x86/aria - add missing vzeroupper in AVX2 code > crypto: x86/aria - add missing vzeroupper in AVX-512 code > netfilter: nft_set_pipapo_avx2: add missing vzeroupper > > arch/x86/crypto/aria-aesni-avx2-asm_64.S | 6 ++++++ > arch/x86/crypto/aria-gfni-avx512-asm_64.S | 3 +++ > lib/raid/raid6/x86/avx2.c | 6 ++++++ > lib/raid/raid6/x86/avx512.c | 6 ++++++ > lib/raid/raid6/x86/recov_avx2.c | 2 ++ > lib/raid/raid6/x86/recov_avx512.c | 2 ++ > lib/raid/xor/x86/xor-avx.c | 1 + > net/netfilter/nft_set_pipapo_avx2.c | 17 ++++++++--------- > 8 files changed, 34 insertions(+), 9 deletions(-) > > > base-commit: db2ddb87143519e20a95aa36c60b36107b736a58