From patchwork Thu Jun 29 08:25:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Mark Cave-Ayland X-Patchwork-Id: 1801408 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (4096-bit key; unprotected) header.d=ilande.co.uk header.i=@ilande.co.uk header.a=rsa-sha256 header.s=20220518 header.b=VQi6RxqG; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QsBNg1zHRz1yhT for ; Thu, 29 Jun 2023 18:25:55 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qEmyG-0000sX-9R; Thu, 29 Jun 2023 04:25:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qEmy9-0000p0-Cf for qemu-devel@nongnu.org; Thu, 29 Jun 2023 04:25:39 -0400 Received: from mail.ilande.co.uk ([2001:41c9:1:41f::167]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qEmy7-0003rj-3K for qemu-devel@nongnu.org; Thu, 29 Jun 2023 04:25:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=ilande.co.uk; s=20220518; h=Subject:Content-Transfer-Encoding:Content-Type: MIME-Version:Message-Id:Date:To:From:Sender:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=RNcZkPa/rKhmBl8lqIGxrWEqpXBOTKDxE9CIQX80Ino=; b=VQi6RxqGv6HkPJlfdYobZTD++Z UZjvCvEDiXgr6soYq0PueGoDKapEWuHGA9OXcY3I1NKlwaYq9f+AHHZLXwaI/zRPxCEphRKhuiF7H pQfWTsrMmZuHnTKiPS7tO5omMRzLuRNj7o1iYyxoP5RGYYUBqGOoD/B5x5UxE54Dnt8pVaZ7JJd0z dZb7MHHkqeqxiQLA3SlFNKSpF/H94NsFlN1uKtnlMEWJh06Xi/x54dfFMmoExoAEMyFmbK1RmPfqz pBPovEUMkT4/x478gFvhd7drrVx/+djt2WVbHieaybrx5vbAiDitw2LCeXAyaE7GO9F0MmJ65q6b7 Ifa8E1XLn0tAcPIE2tJj9MUFZWRjMzuzCTBJdsQuzX8E/HV1ksjfyg+1IOQMpmnRq70tDYL77sanM MTb5OpKyaC1k/yWJyFvOT8m7EPqJRrHCs4MA9oW6Xui6yAa3PlNR1b9W70wZEQ6LS0JJ/qK4VJk7o CYUYs0hG4/VzDDiNssMfJUhVpO3jWsw7jtCmCLL6e0poTQ9HZb5TFpeydFl+YIbkU/9jP4OEO1D0W OPiGH1X/BuYjUSmRysYyS67gmiLCBBA2wV3NfFNoy86HfVi05r74jSywEr29ARarBOEpCFy0NJe4p ziveRfwLCEUhTsqutjoqzwY/1znWizb68f095onps=; Received: from host86-130-37-216.range86-130.btcentralplus.com ([86.130.37.216] helo=kentang.home) by mail.ilande.co.uk with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qEmxo-000AaV-Lb; Thu, 29 Jun 2023 09:25:20 +0100 From: Mark Cave-Ayland To: richard.henderson@linaro.org, clegoate@redhat.com, hsp.cat7@gmail.com, qemu-devel@nongnu.org Date: Thu, 29 Jun 2023 09:25:20 +0100 Message-Id: <20230629082522.606219-1-mark.cave-ayland@ilande.co.uk> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-SA-Exim-Connect-IP: 86.130.37.216 X-SA-Exim-Mail-From: mark.cave-ayland@ilande.co.uk Subject: [PATCH 0/2] accel/tcg: fix page invalidation in tb_invalidate_phys_range() X-SA-Exim-Version: 4.2.1 (built Wed, 08 May 2019 21:11:16 +0000) X-SA-Exim-Scanned: Yes (on mail.ilande.co.uk) Received-SPF: pass client-ip=2001:41c9:1:41f::167; envelope-from=mark.cave-ayland@ilande.co.uk; helo=mail.ilande.co.uk X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org This series contains 2 patches: the first is a fix for page invalidation in tb_invalidate_phys_range() which resolves the crash reported by Howard and Cédric when booting MacOS 9 under qemu-system-ppc -M mac99,via=pmu. The second patch adds an assert() to tb_invalidate_phys_page_range__locked() which is enabled by --enable-debug-tcg to ensure that both the start and last addresses are within the same target page. I've confirmed that this assert() is first triggered by the commit that initially introduced the bug e506ad6a05 ("accel/tcg: Pass last not end to tb_invalidate_phys_range") when building QEMU with --enable-debug and doesn't trigger after the series is applied. Signed-off-by: Mark Cave-Ayland Mark Cave-Ayland (2): accel/tcg: fix start page passed to tb_invalidate_phys_page_range__locked() accel/tcg: add assert() check in tb_invalidate_phys_page_range__locked() accel/tcg/tb-maint.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-)