Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp2677208rdh; Mon, 30 Oct 2023 04:46:09 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH4Rc71JHJqA2+LFmWqfD47RV/wQzDY6vnvBD/xyICwriBwmk5PlmQCmSflkJLVNHUZgsdv X-Received: by 2002:a17:902:eb83:b0:1b0:f8:9b2d with SMTP id q3-20020a170902eb8300b001b000f89b2dmr12948570plg.29.1698666369471; Mon, 30 Oct 2023 04:46:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698666369; cv=none; d=google.com; s=arc-20160816; b=eKDL13P37Iz6Zeg8Z2oPKr04U5uA/cF1qL2a0wUStk1ARCBENVfu1dc/fwOwQz7yL0 +XEL3feERTHUxUpmwdoPZkER97U0t/hyW5k3IP2EZqE+M7bSZk4HsUd7cHJDTm1mY9+y h6TQhoi4R21pa5gQcs51gwB/kpJri+bl1+u4Bov+l8Ri4LbxrTFhmUMeQ3B7hPM05zfP wpqDEv/Oi/+ZvLBKDXBAbqRoBH18nlVkB8/wHrY7AcMHRwlk2tbPFtL8WMgx0nokyieT MnZjgJc3sZjvWLTDfUSrdF1dVAzAOF44XRhXOJpzqkDCW8uZrttM6g+5nySVpxMXmQtP LfYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=cwVuwgnOv5r0BduS2NFCQTDkWPxIV5qbAn/Ows6hD4E=; fh=aDOWuXe1DsyAOK2Elrdm+ylnpZ5NAlspRgCgh6DN/FQ=; b=uaYMxGGfeuwQfQYfzceXnR/JAK+64/HhgWBMyfpU3b7NIOgpjHpFC4/MKavBYDgLoY xVvncJb7tgNTYi9aFcNya20Oer4XqHHfdyLT5/vOReLqxtmbne3dPN5LI6zo+Bu0M3VK 4Ekb01y/GUWzTxFMQ7/Nn8Yrwl11ENjYLB5QVn9KqfjMR43Ym9OUxKEGBwkj9p+RQIwG k+nyMDlouhOLfZbRUwKCkGOcOU38DcNYYCsOS9gutzRyTqry/i81DoKxXOv3/8+mANPY /Xv+aGFnY57gP3U+FpXH6M4iSQ7QqyrN8gafVrYWferpbwToDW6uZiXnDaLAjM/1ahT9 Vp1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b="S/jAle9c"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id s2-20020a170902ea0200b001b9f55d28a2si942911plg.205.2023.10.30.04.46.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Oct 2023 04:46:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b="S/jAle9c"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 6FBB28072810; Mon, 30 Oct 2023 04:45:19 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232654AbjJ3LpK (ORCPT + 99 others); Mon, 30 Oct 2023 07:45:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34888 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229456AbjJ3LpJ (ORCPT ); Mon, 30 Oct 2023 07:45:09 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B1CC3C5 for ; Mon, 30 Oct 2023 04:45:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=cwVuwgnOv5r0BduS2NFCQTDkWPxIV5qbAn/Ows6hD4E=; b=S/jAle9cEv4vC60/nLAV/3eums L7uQfrndiWKgTYNf738nhe/7bL49uGKYef+bR1pFxUu4jWojXwwpYWkF4UY36nIvoJYyq10kiFCab Z7QQMsuiZ/PzNTQBiZ/2ZzxkhHR9chQHFyHg7m8Rjzp1eUUiKW3uZVxW4Of14XTgbDqv0yPYwygUW MLHVxVYZX5cMoGgLLlboMmPs8eMg5A4Gz+S4Y1Vvn1QKxTRx3tvOqb0E0hIIByt1jFB/T+/f4DOLn ue+S/9/vx2iH+u7WdlCyRJXlvr2wNKfuN3Jc7i0goGlE7d5MQyu8o4TlJOMFF16nY8bEb/6rj48kq /mDRdg4Q==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1qxQhP-003rSf-BB; Mon, 30 Oct 2023 11:44:53 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id CF910300478; Mon, 30 Oct 2023 12:44:50 +0100 (CET) Date: Mon, 30 Oct 2023 12:44:50 +0100 From: Peter Zijlstra To: Richard Purdie Cc: Paul Gortmaker , Borislav Petkov , Thomas Gleixner , x86@kernel.org, linux-kernel@vger.kernel.org Subject: Re: 32 bit qemu regression from v6.5 tip pull [6c480f222128 x86/alternative: Rewrite optimize_nops() some] Message-ID: <20231030114450.GB12604@noisy.programming.kicks-ass.net> References: <20231030082644.GK26550@noisy.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Mon, 30 Oct 2023 04:45:19 -0700 (PDT) On Mon, Oct 30, 2023 at 10:55:26AM +0000, Richard Purdie wrote: > On Mon, 2023-10-30 at 09:26 +0100, Peter Zijlstra wrote: > > On Sun, Oct 29, 2023 at 02:41:46PM -0400, Paul Gortmaker wrote: > > > The TL;DR is that the Yocto folks encountered a regression in their > > > automated QA tests (after a move from v6.4 --> v6.5) where non-KVM > > > enabled boot tests on 32 bit x86 would (with ~2% frequency) splat with: > > > > You're sure you're not running into this here: > > > > https://lkml.kernel.org/r/20230706170537.95959-1-richard.henderson@linaro.org > > > > ? > > We're using qemu 8.1.0. Whilst I will get us updated to 8.1.2 and see > if that helps, I think those commits are in 8.1.0: > > $ git show cb62bd15e14e304617d250158b77d0deb032f03 > commit cb62bd15e14e304617d250158b77d0deb032f032 > Author: Richard Henderson > Date: Thu Jul 6 08:45:13 2023 +0100 > > accel/tcg: Split out cpu_exec_longjmp_cleanup > [...] > $ git tag --contains cb62bd15e14e304617d250158b77d0deb032f03 > v8.1.0 > v8.1.0-rc0 > v8.1.0-rc1 > v8.1.0-rc2 > v8.1.0-rc3 > v8.1.0-rc4 > v8.1.1 > v8.1.2 > > Similarly for: > > commit deba78709ae8ce103e2248413857747f804cd1ef > Author: Richard Henderson > Date: Thu Jul 6 17:55:48 2023 +0100 > > accel/tcg: Always lock pages before translation > > and > > commit ad17868eb162a5466d8ad43e5ccb428776403308 > Author: Richard Henderson > Date: Wed Jul 26 12:58:08 2023 -0700 > > accel/tcg: Clear tcg_ctx->gen_tb on buffer overflow > [...] > Fixes: deba78709ae8 ("accel/tcg: Always lock pages before translation") > > Both of which are also in 8.1.0. > > Is there any other patch related to those we might be missing? Not sure -- afaik that was it. Thomas was looking at this and wondered if something like the below would help? --- arch/x86/kernel/alternative.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c index 73be3931e4f0..fd44739828f7 100644 --- a/arch/x86/kernel/alternative.c +++ b/arch/x86/kernel/alternative.c @@ -1685,8 +1685,8 @@ void __init_or_module text_poke_early(void *addr, const void *opcode, } else { local_irq_save(flags); memcpy(addr, opcode, len); - local_irq_restore(flags); sync_core(); + local_irq_restore(flags); /* * Could also do a CLFLUSH here to speed up CPU recovery; but