[PATCH v6 5/6] net/colo-compare.c: Check that colo-compare is active

2020-05-22 Thread Lukas Straub
If the colo-compare object is removed before failover and a checkpoint happens, qemu crashes because it tries to lock the destroyed event_mtx in colo_notify_compares_event. Fix this by checking if everything is initialized by introducing a new variable colo_compare_active which is protected by a

[PATCH V2 7/7] colo-compare: Fix memory leak in packet_enqueue()

2020-05-22 Thread Zhang Chen
From: Derek Su The patch is to fix the "pkt" memory leak in packet_enqueue(). The allocated "pkt" needs to be freed if the colo compare primary or secondary queue is too big. Replace the error_report of full queue with a trace event. Signed-off-by: Derek Su Reviewed-by: Zhang Chen

Re: [PATCH] hw/arm/virt: Fix PL061 node name and properties

2020-05-22 Thread Geert Uytterhoeven
Hi Peter, On Thu, May 21, 2020 at 6:59 PM Peter Maydell wrote: > On Tue, 19 May 2020 at 09:49, Geert Uytterhoeven > wrote: > > Make the created node comply with the PL061 Device Tree bindings: > > - Use generic node name "gpio" instead of "pl061", > > - Add missing "#interrupt-cells" and

Re: [PATCH] hw/arm/virt: Fix PL061 node name and properties

2020-05-22 Thread Peter Maydell
On Fri, 22 May 2020 at 09:29, Geert Uytterhoeven wrote: > > Hi Peter, > > On Thu, May 21, 2020 at 6:59 PM Peter Maydell > wrote: > > On Tue, 19 May 2020 at 09:49, Geert Uytterhoeven > > wrote: > > > Make the created node comply with the PL061 Device Tree bindings: > > > - Use generic node

[PATCH] replay: fix replay shutdown for console mode

2020-05-22 Thread Pavel Dovgalyuk
When QEMU is used without any graphical window, QEMU execution is terminated with the signal (e.g., Ctrl-C). Signal processing in QEMU does not include qemu_system_shutdown_request call. That is why shutdown event is not recorded by record/replay in this case. This patch adds shutdown event to the

[Bug 1879425] Re: The thread of "CPU 0 /KVM" keeping 99.9%CPU

2020-05-22 Thread Thomas Huth
I think you should definitely try a newer version if available - otherwise they'll likely refuse to help you, too (nobody wants to debug old versions when bugs are already fixed in newer ones) -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed

[Bug 1879425] Re: The thread of "CPU 0 /KVM" keeping 99.9%CPU

2020-05-22 Thread cliff chen
Got it! BTW, you can confirm this is bug for qemu-kvm, right? thank you! Cliff -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1879425 Title: The thread of "CPU 0 /KVM" keeping 99.9%CPU Status in

RE: [PATCH v6 5/6] net/colo-compare.c: Check that colo-compare is active

2020-05-22 Thread Zhang, Chen
> -Original Message- > From: Lukas Straub > Sent: Friday, May 22, 2020 2:48 PM > To: qemu-devel > Cc: Zhang, Chen ; Li Zhijian > ; Jason Wang ; Marc- > André Lureau > Subject: [PATCH v6 5/6] net/colo-compare.c: Check that colo-compare is > active > > If the colo-compare object is

Re: [RFC 1/3] cpu-throttle: new module, extracted from cpus.c

2020-05-22 Thread Claudio Fontana
On 5/22/20 8:07 AM, Thomas Huth wrote: >> From: "Claudio Fontana" >> Sent: Thursday, May 21, 2020 8:54:05 PM >> >> this is a first step in the refactoring of cpus.c. > > Could you maybe extend the commit message in the next version a little bit? > ... say something about *what* you are moving

Re: [PATCH v4 5/6] i386: Hyper-V VMBus ACPI DSDT entry

2020-05-22 Thread Igor Mammedow
On Thu, 21 May 2020 18:02:07 +0200 Paolo Bonzini wrote: > On 13/05/20 17:34, Igor Mammedov wrote: > > I'd rather avoid using random IRQ numbers (considering we are > > dealing with black-box here). So if it's really necessary to have > > IRQ described here, I'd suggest to implement them in

[PATCH v2] replay: synchronize on every virtual timer callback

2020-05-22 Thread Pavel Dovgalyuk
Sometimes virtual timer callbacks depend on order of virtual timer processing and warping of virtual clock. Therefore every callback should be logged to make replay deterministic. This patch creates a checkpoint before every virtual timer callback. With these checkpoints virtual timers processing

[PATCH v6 6/6] net/colo-compare.c: Correct ordering in complete and finalize

2020-05-22 Thread Lukas Straub
In colo_compare_complete, insert CompareState into net_compares only after everything has been initialized. In colo_compare_finalize, remove CompareState from net_compares before anything is deinitialized. Signed-off-by: Lukas Straub Reviewed-by: Zhang Chen --- net/colo-compare.c | 45

Re: [RFC][PATCH v2 2/3] docs/specs: Add specification of ivshmem device revision 2

2020-05-22 Thread Jan Kiszka
On 21.05.20 20:18, Michael S. Tsirkin wrote: > On Thu, May 21, 2020 at 05:53:31PM +0100, Alex Bennée wrote: >> >> Jan Kiszka writes: >> >>> From: Jan Kiszka >>> >>> This imports the ivshmem v2 specification draft from Jailhouse where the >>> implementation is about to be merged now. The final

