From patchwork Wed Mar 3 21:47:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 1446919 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: 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: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=ufEWTYp3; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DrSg23Bjhz9sR4 for ; Thu, 4 Mar 2021 09:03:10 +1100 (AEDT) Received: from localhost ([::1]:47564 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lHZaF-0000Ra-4g for incoming@patchwork.ozlabs.org; Wed, 03 Mar 2021 17:03:08 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:44702) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lHZN0-0006jB-36; Wed, 03 Mar 2021 16:49:27 -0500 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]:35560) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lHZMy-0002du-6b; Wed, 03 Mar 2021 16:49:25 -0500 Received: by mail-wr1-x435.google.com with SMTP id l12so25366563wry.2; Wed, 03 Mar 2021 13:49:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=EiAs45/8RrC9+ORKHg3D6zi8PaaattSX1vXVK8lwp1c=; b=ufEWTYp3p7tj6hEz3k8BTBwooYiH8JE2gOPjzdAVZBAQxBy49PqvCSMtwHVUvmH9tO OF58jteoXSWCt2xb2zqnQgvagPNAI+6QYEg4hgQ43fTnaIOMTMeddrbjhL6ikmFZUfVj s3Ed31LBPh6fVAo1A4RqjaOvcjWhcW3DfVsXsa93SI+qM4H2BwjHwQuykHklyqvjqbSy BWcN/B40cP0uVpQjX7xyktAmzuYFO4hGvSI5E8uFSdzKUL+gRdpsV3P43lpD+QrAzHed pU1E+US1ZSbayHmCTI1+Ig7SAXB5TymhMtHeYnZMKVq2OLycCtcWtbItm9Qx+oYUso+N GVSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=EiAs45/8RrC9+ORKHg3D6zi8PaaattSX1vXVK8lwp1c=; b=atp7m6370D6aTfuZRXbPXiY1k9oYaNI3oHwHYaQJpU/mXpA1oltgZK/HgLJ+nESAS3 ZnUvLHW64/mdpCD/AZuSkAXYIrEjKdS5qkdozCWYUy+CMXgloL8jzZQvlZZRvhbKR87z Pe3TmfBNbckjkBAAjHZirXccXc4f9EXqayoml8IK/ZmXH0G18HutJZF3RBUOXnZaET9y yqXTFVldeNas6IRQLofVIYwe+puG3W5yjqVBbKZFDccAJZ724z4jG9wlVclRR942X407 Nf5GqKyTQsqLDgzRyR+kqiLvAapWNmSTN4txLdHMK3xNLfkGErP/q0r6eFC/3HH5k09g KU1Q== X-Gm-Message-State: AOAM531uYEznIbfx1J0AikML1znHIr4Wcd+ge+LOqBGC17bQhrrVbPuT MYYk4ZHOHf8vmSbqnFsB5qawLLn07To= X-Google-Smtp-Source: ABdhPJzuZWFGh3IGPE603zM6dkg+gEydT+i8E3xcrTonUKvbAsPed0eKEbxmkeJkLgl19/unaDBZEg== X-Received: by 2002:a05:6000:191:: with SMTP id p17mr813048wrx.154.1614808161082; Wed, 03 Mar 2021 13:49:21 -0800 (PST) Received: from x1w.redhat.com (68.red-83-57-175.dynamicip.rima-tde.net. [83.57.175.68]) by smtp.gmail.com with ESMTPSA id r7sm33806893wre.25.2021.03.03.13.49.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Mar 2021 13:49:20 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v4 24/28] target/xtensa: Restrict watchpoint code to system emulation Date: Wed, 3 Mar 2021 22:47:04 +0100 Message-Id: <20210303214708.1727801-25-f4bug@amsat.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210303214708.1727801-1-f4bug@amsat.org> References: <20210303214708.1727801-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::435; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-x435.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Thomas Huth , Cornelia Huck , Richard Henderson , Laurent Vivier , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Max Filippov , qemu-s390x@nongnu.org, qemu-arm@nongnu.org, qemu-ppc@nongnu.org, Claudio Fontana , Paolo Bonzini , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" We can not use watchpoints in user-mode emulation because we need the softmmu slow path to detect accesses to watchpointed memory. Add #ifdef'ry around it. Signed-off-by: Philippe Mathieu-Daudé --- target/xtensa/helper.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/target/xtensa/helper.c b/target/xtensa/helper.c index eeffee297d1..85e466b37d2 100644 --- a/target/xtensa/helper.c +++ b/target/xtensa/helper.c @@ -201,6 +201,7 @@ void xtensa_register_core(XtensaConfigList *node) g_free((gpointer)type.name); } +#ifndef CONFIG_USER_ONLY static uint32_t check_hw_breakpoints(CPUXtensaState *env) { unsigned i; @@ -213,9 +214,11 @@ static uint32_t check_hw_breakpoints(CPUXtensaState *env) } return 0; } +#endif void xtensa_breakpoint_handler(CPUState *cs) { +#ifndef CONFIG_USER_ONLY XtensaCPU *cpu = XTENSA_CPU(cs); CPUXtensaState *env = &cpu->env; @@ -231,6 +234,7 @@ void xtensa_breakpoint_handler(CPUState *cs) cpu_loop_exit_noexc(cs); } } +#endif } void xtensa_cpu_list(void)