[PATCH 1/2] vl.c: run preconfig loop before creating default RAM backend

2020-05-11 Thread Igor Mammedov
Default RAM backend depends on numa_uses_legacy_mem(), which is infulenced by -numa options on CLI or set-numa-node QMP command at preconfig time. If QEMU is started with '-preconfig' without -numa, it will lead to creating default RAM backend even if later set-numa-node is used to assing RAM to N

[PATCH 2/2] numa: prevent usage of -M memory-backend and -numa memdev at the same time

2020-05-11 Thread Igor Mammedov
Options -M memory-backend and -numa memdev are mutually exclusive, and if used together, it might lead to a crash in the worst case. For example when the same backend is used with these options together: -m 4G \ -object memory-backend-ram,id=mem0,size=4G \ -M pc,memory-backend=mem0 \ -numa

[PATCH 0/2] make -M memory-backend and -numa memdev mutually exclusive

2020-05-11 Thread Igor Mammedov
The options can't be used together (1st provides RAM for non-numa and fake-numa, while 2nd provides RAM for each numa node). If used together it might lead to crashes, so add a check to prevent simultaneous usage. Igor Mammedov (2): vl.c: run preconfig loop before creating default RAM backend

Re: Qemu, VNC and non-US keymaps

2020-05-11 Thread Philippe Mathieu-Daudé
Cc'ing more developers. On 5/11/20 4:17 PM, B3r3n wrote: Dear all, I am struggling for days/weeks with Qemu and its VNC accesses...with non-US keymaps. Let me summ the facts: - I am using a french keyboard over a Ubuntu 18.04. - I installed a simple Debian in a Qemu VM, configured with FR ke

Re: [PULL 00/34] target-arm queue

