aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorStefan Hajnoczi <stefanha@redhat.com>2022-09-17 10:30:33 -0400
committerStefan Hajnoczi <stefanha@redhat.com>2022-09-17 10:30:34 -0400
commit123a32f9b38c3bd22d47688d0bf0ab955d4152bc (patch)
tree4da85597c7685c95ee752c2e5dff4b1d185fe458 /include
parent50eac424c74bddd2d73cee47080be94c1d04893e (diff)
parent7d7fb11615809839ff858328134c6a0abad27ea4 (diff)
Merge tag 'pull-semi-20220914' of https://gitlab.com/rth7680/qemu into staging
Convert m68k to semihosting/syscalls.h. Convert nios2 to semihosting/syscalls.h. Allow optional use of semihosting from userspace. # -----BEGIN PGP SIGNATURE----- # # iQFRBAABCgA7FiEEekgeeIaLTbaoWgXAZN846K9+IV8FAmMh1W8dHHJpY2hhcmQu # aGVuZGVyc29uQGxpbmFyby5vcmcACgkQZN846K9+IV8ptggAimuNN6IiD19Huu5F # PMjzDqFPvWFOf82O16WTBM1xN0lwVH8+02PYRL3AhOIw9ZTgxezOo9/KXZpr8a8Z # gocr4Ge/J7zHzHahYuqcyOqqkur2dM4lFiK9rfDD6vdNBMbi0kQZVuaNlQK6rV6Z # 2LHEwKKh64MXJVfwGzK7OLMv4pu0wpWcuCTH2/6U4E1325SOKmEos1VzIePxY1bw # +AMNnairGEdBX1b3JlzZfrLSaOapJcgl0HZdrg6Mflm6ttTuuykGGtjkWBfcu3Nw # utNI1zmUYfD/iJbnbsCNpZSLv6LVOQ2l5S6dOWV+JJ1HukVTZu3DoyfTr8t95kwK # UuUoqA== # =W7Yh # -----END PGP SIGNATURE----- # gpg: Signature made Wed 14 Sep 2022 09:21:51 EDT # gpg: using RSA key 7A481E78868B4DB6A85A05C064DF38E8AF7E215F # gpg: issuer "richard.henderson@linaro.org" # gpg: Good signature from "Richard Henderson <richard.henderson@linaro.org>" [full] # Primary key fingerprint: 7A48 1E78 868B 4DB6 A85A 05C0 64DF 38E8 AF7E 215F * tag 'pull-semi-20220914' of https://gitlab.com/rth7680/qemu: target/riscv: Honour -semihosting-config userspace=on and enable=on target/xtensa: Honour -semihosting-config userspace=on target/nios2: Honour -semihosting-config userspace=on target/mips: Honour -semihosting-config userspace=on target/m68k: Honour -semihosting-config userspace=on target/arm: Honour -semihosting-config userspace=on semihosting: Allow optional use of semihosting from userspace target/m68k: Convert semihosting errno to gdb remote errno target/m68k: Use semihosting/syscalls.h target/nios2: Convert semihosting errno to gdb remote errno target/nios2: Use semihosting/syscalls.h Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/semihosting/semihost.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/include/semihosting/semihost.h b/include/semihosting/semihost.h
index 93a3c21b44..efd2efa25a 100644
--- a/include/semihosting/semihost.h
+++ b/include/semihosting/semihost.h
@@ -27,7 +27,7 @@ typedef enum SemihostingTarget {
} SemihostingTarget;
#ifdef CONFIG_USER_ONLY
-static inline bool semihosting_enabled(void)
+static inline bool semihosting_enabled(bool is_user)
{
return true;
}
@@ -52,7 +52,13 @@ static inline const char *semihosting_get_cmdline(void)
return NULL;
}
#else /* !CONFIG_USER_ONLY */
-bool semihosting_enabled(void);
+/**
+ * semihosting_enabled:
+ * @is_user: true if guest code is in usermode (i.e. not privileged)
+ *
+ * Return true if guest code is allowed to make semihosting calls.
+ */
+bool semihosting_enabled(bool is_user);
SemihostingTarget semihosting_get_target(void);
const char *semihosting_get_arg(int i);
int semihosting_get_argc(void);