[PATCH v8 10/16] qemu-iotests: extend the check script to prepare supporting valgrind for python tests

2021-07-04 Thread Emanuele Giuseppe Esposito
Currently, the check script only parses the option and sets the VALGRIND_QEMU environmental variable to "y". Add another local python variable that prepares the command line, identical to the one provided in the test scripts. Because the python script does not know in advance the valgrind PID to a

[PATCH v8 01/16] python: qemu: add timer parameter for qmp.accept socket

2021-07-04 Thread Emanuele Giuseppe Esposito
Also add a new _qmp_timer field to the QEMUMachine class. Let's change the default socket timeout to None, so that if a subclass needs to add a timer, it can be done by modifying this private field. At the same time, restore the timer to be 15 seconds in iotests.py, to give an upper bound to the

[PATCH v8 03/16] python: qemu: pass the wrapper field from QEMUQtestmachine to QEMUMachine

2021-07-04 Thread Emanuele Giuseppe Esposito
Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: John Snow Reviewed-by: Max Reitz Acked-by: John Snow --- python/qemu/machine/qtest.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/python/qemu/machine/qtest.py b/python/q

[PATCH v8 00/16] qemu_iotests: improve debugging options

2021-07-04 Thread Emanuele Giuseppe Esposito
This series adds the option to attach gdbserver and valgrind to the QEMU binary running in qemu_iotests. It also allows to redirect QEMU binaries output of the python tests to the stdout, instead of a log file. Patches 1-9 introduce the -gdb option to both python and bash tests, 10-14 extend the

[PATCH v2] linux-user/elfload: Implement ELF_HWCAP for RISC-V

2021-07-04 Thread Kito Cheng
Set I, M, A, F, D and C bit for hwcap if misa is set. V2 Changes: - Only set imafdc bits, sync with upstream linux kernel. Signed-off-by: Kito Cheng --- linux-user/elfload.c | 30 +- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/linux-user/elfload.c b

Re: [RFC PATCH 6/6] dp8393x: Rewrite dp8393x_get() / dp8393x_put()

2021-07-04 Thread Mark Cave-Ayland
On 05/07/2021 02:36, Finn Thain wrote: Unfortunately I don't have a test mips64el image available to see if this combination works for Linux. Phil, do you have a suitable test kernel and rootfs image available to allow this to be tested? You can build and boot a mipsel vmlinux by following th

[Bug 1770417] Re: Qemu can not parse long fqdns during drive-mirror

2021-07-04 Thread Thomas Huth
** Changed in: qemu (Ubuntu) Status: Confirmed => Incomplete ** Bug watch removed: Red Hat Bugzilla #1568939 https://bugzilla.redhat.com/show_bug.cgi?id=1568939 -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.l

Re: [PATCH] tests/acceptance: Test NetBSD 5.1 on the Jazz Magnum machine

2021-07-04 Thread Mark Cave-Ayland
On 05/07/2021 01:26, Philippe Mathieu-Daudé wrote: Test NetBSD 5.1 on the Jazz Magnum machine. As the firmware is not redistributable, it has to be extracted from the floppy configuration disk coming with a Mips Magnum 4000 system, then the NTPROM_BIN_PATH environment variable has to be set. For

Re: [RFC v6 08/13] target/s390x: split cpu-dump from helper.c

2021-07-04 Thread Claudio Fontana
On 7/2/21 9:25 AM, Al Cho wrote: > On Thu, 2021-07-01 at 14:35 +0200, Thomas Huth wrote: >> On 29/06/2021 16.19, Cho, Yu-Chen wrote: >>> Splitting this functionality also allows us to make helper.c sysemu- >>> only. >>> >>> Signed-off-by: Claudio Fontana >>> Signed-off-by: Cho, Yu-Chen >>> Acked-

Re: [PATCH v1 2/3] hw/riscv: opentitan: Add the unimplement rv_core_ibex_peri

2021-07-04 Thread Bin Meng
On Fri, Jul 2, 2021 at 1:20 PM Alistair Francis wrote: > > Signed-off-by: Alistair Francis > --- > include/hw/riscv/opentitan.h | 1 + > hw/riscv/opentitan.c | 3 +++ > 2 files changed, 4 insertions(+) > Reviewed-by: Bin Meng

Re: [PATCH v1 1/3] char: ibex_uart: Update the register layout

2021-07-04 Thread Bin Meng
On Fri, Jul 2, 2021 at 1:19 PM Alistair Francis wrote: > > Update the register layout to match the latest OpenTitan bitstream. > > Signed-off-by: Alistair Francis > --- > hw/char/ibex_uart.c | 19 ++- > 1 file changed, 10 insertions(+), 9 deletions(-) > Reviewed-by: Bin Meng

Re: [PATCH v1 3/3] hw/riscv: opentitan: Add the flash alias

2021-07-04 Thread Bin Meng
On Fri, Jul 2, 2021 at 1:20 PM Alistair Francis wrote: Could you add some commit message to explain this alias? > > Signed-off-by: Alistair Francis > --- > include/hw/riscv/opentitan.h | 2 ++ > hw/riscv/opentitan.c | 6 ++ > 2 files changed, 8 insertions(+) > > diff --git a/includ

Re: [PATCH v2 1/3] hw/net: e1000: Correct the initial value of VET register