2020-05-11 Thread Peter Maydell
On Mon, 11 May 2020 at 15:03, Peter Maydell wrote: > Hmm. I get this link failure, but only on non-x86 hosts > (aarch64, ppc, s390 [aarch32 ran into a temporary connectivity > problem and didn't run]): > > linux-user/vm86.o: In function `do_int': > /home/pm/qemu/linux-user/vm86.c:224: undefined re

Re: [PATCH v1 2/8] s390/sclp: check sccb len before filling in data

2020-05-11 Thread Janosch Frank
On 5/9/20 1:08 AM, Collin Walling wrote: > The SCCB must be checked for a sufficient length before it is filled > with any data. If the length is insufficient, then the SCLP command > is suppressed and the proper response code is set in the SCCB header. > > Signed-off-by: Collin Walling Fixes ta

Re: RFC: use VFIO over a UNIX domain socket to implement device offloading

2020-05-11 Thread Stefan Hajnoczi
On Mon, May 04, 2020 at 10:49:11AM -0700, John G Johnson wrote: > > > > On May 4, 2020, at 2:45 AM, Stefan Hajnoczi wrote: > > > > On Fri, May 01, 2020 at 04:28:25PM +0100, Daniel P. Berrangé wrote: > >> On Fri, May 01, 2020 at 03:01:01PM +, Felipe Franciosi wrote: > >>> Hi, > >>> > O

Re: [PATCH v1 1/8] s390/sclp: remove SCLPDevice param from prepare_cpu_entries

2020-05-11 Thread Janosch Frank
On 5/9/20 1:08 AM, Collin Walling wrote: > It was never used in this function, so let's remove it. > > Signed-off-by: Collin Walling Acked-by: Janosch Frank > --- > hw/s390x/sclp.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/hw/s390x/sclp.c b/hw/s390x/sclp.

Re: [PATCH RESEND v6 00/36] Initial support for multi-process qemu

2020-05-11 Thread Stefan Hajnoczi
Hi, Have you decided whether to drop the remote device program in favor of using a softmmu make target? Is there anything in this series you'd like me to review before you send the next revision? Stefan signature.asc Description: PGP signature

Re: [PATCH v1 2/8] s390/sclp: check sccb len before filling in data

2020-05-11 Thread David Hildenbrand
On 11.05.20 16:36, Janosch Frank wrote: > On 5/9/20 1:08 AM, Collin Walling wrote: >> The SCCB must be checked for a sufficient length before it is filled >> with any data. If the length is insufficient, then the SCLP command >> is suppressed and the proper response code is set in the SCCB header.

Re: [PATCH v1 2/8] s390/sclp: check sccb len before filling in data

2020-05-11 Thread Collin Walling
On 5/11/20 10:44 AM, David Hildenbrand wrote: On 11.05.20 16:36, Janosch Frank wrote: On 5/9/20 1:08 AM, Collin Walling wrote: The SCCB must be checked for a sufficient length before it is filled with any data. If the length is insufficient, then the SCLP command is suppressed and the proper re

Re: [PATCH v8 02/74] cpu: rename cpu->work_mutex to cpu->lock

2020-05-11 Thread Alex Bennée
Robert Foley writes: > From: "Emilio G. Cota" > > This lock will soon protect more fields of the struct. Give > it a more appropriate name. Hmm while bisecting to find another problem I found this commit: /home/alex/lsrc/qemu.git/hw/core/cpu.c: In function ‘cpu_common_finalize’: /home/al

Re: Qemu, VNC and non-US keymaps

2020-05-11 Thread LAHAYE Olivier
I have a similar problem with qemu (all versions including 5.0.0) on MacOS-10.14.6 (mac book pro 2017with touch bar). Using -k fr-mac the "@"/"#" key is dead. Showkey doesn't detect the key. Moreover, the # and @ symbols are mapped on the "<" / ">" key and thus I miss the redirection operator in

Re: [libcamera-devel] [virtio-dev] Re: Fwd: Qemu Support for Virtio Video V4L2 driver

2020-05-11 Thread Laurent Pinchart
Hello, Jumping in the middle of this thread, so I apologize if some of my comments are a bit out of context. On Mon, May 11, 2020 at 11:06:34PM +0900, Keiichi Watanabe wrote: > On Mon, May 11, 2020 at 9:33 PM Saket Sinha wrote: > > > > > I do not support the approach of QEMU implementation forw

Re: [PATCH v1 2/8] s390/sclp: check sccb len before filling in data

2020-05-11 Thread Janosch Frank
On 5/11/20 4:44 PM, David Hildenbrand wrote: > On 11.05.20 16:36, Janosch Frank wrote: >> On 5/9/20 1:08 AM, Collin Walling wrote: >>> The SCCB must be checked for a sufficient length before it is filled >>> with any data. If the length is insufficient, then the SCLP command >>> is suppressed and t

[PATCH v7 1/6] i2c: i801: Use GPIO_LOOKUP() helper macro

2020-05-11 Thread Geert Uytterhoeven
i801_add_mux() fills in the GPIO lookup table by manually populating an array of gpiod_lookup structures. Use the existing GPIO_LOOKUP() helper macro instead, to relax a dependency on the gpiod_lookup structure's member names. Signed-off-by: Geert Uytterhoeven Reviewed-by: Jean Delvare --- This

[PATCH v7 4/6] gpio: Add GPIO Aggregator

2020-05-11 Thread Geert Uytterhoeven
GPIO controllers are exported to userspace using /dev/gpiochip* character devices. Access control to these devices is provided by standard UNIX file system permissions, on an all-or-nothing basis: either a GPIO controller is accessible for a user, or it is not. Currently no mechanism exists to con

[PATCH v7 6/6] MAINTAINERS: Add GPIO Aggregator section

2020-05-11 Thread Geert Uytterhoeven
Add a maintainership section for the GPIO Aggregator, covering documentation and driver source code. Signed-off-by: Geert Uytterhoeven Reviewed-by: Eugeniu Rosca Tested-by: Eugeniu Rosca --- v7: - Maintained => Supported, v6: - No changes, v5: - Add Reviewed-by, Tested-by, v4: - Drop

[PATCH v7 2/6] mfd: sm501: Use GPIO_LOOKUP_IDX() helper macro

2020-05-11 Thread Geert Uytterhoeven
i801_add_mux() fills in the GPIO lookup table by manually populating an array of gpiod_lookup structures. Use the existing GPIO_LOOKUP_IDX() helper macro instead, to relax a dependency on the gpiod_lookup structure's member names. Signed-off-by: Geert Uytterhoeven Acked-by: Lee Jones --- v7:

[PATCH v7 3/6] gpiolib: Add support for GPIO lookup by line name

2020-05-11 Thread Geert Uytterhoeven
Currently a GPIO lookup table can only refer to a specific GPIO by a tuple, consisting of a GPIO controller label and a GPIO offset inside the controller. However, a GPIO may also carry a line name, defined by DT or ACPI. If present, the line name is the most use-centric way to refer to a GPIO. H

[PATCH v7 5/6] docs: gpio: Add GPIO Aggregator documentation

2020-05-11 Thread Geert Uytterhoeven
Document the GPIO Aggregator, and the two typical use-cases. Signed-off-by: Geert Uytterhoeven Reviewed-by: Ulrich Hecht Reviewed-by: Eugeniu Rosca Tested-by: Eugeniu Rosca --- v7: - No changes, v6: - Fix "allows" without object: -> provides a mechanism to aggregate GPIOs, ->

[PATCH v7 0/6] gpio: Add GPIO Aggregator

2020-05-11 Thread Geert Uytterhoeven
Hi all, GPIO controllers are exported to userspace using /dev/gpiochip* character devices. Access control to these devices is provided by standard UNIX file system permissions, on an all-or-nothing basis: either a GPIO controller is accessible for a user, or it is not. Currently no mechan

Re: [PATCH v8] audio/jack: add JACK client audiodev

2020-05-11 Thread Stefan Hajnoczi
On Wed, Apr 29, 2020 at 03:53:58PM +1000, Geoffrey McRae wrote: > This commit adds a new audiodev backend to allow QEMU to use JACK as > both an audio sink and source. > > Signed-off-by: Geoffrey McRae > --- > audio/Makefile.objs| 5 + > audio/audio.c | 1 + > audio/audio_templa

Re: [PATCH v8] audio/jack: add JACK client audiodev

2020-05-11 Thread Geoffrey McRae
On 2020-05-12 00:53, Stefan Hajnoczi wrote: On Wed, Apr 29, 2020 at 03:53:58PM +1000, Geoffrey McRae wrote: This commit adds a new audiodev backend to allow QEMU to use JACK as both an audio sink and source. Signed-off-by: Geoffrey McRae --- audio/Makefile.objs| 5 + audio/audio.c

Re: [PATCH v1 2/8] s390/sclp: check sccb len before filling in data

2020-05-11 Thread David Hildenbrand
On 11.05.20 16:50, Janosch Frank wrote: > On 5/11/20 4:44 PM, David Hildenbrand wrote: >> On 11.05.20 16:36, Janosch Frank wrote: >>> On 5/9/20 1:08 AM, Collin Walling wrote: The SCCB must be checked for a sufficient length before it is filled with any data. If the length is insufficient,

Re: [PATCH v3] aspeed: Add support for the sonorapass-bmc board

2020-05-11 Thread Peter Maydell
On Mon, 11 May 2020 at 14:13, Patrick Williams wrote: > > On Mon, May 11, 2020 at 11:54:42AM +0100, Peter Maydell wrote: > > On Wed, 6 May 2020 at 19:32, Patrick Williams wrote: > > > Looking up through the thread I can't find the email where > > Amithash gave his reviewed-by tag -- did I miss it

Re: [PATCH v2 1/4] iotests/109: Don't mirror with mismatched size

2020-05-11 Thread Max Reitz
On 11.05.20 15:58, Kevin Wolf wrote: > This patch makes the raw image the same size as the file in a different > format that is mirrored as raw to it to avoid errors when mirror starts > to enforce that source and target are the same size. > > We check only that the first 512 bytes are zeroed (ins

Re: [PATCH 0/3] tcg/s390: Support host vector operations

2020-05-11 Thread Richard Henderson
On 5/11/20 2:51 AM, David Hildenbrand wrote: > On 11.05.20 10:50, David Hildenbrand wrote: > I'm having issues building this due to lack of HWCAP_S390_VX. > > [linux1@rhkvm01 qemu]$ cat /etc/redhat-release > Red Hat Enterprise Linux Server release 7.7 (Maipo) > Yes, I found that when I pushed the

Re: Qemu, VNC and non-US keymaps

2020-05-11 Thread Daniel P . Berrangé
On Mon, May 11, 2020 at 04:24:32PM +0200, Philippe Mathieu-Daudé wrote: > Cc'ing more developers. > > On 5/11/20 4:17 PM, B3r3n wrote: > > Dear all, > > > > I am struggling for days/weeks with Qemu and its VNC accesses...with > > non-US keymaps. > > > > Let me summ the facts: > > - I am using a

Re: [PULL 00/34] target-arm queue

2020-05-11 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200511133405.5275-1-peter.mayd...@linaro.org/ Hi, This series seems to have some coding style problems. See output below for more information: Message-id: 20200511133405.5275-1-peter.mayd...@linaro.org Subject: [PULL 00/34] target-arm queue Type: series

Re: [PATCH v2 2/4] iotests/229: Use blkdebug to inject an error

2020-05-11 Thread Max Reitz
On 11.05.20 15:58, Kevin Wolf wrote: > 229 relies on the mirror running into an I/O error when the target is > smaller than the source. After changing mirror to catch this condition > while starting the job, this test case won't get a job that is paused > for an I/O error any more. Use blkdebug ins

Re: [PATCH v3 01/17] block/throttle-groups: throttle_group_co_io_limits_intercept(): 64bit bytes

2020-05-11 Thread Alberto Garcia
On Thu 30 Apr 2020 01:10:17 PM CEST, Vladimir Sementsov-Ogievskiy wrote: > The function is called from 64bit io handlers, and bytes is just passed > to throttle_account() which is 64bit too (unsigned though). So, let's > convert intermediate argument to 64bit too. > > This patch is a first in the 6

Re: [PATCH v2 1/4] iotests/109: Don't mirror with mismatched size

2020-05-11 Thread Kevin Wolf
Am 11.05.2020 um 17:08 hat Max Reitz geschrieben: > On 11.05.20 15:58, Kevin Wolf wrote: > > This patch makes the raw image the same size as the file in a different > > format that is mirrored as raw to it to avoid errors when mirror starts > > to enforce that source and target are the same size. >

Re: Abort in mch_update_pciexbar

2020-05-11 Thread Alexander Bulekov
On 200511 0910, Philippe Mathieu-Daudé wrote: > On 5/11/20 8:19 AM, Philippe Mathieu-Daudé wrote: > > On 5/11/20 6:59 AM, Alexander Bulekov wrote: > > > Hello, > > > While fuzzing, I found an input that triggers an assertion failure in > > > mch_update_pciexbar: > > > > > > #6 0x7f38d387c55a in ab

Re: [PATCH v2 3/4] mirror: Make sure that source and target size match

2020-05-11 Thread Max Reitz
On 11.05.20 15:58, Kevin Wolf wrote: > If the target is shorter than the source, mirror would copy data until > it reaches the end of the target and then fail with an I/O error when > trying to write past the end. > > If the target is longer than the source, the mirror job would complete > success

Re: [PATCH v2 2/4] iotests/229: Use blkdebug to inject an error

2020-05-11 Thread Kevin Wolf
Am 11.05.2020 um 17:18 hat Max Reitz geschrieben: > On 11.05.20 15:58, Kevin Wolf wrote: > > 229 relies on the mirror running into an I/O error when the target is > > smaller than the source. After changing mirror to catch this condition > > while starting the job, this test case won't get a job th

Re: [PATCH v3 02/17] block: use int64_t as bytes type in tracked requests

2020-05-11 Thread Alberto Garcia
On Thu 30 Apr 2020 01:10:18 PM CEST, 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. > > W

[Bug 1877716] Re: Win10 guest unusable after a few minutes

2020-05-11 Thread Stefan Hajnoczi
I have been able to reproduce the issue and found that nodes are not being removed from the AioContext->aio_handlers list when aio_set_fd_handler() is called. perf shows that large amounts of CPU time are spent in aio_pending(). Working on getting to the bottom of the issue and fixing it. -- You

Re: [PATCH 0/3] tcg/s390: Support host vector operations

2020-05-11 Thread David Hildenbrand
On 11.05.20 17:10, Richard Henderson wrote: > On 5/11/20 2:51 AM, David Hildenbrand wrote: >> On 11.05.20 10:50, David Hildenbrand wrote: >> I'm having issues building this due to lack of HWCAP_S390_VX. >> >> [linux1@rhkvm01 qemu]$ cat /etc/redhat-release >> Red Hat Enterprise Linux Server release

Re: [PATCH v2 1/4] iotests/109: Don't mirror with mismatched size

2020-05-11 Thread Max Reitz
On 11.05.20 17:29, Kevin Wolf wrote: > Am 11.05.2020 um 17:08 hat Max Reitz geschrieben: >> On 11.05.20 15:58, Kevin Wolf wrote: >>> This patch makes the raw image the same size as the file in a different >>> format that is mirrored as raw to it to avoid errors when mirror starts >>> to enforce tha

Re: [PATCH v2 4/4] iotests: Mirror with different source/target size

2020-05-11 Thread Max Reitz
On 11.05.20 15:58, Kevin Wolf wrote: > This tests that the mirror job catches situations where the target node > has a different size than the source node. It must also forbid resize > operations when the job is already running. > > Signed-off-by: Kevin Wolf > Message-Id: <20200507145228.323412-4

Re: [PULL 00/34] target-arm queue

2020-05-11 Thread Peter Maydell
ilable in the Git repository at: > > https://git.linaro.org/people/pmaydell/qemu-arm.git > tags/pull-target-arm-20200511 > > for you to fetch changes up to 7e17d50ebd359ee5fa3d65d7fdc0fe0336d60694: > > target/arm: Fix tcg_gen_gvec_du

Re: [PATCH 0/5] Introduce 'yank' oob qmp command to recover from hanging qemu

2020-05-11 Thread Dr. David Alan Gilbert
* Daniel P. Berrangé (berra...@redhat.com) wrote: > On Mon, May 11, 2020 at 01:07:18PM +0100, Dr. David Alan Gilbert wrote: > > * Daniel P. Berrangé (berra...@redhat.com) wrote: > > > On Mon, May 11, 2020 at 01:14:34PM +0200, Lukas Straub wrote: > > > > Hello Everyone, > > > > In many cases, if q

Re: [PATCH 3/3] plugins: avoid failing plugin when CPU is inited several times

2020-05-11 Thread Nikolay Igotti
Attached to the mail counter.c when running with attached test.c compiled to Linux standalone binary shows failing assert, unless the patch is applied. вс, 10 мая 2020 г. в 02:00, Emilio G. Cota : > On Mon, Apr 20, 2020 at 13:04:51 +0300, Nikolay Igotti wrote: > > In linux-user multithreaded scen

Re: [PATCH v3 03/17] block/io: use int64_t bytes parameter in bdrv_check_byte_request()

2020-05-11 Thread Alberto Garcia
On Thu 30 Apr 2020 01:10:19 PM CEST, 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. > > W

Re: [PATCH v16 QEMU 09/16] vfio: Add save state functions to SaveVMHandlers

2020-05-11 Thread Alex Williamson
On Mon, 11 May 2020 15:23:37 +0530 Kirti Wankhede wrote: > On 5/5/2020 10:07 AM, Alex Williamson wrote: > > On Tue, 5 May 2020 04:48:14 +0530 > > Kirti Wankhede wrote: > > > >> On 3/26/2020 3:33 AM, Alex Williamson wrote: > >>> On Wed, 25 Mar 2020 02:39:07 +0530 > >>> Kirti Wankhede wrote:

Re: [PATCH] hostmem: don't use mbind() if host-nodes is epmty

2020-05-11 Thread Philippe Mathieu-Daudé
Hi Eduardo, On 5/4/20 5:44 PM, Eduardo Habkost wrote: On Thu, Apr 30, 2020 at 11:46:06AM -0400, Igor Mammedov wrote: Since 5.0 QEMU uses hostmem backend for allocating main guest RAM. The backend however calls mbind() which is typically NOP in case of default policy/absent host-nodes bitmap. Ho

[Bug 1878034] [NEW] memcpy param-overlap through e1000e_write_to_rx_buffers

2020-05-11 Thread Alexander Bulekov
Public bug reported: Hello, While fuzzing, I found an input that triggers an overlapping memcpy (caught by AddressSanitizer). Overlapping memcpys are undefined behavior according to the POSIX and C standards, and can lead to bugs. ==22287==ERROR: AddressSanitizer: memcpy-param-overlap: memory r

Re: [PATCH v8 03/74] cpu: introduce cpu_mutex_lock/unlock

2020-05-11 Thread Robert Foley
On Mon, 11 May 2020 at 06:24, Alex Bennée wrote: > Robert Foley writes: snip > > +/* XXX: is this really the max number of CPUs? */ > > +#define CPU_LOCK_BITMAP_SIZE 2048 > > I wonder if we should be asserting this somewhere? Given it's an init > time constant we can probably do it somewhere in t

[PATCH v2 1/7] scsi/scsi_bus: switch search direction in scsi_device_find

2020-05-11 Thread Maxim Levitsky
This change will allow us to convert the bus children list to RCU, while not changing the logic of this function Signed-off-by: Maxim Levitsky --- hw/scsi/scsi-bus.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/hw/scsi/scsi-bus.c b/hw/scsi/scsi-bus.c index 1c

[PATCH v2 0/7] RFC/WIP: Fix scsi devices plug/unplug races w.r.t virtio-scsi iothread

2020-05-11 Thread Maxim Levitsky
Hi! This is a patch series that is a result of my discussion with Paulo on how to correctly fix the root cause of the BZ #1812399. The root cause of this bug is the fact that IO thread is running mostly unlocked versus main thread on which device hotplug is done. qdev_device_add first creates th

[PATCH v2 4/7] device-core: use atomic_set on .realized property

2020-05-11 Thread Maxim Levitsky
Some code might race with placement of new devices on a bus. We currently first place a (unrealized) device on the bus and then realize it. As a workaround, users that scan the child device list, can check the realized property to see if it is safe to access such a device. Use an atomic write here

[PATCH v2 3/7] device-core: use RCU for list of childs of a bus

2020-05-11 Thread Maxim Levitsky
This fixes the race between device emulation code that tries to find a child device to dispatch the request to (e.g a scsi disk), and hotplug of a new device to that bus. Note that this doesn't convert all the readers of the list but only these that might go over that list without BQL held. This

[PATCH v2 5/7] virtio-scsi: don't touch scsi devices that are not yet realized or about to be un-realized

2020-05-11 Thread Maxim Levitsky
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1812399 Suggested-by: Paolo Bonzini Signed-off-by: Maxim Levitsky --- hw/scsi/virtio-scsi.c | 19 ++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c index b0f4a35f8

[PATCH v2 2/7] Implement drain_call_rcu and use it in hmp_device_del

2020-05-11 Thread Maxim Levitsky
This allows to preserve the semantics of hmp_device_del, that the device is deleted immediatly which was changed by previos patch that delayed this to RCU callback Suggested-by: Stefan Hajnoczi Signed-off-by: Maxim Levitsky --- include/qemu/rcu.h | 1 + qdev-monitor.c | 3 +++ util/rcu.c

[PATCH v2 7/7] virtio-scsi: use scsi_device_get

2020-05-11 Thread Maxim Levitsky
This will help us to avoid the scsi device disappearing after we took a reference to it. It doesn't by itself forbid case when we try to access an unrealized device Suggested-by: Stefan Hajnoczi Signed-off-by: Maxim Levitsky --- hw/scsi/virtio-scsi.c | 23 +++ 1 file change

[PATCH v2 6/7] scsi: Add scsi_device_get

2020-05-11 Thread Maxim Levitsky
Add scsi_device_get which finds the scsi device and takes a reference to it. Suggested-by: Stefan Hajnoczi Signed-off-by: Maxim Levitsky --- hw/scsi/scsi-bus.c | 31 --- include/hw/scsi/scsi.h | 2 ++ 2 files changed, 26 insertions(+), 7 deletions(-) diff --git

Re: [PATCH v8 25/74] riscv: convert to cpu_halted

2020-05-11 Thread Robert Foley
On Mon, 11 May 2020 at 06:40, Alex Bennée wrote: > Robert Foley writes: > > > From: "Emilio G. Cota" > > > > Cc: Palmer Dabbelt > > Cc: Sagar Karandikar > > Cc: Bastian Koppelmann > > Cc: Alistair Francis > > Reviewed-by: Palmer Dabbelt > > You can drop Cc: lines fron patches once you have

Re: [PATCH 3/5] block/nbd.c: Add yank feature

2020-05-11 Thread Dr. David Alan Gilbert
* Lukas Straub (lukasstra...@web.de) wrote: > Add yank option, pass it to the socket-channel and register a yank > function which sets s->state = NBD_CLIENT_QUIT. This is the same > behaviour as if an error occured. > > Signed-off-by: Lukas Straub > +static void nbd_yank(void *opaque) > +{ > +

[Bug 1878043] [NEW] memcpy param-overlap in Slirp ip_stripoptions through e1000e

2020-05-11 Thread Alexander Bulekov
Public bug reported: Hello, While fuzzing, I found an input that triggers an overlapping memcpy (caught by AddressSanitizer). Overlapping memcpys are undefined behavior according to the POSIX and C standards, and can lead to bugs. ==1==ERROR: AddressSanitizer: memcpy-param-overlap: memory r

Re: [RFC PATCH 0/8] RISCV risu porting

2020-05-11 Thread Richard Henderson
On 4/30/20 12:21 AM, LIU Zhiwei wrote: > It's some difficult when I try to support RV32, because it's very > similiar to RV64, so I can't make two .risu files like arm.risu and > aarch64.risu. You could a command-line parameter, like --be or --sve for this. r~

Re: [PATCH v3 04/17] block/io: use int64_t bytes in driver wrappers

2020-05-11 Thread Alberto Garcia
On Thu 30 Apr 2020 01:10:20 PM CEST, 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. > > W

Re: [PATCH v8 02/74] cpu: rename cpu->work_mutex to cpu->lock

2020-05-11 Thread Robert Foley
On Mon, 11 May 2020 at 10:48, Alex Bennée wrote: > Hmm while bisecting to find another problem I found this commit: > > /home/alex/lsrc/qemu.git/hw/core/cpu.c: In function ‘cpu_common_finalize’: > /home/alex/lsrc/qemu.git/hw/core/cpu.c:383:27: error: incompatible type for > argument 1 of ‘qem

[PATCH 2/2] iotests: Run pylint and mypy in a testcase

2020-05-11 Thread Kevin Wolf
We made sure that iotests.py passes pylint. It would be a shame if we allowed new patches in that break this again, so let's just add a meta-test case that runs pylint on it. While we don't pass mypy --strict yet, we can already run it with a few options that would be part of --strict to make sure

[PATCH 1/2] iotests: Fix incomplete type declarations

2020-05-11 Thread Kevin Wolf
We need to fix only a few places so that iotests.py can pass mypy --disallow-incomplete-defs, which seems to be a desirable option to have enabled in the long run. Signed-off-by: Kevin Wolf --- tests/qemu-iotests/iotests.py | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --gi

[PATCH 0/2] iotests: Run pylint and mypy in a testcase

2020-05-11 Thread Kevin Wolf
Kevin Wolf (2): iotests: Fix incomplete type declarations iotests: Run pylint and mypy in a testcase tests/qemu-iotests/iotests.py | 8 +++ tests/qemu-iotests/297| 44 +++ tests/qemu-iotests/297.out| 3 +++ tests/qemu-iotests/group | 1 +

Re: [PATCH 0/3] tcg/s390: Support host vector operations

2020-05-11 Thread Richard Henderson
On 5/11/20 8:34 AM, David Hildenbrand wrote: > Yes, compiles with that. Where are the arm sve tests located, so I can > run them? (are they in tests/tcg?) Ah, they're risu files. I'll find somewhere to share them. r~

Re: [RFC PATCH 1/8] riscv: Add RV64I instructions description

2020-05-11 Thread Richard Henderson
On 4/30/20 12:21 AM, LIU Zhiwei wrote: > +LUI RISCV imm:20 rd:5 0110111 \ > +!constraints { $rd != 2 && $rd != 3 && $rd != 4 } I think it would be helpful to add a function for this. e.g. greg($rd) and gbase($rs1) (including $0). It would keep the constraints smaller, and avoid mistakes. These

[PATCH] linux-user: support of semtimedop syscall

2020-05-11 Thread Matus Kysel
We should add support of semtimedop syscall as new version of glibc 2.31 uses semop based on semtimedop (commit: https://gitlab.com/freedesktop-sdk/mirrors/sourceware/glibc/-/commit/765cdd0bffd77960ae852104fc4ea5edcdb8aed3 ). Signed-off-by: Matus Kysel --- linux-user/syscall.c | 26 +++

Re: [PATCH] hw/registerfields: Prefix local variables with underscore in macros

2020-05-11 Thread Alistair Francis
On Sun, May 10, 2020 at 1:35 PM Philippe Mathieu-Daudé wrote: > > One can name a local variable holding a value as 'v', but it > currently clashes with the registerfields macros. To save others > to debug the same mistake, prefix the macro's local variables > with an underscore. > > Signed-off-by:

Re: [PATCH] tests/acceptance/boot_linux: Skip slow Aarch64 'virt' machine TCG test

2020-05-11 Thread Lukas Straub
On Mon, 11 May 2020 10:11:20 +0100 Peter Maydell wrote: > On Sat, 9 May 2020 at 14:18, Lukas Straub wrote: > > Hi, > > Why not simply add slow tag to the test. Like: > > :avocado: tags=slow > > > > The slow tests can then be skipped with > > $ make check-acceptance AVOCADO_TAGS='-t -slow' > >

Re: [PATCH 0/6] target/ppc: Various clean-up and fixes for radix64

2020-05-11 Thread Greg Kurz
On Mon, 11 May 2020 11:44:26 +1000 David Gibson wrote: > On Thu, May 07, 2020 at 07:26:32PM +0200, Greg Kurz wrote: > > First three patches of this series are simple cleanups. The other > > ones fix some regressions introduced by Cedric's recent addition > > of partition-scoped translation. > >

[RFC] bdrv_flush: only use fast path when in owned AioContext

2020-05-11 Thread Stefan Reiter
Just because we're in a coroutine doesn't imply ownership of the context of the flushed drive. In such a case use the slow path which explicitly enters bdrv_flush_co_entry in the correct AioContext. Signed-off-by: Stefan Reiter --- We've experienced some lockups in this codepath when taking snap

Re: [PATCH 3/5] block/nbd.c: Add yank feature

2020-05-11 Thread Lukas Straub
On Mon, 11 May 2020 17:19:09 +0100 "Dr. David Alan Gilbert" wrote: > * Lukas Straub (lukasstra...@web.de) wrote: > > Add yank option, pass it to the socket-channel and register a yank > > function which sets s->state = NBD_CLIENT_QUIT. This is the same > > behaviour as if an error occured. > > >

[PATCH v1 0/4] target/microblaze: Add dynamic GDB XML and correct SReg reporting

2020-05-11 Thread Joe Komlodi
Hi all, This series adds dynamic GDB XML support for Micraoblaze CPUs, and fixes an issue when reporting Microblaze SRegs through GDB. The SRegs used to be printed out by iterating over the SReg array, but the SReg array isn't laid out in memory in the same order that GDB expects them. When repo

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

2020-05-11 Thread Alberto Garcia
On Thu 30 Apr 2020 01:10:21 PM CEST, Vladimir Sementsov-Ogievskiy wrote: > compute 'int tail' via % 'int alignment' - safe tail = (offset + bytes) % alignment; both are int64_t, no chance of overflow here? Berto

Re: Qemu, VNC and non-US keymaps

2020-05-11 Thread Daniel P . Berrangé
On Mon, May 11, 2020 at 05:29:48PM +0200, B3r3n wrote: > Hello Daniel, > > > There is no mention here of what VNC client program is being used, which > > is quite important, as key handling is a big mess in VNC. > I tested with TightVNC & noVNC through Apache. Both behaves the same. I did > not te

[PATCH v1 3/4] target/microblaze: gdb: Fix incorrect SReg reporting

2020-05-11 Thread Joe Komlodi
SRegs used to be reported to GDB by iterating over the SRegs array, however we do not store them in an order that allows them to be reported to GDB in that way. To fix this, a simple map is used to map the register GDB wants to its location in the SRegs array. Signed-off-by: Joe Komlodi --- tar

[PATCH v1 4/4] target/microblaze: monitor: Increase the number of registers reported

2020-05-11 Thread Joe Komlodi
Increase the number of registers reported to match GDB. Registers that aren't modeled are reported as 0. Signed-off-by: Joe Komlodi --- target/microblaze/translate.c | 16 ++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/target/microblaze/translate.c b/target/micr

[PATCH v1 2/4] target/microblaze: gdb: Extend the number of registers presented to GDB

2020-05-11 Thread Joe Komlodi
Increase the number of Microblaze registers QEMU will report when talking to GDB. Signed-off-by: Joe Komlodi --- target/microblaze/cpu.c | 2 +- target/microblaze/gdbstub.c | 52 ++--- 2 files changed, 50 insertions(+), 4 deletions(-) diff --git a/ta

[PATCH v1 1/4] target/microblaze: gdb: Add dynamic GDB XML register support

2020-05-11 Thread Joe Komlodi
Add dynamic GDB register XML for Microblaze, and modify the config file to use XML when building for Microblaze. For the dynamic XML to be read, there still needs to be a core XML file. Signed-off-by: Joe Komlodi --- configure | 1 + target/microblaze/cpu.c | 4 ++ targ

Re: [PATCH 3/5] block/nbd.c: Add yank feature

2020-05-11 Thread Dr. David Alan Gilbert
* Lukas Straub (lukasstra...@web.de) wrote: > On Mon, 11 May 2020 17:19:09 +0100 > "Dr. David Alan Gilbert" wrote: > > > * Lukas Straub (lukasstra...@web.de) wrote: > > > Add yank option, pass it to the socket-channel and register a yank > > > function which sets s->state = NBD_CLIENT_QUIT. This

[Bug 1878054] Re: Hang with high CPU usage in sdhci_data_transfer

2020-05-11 Thread Alexander Bulekov
Forgot the attachment.. ** Attachment added: "attachment" https://bugs.launchpad.net/qemu/+bug/1878054/+attachment/5369967/+files/attachment -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1878054

[Bug 1878054] [NEW] Hang with high CPU usage in sdhci_data_transfer

2020-05-11 Thread Alexander Bulekov
Public bug reported: Hello, While fuzzing, I found an input that causes QEMU to hang with 100% CPU usage. I have waited several minutes, and QEMU is still unresponsive. Using gdb, It appears that it is stuck in an sdhci_data_transfer: #0 memory_region_access_valid (mr=, addr=0x10284920, size=,

Re: [RFC PATCH 2/8] riscv: Generate payload scripts

2020-05-11 Thread Richard Henderson
On 4/30/20 12:21 AM, LIU Zhiwei wrote: > +# sequence of li rd, 0x1234567887654321 > +# > +# 0: 002471b7lui rd,0x247 > +# 4: 8ad1819baddiw rd,rd,-1875 > +# 8: 00c19193sllird,rd,0xc > +# c: f1118193

[Bug 1878057] [NEW] null-ptr dereference in megasas_command_complete

2020-05-11 Thread Alexander Bulekov
Public bug reported: Hello, While fuzzing, I found an input that triggers a null-pointer dereference in megasas_command_complete: ==14959==ERROR: AddressSanitizer: SEGV on unknown address 0x0003 (pc 0x55b1d11b4df1 bp 0x7ffeb55ca450 sp 0x7ffeb55ca1e0 T0) ==14959==The signal is caused by a

Re: [RFC PATCH 3/8] riscv: Define riscv struct reginfo

2020-05-11 Thread Richard Henderson
On 4/30/20 12:21 AM, LIU Zhiwei wrote: > +struct reginfo { > +uint64_t fault_address; > +uint64_t regs[32]; > +uint64_t fregs[32]; > +uint64_t sp; > +uint64_t pc; > +uint32_t flags; > +uint32_t faulting_insn; > + > +/* FP */ > +uint32_t fcsr; > +}; There's no ne

[PATCH v1 1/1] target/microblaze: Fix FPU2 instruction check

2020-05-11 Thread Joe Komlodi
The check to see if we can use FPU2 instructions would return 0 if cfg.use_fpu == 2, rather than returning the PVR2_USE_FPU2_MASK. This would cause all FPU2 instructions (fsqrt, flt, fint) to not be used. Signed-off-by: Joe Komlodi --- target/microblaze/translate.c | 2 +- 1 file changed, 1 ins

[PATCH v1 0/1] target/microblaze: Fix FPU2 instruction check

2020-05-11 Thread Joe Komlodi
Hi all, This fixes a backwards if statement that caused Microblaze FPU2 instructions to not be executed, even if use-fpu=2 in the DTS. Thanks! Joe Joe Komlodi (1): target/microblaze: Fix FPU2 instruction check target/microblaze/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-

Re: [PATCH v3 1/3] qemu-sockets: add abstract UNIX domain socket support

2020-05-11 Thread Eric Blake
On 5/10/20 1:14 AM, xiaoqiang zhao wrote: unix_listen/connect_saddr now support abstract address types two aditional BOOL switches are introduced: tight: whether to set @addrlen to the minimal string length, or the maximum sun_path length. default is TRUE abstract: whether we use abstrac

Re: [PATCH v2 0/7] RFC/WIP: Fix scsi devices plug/unplug races w.r.t virtio-scsi iothread

2020-05-11 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200511160951.8733-1-mlevi...@redhat.com/ 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. === TEST SCRIPT BEGIN ===

Re: [RFC PATCH 4/8] riscv: Implement payload load interfaces

2020-05-11 Thread Richard Henderson
On 4/30/20 12:21 AM, LIU Zhiwei wrote: > +void reginfo_init(struct reginfo *ri, ucontext_t *uc) > +{ > +int i; > +union __riscv_mc_fp_state *fp; > +/* necessary to be able to compare with memcmp later */ > +memset(ri, 0, sizeof(*ri)); > + > +for (i = 0; i < 32; i++) { > +

Re: [RFC PATCH 5/8] riscv: Add standard test case

2020-05-11 Thread Richard Henderson
On 4/30/20 12:21 AM, LIU Zhiwei wrote: > Signed-off-by: LIU Zhiwei > --- > test_riscv64.s | 85 ++ > 1 file changed, 85 insertions(+) > create mode 100644 test_riscv64.s Reviewed-by: Richard Henderson r~

Re: [PATCH v1 0/7] various tcg and linux-user updates

2020-05-11 Thread Laurent Vivier
Le 11/05/2020 à 13:12, Alex Bennée a écrit : > > Alex Bennée writes: > >> Hi, >> >> Cleaning up my queues into more focused trees these are all tweaks to >> TCG related stuff. The guest_base changes where posted before but >> where a little radical for 5.0 but I think are worth getting in early

Re: [PATCH v2 0/7] RFC/WIP: Fix scsi devices plug/unplug races w.r.t virtio-scsi iothread

2020-05-11 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200511160951.8733-1-mlevi...@redhat.com/ Hi, This series seems to have some coding style problems. See output below for more information: Message-id: 20200511160951.8733-1-mlevi...@redhat.com Subject: [PATCH v2 0/7] RFC/WIP: Fix scsi devices plug/unplug

Re: [RFC PATCH 6/8] riscv: Add configure script

2020-05-11 Thread Richard Henderson
On 4/30/20 12:21 AM, LIU Zhiwei wrote: > +++ b/configure > @@ -58,6 +58,8 @@ guess_arch() { > ARCH="m68k" > elif check_define __powerpc64__ ; then > ARCH="ppc64" > +elif check_define __riscv ; then > +ARCH="riscv64" > else > echo "This cpu is not sup

Re: [RFC PATCH 4/8] riscv: Implement payload load interfaces

2020-05-11 Thread Richard Henderson
On 5/11/20 11:03 AM, Richard Henderson wrote: >> +if (m->regs[i] != a->regs[i]) { >> +fprintf(f, " X%-2d: %016" PRIx64 " vs %016" PRIx64 "\n", >> +i, m->regs[i], a->regs[i]); >> +} > > riscv doesn't name its registers with an x. Duh. It does.

[Bug 1878067] [NEW] Assertion failure in eth_get_gso_type through the e1000e

2020-05-11 Thread Alexander Bulekov
Public bug reported: Hello, While fuzzing, I found an input that triggers an assertion failure in eth_get_gso_type through the e1000e: #1 0x7685755b in __GI_abort () at abort.c:79 #2 0x77c75dc3 in () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0 #3 0x77cd0b0a in g_asse

Re: [Bug 1877384] Re: 9pfs file create with mapped-xattr can fail on overlayfs

2020-05-11 Thread Fishface60
I've tested it (eventually, hit https://github.com/torvalds/linux/commit/467d12f5c7842896d2de3ced74e4147ee29e97c8 while trying to build it), it doesn't help, since my program wasn't failing from attempting to use O_NOATIME. The following patch fixed the -ENOENT on file create for me. I also applie

Re: [RFC PATCH 8/8] riscv: Add RV64F instructions description

2020-05-11 Thread Richard Henderson
On 4/30/20 12:21 AM, LIU Zhiwei wrote: > +FCVT_L_S RISCV 110 00010 rs1:5 rm:3 rd:5 1010011 \ > +!constraints { $rd != 2 && $rd != 3 && $rd != 4 && $rm != 6 && $rm != 5 } > + > +FCVT_LU_S RISCV 110 00011 rs1:5 rm:3 rd:5 1010011 \ > +!constraints { $rd != 2 && $rd != 3 && $rd != 4 && $rm != 6

<    1   2   3   4   5   >