From nobody Tue Feb 10 11:32:52 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.128.53 as permitted sender) client-ip=209.85.128.53; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-f53.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.53 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1630595882; cv=none; d=zohomail.com; s=zohoarc; b=YLgPjHxRXay9mMR2gB22saq1Azk/1YZ1IVHYl+DwDbfpTOjdQsKdhG21x3rNQ/RAaL8tPk7sPlR35RP1JhXXYPDdtRWXrGk8XkCKj0VCtHVdyjr7VRKjrAgDzjDoZxtjBuc4qZNsbFi2aNV5xhCICfYn3b1yhzAQLDrbeSnW/8o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1630595882; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=qUI/GEcrThYL7vzCuO0R9Lw6aoERtFPxgcZzSbFzqgM=; b=lgjKBazoZbvsxD9AbI3W7q5SpXAXeNl7pBvIMh+gsGppzMoDUtkTHAMskAZoGtAR6WaYMGYLj4QS87mHid3GJONOJa95bEJwNy8wSijvCuAs4Tsv0cLkLfOcWkPXfjzOkeLWCVmT9dmBq0qBR2Cvs11i/Ix84nitcaKOTrmdJws= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.53 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) by mx.zohomail.com with SMTPS id 163059588268629.77687199229547; Thu, 2 Sep 2021 08:18:02 -0700 (PDT) Received: by mail-wm1-f53.google.com with SMTP id o39-20020a05600c512700b002e74638b567so1628399wms.2 for ; Thu, 02 Sep 2021 08:18:02 -0700 (PDT) Return-Path: Return-Path: Received: from x1w.. (163.red-83-52-55.dynamicip.rima-tde.net. [83.52.55.163]) by smtp.gmail.com with ESMTPSA id c13sm2120248wru.73.2021.09.02.08.17.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Sep 2021 08:18:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=qUI/GEcrThYL7vzCuO0R9Lw6aoERtFPxgcZzSbFzqgM=; b=iVe+9QqLylnt44FCv/N/bfyTajQ514saaLhXAzK5EeFT9xMeKMd1jEbb+vjCPqN5qN Hj6EIuaGURXyjORJmhtVPYv94Uen8vqsnqGTFcyOfRVX05r5frtEsMm5Pwi1nqEmK4/O X6p+NfV0JuQBExet9c7uVyJWb7XjxUfREWMA3BDlKCVF4Y4ZWpSP1QOErtpS28if2IQT h7KNQi0PSAFp1Pi6U1g93GYTTxirckdTDakyIKakBGWTT+g0v08azAwFuQHSj5+KPw0y O2ZbvWidpUAZ11OdgEd2kG5sJ4RF9TdP5/KngToSbEA5Uq1sG5Lt9nQdav43sDGf53yJ IrhQ== 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=qUI/GEcrThYL7vzCuO0R9Lw6aoERtFPxgcZzSbFzqgM=; b=jGVgVDjgDTz2M7MLmdjsqjUgqcAo85m0/ZwHctYJXReCwPeN/VQxDBupYEAZcyKKtj Ukg2f8nk34cG2gykbCSFFqa5QQkp07e6L8JQ81m7xDXXRwq27tK6EDW/FNejzmmn4rN9 fSc4CLoWswvz51K3i3Z/W/l49F450I5rpQa5e/YBHONECuv/LGCazl2vFxEE6OInFnMf nXH98y9nLBD7YrdHGnfr3nPu5Gz9hPmDi0jzbh4aOmSMRRKcOKG8S1JErvN++akYJMJv vyztcBoq6xVPHEuHwyVSJvXlQNgY8Cj+givCws9R7ftSm7SqX7pj5KQViBZAfUp1mbJb WArQ== X-Gm-Message-State: AOAM531/hFfBbItMS1yI+e4AEuKqrq+r4zQYlSo0D3LoodmF5395uQuj O+JZEuysD63h6t4zJJqcHXM= X-Google-Smtp-Source: ABdhPJzAnp+XZLE18wcnuwhy0fp4/okghnI04S0wrtOup0uMFI8bALRUb6vI89KXsNrtVvB7SCNy9w== X-Received: by 2002:a1c:4686:: with SMTP id t128mr3601905wma.183.1630595880991; Thu, 02 Sep 2021 08:18:00 -0700 (PDT) Sender: =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Yoshinori Sato , Jiaxun Yang , qemu-arm@nongnu.org, Palmer Dabbelt , Max Filippov , Warner Losh , Michael Rolnik , Stafford Horne , Paolo Bonzini , "Edgar E. Iglesias" , Bin Meng , Chris Wulff , Mark Cave-Ayland , David Gibson , Kyle Evans , Peter Maydell , Aurelien Jarno , Eduardo Habkost , Marek Vasut , Artyom Tarasenko , Aleksandar Rikalo , Greg Kurz , qemu-riscv@nongnu.org, Laurent Vivier , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , qemu-ppc@nongnu.org, Richard Henderson , Alistair Francis Subject: [PATCH 08/24] target/avr: Restrict cpu_exec_interrupt() handler to sysemu Date: Thu, 2 Sep 2021 17:16:59 +0200 Message-Id: <20210902151715.383678-9-f4bug@amsat.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210902151715.383678-1-f4bug@amsat.org> References: <20210902151715.383678-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1630595884051100001 Restrict cpu_exec_interrupt() and its callees to sysemu. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Warner Losh --- target/avr/cpu.h | 2 ++ target/avr/cpu.c | 2 +- target/avr/helper.c | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/target/avr/cpu.h b/target/avr/cpu.h index 93e3faa0a98..6f8c0ffd770 100644 --- a/target/avr/cpu.h +++ b/target/avr/cpu.h @@ -156,8 +156,10 @@ typedef struct AVRCPU { =20 extern const struct VMStateDescription vms_avr_cpu; =20 +#ifndef CONFIG_USER_ONLY void avr_cpu_do_interrupt(CPUState *cpu); bool avr_cpu_exec_interrupt(CPUState *cpu, int int_req); +#endif /* !CONFIG_USER_ONLY */ hwaddr avr_cpu_get_phys_page_debug(CPUState *cpu, vaddr addr); int avr_cpu_gdb_read_register(CPUState *cpu, GByteArray *buf, int reg); int avr_cpu_gdb_write_register(CPUState *cpu, uint8_t *buf, int reg); diff --git a/target/avr/cpu.c b/target/avr/cpu.c index ea14175ca55..e9fa54c9777 100644 --- a/target/avr/cpu.c +++ b/target/avr/cpu.c @@ -195,10 +195,10 @@ static const struct SysemuCPUOps avr_sysemu_ops =3D { static const struct TCGCPUOps avr_tcg_ops =3D { .initialize =3D avr_cpu_tcg_init, .synchronize_from_tb =3D avr_cpu_synchronize_from_tb, - .cpu_exec_interrupt =3D avr_cpu_exec_interrupt, .tlb_fill =3D avr_cpu_tlb_fill, =20 #ifndef CONFIG_USER_ONLY + .cpu_exec_interrupt =3D avr_cpu_exec_interrupt, .do_interrupt =3D avr_cpu_do_interrupt, #endif /* !CONFIG_USER_ONLY */ }; diff --git a/target/avr/helper.c b/target/avr/helper.c index 981c29da453..84e366d94a3 100644 --- a/target/avr/helper.c +++ b/target/avr/helper.c @@ -25,6 +25,7 @@ #include "exec/address-spaces.h" #include "exec/helper-proto.h" =20 +#ifndef CONFIG_USER_ONLY bool avr_cpu_exec_interrupt(CPUState *cs, int interrupt_request) { bool ret =3D false; @@ -91,6 +92,7 @@ void avr_cpu_do_interrupt(CPUState *cs) =20 cs->exception_index =3D -1; } +#endif /* !CONFIG_USER_ONLY */ =20 int avr_cpu_memory_rw_debug(CPUState *cs, vaddr addr, uint8_t *buf, int len, bool is_write) --=20 2.31.1