Re: [PATCH v1 5/8] cpus-common: ensure auto-assigned cpu_indexes don't clash

2020-05-22 Thread Igor Mammedow
On Thu, 21 May 2020 18:10:40 +0100 Alex Bennée wrote: > Igor Mammedov writes: > > > On Thu, 14 May 2020 17:27:53 +0100 > > Alex Bennée wrote: > > > >> a > >> Alex Bennée writes: > >> > >> > Basing the cpu_index on the number of currently allocated vCPUs > >> > fails when vCPUs aren't

[PATCH v6 4/6] net/colo-compare.c: Only hexdump packets if tracing is enabled

2020-05-22 Thread Lukas Straub
Else the log will be flooded if there is a lot of network traffic. Signed-off-by: Lukas Straub Reviewed-by: Zhang Chen Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- net/colo-compare.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git

[PATCH v6 0/6] colo-compare bugfixes

2020-05-22 Thread Lukas Straub
Hello Everyone, Here are fixes for bugs that I found in my tests. I have tested this with my test suite and everything works fine. Regards, Lukas Straub Version changes: v6: -don't touch softmmu/vl.c, use __contructor__ attribute instead -better wording v5: -initialize and use notify_sendco

[PATCH v6 1/6] net/colo-compare.c: Create event_bh with the right AioContext

2020-05-22 Thread Lukas Straub
qemu_bh_new will set the bh to be executed in the main loop. This causes crashes as colo_compare_handle_event assumes that it has exclusive access the queues, which are also concurrently accessed in the iothread. Create the bh with the AioContext of the iothread to fulfill these assumptions and

[PATCH V2 3/7] net/colo-compare.c: Fix deadlock in compare_chr_send

2020-05-22 Thread Zhang Chen
From: Lukas Straub The chr_out chardev is connected to a filter-redirector running in the main loop. qemu_chr_fe_write_all might block here in compare_chr_send if the (socket-)buffer is full. If another filter-redirector in the main loop want's to send data to chr_pri_in it might also block if

[PATCH V2 2/7] chardev/char.c: Use qemu_co_sleep_ns if in coroutine

2020-05-22 Thread Zhang Chen
From: Lukas Straub This will be needed in the next patch so compare_chr_send can be converted to a coroutine. Signed-off-by: Lukas Straub Reviewed-by: Marc-André Lureau Reviewed-by: Zhang Chen Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Zhang Chen --- chardev/char.c | 7 ++- 1

[PATCH V2 0/7] Latest COLO tree queued patches

2020-05-22 Thread Zhang Chen
From: Zhang Chen Hi Jason, this series include latest COLO related patches. I have finish basic test and review. If no other comments, please check and merge this series. Derek Su (1): colo-compare: Fix memory leak in packet_enqueue() Lukas Straub (6): net/colo-compare.c: Create event_bh

Re: [PATCH v5] char-socket: initialize reconnect timer only when the timer doesn't start

2020-05-22 Thread Marc-André Lureau
On Fri, May 22, 2020 at 4:56 AM Li Feng wrote: > > When the disconnect event is triggered in the connecting stage, > the tcp_chr_disconnect_locked may be called twice. > > The first call: > #0 qemu_chr_socket_restart_timer (chr=0x5582ee90) at > chardev/char-socket.c:120 > #1

Re: [RFC 1/3] cpu-throttle: new module, extracted from cpus.c

