From nobody Tue Feb 10 20:48:13 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.221.44 as permitted sender) client-ip=209.85.221.44; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-f44.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.221.44 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1632695395; cv=none; d=zohomail.com; s=zohoarc; b=ZOlIs0Sy1GfJoGZfoWVcUdZ+NwJe10IDnS24De5DVC9MmdpFyCy+yFwiZIbyKjAdeh5KFyTXYaoiddOofwhuSR/jWGuHSt+Dg+7szbf6EKA1et5XysFpy7Lj+qiuTXG4zRGkIIg0LoVWpuHt4HVEvlCqJbGPc4a1f5dS0HGqK9c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1632695395; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=ZAYjmxiur5f+p7A1SrpNSihQLXDhLnmlUZZ8rIaewhE=; b=iwQ5ScNfTk5e30auNL4EmsZ83YemJ/eaqwHooXVPlZYPvqGi89TayXsleIe5dSvjh0+shPk0AVe1P3H3+R0Ieq+hsQBJoE/wpx8yHywrsCPUo76Ulid4yjgJV3WxQm0BpWehvYHj96viITJ7LJEL3OuiuT5mu6vmD/7i7Mo9T4c= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.221.44 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.44]) by mx.zohomail.com with SMTPS id 1632695395302835.2674366279539; Sun, 26 Sep 2021 15:29:55 -0700 (PDT) Received: by mail-wr1-f44.google.com with SMTP id g16so46525125wrb.3 for ; Sun, 26 Sep 2021 15:29:54 -0700 (PDT) Return-Path: Return-Path: Received: from x1w.. (118.red-83-35-24.dynamicip.rima-tde.net. [83.35.24.118]) by smtp.gmail.com with ESMTPSA id s13sm19176691wmc.47.2021.09.26.15.29.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Sep 2021 15:29:52 -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=ZAYjmxiur5f+p7A1SrpNSihQLXDhLnmlUZZ8rIaewhE=; b=jsNC4UiFCCOc2HUh0HNgZLNrEdz6P4qvQ0mAeYBhC7vOUFqJtVT+ZKTq+ommX2Gv/Z 5bCDDmm/W/ucFF7C1BKLiJKJYczgi6VI9KO+R60U0U+Bt1Vo9WD1amFz//cX9Jy4evbH PB2cnijxH3uXrPKjysxYQxRExv0a8RO9HtOeUzvYtJzN6AFLs1lbMT9biUI1PdjvtWdN B1OesHs76zxglJyP8j+TBiJQRM/O6wlgQDo8xgQXp2NmtJeTQz2lto6KZR3aJP2L0dnH v34IaWFzVpn11AKhqRR5Fv4xhHCcHZycB8fQTggHlTV0Nk+dke7RFQguVYESDlSoyUp/ IqHA== 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=ZAYjmxiur5f+p7A1SrpNSihQLXDhLnmlUZZ8rIaewhE=; b=1eQugeFflc614IzLsgIbR0DHFByaLYOQNhBPwD3fvn3TyP+CwCeaicxFcT2+boJd97 oRQyzxwnrSrr/QV7yLFKC75jnjc5/nBhFk+yDMtbt/RqwSyXOfiewuuo+GgWPA1JpYyF bl+e7I2UR+15xxjQtzchxg89O9lY7G8kIjwwIjWFp/us71h3W+3KS4Dm/a0vx0aPhw2f /vVzNmdT1EAUUUddnr3SlU4PqYZ5K2Rk2jpmO1rNGBrQXGDCqIKrC1ZBZ501qAqxaoq3 i9GYJ5CN8pAW4KFWBLkSZf3cOZVXRt0X95miO1NpfV3xZADtm01uf5OtrwLmTYP+j84+ aUZQ== X-Gm-Message-State: AOAM532j3aa2tvjFT/r9Y6fCorso2dSui6T/vsHHziaD0CCmzJ+VsA1O JCr2wNyu2FvSBlF4kmx5+E/Qr5GlJ1A= X-Google-Smtp-Source: ABdhPJzbAkOWH+XnJWCqO/LwNB8D6EKgJcl2dCcLx9IwuEfNbvFMuIN9ekfL6d5CH0G8+h5/PTVYsQ== X-Received: by 2002:a05:6000:18ab:: with SMTP id b11mr24875417wri.131.1632695393269; Sun, 26 Sep 2021 15:29:53 -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: Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v8 33/40] target/s390x: Restrict has_work() handler to sysemu and TCG Date: Mon, 27 Sep 2021 00:27:09 +0200 Message-Id: <20210926222716.1732932-34-f4bug@amsat.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210926222716.1732932-1-f4bug@amsat.org> References: <20210926222716.1732932-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: 1632695396752100001 Restrict has_work() to TCG sysemu. Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/intc/s390_flic.c | 15 ++++++++++++--- target/s390x/cpu.c | 4 +++- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/hw/intc/s390_flic.c b/hw/intc/s390_flic.c index 74e02858d43..22bc38e9b4e 100644 --- a/hw/intc/s390_flic.c +++ b/hw/intc/s390_flic.c @@ -312,19 +312,28 @@ static void qemu_s390_inject_crw_mchk(S390FLICState *= fs) =20 bool qemu_s390_flic_has_service(QEMUS390FLICState *flic) { - /* called without lock via cc->has_work, will be validated under lock = */ + /* + * Called without lock via TCGCPUOps::has_work, + * will be validated under lock. + */ return !!(flic->pending & FLIC_PENDING_SERVICE); } =20 bool qemu_s390_flic_has_io(QEMUS390FLICState *flic, uint64_t cr6) { - /* called without lock via cc->has_work, will be validated under lock = */ + /* + * Called without lock via TCGCPUOps::has_work, + * will be validated under lock. + */ return !!(flic->pending & CR6_TO_PENDING_IO(cr6)); } =20 bool qemu_s390_flic_has_crw_mchk(QEMUS390FLICState *flic) { - /* called without lock via cc->has_work, will be validated under lock = */ + /* + * Called without lock via TCGCPUOps::has_work, + * will be validated under lock. + */ return !!(flic->pending & FLIC_PENDING_MCHK_CR); } =20 diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c index 7b7b05f1d3a..df8ade9021d 100644 --- a/target/s390x/cpu.c +++ b/target/s390x/cpu.c @@ -88,6 +88,7 @@ static void s390_cpu_set_pc(CPUState *cs, vaddr value) cpu->env.psw.addr =3D value; } =20 +#if defined(CONFIG_TCG) && !defined(CONFIG_USER_ONLY) static bool s390_cpu_has_work(CPUState *cs) { S390CPU *cpu =3D S390_CPU(cs); @@ -104,6 +105,7 @@ static bool s390_cpu_has_work(CPUState *cs) =20 return s390_cpu_has_int(cpu); } +#endif /* CONFIG_TCG && !CONFIG_USER_ONLY */ =20 /* S390CPUClass::reset() */ static void s390_cpu_reset(CPUState *s, cpu_reset_type type) @@ -269,6 +271,7 @@ static const struct TCGCPUOps s390_tcg_ops =3D { .tlb_fill =3D s390_cpu_tlb_fill, =20 #if !defined(CONFIG_USER_ONLY) + .has_work =3D s390_cpu_has_work, .cpu_exec_interrupt =3D s390_cpu_exec_interrupt, .do_interrupt =3D s390_cpu_do_interrupt, .debug_excp_handler =3D s390x_cpu_debug_excp_handler, @@ -292,7 +295,6 @@ static void s390_cpu_class_init(ObjectClass *oc, void *= data) =20 scc->reset =3D s390_cpu_reset; cc->class_by_name =3D s390_cpu_class_by_name, - cc->has_work =3D s390_cpu_has_work; cc->dump_state =3D s390_cpu_dump_state; cc->set_pc =3D s390_cpu_set_pc; cc->gdb_read_register =3D s390_cpu_gdb_read_register; --=20 2.31.1