From patchwork Fri May 5 01:02:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 679280 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a41:0:0:0:0:0 with SMTP id v1csp91914wrs; Thu, 4 May 2023 18:13:38 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7TivM2UK6Dd4zDLwVKObFIko1CxFSJH+RaXP50EgBHrm5ZuCBZ0mRQ6U2+bismi8TgSFO/ X-Received: by 2002:a05:622a:198d:b0:3f2:1778:813c with SMTP id u13-20020a05622a198d00b003f21778813cmr150418qtc.31.1683249218428; Thu, 04 May 2023 18:13:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683249218; cv=none; d=google.com; s=arc-20160816; b=cIQyCX3TaGqtVTzMJJ2/dRSQf6LYJ62+7qU+GpB1mwPe2pmsjEesYjRa+hzX4SKvHI WXpYzNQuMVTxkPvdCF7dB8rOxnZOewkC4gtz5JEqGTkFU+1Gq00IAc8tSwWUY+IdoHyQ kfZO1tH6KZmboNWVoNcTn7RM9ln7ciPcvMixDJ38Xk9Xo364vXgJfUa66Rk1mI+2b9zu 0aWX8SjDKeqC4PW3JVYRQzW4vxzdizO/bMWQuuxYVt4jp1wU12K+5nwZAVdX1xqe4EIQ TDJc/H2NAFAS2FUHRB4oPlSKnQysAT1y+C1bo9ez+dUT8HkJoxCrAyD1uXMw7UdtYEaW EKaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Ho41lpjeATC7N1pQUPpGcon/1Mo2ide/rqHX/jMW8jQ=; b=k/hzaTJjQ3nOO+UlQ9trlbmmnAYdmLJgEKP8AzDWlQpWVY2V4ldNB0xrMbdwG3Je22 e8VDzhq5XTyZU/y0o4QJHKmBmO+8xPvxSaS1A694KETswapWhnOKyLOBwJ2PBULFMxK3 2w0d0Vy5wh83GhrKuN7wshR2wL9h97vW5QZKzNgjLgW/Xjq5pZfX/mm9G8bsGVHyof78 ngW7ghfOgPk+Vz8CocpjqbxCk4+ljR9zwuPrmDPJgb7iWDM2GrD7nAr96QhLw7YcSuVu 2iWc8jNnB7119yMlpANK95urG84pGtjEVWJrj5hp1rlzHOVx1WTgz4IQYlv3JWGlsWVi 2sfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=NO03irhh; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id z22-20020ae9c116000000b0074e010e5092si252548qki.345.2023.05.04.18.13.38 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 04 May 2023 18:13:38 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=NO03irhh; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pujvQ-0000uz-Az; Thu, 04 May 2023 21:07:56 -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 1pujvI-0000nh-HD for qemu-devel@nongnu.org; Thu, 04 May 2023 21:07:48 -0400 Received: from mail-pj1-x1034.google.com ([2607:f8b0:4864:20::1034]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pujvG-00084z-7G for qemu-devel@nongnu.org; Thu, 04 May 2023 21:07:48 -0400 Received: by mail-pj1-x1034.google.com with SMTP id 98e67ed59e1d1-24e16918323so883642a91.2 for ; Thu, 04 May 2023 18:07:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683248864; x=1685840864; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Ho41lpjeATC7N1pQUPpGcon/1Mo2ide/rqHX/jMW8jQ=; b=NO03irhhD8sXqVu/I+GddYoDrn8/cd4c+L4U9p3WWwTuLih4W6kcd+Ud3mxTyXYbAv Vj5XVf3SW9XrvWUIYzQ6KARHBKyy0jzxlSwW7hchtcsYWm9kx3qGqXzGT+3+YUWdFlEh 6wrRrN7/EFWxz7eyp2EyLFv5B88TktKNHER+z8cZlWg5MgfpfaRd0gz476+SSIT8paPF pgUJJv+Rggirf2eTDj3epoQE5NfLazIgWevWy8YKK3Xrl0zJNZaLF+QQ2yPDkT40vjwp pfn+2jJNzLmXW6KBUopdIXCBcpiRCeENV69C3xvxz3xikJa3AG/FN4dlCWTp69vQkNxU +Wtg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683248864; x=1685840864; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Ho41lpjeATC7N1pQUPpGcon/1Mo2ide/rqHX/jMW8jQ=; b=h+yri8a4CfyiEzBTCu/AUnwF9icZwnMsfngbDaLrwAX59ffTdnFJpqgcGKtLdksKfZ E0qmVkRxn3fOazD+DNicmk1LAupbsVAWUS7xTkeh3vD2I25luQj8MdegSef5SnGH+2Y8 0X8lxnEAUuDOy00hlmsnlKB00bCsn7FvFBjO4Jz3AZsPqZtKJpRgUkU4+tn5CI0XbyeN 60TSAsAeAOBIKFfC/HSMzEda7DyqquRf0YoH+5t4jwpxqXp4v6xkTpzkUFKme0leesKS z9siqu8hQf/0JpEO74ZVEVds04RxjuxzyYc70vun+uRigUnlQJ1JxTIksvLTMAy8RY6A AM3g== X-Gm-Message-State: AC+VfDzNeUcX8B6dMXtYGqn6ci8DT1vQ1CHwmnBbHz6oFeG7IjQSqEKZ lHk0p71wxtw2ypV7Rdk65Fr/ya1+N01u5w== X-Received: by 2002:a17:90b:811:b0:24e:56e4:9718 with SMTP id bk17-20020a17090b081100b0024e56e49718mr4094559pjb.15.1683248864541; Thu, 04 May 2023 18:07:44 -0700 (PDT) Received: from toolbox.alistair23.me (2403-580b-97e8-0-321-6fb2-58f1-a1b1.ip6.aussiebb.net. [2403:580b:97e8:0:321:6fb2:58f1:a1b1]) by smtp.gmail.com with ESMTPSA id l19-20020a170902d35300b0019309be03e7sm218762plk.66.2023.05.04.18.07.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 May 2023 18:07:44 -0700 (PDT) From: Alistair Francis X-Google-Original-From: Alistair Francis To: qemu-devel@nongnu.org Cc: alistair23@gmail.com, Richard Henderson , Alistair Francis , Weiwei Li , Daniel Henrique Barboza Subject: [PULL 77/89] target/riscv: Suppress pte update with is_debug Date: Fri, 5 May 2023 11:02:29 +1000 Message-Id: <20230505010241.21812-78-alistair.francis@wdc.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230505010241.21812-1-alistair.francis@wdc.com> References: <20230505010241.21812-1-alistair.francis@wdc.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1034; envelope-from=alistair23@gmail.com; helo=mail-pj1-x1034.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 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, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Richard Henderson The debugger should not modify PTE_A or PTE_D. Signed-off-by: Richard Henderson Reviewed-by: Alistair Francis Reviewed-by: Weiwei Li Tested-by: Daniel Henrique Barboza Message-Id: <20230325105429.1142530-22-richard.henderson@linaro.org> Message-Id: <20230412114333.118895-22-richard.henderson@linaro.org> Signed-off-by: Alistair Francis --- target/riscv/cpu_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/riscv/cpu_helper.c b/target/riscv/cpu_helper.c index c2d083f029..6dc3fdf594 100644 --- a/target/riscv/cpu_helper.c +++ b/target/riscv/cpu_helper.c @@ -1001,7 +1001,7 @@ restart: (access_type == MMU_DATA_STORE ? PTE_D : 0); /* Page table updates need to be atomic with MTTCG enabled */ - if (updated_pte != pte) { + if (updated_pte != pte && !is_debug) { if (!hade) { return TRANSLATE_FAIL; }