qemu-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: semihosting option


From: Peter Maydell
Subject: Re: semihosting option
Date: Thu, 27 Feb 2025 09:55:43 +0000

On Thu, 27 Feb 2025 at 05:44, Yanfeng Liu <yfliu2008@qq.com> wrote:
> I am wondering QEMU semihosting for ARM or RISCV targets allows user to 
> control
> the set of functions available in semihosting? for example, I want give read-
> only host folder share and poweroff functions to a guest. Is this possible?

No, these are not things that the semihosting ABI includes.
Semihosting does allow the guest to read and write *any*
file on the host, so you mustn't give it to an untrusted
guest. And there's no poweroff function in semihosting.
(There is a SYS_EXIT, but this will exit the whole of QEMU
in a pretty abrupt way; it's not like a powerdown.)

The semihosting ABI is provision of a specific set of
functions defined in an external specification; it's not
something that we created in QEMU. The main aim of
semihosting is for debugging, especially debugging of
standalone or lowlevel guest code. It's not intended
or ever going to be something for providing arbitrary
VM services to a full-featured guest OS.

-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]