2021-07-04 Thread Bin Meng
On Mon, Jul 5, 2021 at 12:21 PM Jason Wang wrote: > > > 在 2021/7/2 下午5:24, Bin Meng 写道: > > From: Christina Wang > > > > The initial value of VLAN Ether Type (VET) register is 0x8100, as per > > the manual and real hardware. > > > > While Linux e1000 driver always writes VET register to 0x8100, i

Re: [PATCH 2/2] docs/system: riscv: Add documentation for virt machine

2021-07-04 Thread Alistair Francis
On Mon, Jun 28, 2021 at 12:29 AM Bin Meng wrote: > > This adds detailed documentation for RISC-V `virt` machine, > including the following information: > > - Supported devices > - Hardware configuration information > - Boot options > - Running Linux kernel > - Running U-Boot > > Signed-o

Re: [PATCH] target/ppc/spapr: Update H_GET_CPU_CHARACTERISTICS L1D cache flush bits

2021-07-04 Thread David Gibson
On Sun, Jun 20, 2021 at 12:22:53PM +1000, Nicholas Piggin wrote: > Excerpts from David Gibson's message of June 19, 2021 7:26 pm: > > On Tue, Jun 15, 2021 at 02:41:07PM +1000, Nicholas Piggin wrote: > >> There are several new L1D cache flush bits added to the hcall which reflect > >> hardware secur

Re: [PATCH v3 2/3] spapr: use DEVICE_UNPLUG_ERROR to report unplug errors

2021-07-04 Thread David Gibson
On Mon, Jun 21, 2021 at 05:59:06PM -0300, Daniel Henrique Barboza wrote: > Linux Kernel 5.12 is now unisolating CPU DRCs in the device_removal > error path, signalling that the hotunplug process wasn't successful. > This allow us to send a DEVICE_UNPLUG_ERROR in drc_unisolate_logical() > to signal

Re: [PATCH v3 3/3] memory_hotplug.c: send DEVICE_UNPLUG_ERROR in acpi_memory_hotplug_write()

2021-07-04 Thread David Gibson
On Mon, Jun 21, 2021 at 05:59:07PM -0300, Daniel Henrique Barboza wrote: > MEM_UNPLUG_ERROR is deprecated since the introduction of > DEVICE_UNPLUG_ERROR. Keep emitting both while the deprecation of > MEM_UNPLUG_ERROR is pending. > > CC: Michael S. Tsirkin > CC: Igor Mammedov > Signed-off-by: Da

Re: [PATCH v3 1/3] qapi/qdev.json: add DEVICE_UNPLUG_ERROR QAPI event

2021-07-04 Thread David Gibson
On Mon, Jun 21, 2021 at 05:59:05PM -0300, Daniel Henrique Barboza wrote: > At this moment we only provide one event to report a hotunplug error, > MEM_UNPLUG_ERROR. As of Linux kernel 5.12 and QEMU 6.0.0, the pseries > machine is now able to report unplug errors for other device types, such >

Re: [PATCH v4 1/3] target/ppc: fix address translation bug for radix mmus

2021-07-04 Thread David Gibson
On Mon, Jun 28, 2021 at 10:36:08AM -0300, Bruno Larsen (billionai) wrote: > This commit attempts to fix a technical hiccup first mentioned by Richard > Henderson in > https://lists.nongnu.org/archive/html/qemu-devel/2021-05/msg06247.html > > To sumarize the hiccup here, when radix-style mmus are t

Re: [PATCH v4 3/3] target/ppc: changed ppc_hash64_xlate to use mmu_idx

2021-07-04 Thread David Gibson
On Mon, Jun 28, 2021 at 10:36:10AM -0300, Bruno Larsen (billionai) wrote: 65;6402;1c> Changed hash64 address translation to use the supplied mmu_idx instead > of using the one stored in the msr, for parity purposes (other book3s > MMUs already use it). > > Signed-off-by: Bruno Larsen (billionai)

Re: [PATCH v4 2/3] target/ppc: change ppc_hash32_xlate to use mmu_idx

2021-07-04 Thread David Gibson
On Mon, Jun 28, 2021 at 10:36:09AM -0300, Bruno Larsen (billionai) wrote: > Changed hash32 address translation to use the supplied mmu_idx, instead > of using what was stored in the msr, for parity purposes (radix64 > already uses that). Well.. parity and conceptual correctness. The translation i

[Bug 1815252] Re: virtio-9p-pci passthrough fsync hang

2021-07-04 Thread Launchpad Bug Tracker
[Expired for QEMU because there has been no activity for 60 days.] ** Changed in: qemu Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1815252 Title: virtio-9p-p

[Bug 1818483] Re: qemu user mode does not support binfmt_misc config with flags include "P"

2021-07-04 Thread Launchpad Bug Tracker
[Expired for QEMU because there has been no activity for 60 days.] ** Changed in: qemu Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1818483 Title: qemu user m

[Bug 1821771] Re: KVM guest does not reflect numa distances configured through qemu

2021-07-04 Thread Launchpad Bug Tracker
[Expired for QEMU because there has been no activity for 60 days.] ** Changed in: qemu Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1821771 Title: KVM guest d

[Bug 1809546] Re: Writing a byte to a pl011 SFR overwrites the whole SFR