2020-05-22 Thread Thomas Huth
> From: "Claudio Fontana" > Sent: Thursday, May 21, 2020 8:54:05 PM > > this is a first step in the refactoring of cpus.c. Could you maybe extend the commit message in the next version a little bit? ... say something about *what* you are moving to a separate file (and maybe why it is ok to

[PATCH v6 3/6] net/colo-compare.c: Fix deadlock in compare_chr_send

2020-05-22 Thread Lukas Straub
The chr_out chardev is connected to a filter-redirector running in the main loop. qemu_chr_fe_write_all might block here in compare_chr_send if the (socket-)buffer is full. If another filter-redirector in the main loop want's to send data to chr_pri_in it might also block if the buffer is full.

Re: [PATCH v1 0/1] target/microblaze: Add GDB XML files

2020-05-22 Thread Edgar E. Iglesias
On Thu, May 21, 2020 at 09:02:14PM -0700, Joe Komlodi wrote: > Hi all, > > This adds GDB XML files for Microblaze CPUs. > For Microblaze, it's split up into core and stack protect XML files. Hi Joe, Can you please add a license header to microblaze-core.xml? I think you wrote this on your own

Re: [PATCH v3 3/9] target/riscv: Add the lowRISC Ibex CPU

2020-05-22 Thread LIU Zhiwei
On 2020/5/20 5:31, Alistair Francis wrote: Ibex is a small and efficient, 32-bit, in-order RISC-V core with a 2-stage pipeline that implements the RV32IMC instruction set architecture. For more details on lowRISC see here: https://github.com/lowRISC/ibex Signed-off-by: Alistair Francis

[PATCH V2 4/7] net/colo-compare.c: Only hexdump packets if tracing is enabled

2020-05-22 Thread Zhang Chen
From: Lukas Straub Else the log will be flooded if there is a lot of network traffic. Signed-off-by: Lukas Straub Reviewed-by: Zhang Chen Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Signed-off-by: Zhang Chen --- net/colo-compare.c | 10 ++ 1 file changed,

[PATCH V2 6/7] net/colo-compare.c: Correct ordering in complete and finalize

2020-05-22 Thread Zhang Chen
From: Lukas Straub In colo_compare_complete, insert CompareState into net_compares only after everything has been initialized. In colo_compare_finalize, remove CompareState from net_compares before anything is deinitialized. Signed-off-by: Lukas Straub Reviewed-by: Zhang Chen Signed-off-by:

[PATCH V2 1/7] net/colo-compare.c: Create event_bh with the right AioContext

2020-05-22 Thread Zhang Chen
From: Lukas Straub qemu_bh_new will set the bh to be executed in the main loop. This causes crashes as colo_compare_handle_event assumes that it has exclusive access the queues, which are also concurrently accessed in the iothread. Create the bh with the AioContext of the iothread to fulfill

[PATCH V2 5/7] net/colo-compare.c: Check that colo-compare is active

2020-05-22 Thread Zhang Chen
From: Lukas Straub If the colo-compare object is removed before failover and a checkpoint happens, qemu crashes because it tries to lock the destroyed event_mtx in colo_notify_compares_event. Fix this by checking if everything is initialized by introducing a new variable colo_compare_active

Re: [PATCH v1 6/8] linux-user: properly "unrealize" vCPU object

2020-05-22 Thread Philippe Mathieu-Daudé
+Paolo On 5/13/20 7:31 PM, Alex Bennée wrote: We shouldn't be messing around with the CPU list in linux-user save for the very special case of do_fork(). When threads end we need to properly follow QOM object lifetime handling and allow the eventual cpu_common_unrealizefn to both remove the CPU

Re: [PATCH v1 7/8] tests/tcg: add new threadcount test

2020-05-22 Thread Philippe Mathieu-Daudé
On 5/13/20 7:31 PM, Alex Bennée wrote: Based on the original testcase by Nikolay Igotti. Message-ID: Cc: Nikolay Igotti [Nikolay can we have your signed of by to add the testcase?] Signed-off-by: Alex Bennée --- tests/tcg/multiarch/threadcount.c | 62 +

Re: [PATCH v3 07/17] block/io: support int64_t bytes in bdrv_co_do_copy_on_readv()

2020-05-22 Thread Vladimir Sementsov-Ogievskiy
22.05.2020 01:29, Eric Blake wrote: On 4/30/20 6:10 AM, Vladimir Sementsov-Ogievskiy wrote: We are generally moving to int64_t for both offset and bytes parameters on all io paths. Main motivation is realization of 64-bit write_zeroes operation for fast zeroing large disk chunks, up to the

Re: [PATCH] replay: synchronize on every virtual timer callback

2020-05-22 Thread Pavel Dovgalyuk
On 21.05.2020 16:22, Paolo Bonzini wrote: On 06/05/20 10:17, Pavel Dovgalyuk wrote: Sometimes virtual timer callbacks depend on order of virtual timer processing and warping of virtual clock. Therefore every callback should be logged to make replay deterministic. This patch creates a

[PATCH] replay: notify the main loop when there are no instructions

2020-05-22 Thread Pavel Dovgalyuk
When QEMU is executed in console mode without any external event sources, main loop may sleep for a very long time. But in case of replay there is another event source - event log. This patch adds main loop notification when the vCPU loop has nothing to do and main loop should process the inputs

[PATCH v6 2/6] chardev/char.c: Use qemu_co_sleep_ns if in coroutine

2020-05-22 Thread Lukas Straub
This will be needed in the next patch so compare_chr_send can be converted to a coroutine. Signed-off-by: Lukas Straub Reviewed-by: Marc-André Lureau Reviewed-by: Zhang Chen Reviewed-by: Philippe Mathieu-Daudé --- chardev/char.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-)

Re: [PATCH v4 0/6] hyperv: VMBus implementation

2020-05-22 Thread Paolo Bonzini
On 22/05/20 04:53, Jon Doron wrote: >>> >>> >> >> Queued, thanks.  I'll take a look at the EOM handling threads next. >> >> Paolo >> > > Hi Paolo, there is no need to look at the EOM, we have scraped it as you > can see in v4 :) I mean in order to un-scrape it. :) Paolo

Re: [RFC 1/3] cpu-throttle: new module, extracted from cpus.c

2020-05-22 Thread Claudio Fontana
On 5/22/20 12:26 PM, Alex Bennée wrote: > > Claudio Fontana writes: > >> On 5/22/20 8:07 AM, Thomas Huth wrote: From: "Claudio Fontana" Sent: Thursday, May 21, 2020 8:54:05 PM this is a first step in the refactoring of cpus.c. >>> >>> Could you maybe extend the commit

Re: [RFC 1/3] cpu-throttle: new module, extracted from cpus.c

2020-05-22 Thread Claudio Fontana
On 5/22/20 1:18 PM, Alex Bennée wrote: > > Claudio Fontana writes: > >> On 5/22/20 12:26 PM, Alex Bennée wrote: >>> >>> Claudio Fontana writes: >>> On 5/22/20 8:07 AM, Thomas Huth wrote: >> From: "Claudio Fontana" >> Sent: Thursday, May 21, 2020 8:54:05 PM >> >> this is a

Re: [PATCH v7 03/12] tests/vm: pass args through to BaseVM's __init__

