qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: qemu-devel@nongnu.org
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
	"Ilya Leoshkevich" <iii@linux.ibm.com>,
	"Eduardo Habkost" <eduardo@habkost.net>,
	qemu-s390x@nongnu.org, "Song Gao" <gaosong@loongson.cn>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"David Hildenbrand" <david@redhat.com>,
	"Xiaojuan Yang" <yangxiaojuan@loongson.cn>,
	"Thomas Huth" <thuth@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>
Subject: [PATCH 4/5] target/s390x: Restrict sysemu/reset.h to system emulation
Date: Tue, 20 Dec 2022 15:56:24 +0100	[thread overview]
Message-ID: <20221220145625.26392-5-philmd@linaro.org> (raw)
In-Reply-To: <20221220145625.26392-1-philmd@linaro.org>

In user emulation, threads -- implemented as CPU -- are
created/destroyed, but never reset. There is no point in
allowing the user emulation access the sysemu/reset API.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 target/s390x/cpu.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c
index 96562c516d..b10a8541ff 100644
--- a/target/s390x/cpu.c
+++ b/target/s390x/cpu.c
@@ -26,7 +26,6 @@
 #include "s390x-internal.h"
 #include "kvm/kvm_s390x.h"
 #include "sysemu/kvm.h"
-#include "sysemu/reset.h"
 #include "qemu/module.h"
 #include "trace.h"
 #include "qapi/qapi-types-machine.h"
@@ -35,6 +34,9 @@
 #include "fpu/softfloat-helpers.h"
 #include "disas/capstone.h"
 #include "sysemu/tcg.h"
+#ifndef CONFIG_USER_ONLY
+#include "sysemu/reset.h"
+#endif
 
 #define CR0_RESET       0xE0UL
 #define CR14_RESET      0xC2000000UL;
-- 
2.38.1



  parent reply	other threads:[~2022-12-20 14:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-20 14:56 [PATCH 0/5] cpus: Remove system reset() API from user emulation Philippe Mathieu-Daudé
2022-12-20 14:56 ` [PATCH 1/5] target/i386: Restrict qapi/qapi-events-run-state.h to system emulation Philippe Mathieu-Daudé
2022-12-20 14:56 ` [PATCH 2/5] target/i386: Restrict sysemu/reset.h " Philippe Mathieu-Daudé
2022-12-20 14:56 ` [PATCH 3/5] target/loongarch: " Philippe Mathieu-Daudé
2022-12-20 14:56 ` Philippe Mathieu-Daudé [this message]
2022-12-29  9:45   ` [PATCH 4/5] target/s390x: " Thomas Huth
2022-12-20 14:56 ` [PATCH 5/5] hw/core: Only build CPU reset handlers with " Philippe Mathieu-Daudé
2022-12-20 15:52   ` Peter Maydell
2022-12-21  1:18 ` [PATCH 0/5] cpus: Remove system reset() API from user emulation Richard Henderson
2022-12-21  4:00 ` Wilfred Mallawa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221220145625.26392-5-philmd@linaro.org \
    --to=philmd@linaro.org \
    --cc=david@redhat.com \
    --cc=eduardo@habkost.net \
    --cc=gaosong@loongson.cn \
    --cc=iii@linux.ibm.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-s390x@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=thuth@redhat.com \
    --cc=yangxiaojuan@loongson.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).