From nobody Tue Feb 10 20:47:53 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.221.45 as permitted sender) client-ip=209.85.221.45; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-f45.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.221.45 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1631379322; cv=none; d=zohomail.com; s=zohoarc; b=Oe0ykEfXSDlPmtHx37rveiGH6U0/zby6nyCmEevHpL1jn6Zyylv+L3MR29dZJbXpAYgtyCdFknBZ+bo7HELh9oDaobBnOAAEDsaIsdltVqJUHRBZ4wAGn6skchE5dodKpTvi8etQ7t041BVnZXO4EZWnfo0I5qR1yEcrWCEOzmk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1631379322; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=TN+Zrhaefhs3QjxEX21PjGTtA8lFVaKomYkrzGxUkf0=; b=bvmLc4Ya+4OsDqYEWCqZkVrZ9Y760DAo2tYCoqw8Qr8RZHi/XzZWzl7FS2V6twWokenKyVJL3SIOw/AHz89ea7YnfSuOo5dcCb7/9Hq7oGo9kaNih0lhzIvrvjTirkIxfFIU4FLx/TnGCgg3LIjwExSL/Zvl1e0eqo69ByYsIzw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.221.45 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.45]) by mx.zohomail.com with SMTPS id 1631379322932295.33364593565057; Sat, 11 Sep 2021 09:55:22 -0700 (PDT) Received: by mail-wr1-f45.google.com with SMTP id m9so7506424wrb.1 for ; Sat, 11 Sep 2021 09:55:22 -0700 (PDT) Return-Path: Return-Path: Received: from x1w.. (21.red-83-52-55.dynamicip.rima-tde.net. [83.52.55.21]) by smtp.gmail.com with ESMTPSA id p13sm2102622wro.8.2021.09.11.09.55.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 Sep 2021 09:55:20 -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=TN+Zrhaefhs3QjxEX21PjGTtA8lFVaKomYkrzGxUkf0=; b=h+NTPtwx3UHTE7siyE39xuiR9Dh4Si9JsNrBFemFvfUayt3pmpEbUeX3iKxgvdRZM0 bAzvuXNpjM4VupwyxYo3Vfd/JdqYG6XD3WtpgCsffDJOyOJw7NAR7b64QtXnaYXhX6hs CChmpjTwIlSxcqRO3qJ1O/GbpsO59PqYxYxt15WfgGPjP1Hu8jRiRhWnj179YOjXeFEZ bBK3y0HCV23n1hoyqzou+PEnG0/cFDlylPOhozsOU0B71qBx/XRKkP99gIzJYOxuQ+LY zD3S5PwY8LWOUruQwkfamyoLLG0badMUQq8wVx63YcAwJHkJDZYOQ6aRnXEIEdxQa8YL +utw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=TN+Zrhaefhs3QjxEX21PjGTtA8lFVaKomYkrzGxUkf0=; b=fSL90ER03pfkrhKInbi69EymjdLxz4opaYMu+sO+dfncnqC8Gqhfnu7cjGiVcnNCxz Mb4vN506jIGOzcTWtzE0crahF7RrrkViRpy2kqSlIxIWUKazakbC55d8zIZE5dE6KfyI eJlMM0wc0NNvhbIfDP5STIwau/GZVWfg74BhuRECE1HST9WMH8F5CN76qj3IvDRukakt PZVi0cd0KHBSv6cPDmDwLfwEkzdUXel9ZkCywAAEWwrYW9f2pPx7bW1LIOIgZngCFYDl 0I+ndaXGZ0Aoadp5tqesLTJV9inxLN6fMhgGsuZi2gju5aUkvPXyXB/+Hn2QNXaLk0PO YQFg== X-Gm-Message-State: AOAM5301jamZ9ilxAbBUrJizOn7qESTIP9Qmte68EzS1TqcI/DIm1VuE D1pmv5/4veK/sqN83Oi5nXA= X-Google-Smtp-Source: ABdhPJwX0AFXeehfprRVw9Xxq+edQZRBL3srvl0G/66fknJoluIWFHBLUBuhdZb84vFmKrN5q05JzA== X-Received: by 2002:adf:9e48:: with SMTP id v8mr3861701wre.141.1631379321197; Sat, 11 Sep 2021 09:55:21 -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: Paolo Bonzini , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Warner Losh Subject: [PATCH v3 09/24] target/hppa: Restrict cpu_exec_interrupt() handler to sysemu Date: Sat, 11 Sep 2021 18:54:19 +0200 Message-Id: <20210911165434.531552-10-f4bug@amsat.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210911165434.531552-1-f4bug@amsat.org> References: <20210911165434.531552-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: 1631379324651100001 Restrict cpu_exec_interrupt() and its callees to sysemu. Reviewed-by: Warner Losh Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- target/hppa/cpu.h | 4 ++-- target/hppa/cpu.c | 2 +- target/hppa/int_helper.c | 7 ++----- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/target/hppa/cpu.h b/target/hppa/cpu.h index 748270bfa31..7854675b903 100644 --- a/target/hppa/cpu.h +++ b/target/hppa/cpu.h @@ -325,13 +325,13 @@ int cpu_hppa_signal_handler(int host_signum, void *pi= nfo, void *puc); hwaddr hppa_cpu_get_phys_page_debug(CPUState *cs, vaddr addr); int hppa_cpu_gdb_read_register(CPUState *cpu, GByteArray *buf, int reg); int hppa_cpu_gdb_write_register(CPUState *cpu, uint8_t *buf, int reg); -void hppa_cpu_do_interrupt(CPUState *cpu); -bool hppa_cpu_exec_interrupt(CPUState *cpu, int int_req); void hppa_cpu_dump_state(CPUState *cs, FILE *f, int); bool hppa_cpu_tlb_fill(CPUState *cs, vaddr address, int size, MMUAccessType access_type, int mmu_idx, bool probe, uintptr_t retaddr); #ifndef CONFIG_USER_ONLY +void hppa_cpu_do_interrupt(CPUState *cpu); +bool hppa_cpu_exec_interrupt(CPUState *cpu, int int_req); int hppa_get_physical_address(CPUHPPAState *env, vaddr addr, int mmu_idx, int type, hwaddr *pphys, int *pprot); extern const MemoryRegionOps hppa_io_eir_ops; diff --git a/target/hppa/cpu.c b/target/hppa/cpu.c index 2eace4ee124..e8edd189bfc 100644 --- a/target/hppa/cpu.c +++ b/target/hppa/cpu.c @@ -144,10 +144,10 @@ static const struct SysemuCPUOps hppa_sysemu_ops =3D { static const struct TCGCPUOps hppa_tcg_ops =3D { .initialize =3D hppa_translate_init, .synchronize_from_tb =3D hppa_cpu_synchronize_from_tb, - .cpu_exec_interrupt =3D hppa_cpu_exec_interrupt, .tlb_fill =3D hppa_cpu_tlb_fill, =20 #ifndef CONFIG_USER_ONLY + .cpu_exec_interrupt =3D hppa_cpu_exec_interrupt, .do_interrupt =3D hppa_cpu_do_interrupt, .do_unaligned_access =3D hppa_cpu_do_unaligned_access, #endif /* !CONFIG_USER_ONLY */ diff --git a/target/hppa/int_helper.c b/target/hppa/int_helper.c index 349495d3610..13073ae2bda 100644 --- a/target/hppa/int_helper.c +++ b/target/hppa/int_helper.c @@ -88,7 +88,6 @@ void HELPER(write_eiem)(CPUHPPAState *env, target_ureg va= l) eval_interrupt(env_archcpu(env)); qemu_mutex_unlock_iothread(); } -#endif /* !CONFIG_USER_ONLY */ =20 void hppa_cpu_do_interrupt(CPUState *cs) { @@ -100,7 +99,6 @@ void hppa_cpu_do_interrupt(CPUState *cs) uint64_t iasq_f =3D env->iasq_f; uint64_t iasq_b =3D env->iasq_b; =20 -#ifndef CONFIG_USER_ONLY target_ureg old_psw; =20 /* As documented in pa2.0 -- interruption handling. */ @@ -187,7 +185,6 @@ void hppa_cpu_do_interrupt(CPUState *cs) env->iaoq_b =3D env->iaoq_f + 4; env->iasq_f =3D 0; env->iasq_b =3D 0; -#endif =20 if (qemu_loglevel_mask(CPU_LOG_INT)) { static const char * const names[] =3D { @@ -248,7 +245,6 @@ void hppa_cpu_do_interrupt(CPUState *cs) =20 bool hppa_cpu_exec_interrupt(CPUState *cs, int interrupt_request) { -#ifndef CONFIG_USER_ONLY HPPACPU *cpu =3D HPPA_CPU(cs); CPUHPPAState *env =3D &cpu->env; =20 @@ -258,6 +254,7 @@ bool hppa_cpu_exec_interrupt(CPUState *cs, int interrup= t_request) hppa_cpu_do_interrupt(cs); return true; } -#endif return false; } + +#endif /* !CONFIG_USER_ONLY */ --=20 2.31.1