2020-05-22 Thread Robert Foley
On Wed, 20 May 2020 at 17:49, Alex Bennée wrote: > > > Robert Foley writes: > > A brief rationale wouldn't go amiss in the commit message. e.g. "We will > shortly need to pass more parameters to the class so lets just pass args > rather than growing the parameter list." Good point. I will add

AW: AW: [PATCH 1/1] tricore: added AURIX TC277 D-Step TriBoard

2020-05-22 Thread Konopik, Andreas (EFS-GH2)
Hello Philippe, sorry to keep you waiting. > -Ursprüngliche Nachricht- > Von: Philippe Mathieu-Daudé Im Auftrag > von Philippe Mathieu-Daudé > Gesendet: Dienstag, 12. Mai 2020 10:40 > An: Konopik, Andreas (EFS-GH2) ; qemu- > de...@nongnu.org > Cc: kbast...@mail.uni-paderborn.de;

[PATCH 0/2] hw/ssi/imx_spi: 2 Fixes to flush txfifo function in imx_spi

2020-05-22 Thread Eden Mikitas
This patch series contains 2 fixes to the imx_spi_flush_txfifo function. The first fix prevents a case in which calling imx_spi_flush_txfifo while the controller is configured (by the guest driver) to use a burst length that isn't a multiple of 8 will cause an infinite loop. The second fix

[PATCH 1/2] hw/ssi/imx_spi: changed while statement to prevent underflow

2020-05-22 Thread Eden Mikitas
The while statement in question only checked if tx_burst is not 0. tx_burst is a signed int, which is assigned the value put by the guest driver in ECSPI_CONREG. The burst length can be anywhere between 1 and 4096, and since tx_burst is always decremented by 8 it could possibly underflow, causing

[PATCH 2/2] hw/ssi/imx_spi: Removed unnecessary cast of rx data received from slave

2020-05-22 Thread Eden Mikitas
When inserting the value retrieved (rx) from the spi slave, rx is pushed to rx_fifo after being cast to uint8_t. rx_fifo is a fifo32, and the rx register the driver uses is also 32 bit. This zeroes the 24 most significant bits of rx. This proved problematic with devices that expect to use the

[PATCH v2 0/3] virtio: add vhost-user-vsock device

2020-05-22 Thread Stefano Garzarella
v2: - removed live migration code in the vhost-user-vsock base device since vhost-user-vsock application built with Cloud Hypervisor crates doesn't support VHOST_USER_PROTOCOL_F_LOG_SHMFD, so I'm not able to test this code [Stefan] v1:

[PATCH v2 3/3] virtio: add vhost-user-vsock-pci device

2020-05-22 Thread Stefano Garzarella
Add the PCI version of vhost-user-vsock Launch QEMU like this: qemu -chardev socket,path=/tmp/vm.vsock,id=chr0 \ -device vhost-user-vsock-pci,chardev=chr0 Signed-off-by: Stefano Garzarella --- hw/virtio/vhost-user-vsock-pci.c | 84

Re: [PATCH v2 1/3] Revert "9p: init_in_iov_from_pdu can truncate the size"

2020-05-22 Thread Christian Schoenebeck
On Donnerstag, 21. Mai 2020 21:26:25 CEST Stefano Stabellini wrote: > From: Stefano Stabellini > > This reverts commit 16724a173049ac29c7b5ade741da93a0f46edff7. > It causes https://bugs.launchpad.net/bugs/1877688. > > Signed-off-by: Stefano Stabellini > --- Actually already reviewed by me; no

Re: [PATCH v2 3/3] xen/9pfs: increase max ring order to 9

2020-05-22 Thread Christian Schoenebeck
On Donnerstag, 21. Mai 2020 21:26:27 CEST Stefano Stabellini wrote: > From: Stefano Stabellini > > The max order allowed by the protocol is 9. Increase the max order > supported by QEMU to 9 to increase performance. > > Signed-off-by: Stefano Stabellini > --- > Changes in v2: > - patch added >

Re: [PATCH v4 3/6] migration/block-dirty-bitmap: fix bitmaps pre-blockdev migration during mirror job

2020-05-22 Thread Eric Blake
On 5/21/20 5:06 PM, Vladimir Sementsov-Ogievskiy wrote: Important thing for bitmap migration is to select destination block node to obtain the migrated bitmap. Prepatch, on source we use bdrv_get_device_or_node_name() to identify the node, and on target we do bdrv_lookup_bs.

[PATCH v2 1/3] vhost-vsock: add vhost-vsock-common abstraction

2020-05-22 Thread Stefano Garzarella
This patch prepares the introduction of vhost-user-vsock, moving the common code usable for both vhost-vsock and vhost-user-vsock devices, in the new vhost-vsock-common parent class. While moving the code, fixed checkpatch warnings about block comments. Signed-off-by: Stefano Garzarella ---

[PATCH v2 2/3] virtio: add vhost-user-vsock base device

2020-05-22 Thread Stefano Garzarella
This patch introduces a vhost-user device for vsock, using the vhost-vsock-common parent class. The vhost-user-vsock device can be used to implement the virtio-vsock device emulation in user-space. Signed-off-by: Stefano Garzarella --- v1 -> v2: - removed live migration code since

Re: [PATCH 0/3] virtio: add vhost-user-vsock device

