在 2022/5/20 03:12, Eugenio Pérez 写道:
Control virtqueue is used by networking device for accepting various
commands from the driver. It's a must to support multiqueue and other
configurations.
Shadow VirtQueue (SVQ) already makes possible migration of virtqueue
states, effectively intercepting
On 06/06/2022 18.43, Kashyap Chamarthy wrote:
This document slightly duplicates the "support"[1] page here, but
largely refers to the content in[1].
This is based on Peter Maydell's feedback[2] in v2: "there is some
merit in the documentation being standalone, even if it does mean a bit
of
On 06/06/2022 18.43, Kashyap Chamarthy wrote:
This document is referred to from the GettingStartedDevelopers wiki
which will be rSTified in a follow-up commit.
Converted from Mediawiki to rST using:
$> pandoc -f Mediawiki -t rst MailingLists.wiki
-o mailing-lists.rst
The only
Hello Peter,
On Wed, Jun 1, 2022 at 10:58 AM Peter Xu wrote:
>
[...]
> > Hi, Leonardo. I'm also paying attention to the application of MSG_ZEROCOPY
> > in live migration recently. I noticed that you defined a member
> > `zero_copy_queued` in the struct QIOChannelSocket, but I can't find out
> >
Within do_interrupt, we hold the iothread lock, which
is required for Chardev access for the console, and for
the round trip for use_gdb_syscalls().
Signed-off-by: Richard Henderson
---
target/xtensa/cpu.h | 2 ++
target/xtensa/helper.h | 3 ---
target/xtensa/exc_helper.c | 4
This separates guest file descriptors from host file descriptors,
and utilizes shared infrastructure for integration with gdbstub.
Remove the xtensa custom console handing and rely on the
generic -semihosting-config handling of chardevs.
Signed-off-by: Richard Henderson
---
target/xtensa/cpu.h
Based-on: <20220607204557.658541-1-richard.hender...@linaro.org>
("[PATCH v4 00/53] semihosting cleanup")
Changes for v4:
* Split out of v2.
* Undo the gdb errno thing; continue to convert between host and xtensa.
r~
Richard Henderson (2):
target/xtensa: Use an exception for semihosting
Inline these macros into the only two callers.
Signed-off-by: Richard Henderson
---
target/mips/tcg/sysemu/mips-semi.c | 27 +--
1 file changed, 9 insertions(+), 18 deletions(-)
diff --git a/target/mips/tcg/sysemu/mips-semi.c
b/target/mips/tcg/sysemu/mips-semi.c
index
We don't implement it with _WIN32 hosts, and the syscalls
are missing from the gdb remote file i/o interface.
Since we can't implement them universally, drop them.
Signed-off-by: Richard Henderson
---
target/mips/tcg/sysemu/mips-semi.c | 39 ++
1 file changed, 7
With semihosting_get_arg, we already have a check vs argc, so
there's no point replicating it -- just check the result vs NULL.
Merge copy_argn_to_target into its caller.
Signed-off-by: Richard Henderson
---
target/mips/tcg/sysemu/mips-semi.c | 44 ++
1 file changed,
Use semihost_sys_write and/or qemu_semihosting_console_write
for implementing plog. When using gdbstub, copy the temp
string below the stack so that gdb has a guest address from
which to perform the log.
Signed-off-by: Richard Henderson
---
target/mips/tcg/sysemu/mips-semi.c | 52
We don't implement it with _WIN32 hosts, and the syscall
is missing from the gdb remote file i/o interface.
Since we can't implement it universally, drop it.
Signed-off-by: Richard Henderson
---
target/mips/tcg/sysemu/mips-semi.c | 9 -
1 file changed, 9 deletions(-)
diff --git
Hello 徐闯,
Thanks for reviewing!
On Wed, Jun 1, 2022 at 6:37 AM 徐闯 wrote:
[...]
> Hi, Leonardo. I'm also paying attention to the application of
> MSG_ZEROCOPY in live migration recently. I noticed that you defined a
> member `zero_copy_queued` in the struct QIOChannelSocket, but I can't
> find
The UHI specification does not have an EFAULT value,
and further specifies that "undefined UHI operations
should not return control to the target".
So, log the error and abort.
Signed-off-by: Richard Henderson
---
target/mips/tcg/sysemu/mips-semi.c | 33 ++
1 file
Always log the assert locally. Do not report_fault, but
instead include the fact of the fault in the assertion.
Don't bother freeing allocated strings before the abort().
Signed-off-by: Richard Henderson
---
target/mips/tcg/sysemu/mips-semi.c | 39 ++
1 file
>From the Unified Hosting Interface, MD01069 Reference Manual,
version 1.1.6, 06 July 2015.
Signed-off-by: Richard Henderson
---
target/mips/tcg/sysemu/mips-semi.c | 40 ++
1 file changed, 40 insertions(+)
diff --git a/target/mips/tcg/sysemu/mips-semi.c
This separates guest file descriptors from host file descriptors,
and utilizes shared infrastructure for integration with gdbstub.
Signed-off-by: Richard Henderson
---
target/mips/tcg/sysemu/mips-semi.c | 219 +
1 file changed, 95 insertions(+), 124 deletions(-)
The function is no longer used.
Signed-off-by: Richard Henderson
---
include/semihosting/console.h | 13 -
semihosting/console.c | 9 -
2 files changed, 22 deletions(-)
diff --git a/include/semihosting/console.h b/include/semihosting/console.h
index
Based-on: <20220607204557.658541-1-richard.hender...@linaro.org>
("[PATCH v4 00/53] semihosting cleanup")
Changes for v4:
* Split out of v2.
* Undo the gdb errno thing; continue to convert between host and uhi.
r~
Richard Henderson (11):
target/mips: Use an exception for semihosting
Within do_interrupt, we hold the iothread lock, which
is required for Chardev access for the console, and for
the round trip for use_gdb_syscalls().
Signed-off-by: Richard Henderson
---
target/mips/cpu.h | 3 ++-
target/mips/tcg/tcg-internal.h| 2 ++
在 2022/5/20 03:12, Eugenio Pérez 写道:
CVQ needs to be in its own group, not shared with any data vq. Enable
the checking of it here, before introducing address space id concepts.
Signed-off-by: Eugenio Pérez
---
include/hw/virtio/vhost.h | 2 +
hw/net/vhost_net.c| 4 +-
在 2022/5/20 03:12, Eugenio Pérez 写道:
To restore the device in the destination of a live migration we send the
commands through control virtqueue. For a device to read CVQ it must
have received DRIVER_OK status bit.
However this open a window where the device could start receiving
packets in
在 2022/5/20 03:12, Eugenio Pérez 写道:
Signed-off-by: Eugenio Pérez
---
It's better to use the helpers in scripts/ and mentioned to which
version is this synced.
Thanks
include/standard-headers/linux/vhost_types.h | 11 -
linux-headers/linux/vhost.h | 25
在 2022/5/20 03:12, Eugenio Pérez 写道:
Enable SVQ to not to forward the descriptor translating its address to
qemu's IOVA but copying to a region outside of the guest.
Virtio-net control VQ will use this mode, so we don't need to send all
the guest's memory every time there is a change, but
Tested-by: Heiko Stuebner
Signed-off-by: Dao Lu
---
target/riscv/cpu.c | 2 ++
target/riscv/cpu.h | 1 +
target/riscv/insn32.decode | 7 ++-
target/riscv/insn_trans/trans_rvi.c.inc | 18 ++
4 files changed, 27
This patch adds RISC-V Zihintpause support. The extension is set to be enabled
by default and opcode has been added to insn32.decode.
Added trans_pause for TCG to mainly to break reservation and exit the TB.
The change can also be found in:
The new PAPR 2.12 defines a watchdog facility managed via the new
H_WATCHDOG hypercall.
This adds H_WATCHDOG support which a proposed driver for pseries uses:
https://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=303120
This was tested by running QEMU with a debug kernel and command
Semihosting is not enabled for nios2-linux-user.
Signed-off-by: Richard Henderson
---
target/nios2/nios2-semi.c | 5 -
target/nios2/meson.build | 4 ++--
2 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/target/nios2/nios2-semi.c b/target/nios2/nios2-semi.c
index
Based-on: <20220607204557.658541-1-richard.hender...@linaro.org>
("[PATCH v4 00/53] semihosting cleanup")
Changes for v4:
* Split out of v2.
* Convert host errno to gdb errno, which for nios2 is guest errno.
r~
Richard Henderson (3):
target/nios2: Eliminate nios2_semi_is_lseek
This separates guest file descriptors from host file descriptors,
and utilizes shared infrastructure for integration with gdbstub.
Signed-off-by: Richard Henderson
---
target/nios2/nios2-semi.c | 321 +-
1 file changed, 77 insertions(+), 244 deletions(-)
Reorg nios2_semi_return_* to gdb_syscall_complete_cb.
Use the 32-bit version normally, and the 64-bit version
for HOSTED_LSEEK.
Signed-off-by: Richard Henderson
---
target/nios2/nios2-semi.c | 59 +++
1 file changed, 23 insertions(+), 36 deletions(-)
diff
On Tue, Jun 07, 2022 at 05:55:46PM -0700, Marc Orr wrote:
> On Tue, Jun 7, 2022 at 12:01 AM Chao Peng wrote:
> >
> > On Mon, Jun 06, 2022 at 01:09:50PM -0700, Vishal Annapurve wrote:
> > > >
> > > > Private memory map/unmap and conversion
> > > > ---
> > > >
On Tue, Jun 7, 2022 at 2:45 PM Richard Henderson <
richard.hender...@linaro.org> wrote:
> On 6/7/22 13:14, Warner Losh wrote:
> > +/* read(2) */
> > +static inline abi_long do_bsd_read(abi_long arg1, abi_long arg2,
> abi_long arg3)
>
> Why the inline markers? Best to drop them.
>
static inline
On 6/7/22 16:35, Warner Losh wrote:
On Jun 7, 2022, at 3:23 PM, Richard Henderson
wrote:
On 6/7/22 14:51, Warner Losh wrote:
void unlock_iovec(IOVecMap *map, bool copy_out)
{
for (int i = 0, count = map->count; i < count; ++i) {
if (map->host[i].iov_base) {
On 6/7/2022 7:16 PM, Gerd Hoffmann wrote:
Hi,
I guess it could be helpful for the discussion when you can outine the
'big picture' for tdx initialization. How does kvm accel setup look
like without TDX, and what additional actions are needed for TDX? What
ordering requirements and other
When shadow doorbell buffer is enabled, doorbell registers are lazily
updated. The actual queue head and tail pointers are stored in Shadow
Doorbell buffers.
Add trace events for updates on the Shadow Doorbell buffers and EventIdx
buffers. Also add trace event for the Doorbell Buffer Config
On Tue, Jun 7, 2022 at 12:01 AM Chao Peng wrote:
>
> On Mon, Jun 06, 2022 at 01:09:50PM -0700, Vishal Annapurve wrote:
> > >
> > > Private memory map/unmap and conversion
> > > ---
> > > Userspace's map/unmap operations are done by fallocate() ioctl on the
> >
This patch adds shadow doorbell buffer support in NVMe 1.3 to QEMU
NVMe. The Doorbell Buffer Config admin command is implemented for the
guest to enable shadow doobell buffer. When this feature is enabled, each
SQ/CQ is associated with two buffers, i.e., Shadow Doorbell buffer and
EventIdx buffer.
Implement Doorbel Buffer Config command (Section 5.7 in NVMe Spec 1.3)
and Shadow Doorbel buffer & EventIdx buffer handling logic (Section 7.13
in NVMe Spec 1.3). For queues created before the Doorbell Buffer Config
command, the nvme_dbbuf_config function tries to associate each existing
SQ and CQ
Since we verify that "ready_delay" parameter has to be smaller than CRWMT,
we know that the namespace will always become ready.
Therefore the "Namespace Not Ready" status code will never have the DNR
bit set.
Add a new parameter "never_ready" that can be used to emulate a namespace
that never
CRMS.CRWMS bit shall be set to 1 on controllers compliant with versions
later than NVMe 1.4.
The first version later than NVMe 1.4 is NVMe 2.0
Let's claim compliance with NVMe 2.0 such that a follow up patch can
set the CRMS.CRWMS bit.
This is needed since CC.CRIME is only writable when both
Each NvmeNamespace can be used by serveral controllers,
but a NvmeNamespace can at most belong to a single NvmeSubsystem.
Store a pointer to the NvmeSubsystem, if the namespace was realized
with a NvmeSubsystem.
This will be used by a follow up patch.
Signed-off-by: Niklas Cassel
---
TP4084 adds a new mode, CC.CRIME, that can be used to mark a namespace
as ready independently from the controller.
When CC.CRIME is 0 (default), things behave as before, all namespaces
are ready when CSTS.RDY gets set to 1.
When CC.CRIME is 1, the controller will become ready when CSTS.RDY gets
Hello there,
considering that Linux v5.19-rc1 is out which includes support for
NVMe TP4084:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/nvme/host/core.c?id=354201c53e61e493017b15327294b0c8ab522d69
I thought that it might be nice to have QEMU support for the
From: Anthony PERARD
At the moment, there doesn't seems to be any way to know that QEMU
made modification to the command buffer. This is potentially an issue
on Xen while migrating a guest, as modification to the buffer after
the migration as started could be ignored and not transfered to the
Hi!
The patches in this PR resolve several Coverity issues and mark a memory
region with TPM response data as dirty so that it does not get lost during
migration.
Stefan
The following changes since commit 7077fcb9b68f058809c9dd9fd1dacae1881e886c:
Merge tag 'vmbus-maint-20220530' of
From: Peter Maydell
In tpm_tis_mmio_read(), tpm_tis_mmio_write() and
tpm_tis_dump_state(), we calculate a locality index with
tpm_tis_locality_from_addr() and then use it as an index into the
s->loc[] array. In all these cases, the array index can't overflow
because the MemoryRegion is sized to
On Wed, 01 Jun 2022, Jonathan Cameron wrote:
Paolo Bonzini requested this change to simplify the ongoing
effort to allow machine setup entirely via RPC.
Includes shortening the command line form cxl-fixed-memory-window
to cxl-fmw as the command lines are extremely long even with this
change.
On Wed, Jun 8, 2022 at 9:27 AM Bin Meng wrote:
>
> On Wed, Jun 1, 2022 at 9:37 AM Alistair Francis
> wrote:
> >
> > From: Alistair Francis
> >
> > There are currently two types of RISC-V CPUs:
> > - Generic CPUs (base or any) that allow complete custimisation
> > - "Named" CPUs that match
On Wed, Jun 8, 2022 at 9:20 AM Dao Lu wrote:
>
> Hi Alistair,
>
> Thanks for the response. I don't think I can find any comments
> on this patch though, could you help point me to them?
I see a PATCH v1 with comments and then your ping to PATCH v2, but I
don't see the original PATCH v2. It might
Leverage the new mechanism to pass over errors to upper stack for
kvm_arch_put_registers() when called for the post_init() accel hook.
Signed-off-by: Peter Xu
---
accel/kvm/kvm-all.c | 13 ++---
accel/kvm/kvm-cpus.h | 2 +-
softmmu/cpus.c | 5 -
3 files changed, 15
This version of run_on_cpu() allows to take an Error** to detect errors.
Signed-off-by: Peter Xu
---
cpus-common.c | 27 +++
include/hw/core/cpu.h | 26 ++
softmmu/cpus.c| 6 ++
3 files changed, 59 insertions(+)
diff --git
> On Jun 7, 2022, at 3:23 PM, Richard Henderson
> wrote:
>
> On 6/7/22 14:51, Warner Losh wrote:
>>void unlock_iovec(IOVecMap *map, bool copy_out)
>>{
>> for (int i = 0, count = map->count; i < count; ++i) {
>> if (map->host[i].iov_base) {
>>
[Marking this as RFC]
This series teaches QEMU to detect errors when e.g. putting registers from
QEMU to KVM, and fail migrations properly.
For the rational of this series and why it was posted, please refer to the
bug report here:
https://lore.kernel.org/all/YppVupW+IWsm7Osr@xz-m1.local/
But
run_on_cpu API does not yet support any way to pass over an error message
to above. Add a new run_on_cpu_func2 hook to grant possibility of that.
Note that this only changes the cpus-common core, no API is yet introduced
for v2 of the run_on_cpu_func function.
Signed-off-by: Peter Xu
---
On Wed, Jun 1, 2022 at 9:37 AM Alistair Francis
wrote:
>
> From: Alistair Francis
>
> There are currently two types of RISC-V CPUs:
> - Generic CPUs (base or any) that allow complete custimisation
> - "Named" CPUs that match existing hardware
>
> Users can use the base CPUs to custimise the
Allow cpu_synchronize_all_post_init() to fail with an errp when it's set.
Modify both precopy and postcopy to try to detect such error.
Signed-off-by: Peter Xu
---
hw/core/machine.c | 2 +-
include/sysemu/cpus.h | 2 +-
migration/savevm.c| 20 +---
softmmu/cpus.c
Based-on: <20220607204557.658541-1-richard.hender...@linaro.org>
("[PATCH v4 00/53] semihosting cleanup")
Changes for v4:
* Split out of v2.
* Convert host errno to gdb errno, which for m68k is guest errno.
r~
Richard Henderson (3):
target/m68k: Eliminate m68k_semi_is_fseek
Hi Alistair,
Thanks for the response. I don't think I can find any comments
on this patch though, could you help point me to them?
Thanks,
Dao
On Tue, Jun 7, 2022 at 4:04 PM Alistair Francis wrote:
>
> On Wed, Jun 8, 2022 at 8:59 AM Dao Lu wrote:
> >
> > Ping
>
> The latest version of this
While we had a call to do_m68k_semihosting in linux-user, it
wasn't actually reachable. We don't include DISAS_INSN(halt)
as an instruction unless system mode.
Signed-off-by: Richard Henderson
---
linux-user/m68k/cpu_loop.c | 5 -
target/m68k/m68k-semi.c| 36
On Wed, Jun 8, 2022 at 8:59 AM Dao Lu wrote:
>
> Ping
The latest version of this patch on the mailing list has comments that
need to be addressed
Alistair
>
> On Tue, May 24, 2022 at 1:36 PM Dao Lu wrote:
> >
> > Tested-by: Heiko Stuebner
> > Signed-off-by: Dao Lu
> > ---
> >
On 6/7/22 14:51, Warner Losh wrote:
void unlock_iovec(IOVecMap *map, bool copy_out)
{
for (int i = 0, count = map->count; i < count; ++i) {
if (map->host[i].iov_base) {
abi_ulong target_base = tswapal(map->target[i].iov_base);
It allows accel->synchronize_post_init() hook to return an error upwards.
Add a new cpu_synchronize_post_init_full() for it, then let the existing
cpu_synchronize_post_init() to call it with errp==NULL.
Signed-off-by: Peter Xu
---
accel/hvf/hvf-accel-ops.c | 2 +-
accel/kvm/kvm-all.c
On Wed, Jun 1, 2022 at 11:37 AM Alistair Francis
wrote:
>
> From: Alistair Francis
>
> There are currently two types of RISC-V CPUs:
> - Generic CPUs (base or any) that allow complete custimisation
> - "Named" CPUs that match existing hardware
>
> Users can use the base CPUs to custimise the
On Tue, Jun 7, 2022 at 2:34 PM Richard Henderson <
richard.hender...@linaro.org> wrote:
> On 6/7/22 13:14, Warner Losh wrote:
> > +static abi_long freebsd_syscall(void *cpu_env, int num, abi_long arg1,
> > +abi_long arg2, abi_long arg3, abi_long
> arg4,
> > +
On 6/7/22 13:14, Warner Losh wrote:
+/* write(2) */
+static inline abi_long do_bsd_write(abi_long arg1, abi_long arg2, abi_long
arg3)
Likewise drop the inline markers.
r~
On 6/7/22 13:14, Warner Losh wrote:
+/* read(2) */
+static inline abi_long do_bsd_read(abi_long arg1, abi_long arg2, abi_long arg3)
Why the inline markers? Best to drop them.
+/*
+ * File system calls.
+ */
+case TARGET_FREEBSD_NR_read: /* read(2) */
+ret
On Mon, Jun 6, 2022 at 4:22 PM ~eopxd wrote:
>
> According to v-spec, tail agnostic behavior can be either kept as
> undisturbed or set elements' bits to all 1s. To distinguish the
> difference of tail policies, QEMU should be able to simulate the tail
> agnostic behavior as "set tail elements'
This separates guest file descriptors from host file descriptors,
and utilizes shared infrastructure for integration with gdbstub.
Signed-off-by: Richard Henderson
---
target/m68k/m68k-semi.c | 306 ++--
1 file changed, 76 insertions(+), 230 deletions(-)
Reorg m68k_semi_return_* to gdb_syscall_complete_cb.
Use the 32-bit version normally, and the 64-bit version
for HOSTED_LSEEK.
Signed-off-by: Richard Henderson
---
target/m68k/m68k-semi.c | 55 +
1 file changed, 23 insertions(+), 32 deletions(-)
diff
On Tue, Jun 7, 2022 at 2:01 PM Richard Henderson <
richard.hender...@linaro.org> wrote:
> On 6/7/22 13:14, Warner Losh wrote:
> > +static void helper_unlock_iovec(struct target_iovec *target_vec,
> > +abi_ulong target_addr, struct iovec
> *vec,
> > +
On 6/7/22 13:14, Warner Losh wrote:
+void unlock_iovec(struct iovec *vec, abi_ulong target_addr,
+int count, int copy)
+{
+struct target_iovec *target_vec;
+
+target_vec = lock_user(VERIFY_READ, target_addr,
+ count * sizeof(struct target_iovec), 1);
+
Ping
On Tue, May 24, 2022 at 1:36 PM Dao Lu wrote:
>
> Tested-by: Heiko Stuebner
> Signed-off-by: Dao Lu
> ---
> target/riscv/cpu.c | 2 ++
> target/riscv/cpu.h | 1 +
> target/riscv/insn32.decode | 7 ++-
>
On 6/7/22 13:14, Warner Losh wrote:
+static void helper_unlock_iovec(struct target_iovec *target_vec,
+abi_ulong target_addr, struct iovec *vec,
+int count, int copy)
+{
+for (int i = 0; i < count; i++) {
+abi_ulong base
This function has been replaced by *_write.
Signed-off-by: Richard Henderson
---
include/semihosting/console.h | 13 --
linux-user/semihost.c | 17
semihosting/console.c | 49 ---
3 files changed, 79 deletions(-)
diff --git
This function has been replaced by *_write.
Signed-off-by: Richard Henderson
---
include/semihosting/console.h | 13 -
linux-user/semihost.c | 16
semihosting/console.c | 18 --
3 files changed, 47 deletions(-)
diff --git
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.
Signed-off-by: Richard Henderson
---
include/semihosting/guestfd.h | 7 +
On Tue, Jun 7, 2022 at 2:28 PM Richard Henderson <
richard.hender...@linaro.org> wrote:
> On 6/7/22 13:14, Warner Losh wrote:
> > +void unlock_iovec(struct iovec *vec, abi_ulong target_addr,
> > +int count, int copy)
> > +{
> > +struct target_iovec *target_vec;
> > +
> > +
Hi Cole,
On Sun, Jun 5, 2022 at 6:46 PM Cole Robinson wrote:
>
> Hi Marc-André,
>
> dbus-display-test seems flakey. I'm occasionally seeing:
>
> ▶ 692/746
> ERROR:../tests/qtest/dbus-display-test.c:68:test_dbus_display_vm:
> assertion failed
>
Signed-off-by: Richard Henderson
---
semihosting/arm-compat-semi.c | 11 +--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/semihosting/arm-compat-semi.c b/semihosting/arm-compat-semi.c
index dea5b2de8d..21b6bc3a0f 100644
--- a/semihosting/arm-compat-semi.c
+++
We don't need CPUArchState, and we do want the CPUState of the
thread performing the operation -- use this instead of current_cpu.
Reviewed-by: Peter Maydell
Signed-off-by: Richard Henderson
---
include/semihosting/console.h | 4 ++--
linux-user/semihost.c | 2 +-
Signed-off-by: Richard Henderson
---
semihosting/arm-compat-semi.c | 27 ++-
1 file changed, 18 insertions(+), 9 deletions(-)
diff --git a/semihosting/arm-compat-semi.c b/semihosting/arm-compat-semi.c
index 20e99cdcc0..4c8932ad54 100644
---
On 6/7/22 13:14, Warner Losh wrote:
+static abi_long freebsd_syscall(void *cpu_env, int num, abi_long arg1,
+abi_long arg2, abi_long arg3, abi_long arg4,
+abi_long arg5, abi_long arg6, abi_long arg7,
+
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.
Signed-off-by: Richard Henderson
---
Allow more than one character to be read at one time.
Will be used by m68k and nios2 semihosting for stdio.
Signed-off-by: Richard Henderson
---
include/semihosting/console.h | 12 +++-
linux-user/semihost.c | 10 ++
semihosting/arm-compat-semi.c | 11 +--
Split out the non-ARM specific portions of SYS_SYSTEM to a
reusable function.
Signed-off-by: Richard Henderson
---
include/semihosting/syscalls.h | 3 +++
semihosting/arm-compat-semi.c | 12 +-
semihosting/syscalls.c | 40 ++
3 files changed, 44
This syscall will be used by m68k and nios2 semihosting.
Signed-off-by: Richard Henderson
---
include/semihosting/syscalls.h | 3 +++
semihosting/syscalls.c | 42 ++
2 files changed, 45 insertions(+)
diff --git a/include/semihosting/syscalls.h
On Tue, 7 Jun 2022 20:44:23 +0300
Avihai Horon wrote:
> On 5/30/2022 8:07 PM, Avihai Horon wrote:
> > Hello,
> >
> > Following VFIO migration protocol v2 acceptance in kernel, this series
> > implements VFIO migration according to the new v2 protocol and replaces
> > the now deprecated v1
Will replace qemu_semihosting_console_{outs,outc},
but we need more plumbing first.
Signed-off-by: Richard Henderson
---
include/semihosting/console.h | 12
linux-user/semihost.c | 5 +
semihosting/console.c | 9 +
3 files changed, 26 insertions(+)
Split out the non-ARM specific portions of SYS_READ to a
reusable function. This handles all GuestFD. Isolate the
curious ARM-specific return value processing to a new
callback, common_semi_rw_cb.
Note that gdb_do_syscall %x reads target_ulong, not int.
Signed-off-by: Richard Henderson
---
These syscalls will be used by m68k and nios2 semihosting.
Signed-off-by: Richard Henderson
---
include/semihosting/syscalls.h | 7 ++
semihosting/syscalls.c | 137 +
2 files changed, 144 insertions(+)
diff --git a/include/semihosting/syscalls.h
The implementation of qemu_semihosting_console_inc does not
defer to gdbstub, but only reads from the fifo in console.c.
Signed-off-by: Richard Henderson
---
include/semihosting/console.h | 9 -
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/include/semihosting/console.h
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.
Signed-off-by: Richard Henderson
---
Moving this to be useful for another function
besides do_common_semihosting.
Reviewed-by: Peter Maydell
Signed-off-by: Richard Henderson
---
semihosting/arm-compat-semi.c | 48 +--
1 file changed, 24 insertions(+), 24 deletions(-)
diff --git
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.
Signed-off-by: Richard Henderson
---
include/semihosting/console.h | 16
include/semihosting/syscalls.h | 3 ++
The ARM-specific SYS_FLEN isn't really something that can be
reused by other semihosting apis, but there are parts that can
reused for the implementation of semihost_sys_fstat.
Signed-off-by: Richard Henderson
---
include/semihosting/syscalls.h | 4 ++
semihosting/arm-compat-semi.c | 74
Split out the non-ARM specific portions of SYS_SEEK to a
reusable function. This handles all GuestFD. Isolate the
curious ARM-specific return value processing to a new
callback, common_semi_seek_cb.
Expand the internal type of the offset to int64_t, and
provide the whence argument, which will
Split out the non-ARM specific portions of SYS_ISTTY to a
reusable function. This handles all GuestFD.
Add a common_semi_istty_cb helper to translate the Posix
error return, 0+ENOTTY, to the Arm semihosting not-a-file
success result.
Signed-off-by: Richard Henderson
---
Move the ARM and RISCV specific helpers into
their own header file.
Signed-off-by: Richard Henderson
---
target/arm/common-semi-target.h | 62
target/riscv/common-semi-target.h | 50
semihosting/arm-compat-semi.c | 94 +--
Split out the non-ARM specific portions of SYS_CLOSE to a
reusable function. This handles all GuestFD.
Note that gdb_do_syscall %x reads target_ulong, not int.
Signed-off-by: Richard Henderson
---
include/semihosting/syscalls.h | 3 +++
semihosting/arm-compat-semi.c | 41
1 - 100 of 334 matches
Mail list logo