<feed xmlns='http://www.w3.org/2005/Atom'>
<title>bwlp/qemu.git/include/semihosting, branch spice_video_codecs</title>
<subtitle>Experimental fork of QEMU with video encoding patches</subtitle>
<id>https://git.openslx.org/bwlp/qemu.git/atom/include/semihosting?h=spice_video_codecs</id>
<link rel='self' href='https://git.openslx.org/bwlp/qemu.git/atom/include/semihosting?h=spice_video_codecs'/>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/'/>
<updated>2022-09-13T16:18:21+00:00</updated>
<entry>
<title>semihosting: Allow optional use of semihosting from userspace</title>
<updated>2022-09-13T16:18:21+00:00</updated>
<author>
<name>Peter Maydell</name>
</author>
<published>2022-08-22T14:12:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/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:12+00:00</updated>
<author>
<name>Richard Henderson</name>
</author>
<published>2022-06-28T11:16:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/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:37+00:00</updated>
<author>
<name>Richard Henderson</name>
</author>
<published>2022-05-02T18:15:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/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:20+00:00</updated>
<author>
<name>Richard Henderson</name>
</author>
<published>2022-05-02T01:04:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/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>
<entry>
<title>semihosting: Remove qemu_semihosting_console_outc</title>
<updated>2022-06-27T23:10:26+00:00</updated>
<author>
<name>Richard Henderson</name>
</author>
<published>2022-05-02T00:57:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=004d2abe3f2f856bd6f70fa3d8933d5f6d620142'/>
<id>urn:sha1:004d2abe3f2f856bd6f70fa3d8933d5f6d620142</id>
<content type='text'>
This function has been replaced by *_write.

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: Create qemu_semihosting_guestfd_init</title>
<updated>2022-06-27T23:06:50+00:00</updated>
<author>
<name>Richard Henderson</name>
</author>
<published>2022-05-02T00:21:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=e4a4aaa51b4c71914a6f30ca504ab78e8f695aee'/>
<id>urn:sha1:e4a4aaa51b4c71914a6f30ca504ab78e8f695aee</id>
<content type='text'>
For arm-compat, initialize console_{in,out}_gf;
otherwise, initialize stdio file descriptors.

This will go some way to cleaning up arm-compat, and
will allow other semihosting to use normal stdio.

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>
<entry>
<title>semihosting: Add GuestFDConsole</title>
<updated>2022-06-27T23:06:30+00:00</updated>
<author>
<name>Richard Henderson</name>
</author>
<published>2022-05-01T20:11:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=008e147572863a7a54c54403e626aaed3e50574f'/>
<id>urn:sha1:008e147572863a7a54c54403e626aaed3e50574f</id>
<content type='text'>
Add a GuestFDType for connecting to the semihosting console.
Hook up to read, write, isatty, and fstat syscalls.

Note that the arm-specific syscall flen cannot be applied
to the console, because the console is not a descriptor
exposed to the guest.

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>
<entry>
<title>semihosting: Create qemu_semihosting_console_write</title>
<updated>2022-06-27T23:05:52+00:00</updated>
<author>
<name>Richard Henderson</name>
</author>
<published>2022-05-01T19:42:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=cd66f20f614bb492e4e5be11e4b65d58b4a046ca'/>
<id>urn:sha1:cd66f20f614bb492e4e5be11e4b65d58b4a046ca</id>
<content type='text'>
Will replace qemu_semihosting_console_{outs,outc},
but we need more plumbing first.

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: Cleanup chardev init</title>
<updated>2022-06-27T23:05:52+00:00</updated>
<author>
<name>Richard Henderson</name>
</author>
<published>2022-05-01T23:59:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=fb08790b35174a98301ecbac4d5234d0cbfebea0'/>
<id>urn:sha1:fb08790b35174a98301ecbac4d5234d0cbfebea0</id>
<content type='text'>
Rename qemu_semihosting_connect_chardevs to
qemu_semihosting_chardev_init; pass the result
directly to qemu_semihosting_console_init.

Store the chardev in SemihostingConsole instead
of SemihostingConfig, which lets us drop
semihosting_get_chardev.

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: Expand qemu_semihosting_console_inc to read</title>
<updated>2022-06-27T23:05:52+00:00</updated>
<author>
<name>Richard Henderson</name>
</author>
<published>2022-05-01T19:31:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=e7fb6f320548c1b0c25d291466a0249ee80d91b6'/>
<id>urn:sha1:e7fb6f320548c1b0c25d291466a0249ee80d91b6</id>
<content type='text'>
Allow more than one character to be read at one time.
Will be used by m68k and nios2 semihosting for stdio.

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