<feed xmlns='http://www.w3.org/2005/Atom'>
<title>qemu/include/semihosting, branch master</title>
<subtitle>QEMU development tree</subtitle>
<id>https://git.zx2c4.com/qemu/atom/include/semihosting?h=master</id>
<link rel='self' href='https://git.zx2c4.com/qemu/atom/include/semihosting?h=master'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/'/>
<updated>2024-07-22T08:38:01Z</updated>
<entry>
<title>semihosting: Include missing 'gdbstub/syscalls.h' header</title>
<updated>2024-07-22T08:38:01Z</updated>
<author>
<name>Philippe Mathieu-Daudé</name>
<email>philmd@linaro.org</email>
</author>
<published>2024-07-18T09:45:16Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=f961773ce13d61f56506dc4964e28f0594c7920f'/>
<id>urn:sha1:f961773ce13d61f56506dc4964e28f0594c7920f</id>
<content type='text'>
"semihosting/syscalls.h" requires definitions from
"gdbstub/syscalls.h", include it in order to avoid:

  include/semihosting/syscalls.h:23:38: error: unknown type name 'gdb_syscall_complete_cb'
  void semihost_sys_open(CPUState *cs, gdb_syscall_complete_cb complete,
                                       ^

Signed-off-by: Philippe Mathieu-Daudé &lt;philmd@linaro.org&gt;
Message-Id: &lt;20240717105723.58965-2-philmd@linaro.org&gt;
Signed-off-by: Alex Bennée &lt;alex.bennee@linaro.org&gt;
Message-Id: &lt;20240718094523.1198645-9-alex.bennee@linaro.org&gt;
</content>
</entry>
<entry>
<title>exec/cpu: Extract page-protection definitions to page-protection.h</title>
<updated>2024-05-06T09:17:15Z</updated>
<author>
<name>Philippe Mathieu-Daudé</name>
<email>philmd@linaro.org</email>
</author>
<published>2023-12-06T19:27:32Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=74781c0888e819552538593c0932d98ea16c766b'/>
<id>urn:sha1:74781c0888e819552538593c0932d98ea16c766b</id>
<content type='text'>
Extract page-protection definitions from "exec/cpu-all.h"
to "exec/page-protection.h".

The list of files requiring the new header was generated
using:

$ git grep -wE \
  'PAGE_(READ|WRITE|EXEC|RWX|VALID|ANON|RESERVED|TARGET_.|PASSTHROUGH)'

Signed-off-by: Philippe Mathieu-Daudé &lt;philmd@linaro.org&gt;
Acked-by: Nicholas Piggin &lt;npiggin@gmail.com&gt;
Acked-by: Richard Henderson &lt;richard.henderson@linaro.org&gt;
Message-Id: &lt;20240427155714.53669-3-philmd@linaro.org&gt;
</content>
</entry>
<entry>
<title>semihosting/uaccess: Avoid including 'cpu.h'</title>
<updated>2024-04-26T13:31:37Z</updated>
<author>
<name>Philippe Mathieu-Daudé</name>
<email>philmd@linaro.org</email>
</author>
<published>2023-12-06T15:11:15Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=3aac8abaca536db275da671db088fef2dd82536d'/>
<id>urn:sha1:3aac8abaca536db275da671db088fef2dd82536d</id>
<content type='text'>
"semihosting/uaccess.h" only requires the following headers:

  - "exec/cpu-defs.h" for target_ulong,
  - "exec/cpu-common.h" for cpu_memory_rw_debug()
  - "exec/tswap.h" for tswap32() and tswap64().

Include them instead of the huge "cpu.h".

Signed-off-by: Philippe Mathieu-Daudé &lt;philmd@linaro.org&gt;
Reviewed-by: Richard Henderson &lt;richard.henderson@linaro.org&gt;
Message-Id: &lt;42c6471e-8383-45e0-85ee-e20ca32ecbad@linaro.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging</title>
<updated>2023-10-09T14:11:18Z</updated>
<author>
<name>Stefan Hajnoczi</name>
<email>stefanha@redhat.com</email>
</author>
<published>2023-10-09T14:11:17Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=1527c6b6fa6c6775523287e33f78b41afc7ba46c'/>
<id>urn:sha1:1527c6b6fa6c6775523287e33f78b41afc7ba46c</id>
<content type='text'>
* util/log: re-allow switching away from stderr log file
* finish audio configuration rework
* cleanup HVF stubs
* remove more mentions of softmmu

# -----BEGIN PGP SIGNATURE-----
#
# iQFIBAABCAAyFiEE8TM4V0tmI4mGbHaCv/vSX3jHroMFAmUi/kIUHHBib256aW5p
# QHJlZGhhdC5jb20ACgkQv/vSX3jHroOXWwf/YW16QMzqdAPVHYRf9NcCneRF16El
# t3lEod0q0sHhchPbh9e04aKbh+oBNeWu9sFyTl11Fwsi+DGmp/b28ziva75/4rfd
# h5N9aX/z2jwPqy93IwPDu3soKXCCgTK+ywtD/5GLQwBGqxs7W2xUEEb7eCnVefHa
# zwL3MOUqPICeqOnR1TNw9k3N3veF04D+rmchTwbAjAmx1f8EI+mK9VlGK9V8TUjP
# 3HjpZYJluc0a92lR5VONJ7V25QfttsjLysTgpFwVAQPS6Frzatc/hWclfLYgw9vl
# 2Irk83FV8gXPRl0XKNcqSDsv6h/yGP6TDFIB8QwRSRGBqIQi5aOlfBJzsQ==
# =qbm7
# -----END PGP SIGNATURE-----
# gpg: Signature made Sun 08 Oct 2023 15:08:50 EDT
# gpg:                using RSA key F13338574B662389866C7682BFFBD25F78C7AE83
# gpg:                issuer "pbonzini@redhat.com"
# gpg: Good signature from "Paolo Bonzini &lt;bonzini@gnu.org&gt;" [full]
# gpg:                 aka "Paolo Bonzini &lt;pbonzini@redhat.com&gt;" [full]
# Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4  E2F7 7E15 100C CD36 69B1
#      Subkey fingerprint: F133 3857 4B66 2389 866C  7682 BFFB D25F 78C7 AE83

* tag 'for-upstream' of https://gitlab.com/bonzini/qemu: (25 commits)
  audio, qtest: get rid of QEMU_AUDIO_DRV
  audio: reintroduce default audio backend for VNC
  audio: do not use first -audiodev as default audio device
  audio: extend -audio to allow creating a default backend
  audio: extract audio_define_default
  audio: disable default backends if -audio/-audiodev is used
  audio: error hints need a trailing \n
  cutils: squelch compiler warnings with custom paths
  configure: change $softmmu to $system
  system: Rename softmmu/ directory as system/
  meson: Rename target_softmmu_arch -&gt; target_system_arch
  meson: Rename softmmu_mods -&gt; system_mods
  target/i386: Rename i386_softmmu_kvm_ss -&gt; i386_kvm_ss
  semihosting: Rename softmmu_FOO_user() -&gt; uaccess_FOO_user()
  gdbstub: Rename 'softmmu' -&gt; 'system'
  accel: Rename accel_softmmu* -&gt; accel_system*
  tcg: Correct invalid mentions of 'softmmu' by 'system-mode'
  fuzz: Correct invalid mentions of 'softmmu' by 'system'
  cpu: Correct invalid mentions of 'softmmu' by 'system-mode'
  travis-ci: Correct invalid mentions of 'softmmu' by 'system'
  ...

Signed-off-by: Stefan Hajnoczi &lt;stefanha@redhat.com&gt;
</content>
</entry>
<entry>
<title>semihosting: Rename softmmu_FOO_user() -&gt; uaccess_FOO_user()</title>
<updated>2023-10-07T17:02:59Z</updated>
<author>
<name>Philippe Mathieu-Daudé</name>
<email>philmd@linaro.org</email>
</author>
<published>2023-10-04T09:06:23Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=f14eced5ac9ae2db10a661e0fdef52a2f0316699'/>
<id>urn:sha1:f14eced5ac9ae2db10a661e0fdef52a2f0316699</id>
<content type='text'>
Add a check in 'softmmu-uaccess.h' that the header is only
include in system emulation, and rename it as 'uaccess.h'.

Rename the API methods:

  - softmmu_[un]lock_user*() -&gt; uaccess_[un]lock_user*()
  - softmmu_strlen_user() -&gt; uaccess_strlen_user().

Update a pair of comments.

Signed-off-by: Philippe Mathieu-Daudé &lt;philmd@linaro.org&gt;
Message-ID: &lt;20231004090629.37473-9-philmd@linaro.org&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>semihosting: Clean up global variable shadowing</title>
<updated>2023-10-06T11:27:48Z</updated>
<author>
<name>Philippe Mathieu-Daudé</name>
<email>philmd@linaro.org</email>
</author>
<published>2023-10-04T12:00:12Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=afb81fe8542c0962b025c566476cdded3b8ec5e1'/>
<id>urn:sha1:afb81fe8542c0962b025c566476cdded3b8ec5e1</id>
<content type='text'>
Fix:

  semihosting/config.c:134:49: error: declaration shadows a variable in the global scope [-Werror,-Wshadow]
  int qemu_semihosting_config_options(const char *optarg)
                                                  ^
  /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/getopt.h:77:14: note: previous declaration is here
  extern char *optarg;                    /* getopt(3) external variables */
               ^

Signed-off-by: Philippe Mathieu-Daudé &lt;philmd@linaro.org&gt;
Message-ID: &lt;20231004120019.93101-10-philmd@linaro.org&gt;
Reviewed-by: Alex Bennée &lt;alex.bennee@linaro.org&gt;
Reviewed-by: Richard Henderson &lt;richard.henderson@linaro.org&gt;
Signed-off-by: Markus Armbruster &lt;armbru@redhat.com&gt;
</content>
</entry>
<entry>
<title>semihosting: Allow optional use of semihosting from userspace</title>
<updated>2022-09-13T16:18:21Z</updated>
<author>
<name>Peter Maydell</name>
<email>peter.maydell@linaro.org</email>
</author>
<published>2022-08-22T14:12:24Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=5202861b20d77b1d638da5f10af0f51ebcfc61bf'/>
<id>urn:sha1:5202861b20d77b1d638da5f10af0f51ebcfc61bf</id>
<content type='text'>
Currently our semihosting implementations generally prohibit use of
semihosting calls in system emulation from the guest userspace.  This
is a very long standing behaviour justified originally "to provide
some semblance of security" (since code with access to the
semihosting ABI can do things like read and write arbitrary files on
the host system).  However, it is sometimes useful to be able to run
trusted guest code which performs semihosting calls from guest
userspace, notably for test code.  Add a command line suboption to
the existing semihosting-config option group so that you can
explicitly opt in to semihosting from guest userspace with
 -semihosting-config userspace=on