2021-07-04 Thread Launchpad Bug Tracker
[Expired for QEMU because there has been no activity for 60 days.] ** Changed in: qemu Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1809546 Title: Writing a b

[Bug 1859106] Re: 4.2 regression: ReactOS crashes on boot

2021-07-04 Thread Launchpad Bug Tracker
[Expired for QEMU because there has been no activity for 60 days.] ** Changed in: qemu Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1859106 Title: 4.2 regress

[Bug 1862887] Re: qemu does not load pulseaudio modules properly

2021-07-04 Thread Launchpad Bug Tracker
[Expired for QEMU because there has been no activity for 60 days.] ** Changed in: qemu Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1862887 Title: qemu does n

[Bug 1861458] Re: Clock drift issue with -soundhw hda

2021-07-04 Thread Launchpad Bug Tracker
[Expired for QEMU because there has been no activity for 60 days.] ** Changed in: qemu Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1861458 Title: Clock drift

[Bug 1861653] Re: CPU of qemu-system-aarch64 always stuck

2021-07-04 Thread Launchpad Bug Tracker
[Expired for QEMU because there has been no activity for 60 days.] ** Changed in: qemu Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1861653 Title: CPU of qemu

[Bug 1860553] Re: cmake crashes on qemu-alpha-user with Illegal Instruction

2021-07-04 Thread Launchpad Bug Tracker
[Expired for QEMU because there has been no activity for 60 days.] ** Changed in: qemu Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1860553 Title: cmake crash

[Bug 1863023] Re: Deadlock in QXL

2021-07-04 Thread Launchpad Bug Tracker
[Expired for QEMU because there has been no activity for 60 days.] ** Changed in: qemu Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1863023 Title: Deadlock in

[Bug 1861875] Re: VDE networking barely working

2021-07-04 Thread Launchpad Bug Tracker
[Expired for QEMU because there has been no activity for 60 days.] ** Changed in: qemu Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1861875 Title: VDE network

[Bug 1862415] Re: -nic user cannot receive TFTP response from outside on windows 10 host

2021-07-04 Thread Launchpad Bug Tracker
[Expired for QEMU because there has been no activity for 60 days.] ** Changed in: qemu Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1862415 Title: -nic user c

[Bug 1862979] Re: Cannot Create Socket Networking in Windows Host using Multicast

2021-07-04 Thread Launchpad Bug Tracker
[Expired for QEMU because there has been no activity for 60 days.] ** Changed in: qemu Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1862979 Title: Cannot Crea

[Bug 1863096] Re: vhost-user multi-queues interrupt failed when Qemu reconnection happens

2021-07-04 Thread Launchpad Bug Tracker
[Expired for QEMU because there has been no activity for 60 days.] ** Changed in: qemu Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1863096 Title: vhost-user

[Bug 1861884] Re: qemu socket multicast not working

2021-07-04 Thread Launchpad Bug Tracker
[Expired for QEMU because there has been no activity for 60 days.] ** Changed in: qemu Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1861884 Title: qemu socket

Re: [PATCH v2 1/3] hw/net: e1000: Correct the initial value of VET register

2021-07-04 Thread Jason Wang
在 2021/7/2 下午5:24, Bin Meng 写道: From: Christina Wang The initial value of VLAN Ether Type (VET) register is 0x8100, as per the manual and real hardware. While Linux e1000 driver always writes VET register to 0x8100, it is not always the case for everyone. Drivers relying on the reset value o

RE: [PATCH 4/7] colo: fixed 'Segmentation fault' when the simplex mode PVM poweroff

2021-07-04 Thread Rao, Lei
It's been a long time since this bug, I will reproduce it to get the GDB stack, but it may take some time. Thanks, Lei. -Original Message- From: Lukas Straub Sent: Sunday, July 4, 2021 4:36 AM To: Rao, Lei Cc: Zhang, Chen ; lizhij...@cn.fujitsu.com; jasow...@redhat.com; zhang.zhangha

Re: [PATCH v3] dp8393x: don't force 32-bit register access

2021-07-04 Thread Finn Thain
On Sun, 4 Jul 2021, Mark Cave-Ayland wrote: > Commit 3fe9a838ec "dp8393x: Always use 32-bit accesses" assumed that all > accesses > to the registers were 32-bit As I said, that assumption was not made there. If commit 3fe9a838ec is deficient it is probably because I am unaware of the ability

Re: [RFC PATCH 6/6] dp8393x: Rewrite dp8393x_get() / dp8393x_put()

2021-07-04 Thread Finn Thain
On Sun, 4 Jul 2021, Mark Cave-Ayland wrote: > On 03/07/2021 15:19, Philippe Mathieu-Daudé wrote: > > > Instead of accessing N registers via a single address_space API > > call using a temporary buffer (stored in the device state) and > > updating each register, move the address_space call in the

Re: [PATCH] hw/usb/hcd-dwc2: Enforce epnum to 0 for the control endpoint to avoid the assertion failure in usb_ep_get()

2021-07-04 Thread Qiang Liu
Hi Paul, On Mon, Jul 5, 2021 at 6:27 AM Paul Zimmerman wrote: > > On Sat, Jun 26, 2021 at 10:21 PM Qiang Liu wrote: > > > > Hi folks, > > > > I found this bug by my dwc2 fuzzer. > > It seems that > > * https://bugs.launchpad.net/qemu/+bug/1907042 > > * https://bugs.launchpad.net/qemu/+bug/152512

