From nobody Thu Dec 18 19:40:30 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1573480923; cv=none; d=zoho.com; s=zohoarc; b=RVl9bE04p7flLfEk9MxA6V/190Irw+VDjAeSHf+evM2WWCuEzm9cn1heZcle+1EspTBM/cFjXeWX/P7968JLUVJSFjUEvaoMkWQ8iv8MimKZUwGvC7PrFlo941HOojS7TSFLrZSyYcK6pq87ybjPJkk/e+2aCtJIrnGjHM1QOhQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1573480923; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=5DB4X5iLJ3/d2bMWVzrjXamq+8t2V0zWZe29T7uLP0g=; b=eitmYJJ7psmpI/CRed9QhZxdNyba/EKR9tOXaNQUl5I3QbgV9PDzmuMavHi7jFFikvrqvtYlSmYUeyFx3VuUBP567B7gFEG0RsZdN0q9ZuQheudfRi9AJ5PTxXsbJ1l/oWwS02QB37gStr72Fl+Vsnwetjmx/9J7QMi6i1i1PFo= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1573480923908193.40302158651582; Mon, 11 Nov 2019 06:02:03 -0800 (PST) Received: from localhost ([::1]:53272 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iUAGX-0003Rz-U6 for importer@patchew.org; Mon, 11 Nov 2019 09:02:01 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:49536) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iUACo-000847-Rx for qemu-devel@nongnu.org; Mon, 11 Nov 2019 08:58:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iUACn-0006MZ-EI for qemu-devel@nongnu.org; Mon, 11 Nov 2019 08:58:10 -0500 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]:36800) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iUACn-0006MA-83 for qemu-devel@nongnu.org; Mon, 11 Nov 2019 08:58:09 -0500 Received: by mail-wr1-x431.google.com with SMTP id r10so14766227wrx.3 for ; Mon, 11 Nov 2019 05:58:09 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id t29sm20544857wrb.53.2019.11.11.05.58.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Nov 2019 05:58:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=5DB4X5iLJ3/d2bMWVzrjXamq+8t2V0zWZe29T7uLP0g=; b=zsizGan93VrdOUhqwbTx2GvHZt2QzNQayEhTg0mOQRFNKsk9rUI9qn8uW/ODAFabrL UIaBkbOb2RdHNyaTJwlEDueFoJYNGHorNXD9sFdd50QrKsu/Q1JWKA7t/K13nhVTJPf7 giXr6Zf8m/+l0V7zwjbsQU9IUfrkrEAUYn2fPYouLMfdL3CtTjvXgqb/BNLgW91ExaKj FrRn7opK7Hr9I22aNSXl4MYv27h7lKJKa24DcaJSR2iLNsUZ6e1ygVUof7pMqNwXGoGb TNY4OPT2pFogottzQVW89MCK1HbWDzycB55iitMljSSWWZmAiZ1wsPc+Lpi836HArd4W VsCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=5DB4X5iLJ3/d2bMWVzrjXamq+8t2V0zWZe29T7uLP0g=; b=hv+agWs8Lx3ECimV93vLYm/OA3FDO0makVsIgXOOs6hss59DIbm0jjpp0/Uhsa2GDj jW5vdunNzFa11gzAWHxjkwXMau0a9uVtKesYfB50PiBkazfbDlkCNQapWqtgKVnXVq+0 x+Y6YMwDYhZUWW5B2KxyhY+WKmw4dbDRIYGzZrSe/T1ymgjc/HJa3vIPGFlbMWz5PPOv yB0zAkP3MjsfkCCjmwcLIAYp7+95tznTtfs+mPE8A56/Uuhhl4ddTeLPpipsayOJrwvx 2rL8Ww8kqjIbvQ1S4RmhUTcoG8cGo1JecrvAIuLpq/ICTPws4EJepiqiqxd7//umcVqA AWrw== X-Gm-Message-State: APjAAAUod5zxPSexFVY6Ifzp7njZ3bGMXvm3LaZnhG2cN0F6whTF9wPj 8R4uX6UHdUZTzuHRe0bQM7AqMfcc9y9eJw== X-Google-Smtp-Source: APXvYqwYFbL2r1IgfaNRwO/EzGGQCc8k6wWZ2KVMlo0g6m4PldL7ueK70erzNq8Zly5uIJpQG8Msxg== X-Received: by 2002:a5d:48c8:: with SMTP id p8mr1001385wrs.318.1573480688051; Mon, 11 Nov 2019 05:58:08 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 2/3] Remove unassigned_access CPU hook Date: Mon, 11 Nov 2019 13:58:02 +0000 Message-Id: <20191111135803.14414-3-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191111135803.14414-1-peter.maydell@linaro.org> References: <20191111135803.14414-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::431 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: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) All targets have now migrated away from the old unassigned_access hook to the new do_transaction_failed hook. This means we can remove the core-code infrastructure for that hook and the code that calls it. Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Alistair Francis Message-id: 20191108173732.11816-1-peter.maydell@linaro.org --- include/hw/core/cpu.h | 24 ------------------------ accel/tcg/cputlb.c | 2 -- memory.c | 7 ------- 3 files changed, 33 deletions(-) diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h index e1c383ba846..77c6f052990 100644 --- a/include/hw/core/cpu.h +++ b/include/hw/core/cpu.h @@ -72,10 +72,6 @@ typedef enum MMUAccessType { =20 typedef struct CPUWatchpoint CPUWatchpoint; =20 -typedef void (*CPUUnassignedAccess)(CPUState *cpu, hwaddr addr, - bool is_write, bool is_exec, int opaqu= e, - unsigned size); - struct TranslationBlock; =20 /** @@ -87,8 +83,6 @@ struct TranslationBlock; * @reset_dump_flags: #CPUDumpFlags to use for reset logging. * @has_work: Callback for checking if there is work to do. * @do_interrupt: Callback for interrupt handling. - * @do_unassigned_access: Callback for unassigned access handling. - * (this is deprecated: new targets should use do_transaction_failed inste= ad) * @do_unaligned_access: Callback for unaligned access handling, if * the target defines #TARGET_ALIGNED_ONLY. * @do_transaction_failed: Callback for handling failed memory transactions @@ -175,7 +169,6 @@ typedef struct CPUClass { int reset_dump_flags; bool (*has_work)(CPUState *cpu); void (*do_interrupt)(CPUState *cpu); - CPUUnassignedAccess do_unassigned_access; void (*do_unaligned_access)(CPUState *cpu, vaddr addr, MMUAccessType access_type, int mmu_idx, uintptr_t retaddr); @@ -415,12 +408,6 @@ struct CPUState { * we store some rarely used information in the CPU context. */ uintptr_t mem_io_pc; - /* - * This is only needed for the legacy cpu_unassigned_access() hook; - * when all targets using it have been converted to use - * cpu_transaction_failed() instead it can be removed. - */ - MMUAccessType mem_io_access_type; =20 int kvm_fd; struct KVMState *kvm_state; @@ -896,17 +883,6 @@ void cpu_interrupt(CPUState *cpu, int mask); #ifdef NEED_CPU_H =20 #ifdef CONFIG_SOFTMMU -static inline void cpu_unassigned_access(CPUState *cpu, hwaddr addr, - bool is_write, bool is_exec, - int opaque, unsigned size) -{ - CPUClass *cc =3D CPU_GET_CLASS(cpu); - - if (cc->do_unassigned_access) { - cc->do_unassigned_access(cpu, addr, is_write, is_exec, opaque, siz= e); - } -} - static inline void cpu_unaligned_access(CPUState *cpu, vaddr addr, MMUAccessType access_type, int mmu_idx, uintptr_t retaddr) diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c index 68487dceb54..98221948d63 100644 --- a/accel/tcg/cputlb.c +++ b/accel/tcg/cputlb.c @@ -931,8 +931,6 @@ static uint64_t io_readx(CPUArchState *env, CPUIOTLBEnt= ry *iotlbentry, cpu_io_recompile(cpu, retaddr); } =20 - cpu->mem_io_access_type =3D access_type; - if (mr->global_locking && !qemu_mutex_iothread_locked()) { qemu_mutex_lock_iothread(); locked =3D true; diff --git a/memory.c b/memory.c index c952eabb5d2..06484c2bff2 100644 --- a/memory.c +++ b/memory.c @@ -1257,10 +1257,6 @@ static uint64_t unassigned_mem_read(void *opaque, hw= addr addr, #ifdef DEBUG_UNASSIGNED printf("Unassigned mem read " TARGET_FMT_plx "\n", addr); #endif - if (current_cpu !=3D NULL) { - bool is_exec =3D current_cpu->mem_io_access_type =3D=3D MMU_INST_F= ETCH; - cpu_unassigned_access(current_cpu, addr, false, is_exec, 0, size); - } return 0; } =20 @@ -1270,9 +1266,6 @@ static void unassigned_mem_write(void *opaque, hwaddr= addr, #ifdef DEBUG_UNASSIGNED printf("Unassigned mem write " TARGET_FMT_plx " =3D 0x%"PRIx64"\n", ad= dr, val); #endif - if (current_cpu !=3D NULL) { - cpu_unassigned_access(current_cpu, addr, true, false, 0, size); - } } =20 static bool unassigned_mem_accepts(void *opaque, hwaddr addr, --=20 2.20.1