(There is no equivalent option for the user-mode emulator, because
there by definition all code runs in userspace and has access to
semihosting already.)

This commit adds the infrastructure for the command line option and
adds a bool 'is_user' parameter to the function
semihosting_userspace_enabled() that target code can use to check
whether it should be permitting the semihosting call for userspace.
It mechanically makes all the callsites pass 'false', so they
continue checking "is semihosting enabled in general".  Subsequent
commits will make each target that implements semihosting honour the
userspace=on option by passing the correct value and removing
whatever "don't do this for userspace" checking they were doing by
hand.

Signed-off-by: Peter Maydell &lt;peter.maydell@linaro.org&gt;
Acked-by: Alex Bennée &lt;alex.bennee@linaro.org&gt;
Reviewed-by: Alistair Francis &lt;alistair.francis@wdc.com&gt;
Reviewed-by: Philippe Mathieu-Daudé &lt;f4bug@amsat.org&gt;
Reviewed-by: Richard Henderson &lt;richard.henderson@linaro.org&gt;
Message-Id: &lt;20220822141230.3658237-2-peter.maydell@linaro.org&gt;
Signed-off-by: Richard Henderson &lt;richard.henderson@linaro.org&gt;
</content>
</entry>
<entry>
<title>semihosting: Remove qemu_semihosting_log_out</title>
<updated>2022-07-12T20:32:12Z</updated>
<author>
<name>Richard Henderson</name>
<email>richard.henderson@linaro.org</email>
</author>
<published>2022-06-28T11:16:59Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=938fcd741ad656b2c4aeb1654bfc4ff221c26bbf'/>
<id>urn:sha1:938fcd741ad656b2c4aeb1654bfc4ff221c26bbf</id>
<content type='text'>
The function is no longer used.