Re: [PATCH] tests/acceptance: Test NetBSD 5.1 on the Jazz Magnum machine

2021-07-04 Thread Finn Thain
On Mon, 5 Jul 2021, Philippe Mathieu-Daudé wrote: > Test NetBSD 5.1 on the Jazz Magnum machine. As the firmware is not > redistributable, it has to be extracted from the floppy configuration > disk coming with a Mips Magnum 4000 system, then the NTPROM_BIN_PATH > environment variable has to be set

Re: [PATCH 07/20] target/loongarch: Add fixed point arithmetic instruction translation

2021-07-04 Thread Song Gao
Hi, Richard, On 07/02/2021 10:46 PM, Richard Henderson wrote: > On 7/2/21 1:51 AM, Philippe Mathieu-Daudé wrote: >> static bool trans_mul_d(DisasContext *ctx, int rd, int rj, int rk) >> { >> TCGv t0, t1; >> >> check_loongarch_64(ctx); >> >> if (a->rd == 0) { >> /* Treat as

[PATCH] tests/acceptance: Test NetBSD 5.1 on the Jazz Magnum machine

2021-07-04 Thread Philippe Mathieu-Daudé
Test NetBSD 5.1 on the Jazz Magnum machine. As the firmware is not redistributable, it has to be extracted from the floppy configuration disk coming with a Mips Magnum 4000 system, then the NTPROM_BIN_PATH environment variable has to be set. For convenience a NVRAM pre- initialized to boot NetBSD i

Re: [PATCH] hw/usb/hcd-dwc2: Enforce epnum to 0 for the control endpoint to avoid the assertion failure in usb_ep_get()

2021-07-04 Thread Paul Zimmerman
On Sat, Jun 26, 2021 at 10:21 PM Qiang Liu wrote: > > Hi folks, > > I found this bug by my dwc2 fuzzer. > It seems that > * https://bugs.launchpad.net/qemu/+bug/1907042 > * https://bugs.launchpad.net/qemu/+bug/1525123 > or > * https://gitlab.com/qemu-project/qemu/-/issues/119 > * https://gitlab.co

[PULL V2 3/3] pvrdma: Fix the ring init error flow (CVE-2021-3608)

2021-07-04 Thread Marcel Apfelbaum
Do not unmap uninitialized dma addresses. Fixes: CVE-2021-3608 Reviewed-by: VictorV (Kunlun Lab) Tested-by: VictorV (Kunlun Lab) Signed-off-by: Marcel Apfelbaum Message-Id: <20210630115246.2178219-1-mar...@redhat.com> Tested-by: Yuval Shaia Reviewed-by: Yuval Shaia Reviewed-by: Philippe Mathi

[PULL V2 0/3] PVRDMA queue

2021-07-04 Thread Marcel Apfelbaum
The following changes since commit 9c2647f75004c4f7d64c9c0ec55f8c6f0739a8b1: Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging (2021-07-02 11:46:32 +0100) are available in the Git repository at: https://github.com/marcel-apf/qemu tags/pvrdma-04-07-2021-v2 for you

[PULL V2 2/3] pvrdma: Ensure correct input on ring init (CVE-2021-3607)

2021-07-04 Thread Marcel Apfelbaum
Check the guest passed a non zero page count for pvrdma device ring buffers. Fixes: CVE-2021-3607 Reported-by: VictorV (Kunlun Lab) Reviewed-by: VictorV (Kunlun Lab) Signed-off-by: Marcel Apfelbaum Message-Id: <20210630114634.2168872-1-mar...@redhat.com> Reviewed-by: Yuval Shaia Tested-by: Yuv

[PULL V2 1/3] hw/rdma: Fix possible mremap overflow in the pvrdma device (CVE-2021-3582)

2021-07-04 Thread Marcel Apfelbaum
From: Marcel Apfelbaum Ensure mremap boundaries not trusting the guest kernel to pass the correct buffer length. Fixes: CVE-2021-3582 Reported-by: VictorV (Kunlun Lab) Tested-by: VictorV (Kunlun Lab) Signed-off-by: Marcel Apfelbaum Message-Id: <20210616110600.20889-1-marcel.apfelb...@gmail.co

Re: [Qemu-devel] [PULL 0/3] PVRDMA queue

2021-07-04 Thread Marcel Apfelbaum
Hi Peter, On Sun, Jul 4, 2021 at 8:28 PM Peter Maydell wrote: > On Sun, 4 Jul 2021 at 11:56, Marcel Apfelbaum > wrote: > > > > The following changes since commit > 9c2647f75004c4f7d64c9c0ec55f8c6f0739a8b1: > > > > Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into > staging (

[PATCH 12/12] linux-user: Extract target errno related functions to 'target_errno.h'

2021-07-04 Thread Philippe Mathieu-Daudé
Extract target errno related functions to a new 'target_errno.h' header, so we can do the host <-> target errno conversion out of the big syscall.c (which is already 13k LoC). Signed-off-by: Philippe Mathieu-Daudé --- linux-user/target_errno.h | 32 +++ linux-user/syscall.c | 162 +

[PATCH 10/12] linux-user/syscall: Refactor target_to_host_errno_table_init()

2021-07-04 Thread Philippe Mathieu-Daudé
To be able to move the errno handling code out of syscall.c, first refactor the target_to_host_errno_table[] initialization as a new init() function. Signed-off-by: Philippe Mathieu-Daudé --- linux-user/syscall.c | 24 1 file changed, 16 insertions(+), 8 deletions(-) di

[PATCH 09/12] linux-user/mips: Move errno definitions to 'target_errno_defs.h'

2021-07-04 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- linux-user/mips/target_errno_defs.h | 211 ++ linux-user/mips/target_syscall.h | 211 -- linux-user/mips64/target_errno_defs.h | 211 ++ linux-user/mips64/target_syscall.h|

[PATCH 07/12] linux-user/alpha: Move errno definitions to 'target_errno_defs.h'

2021-07-04 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- linux-user/alpha/target_errno_defs.h | 194 +++ linux-user/alpha/target_syscall.h| 194 --- 2 files changed, 194 insertions(+), 194 deletions(-) diff --git a/linux-user/alpha/target_errno_defs.h b/linu

Re: [PATCH 3/4] target/mips: Rewrite UHI errno_mips() using GHashTable

2021-07-04 Thread Philippe Mathieu-Daudé
On 7/4/21 8:38 PM, Thomas Huth wrote: > On 04/07/2021 19.07, Philippe Mathieu-Daudé wrote: >> Linking on Haiku OS fails: >> >>    >> /boot/system/develop/tools/bin/../lib/gcc/x86_64-unknown-haiku/8.3.0/../../../../x86_64-unknown-haiku/bin/ld: >> >>    error: >> libqemu-mips-softmmu.fa.p/target_mips

[PATCH 06/12] linux-user/alpha: Remove hardcoded tabs (code style)

2021-07-04 Thread Philippe Mathieu-Daudé
We are going to move this code, fix its style first. Signed-off-by: Philippe Mathieu-Daudé --- Patch trivial to review using 'git-diff --ignore-all-space' --- linux-user/alpha/target_syscall.h | 196 +++--- 1 file changed, 97 insertions(+), 99 deletions(-) diff --git a/l

[PATCH 05/12] linux-user: Extract target errno to 'target_errno_defs.h'

2021-07-04 Thread Philippe Mathieu-Daudé
We want to access the target errno indepently of the rest of the linux-user code. Extract it to a new target-specific header: 'target_errno_defs.h'. Signed-off-by: Philippe Mathieu-Daudé --- linux-user/aarch64/target_errno_defs.h| 6 ++ linux-user/alpha/target_errno_defs.h | 4

[PATCH 11/12] linux-user/syscall: Remove hardcoded tabs (code style)

2021-07-04 Thread Philippe Mathieu-Daudé
We are going to move this code, fix its style first. Signed-off-by: Philippe Mathieu-Daudé --- Patch trivial to review using 'git-diff --ignore-all-space' --- linux-user/syscall.c | 188 +-- 1 file changed, 94 insertions(+), 94 deletions(-) diff --git a/l

Re: [PATCH 3/4] target/mips: Rewrite UHI errno_mips() using GHashTable

2021-07-04 Thread Thomas Huth
On 04/07/2021 19.07, Philippe Mathieu-Daudé wrote: Linking on Haiku OS fails: /boot/system/develop/tools/bin/../lib/gcc/x86_64-unknown-haiku/8.3.0/../../../../x86_64-unknown-haiku/bin/ld: error: libqemu-mips-softmmu.fa.p/target_mips_tcg_sysemu_mips-semi.c.o(.rodata) is too large (0x

[PATCH 03/12] linux-user/mips: Handle TARGET_EWOULDBLOCK as TARGET_EAGAIN

2021-07-04 Thread Philippe Mathieu-Daudé
Linux kernel defines EWOULDBLOCK as EAGAIN (since before v2.6.12-rc2). Signed-off-by: Philippe Mathieu-Daudé --- linux-user/mips/target_syscall.h | 2 ++ linux-user/mips64/target_syscall.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/linux-user/mips/target_syscall.h b/linux-user/mips

[PATCH 08/12] linux-user/hppa: Move errno definitions to 'target_errno_defs.h'

2021-07-04 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- linux-user/hppa/target_errno_defs.h | 210 linux-user/hppa/target_syscall.h| 210 2 files changed, 210 insertions(+), 210 deletions(-) diff --git a/linux-user/hppa/target_errno_defs.h b/linux

[PATCH 04/12] linux-user/sparc: Rename target_errno.h -> target_errno_defs.h

2021-07-04 Thread Philippe Mathieu-Daudé
We want to have one generic target_errno.h (API to access target errno), and will add target errno definitions in target_errno_defs.h. The sparc target already have its errnos in an header, simply rename it. Signed-off-by: Philippe Mathieu-Daudé --- linux-user/sparc/{target_errno.h => target_err

[PATCH 02/12] linux-user/hppa: Handle TARGET_EWOULDBLOCK as TARGET_EAGAIN

2021-07-04 Thread Philippe Mathieu-Daudé
Linux kernel defines EWOULDBLOCK as EAGAIN (since before v2.6.12-rc2). Signed-off-by: Philippe Mathieu-Daudé --- linux-user/hppa/target_syscall.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/linux-user/hppa/target_syscall.h b/linux-user/hppa/target_syscall.h index f34e05edb57..97a095656

[PATCH 01/12] linux-user/alpha: Handle TARGET_EWOULDBLOCK as TARGET_EAGAIN

2021-07-04 Thread Philippe Mathieu-Daudé
Linux kernel defines EWOULDBLOCK as EAGAIN (since before v2.6.12-rc2). Signed-off-by: Philippe Mathieu-Daudé --- linux-user/alpha/target_syscall.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/linux-user/alpha/target_syscall.h b/linux-user/alpha/target_syscall.h index fd389422e31..4e6f9

[PATCH 00/12] linux-user: Extract target errno related functions to 'target_errno.h'

2021-07-04 Thread Philippe Mathieu-Daudé
Hi, This series extract code related to target errno conversion (to/from host) into a separate header. While reviewing I noticed EWOULDBLOCK is defined as EAGAIN on alpha/hppa/mips targets, these are the first 3 patches. Then each target errno definitions are extracted to a new header: 'target_e

Re: [PATCH 1/2] Fix for Haiku

2021-07-04 Thread Thomas Huth
On 04/07/2021 18.58, Richard Zak wrote: În dum., 4 iul. 2021 la 12:51, Thomas Huth > a scris: On 04/07/2021 18.39, Richard Zak wrote: > Regarding upside down text, where did that occur? I certainly didn't do that > intentionally. Maybe an encoding err

Re: [PATCH 1/2 v3] Configure script for Haiku

2021-07-04 Thread Richard Zak
În dum., 4 iul. 2021 la 13:11, Peter Maydell a scris: > On Sun, 4 Jul 2021 at 17:44, Richard Zak wrote: > > > > Use system capstone, for which a port is maintained by Haiku. Disable > TPM which isn't supported. > > > > Signed-off-by: Richard Zak > > --- > > configure | 3 +++ > > 1 file change

Re: [PATCH 3/4] target/mips: Rewrite UHI errno_mips() using GHashTable

2021-07-04 Thread Philippe Mathieu-Daudé
On 7/4/21 7:25 PM, Peter Maydell wrote: > On Sun, 4 Jul 2021 at 18:07, Philippe Mathieu-Daudé wrote: >> >> Linking on Haiku OS fails: >> >> >> /boot/system/develop/tools/bin/../lib/gcc/x86_64-unknown-haiku/8.3.0/../../../../x86_64-unknown-haiku/bin/ld: >> error: >> libqemu-mips-softmmu.fa.p/

Re: [PATCH 4/4] target/mips: Complete UHI errno list and log unexpected errors

2021-07-04 Thread Philippe Mathieu-Daudé
On 7/4/21 7:23 PM, Peter Maydell wrote: > On Sun, 4 Jul 2021 at 18:07, Philippe Mathieu-Daudé wrote: >> >> The spec only defines a set of host errno to translate to guest. >> Complete the current errno set, and log unexpected errno (they >> are currently replaced by EINVAL, which is dubious, but w

Re: [Qemu-devel] [PULL 0/3] PVRDMA queue

2021-07-04 Thread Peter Maydell
On Sun, 4 Jul 2021 at 11:56, Marcel Apfelbaum wrote: > > The following changes since commit 9c2647f75004c4f7d64c9c0ec55f8c6f0739a8b1: > > Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging > (2021-07-02 11:46:32 +0100) > > are available in the Git repository at: > > h

Re: [PATCH 3/4] target/mips: Rewrite UHI errno_mips() using GHashTable

2021-07-04 Thread Peter Maydell
On Sun, 4 Jul 2021 at 18:07, Philippe Mathieu-Daudé wrote: > > Linking on Haiku OS fails: > > > /boot/system/develop/tools/bin/../lib/gcc/x86_64-unknown-haiku/8.3.0/../../../../x86_64-unknown-haiku/bin/ld: > error: > libqemu-mips-softmmu.fa.p/target_mips_tcg_sysemu_mips-semi.c.o(.rodata) is

Re: [PATCH 4/4] target/mips: Complete UHI errno list and log unexpected errors

2021-07-04 Thread Peter Maydell
On Sun, 4 Jul 2021 at 18:07, Philippe Mathieu-Daudé wrote: > > The spec only defines a set of host errno to translate to guest. > Complete the current errno set, and log unexpected errno (they > are currently replaced by EINVAL, which is dubious, but we don't > modify this). > > Signed-off-by: Phi

Re: [PATCH 1/2 v3] Configure script for Haiku

2021-07-04 Thread Peter Maydell
On Sun, 4 Jul 2021 at 17:44, Richard Zak wrote: > > Use system capstone, for which a port is maintained by Haiku. Disable TPM > which isn't supported. > > Signed-off-by: Richard Zak > --- > configure | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/configure b/configure > index e799d

[PATCH 4/4] target/mips: Complete UHI errno list and log unexpected errors

2021-07-04 Thread Philippe Mathieu-Daudé
The spec only defines a set of host errno to translate to guest. Complete the current errno set, and log unexpected errno (they are currently replaced by EINVAL, which is dubious, but we don't modify this). Signed-off-by: Philippe Mathieu-Daudé --- target/mips/tcg/sysemu/mips-semi.c | 38 +++

[PATCH 3/4] target/mips: Rewrite UHI errno_mips() using GHashTable

2021-07-04 Thread Philippe Mathieu-Daudé
Linking on Haiku OS fails: /boot/system/develop/tools/bin/../lib/gcc/x86_64-unknown-haiku/8.3.0/../../../../x86_64-unknown-haiku/bin/ld: error: libqemu-mips-softmmu.fa.p/target_mips_tcg_sysemu_mips-semi.c.o(.rodata) is too large (0x405a bytes) /boot/system/develop/tools/bin/../lib/gc

[PATCH 2/4] target/mips: Rename UHI err -> host_errno

2021-07-04 Thread Philippe Mathieu-Daudé
Rename 'err' as 'host_errno' to ease code review. Signed-off-by: Philippe Mathieu-Daudé --- target/mips/tcg/sysemu/mips-semi.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/target/mips/tcg/sysemu/mips-semi.c b/target/mips/tcg/sysemu/mips-semi.c index 3b1939365c4

[PATCH 1/4] target/mips: Fix UHI error values

2021-07-04 Thread Philippe Mathieu-Daudé
The UHI support was posted *before* [1] the specification was released, and merged (commit 2c44b19c199) around the same time [2], using Linux kernel errno values. Update to use the spec values. [1] https://lists.gnu.org/archive/html/qemu-devel/2015-02/msg05387.html [2] https://lists.gnu.org/archiv

[PATCH 0/4] target/mips: Rewrite UHI errno_mips() to allow building on Haiku OS

2021-07-04 Thread Philippe Mathieu-Daudé
Richard Zak reported a build failure on Haiku OS which is due to using POSIX errno as array indexes: https://www.mail-archive.com/qemu-devel@nongnu.org/msg820587.html Work around by using a GHashTable. Since we were reviewing the UHI (semihosting) spec, fix the errno values and complete to suppor

Re: [PATCH 1/2] Fix for Haiku

2021-07-04 Thread Richard Zak
În dum., 4 iul. 2021 la 12:51, Thomas Huth a scris: > On 04/07/2021 18.39, Richard Zak wrote: > > Regarding upside down text, where did that occur? I certainly didn't do > that > > intentionally. Maybe an encoding error somewhere? > > That was meant as a humorous way to say that you should avoid

Re: [PATCH 1/2] Fix for Haiku

2021-07-04 Thread Thomas Huth
On 04/07/2021 18.39, Richard Zak wrote: Regarding upside down text, where did that occur? I certainly didn't do that intentionally. Maybe an encoding error somewhere? That was meant as a humorous way to say that you should avoid top posting, but apparently it was just confusing instead. Sorry

[PATCH 1/2 v3] Configure script for Haiku

2021-07-04 Thread Richard Zak
Use system capstone, for which a port is maintained by Haiku. Disable TPM which isn't supported. Signed-off-by: Richard Zak --- configure | 3 +++ 1 file changed, 3 insertions(+) diff --git a/configure b/configure index e799d908a3..c928071f69 100755 --- a/configure +++ b/configure @@ -358,6 +35

Re: [PATCH 1/2] Fix for Haiku

2021-07-04 Thread Richard Zak
Regarding upside down text, where did that occur? I certainly didn't do that intentionally. Maybe an encoding error somewhere? I'll work on incorporating the changes in the patch file. I'll make another post where the other configure changes are in place, without the target exclude list. În dum.,

Re: [PATCH 2/2 v2] Fix SHELL variable in Makefile for Haiku

2021-07-04 Thread Richard Zak
Yes, that would have been fine, but I don't know why that wasn't done previously. Someone else had put in the full path to env for bash, so I didn't want to change something which may have been intentional. În dum., 4 iul. 2021 la 12:19, Thomas Huth a scris: > On 04/07/2021 16.28, Richard Zak wr

Re: [PATCH 2/2 v2] Fix SHELL variable in Makefile for Haiku

2021-07-04 Thread Thomas Huth
On 04/07/2021 16.28, Richard Zak wrote: Signed-off-by: Richard Zak > ---  Makefile | 8 +++-  1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 30f19d33bb..37124410da 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,13 @@

Re: [PATCH 1/2] Fix for Haiku

2021-07-04 Thread Thomas Huth
Meta comment: Please avoid ƃuıʇsod uʍop ǝpısdn ... it makes threads much harder to read. On 04/07/2021 16.20, Richard Zak wrote: Exactly. One of the developers on the Haiku forum shared with me the patch that Haiku uses for qemu, and it has a few lines concerning error codes. I'll look into t

[PATCH] colo: Don't dump colo cache if dump-guest-core=off

2021-07-04 Thread Lukas Straub
One might set dump-guest-core=off to make coredumps smaller and still allow to debug many qemu bugs. Extend this option to the colo cache. Signed-off-by: Lukas Straub --- migration/ram.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/migration/ram.c b/migration/ram.c index 723af67c2e.

Re: [PATCH 2/6] dp8393x: don't force 32-bit register access

2021-07-04 Thread Mark Cave-Ayland
On 03/07/2021 17:29, Philippe Mathieu-Daudé wrote: On 7/3/21 4:39 PM, Mark Cave-Ayland wrote: On 03/07/2021 15:19, Philippe Mathieu-Daudé wrote: From: Mark Cave-Ayland Commit 3fe9a838ec "dp8393x: Always use 32-bit accesses" assumed that all accesses to the registers were 32-bit but this is

[PATCH v3] dp8393x: don't force 32-bit register access

2021-07-04 Thread Mark Cave-Ayland
Commit 3fe9a838ec "dp8393x: Always use 32-bit accesses" assumed that all accesses to the registers were 32-bit but this is actually not the case. The access size is determined by the CPU instruction used and not the number of physical address lines. The big_endian workaround applied to the regi

Re: [PULL 00/18] MIPS patches for 2021-07-02

2021-07-04 Thread Philippe Mathieu-Daudé
On 7/4/21 5:02 PM, Peter Maydell wrote: > On Fri, 2 Jul 2021 at 14:38, Philippe Mathieu-Daudé wrote: >> >> >> MIPS patches queue >> >> - Extract nanoMIPS, microMIPS, Code Compaction from translate.c >> - Allow PCI config accesses sma

Re: [RFC PATCH 6/6] dp8393x: Rewrite dp8393x_get() / dp8393x_put()

2021-07-04 Thread Mark Cave-Ayland
On 03/07/2021 15:19, Philippe Mathieu-Daudé wrote: Instead of accessing N registers via a single address_space API call using a temporary buffer (stored in the device state) and updating each register, move the address_space call in the register put/get. The load/store and word size checks are m

Re: [PULL 00/18] MIPS patches for 2021-07-02

2021-07-04 Thread Peter Maydell
On Fri, 2 Jul 2021 at 14:38, Philippe Mathieu-Daudé wrote: > > The following changes since commit 67e25eed977cb60e723b918207f0a3469baceef4: > > Merge remote-tracking branch 'remotes/rth-gitlab/tags/pull-tcg-20210629' > into staging (2021-07-01 20:29:33 +0100) > > are available in the Git reposi

Re: [PATCH 5/6] dp8393x: Replace address_space_rw(is_write=1) by address_space_write()

2021-07-04 Thread Mark Cave-Ayland
On 03/07/2021 15:19, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé --- hw/net/dp8393x.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/net/dp8393x.c b/hw/net/dp8393x.c index e0055b178b1..bbe241ef9db 100644 --- a/hw/net/dp8393x.c +++ b/hw/

Re: [RFC PATCH 4/6] dp8393x: Store CAM registers as 16-bit

2021-07-04 Thread Mark Cave-Ayland
On 03/07/2021 15:19, Philippe Mathieu-Daudé wrote: Per the DP83932C datasheet from July 1995: 4.0 SONIC Registers 4.1 THE CAM UNIT The Content Addressable Memory (CAM) consists of sixteen 48-bit entries for complete address filtering of network packets. Each entry correspo

Re: [RFC PATCH 3/6] dp8393x: Restrict bus access to 16/32-bit operations

2021-07-04 Thread Mark Cave-Ayland
On 03/07/2021 15:19, Philippe Mathieu-Daudé wrote: Per the DP83932C datasheet from July 1995: 1. Functional Description 1.3 DATA WIDTH AND BYTE ORDERING The SONIC can be programmed to operate with either 32-bit or 16-bit wide memory. Restrict the memory bus to reject 8/64-bit

[PATCH 1/2] accel/tcg: Hoist tcg_tb_insert() up above tb_link_page()

2021-07-04 Thread Liren Wei
TranslationBlocks not inserted into the corresponding region tree shall be regarded as partially initialized objects, and needs to be finalized first before inserting into QHT. Signed-off-by: Liren Wei --- accel/tcg/translate-all.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) d

[PATCH 2/2] tcg: Bake tb_destroy() into tcg_region_tree

2021-07-04 Thread Liren Wei
The function is called only at tcg_gen_code() when duplicated TBs are translated by different threads, and when the tcg_region_tree is reset. Bake it into the underlying GTree as its value destroy function to unite these situations. Also remove tcg_region_tree_traverse() which now becomes useless.

[PATCH 0/2] Fix defect in TranslationBlock insertion procedure

2021-07-04 Thread Liren Wei
TranslationBlocks are now inserted first into QHT and then into its corresponding tcg_region_tree. This is problematic under MTTCG, as other vCPU threads may immediately execute it, and even bailout before the TB itself is inserted into its tcg_region_tree, resulting in an incorrect CPUState after

[PATCH 2/2 v2] Fix SHELL variable in Makefile for Haiku

2021-07-04 Thread Richard Zak
Signed-off-by: Richard Zak --- Makefile | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 30f19d33bb..37124410da 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,13 @@ SRC_PATH=. # we have explicit rules for everything MAKEFLAGS += -rR -SHELL

Re: [PATCH 2/2] Fix for Haiku

2021-07-04 Thread Richard Zak
I'll re-submit with better comments, and this variable is defined on Haiku, presumably for support for old Be OS applications, to indicate the architecture of the CPU. On my 64-bit system, it's value is "x86_64", 32-bit it's "x86". În dum., 4 iul. 2021 la 09:51, Philippe Mathieu-Daudé a scris: >

Re: [PATCH 1/2] Fix for Haiku

2021-07-04 Thread Richard Zak
Exactly. One of the developers on the Haiku forum shared with me the patch that Haiku uses for qemu, and it has a few lines concerning error codes. I'll look into this. https://github.com/haikuports/haikuports/blob/14c2cab5428145b93232cb69683a67bbe68a9f06/app-emulation/qemu/patches/qemu-3.1.1.1.pat

  1   2   >