2020-05-22 Thread Stefano Garzarella
On Thu, May 21, 2020 at 03:35:59PM +0100, Stefan Hajnoczi wrote: > On Fri, May 15, 2020 at 05:21:07PM +0200, Stefano Garzarella wrote: > > This series add vhost-user-vsock base device and its PCI version > > (vhost-user-vsock-pci). > > The vhost-user-vsock device can be used to implement the

Re: [PATCH v1 04/10] linux-user: completely re-write init_guest_space

2020-05-22 Thread Alex Bennée
Richard Henderson writes: > On 5/21/20 1:21 AM, Alex Bennée wrote: >> >> Thomas Huth writes: >> >>> On 13/05/2020 19.51, Alex Bennée wrote: First we ensure all guest space initialisation logic comes through probe_guest_base once we understand the nature of the binary we are

Re: [RFC 1/3] cpu-throttle: new module, extracted from cpus.c

2020-05-22 Thread Alex Bennée
Claudio Fontana writes: > On 5/22/20 12:26 PM, Alex Bennée wrote: >> >> Claudio Fontana writes: >> >>> On 5/22/20 8:07 AM, Thomas Huth wrote: > From: "Claudio Fontana" > Sent: Thursday, May 21, 2020 8:54:05 PM > > this is a first step in the refactoring of cpus.c.

Re: [PATCH] hw/arm/virt: Fix PL061 node name and properties

2020-05-22 Thread Philippe Mathieu-Daudé
On 5/22/20 11:30 AM, Peter Maydell wrote: On Fri, 22 May 2020 at 09:29, Geert Uytterhoeven wrote: On Thu, May 21, 2020 at 6:59 PM Peter Maydell wrote: On Tue, 19 May 2020 at 09:49, Geert Uytterhoeven wrote: Make the created node comply with the PL061 Device Tree bindings: - Use generic

RE: [PATCH 2/4] hw/riscv: spike: Allow creating multiple sockets

2020-05-22 Thread Anup Patel
> -Original Message- > From: Palmer Dabbelt > Sent: 22 May 2020 01:46 > To: Anup Patel > Cc: Peter Maydell ; Alistair Francis > ; sag...@eecs.berkeley.edu; Atish Patra > ; a...@brainfault.org; qemu-ri...@nongnu.org; > qemu-devel@nongnu.org; Anup Patel > Subject: Re: [PATCH 2/4]

Re: [Bug 1693649] Re: x86 pause misbehaves with -cpu haswell

2020-05-22 Thread Paul Goyette
Seems ok now. On Fri, 22 May 2020, Thomas Huth wrote: > Can you still reproduce this issue with the latest version of QEMU > (currently 5.0)? > > ** Changed in: qemu > Status: New => Incomplete > > -- > You received this bug notification because you are subscribed to the bug > report. >

Re: [PATCH] replay: notify the main loop when there are no instructions

2020-05-22 Thread no-reply
Patchew URL: https://patchew.org/QEMU/159013007895.28110.2020104406699709721.stgit@pasha-ThinkPad-X280/ Hi, This series failed the docker-quick@centos7 build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally.

Re: [RFC 1/3] cpu-throttle: new module, extracted from cpus.c

2020-05-22 Thread Alex Bennée
Claudio Fontana writes: > On 5/22/20 8:07 AM, Thomas Huth wrote: >>> From: "Claudio Fontana" >>> Sent: Thursday, May 21, 2020 8:54:05 PM >>> >>> this is a first step in the refactoring of cpus.c. >> >> Could you maybe extend the commit message in the next version a little bit? >> ... say

Re: [PATCH v1 04/10] linux-user: completely re-write init_guest_space

2020-05-22 Thread Peter Maydell
On Fri, 22 May 2020 at 11:24, Alex Bennée wrote: > Examples: > > /tmp/qemu-test/src/fpu/softfloat.c:3365:13: error: bitwise negation of a > boolean expression; did you mean logical negation? [-Werror,-Wbool-operation] > absZ &= ~ ( ( ( roundBits ^ 0x40 ) == 0 ) & roundNearestEven ); >

Re: [PULL v2 00/29] target-arm queue

2020-05-22 Thread Peter Maydell
On Thu, 21 May 2020 at 22:06, Peter Maydell wrote: > > v2: added Property array terminator (which caused crashes on > various non-x86 host architectures). > > The following changes since commit ae3aa5da96f4ccf0c2a28851449d92db9fcfad71: > > Merge remote-tracking branch >

Re: [PATCH] replay: fix replay shutdown for console mode

2020-05-22 Thread no-reply
Patchew URL: https://patchew.org/QEMU/159012995470.27967.18129611453659045726.stgit@pasha-ThinkPad-X280/ Hi, This series failed the docker-quick@centos7 build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally.

[PATCH] linux-user: provide fallback pgd_find_hole for bare chroots

2020-05-22 Thread Alex Bennée
When running QEMU out of a chroot environment we may not have access to /proc/self/maps. As there is no other "official" way to introspect our memory map we need to fall back to the original technique of repeatedly trying to mmap an address range until we find one that works. Fortunately it's not

Re: [PATCH v7 06/12] tests/vm: Pass --debug through for vm-boot-ssh.

2020-05-22 Thread Alex Bennée
Robert Foley writes: > This helps debug issues that occur during the boot sequence. > > Signed-off-by: Robert Foley > Reviewed-by: Peter Puhov Reviewed-by: Alex Bennée > --- > tests/vm/Makefile.include | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/tests/vm/Makefile.include