Reviewed-by: Philippe Mathieu-Daudé &lt;f4bug@amsat.org&gt;
Signed-off-by: Richard Henderson &lt;richard.henderson@linaro.org&gt;
Message-Id: &lt;20220628111701.677216-7-richard.henderson@linaro.org&gt;
Signed-off-by: Philippe Mathieu-Daudé &lt;f4bug@amsat.org&gt;
</content>
</entry>
<entry>
<title>semihosting: Create semihost_sys_poll_one</title>
<updated>2022-06-27T23:11:37Z</updated>
<author>
<name>Richard Henderson</name>
<email>richard.henderson@linaro.org</email>
</author>
<published>2022-05-02T18:15:40Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=1b9177f7495086f1595d7c989c810013f1c9eb5a'/>
<id>urn:sha1:1b9177f7495086f1595d7c989c810013f1c9eb5a</id>
<content type='text'>
This will be used for implementing the xtensa select_one
system call.  Choose "poll" over "select" so that we can
reuse Glib's g_poll constants and to avoid struct timeval.

Reviewed-by: Luc Michel &lt;lmichel@kalray.eu&gt;
Signed-off-by: Richard Henderson &lt;richard.henderson@linaro.org&gt;
</content>
</entry>
<entry>
<title>semihosting: Remove qemu_semihosting_console_outs</title>
<updated>2022-06-27T23:11:20Z</updated>
<author>
<name>Richard Henderson</name>
<email>richard.henderson@linaro.org</email>
</author>
<published>2022-05-02T01:04:27Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=2d010c2719da360d44a5c44d279d49eca21c5de8'/>
<id>urn:sha1:2d010c2719da360d44a5c44d279d49eca21c5de8</id>
<content type='text'>
This function has been replaced by *_write.

Reviewed-by: Luc Michel &lt;lmichel@kalray.eu&gt;
Reviewed-by: Alex Bennée &lt;alex.bennee@linaro.org&gt;
Signed-off-by: Richard Henderson &lt;richard.henderson@linaro.org&gt;
</content>
</entry>
</feed>