Re: [PATCH v7 07/12] tests/vm: Add ability to select QEMU from current build.

2020-05-22 Thread Alex Bennée
Robert Foley writes: > Added a new special variable QEMU_LOCAL=1, which > will indicate to take the QEMU binary from the current > build. > > Signed-off-by: Robert Foley > Reviewed-by: Peter Puhov > --- > tests/vm/Makefile.include | 4 > tests/vm/basevm.py| 25

[PATCH v2 7/9] target/arm: Convert Neon VSHLL, VMOVL to decodetree

2020-05-22 Thread Peter Maydell
Convert the VSHLL and VMOVL insns from the 2-reg-shift group to decodetree. Since the loop always has two passes, we unroll it to avoid the awkward reassignment of one TCGv to another. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson --- target/arm/neon-dp.decode | 16 +++

Re: [PATCH 4/4] check-block: Enable iotests with SafeStack

2020-05-22 Thread Daniele Buono
On 5/21/2020 5:59 AM, Stefan Hajnoczi wrote: On Wed, Apr 29, 2020 at 03:44:20PM -0400, Daniele Buono wrote: SafeStack is a stack protection technique implemented in llvm. It is enabled with a -fsanitize flag. iotests are currently disabled when any -fsanitize option is used. Since SafeStack

Re: [Bug 1693667] Re: -cpu haswell / broadwell have no MONITOR in features1

2020-05-22 Thread Paul Goyette
This bug seems not to be a problem, and may reflect an issue with NetBSD. Even though the decode of the features1 register does not include MONITOR/MWAIT, that capability is separately reported on a separate line, further down (apologies in advance for any confusing line-wrap): # cpuctl identify

Fwd: simple qemu command not working

2020-05-22 Thread haris iqbal
Hi, I am having some trouble with spinning up a VM using qemu. The description is below. Can someone please point me in the right direction? -- Regards -Haris -- Forwarded message - From: haris iqbal Date: Wed, May 20, 2020 at 5:10 PM Subject: simple qemu command not working

Re: [PATCH 10/10] target/arm: Convert Neon one-register-and-immediate insns to decodetree

2020-05-22 Thread Peter Maydell
On Sat, 16 May 2020 at 03:51, Richard Henderson wrote: > I wonder if it's worth repeating VORR/VBIC so many times. > You can just as well do the (cmode & 1) && cmode < 12 check in the trans_ > function. OK; at that point we might as well just have a single Vimm_1r pattern and distinguish

Re: [PATCH v2 5/5] hw/arm/virt: Let the virtio-iommu bypass MSIs

2020-05-22 Thread Jean-Philippe Brucker
On Fri, May 08, 2020 at 07:30:57PM +0200, Eric Auger wrote: > At the moment the virtio-iommu translates MSI transactions. > This behavior is inherited from ARM SMMU. The virt machine > code knows where the guest MSI doorbells are so we can easily > declare those regions as

[PATCH v2 2/9] target/arm: Convert Neon VSHR 2-reg-shift insns to decodetree

2020-05-22 Thread Peter Maydell
Convert the VSHR 2-reg-shift insns to decodetree. Note that unlike the legacy decoder, we present the right shift amount to the trans_ function as a positive integer. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson --- target/arm/neon-dp.decode | 25

Re: [PATCH v3 11/11] hw/semihosting: Make the feature depend of TCG, and allow to disable it

2020-05-22 Thread Philippe Mathieu-Daudé
On 5/22/20 6:26 AM, Richard Henderson wrote: > On 5/21/20 12:59 PM, Philippe Mathieu-Daudé wrote: >> +++ b/hw/semihosting/Kconfig >> @@ -1,3 +1,5 @@ >> >> +# default is 'n' >> config SEMIHOSTING >> - bool >> +bool >> +depends on TCG >> diff --git a/target/arm/Kconfig

Re: [PATCH 1/2] hw/ssi/imx_spi: changed while statement to prevent underflow

2020-05-22 Thread Alistair Francis
On Fri, May 22, 2020 at 4:51 AM Eden Mikitas wrote: > > The while statement in question only checked if tx_burst is not 0. > tx_burst is a signed int, which is assigned the value put by the > guest driver in ECSPI_CONREG. The burst length can be anywhere > between 1 and 4096, and since tx_burst

Re: [PATCH v7 04/12] tests/vm: Add configuration to basevm.py

2020-05-22 Thread Alex Bennée
Robert Foley writes: > Added use of a configuration to tests/vm/basevm.py. > The configuration provides parameters used to configure a VM. > This allows for providing alternate configurations to the VM being > created/launched. cpu, machine, memory, and NUMA configuration are all > examples of

Re: [PATCH v7 05/12] tests/vm: Added configuration file support

2020-05-22 Thread Alex Bennée
Robert Foley writes: > Changes to tests/vm/basevm.py to allow accepting a configuration file > as a parameter. Allows for specifying VM options such as > cpu, machine, memory, and arbitrary qemu arguments for specifying options > such as NUMA configuration. > Also added an example

Re: [PULL 0/1] qemu-openbios queue 20200521

2020-05-22 Thread Peter Maydell
On Thu, 21 May 2020 at 21:07, Mark Cave-Ayland wrote: > > The following changes since commit ae3aa5da96f4ccf0c2a28851449d92db9fcfad71: > > Merge remote-tracking branch > 'remotes/berrange/tags/socket-next-pull-request' into staging (2020-05-21 > 16:47:28 +0100) > > are available in the Git

[PATCH v2 4/9] target/arm: Convert VQSHLU, VQSHL 2-reg-shift insns to decodetree

2020-05-22 Thread Peter Maydell
Convert the VQSHLU and QVSHL 2-reg-shift insns to decodetree. These are the last of the simple shift-by-immediate insns. Signed-off-by: Peter Maydell --- target/arm/neon-dp.decode | 15 + target/arm/translate-neon.inc.c | 108 +++ target/arm/translate.c

[PATCH v2 5/9] target/arm: Convert Neon narrowing shifts with op==8 to decodetree

2020-05-22 Thread Peter Maydell
Convert the Neon narrowing shifts where op==8 to decodetree: * VSHRN * VRSHRN * VQSHRUN * VQRSHRUN Signed-off-by: Peter Maydell --- target/arm/neon-dp.decode | 27 + target/arm/translate-neon.inc.c | 168 target/arm/translate.c | 1 + 3

[PATCH v2 1/9] target/arm: Convert Neon VSHL and VSLI 2-reg-shift insn to decodetree

2020-05-22 Thread Peter Maydell
Convert the VSHL and VSLI insns from the Neon 2-registers-and-a-shift group to decodetree. Signed-off-by: Peter Maydell --- target/arm/neon-dp.decode | 25 ++ target/arm/translate-neon.inc.c | 38 + target/arm/translate.c | 18

[PATCH v2 9/9] target/arm: Convert Neon one-register-and-immediate insns to decodetree

2020-05-22 Thread Peter Maydell
Convert the insns in the one-register-and-immediate group to decodetree. In the new decode, our asimd_imm_const() function returns a 64-bit value rather than a 32-bit one, which means we don't need to treat cmode=14 op=1 as a special case in the decoder (it is the only encoding where the two

Re: [PATCH 3/4] configure: add flag to enable SafeStack

2020-05-22 Thread Daniele Buono
Hi Stefan, I would feel more confident by adding another check in configure to make sure that the user didn't enable SafeStack manually through other means, like manually setting the option through extra_cflags. What do you think? On 5/21/2020 5:52 AM, Stefan Hajnoczi wrote: On Wed, Apr 29,

Re: [PATCH v7 09/12] tests/vm: Added a new script for ubuntu.aarch64.

2020-05-22 Thread Alex Bennée
Robert Foley writes: > ubuntu.aarch64 provides a script to create an Ubuntu 18.04 VM. > Another new file is also added aarch64vm.py, which is a module with > common methods used by aarch64 VMs, such as how to create the > flash images. > > Signed-off-by: Robert Foley > Reviewed-by: Peter

Re: [PATCH v3 08/17] block/io: support int64_t bytes in bdrv_aligned_preadv()

2020-05-22 Thread Eric Blake
On 4/30/20 6:10 AM, Vladimir Sementsov-Ogievskiy wrote: We are generally moving to int64_t for both offset and bytes parameters on all io paths. Main motivation is realization of 64-bit write_zeroes operation for fast zeroing large disk chunks, up to the whole disk. We chose signed type, to be

Re: [PATCH v3 09/11] rules.mak: Add base-arch() rule

2020-05-22 Thread Philippe Mathieu-Daudé
On 5/22/20 6:24 AM, Richard Henderson wrote: > On 5/21/20 12:59 PM, Philippe Mathieu-Daudé wrote: >> +$(if $(findstring risc,$1),risc,\ > > Eh? riscv{32,64} vs openrisc. Nice catch, because with this patch openrisc builds with a riscv config-devices.h =) > >> +$(if

Re: [RFC 2/3] cpu-timers: new module extracted from cpus.c

2020-05-22 Thread Claudio Fontana
here the obvious next step would be to split icount as its own module, and make it tcg-only. The issue I am facing with that is that qtest is actually requiring this, as it is "using" icount for its qtest_clock_warp functionality. Does somebody have a good idea here that might save some time?

[PATCH v2 3/9] target/arm: Convert Neon VSRA, VSRI, VRSHR, VRSRA 2-reg-shift insns to decodetree

2020-05-22 Thread Peter Maydell
Convert the VSRA, VSRI, VRSHR, VRSRA 2-reg-shift insns to decodetree. (These are the last instructions in the group that are vectorized; the rest all require looping over each element.) Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson --- target/arm/neon-dp.decode | 35

[PATCH v2 0/9] target/arm: Convert 2-reg-shift and 1-reg-imm Neon insns to decodetree

2020-05-22 Thread Peter Maydell
This patchset converts the Neon insns in the 2-register-and-shift-amount and 1-register-and-modified-immediate groups to decodetree. Changes since v1: * old patch 1 is now in master * patch 1, 2, 3, 4: create and use separate formats for each size of shift * patch 5, 6, 7: use new

[PATCH v2 6/9] target/arm: Convert Neon narrowing shifts with op==9 to decodetree

2020-05-22 Thread Peter Maydell
Convert the remaining Neon narrowing shifts to decodetree: * VQSHRN * VQRSHRN Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson --- target/arm/neon-dp.decode | 20 ++ target/arm/translate-neon.inc.c | 15 + target/arm/translate.c | 110

[PATCH v2 8/9] target/arm: Convert VCVT fixed-point ops to decodetree

2020-05-22 Thread Peter Maydell
Convert the VCVT fixed-point conversion operations in the Neon 2-regs-and-shift group to decodetree. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson --- target/arm/neon-dp.decode | 11 + target/arm/translate-neon.inc.c | 49 + target/arm/translate.c

Re: [PATCH v3 11/11] hw/semihosting: Make the feature depend of TCG, and allow to disable it

2020-05-22 Thread Philippe Mathieu-Daudé
On 5/21/20 9:59 PM, Philippe Mathieu-Daudé wrote: > The semihosting feature is only meaningful when using TCG. > > Do not enable it by default, and let the few targets requiring > it to manually select it. > The targets restricted to TCG that previously selected it > (see commit 16932bb761e52c2

Re: [PATCH 1/4] coroutine: support SafeStack in ucontext backend

2020-05-22 Thread Daniele Buono
Hi Stefan, thank you so much for reviewing this. See my answers below: On 5/21/2020 5:44 AM, Stefan Hajnoczi wrote: On Wed, Apr 29, 2020 at 03:44:17PM -0400, Daniele Buono wrote: diff --git a/include/qemu/coroutine_int.h b/include/qemu/coroutine_int.h index bd6b0468e1..2ffd75ddbe 100644 ---

Re: [PATCH v4 0/6] fix migration with bitmaps and mirror

2020-05-22 Thread Eric Blake
On 5/21/20 5:06 PM, Vladimir Sementsov-Ogievskiy wrote: v4: (Max's patch marking filters as filters already in master) 03: careful select child of filter, avoid crash 04: add Eric's r-b 05-06: tweak error message, keep Andrey's r-b, add Eric's r-b Vladimir Sementsov-Ogievskiy (6):

Re: [PATCH 2/2] hw/ssi/imx_spi: Removed unnecessary cast of rx data received from slave

2020-05-22 Thread Alistair Francis
On Fri, May 22, 2020 at 4:52 AM Eden Mikitas wrote: > > When inserting the value retrieved (rx) from the spi slave, rx is pushed to > rx_fifo after being cast to uint8_t. rx_fifo is a fifo32, and the rx > register the driver uses is also 32 bit. This zeroes the 24 most > significant bits of rx.

Re: [PATCH v7 10/12] tests/vm: Added a new script for centos.aarch64.

2020-05-22 Thread Alex Bennée
Robert Foley writes: > centos.aarch64 creates a CentOS 8 image. > Also added a new kickstart script used to build the centos.aarch64 image. > > Signed-off-by: Robert Foley > Reviewed-by: Peter Puhov > --- > --- /dev/null > +++ b/tests/vm/centos.aarch64 > @@ -0,0 +1,227 @@ > +#!/usr/bin/env

[Bug 1880225] Re: Emulation of some arm programs fail with "Assertion `have_guest_base' failed."

2020-05-22 Thread Aleksandar Markovic
Using bisection, it can be deduced that this behavior appears to be caused by this commit: commit ee94743034bfb443cf246eda4971bdc15d8ee066 (HEAD) Author: Alex Bennée Date: Wed May 13 18:51:28 2020 +0100 linux-user: completely re-write init_guest_space First we ensure all guest

[Bug 1880225] Re: Emulation of some arm programs fail with "Assertion `have_guest_base' failed."

2020-05-22 Thread Aleksandar Markovic
I just want to stress once again that the test was performed on a 32-bit Intel host. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1880225 Title: Emulation of some arm programs fail with

[Bug 1880225] Re: Emulation of some arm programs fail with "Assertion `have_guest_base' failed."

2020-05-22 Thread Aleksandar Markovic
It appear that there is no problem on Intel 64-bit hosts. Perhaps the problem is manifested on all 32-bit hosts. I currently don't have access to any other 320bit host due to remote work. The arm is the only target were I noticed this happens. I checked hppa, mips, mipsel, m68k, ppc, and sh4,

[PATCH 11/19] accel/tcg: Fixed tsan warnings related to parallel_cpus

2020-05-22 Thread Robert Foley
Fixed several tsan warnings. e.g. WARNING: ThreadSanitizer: data race (pid=35425) Read of size 1 at 0x557cd83aee28 by thread T7: #0 curr_cflags include/exec/exec-all.h:460:13 (qemu-system-aarch64+0x4b7f27) #1 cpu_exec accel/tcg/cpu-exec.c:730:26 (qemu-system-aarch64+0x4b7f27) #2

[PATCH 10/19] include/qemu: Added tsan.h for annotations.

2020-05-22 Thread Robert Foley
These annotations will allow us to give tsan additional hints. For example, we can inform tsan about reads/writes to ignore to silence certain classes of warnings. We can also annotate threads so that the proper thread naming shows up in tsan warning results. Signed-off-by: Robert Foley ---

[PATCH 14/19] util/async: Fixed tsan warnings

2020-05-22 Thread Robert Foley
For example: Atomic write of size 8 at 0x7b4800113c28 by main thread (mutexes: write M30): #0 __tsan_atomic64_exchange (qemu-system-aarch64+0x386f85) #1 aio_bh_poll util/async.c:146:5 (qemu-system-aarch64+0xcd1f61) #2 aio_dispatch util/aio-posix.c:380:5

  1   2   >