Re: [Qemu-devel] [PATCH 0/4] scsi-generic: fixes for Block Limits emulation

2018-11-06 Thread no-reply
Hi, This series failed 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. Type: series Message-id: 20181029173437.32559-1-pbonz...@redhat.com Subject: [Qemu-devel] [PATCH 0/4] scsi-generic

Re: [Qemu-devel] [PATCH v6 06/10] hw/m68k: add Nubus support

2018-11-06 Thread Thomas Huth
On 2018-11-02 16:22, Mark Cave-Ayland wrote: > From: Laurent Vivier > > Co-developed-by: Mark Cave-Ayland > Signed-off-by: Mark Cave-Ayland > Signed-off-by: Laurent Vivier > --- > hw/Makefile.objs| 1 + > hw/nubus/Makefile.objs | 4 + > hw/nubus/mac-nubus-

Re: [Qemu-devel] [PATCH] tests: Fix Python 3 detection on older GNU make versions

2018-11-06 Thread Peter Maydell
On 6 November 2018 at 14:13, Eduardo Habkost wrote: > The $(SHELLSTATUS) variable requires GNU make >= 4.2, but Travis > seems to provide an older version. Change the existing rules to > use command output instead of exit code, to make it compatible > with older GNU make versions. > > Signed-off-

Re: [Qemu-devel] [PATCH 2/4] scsi-generic: avoid out-of-bounds access to VPD page list

2018-11-06 Thread Daniel Henrique Barboza
On 10/29/18 2:34 PM, Paolo Bonzini wrote: A device can report an excessive number of VPD pages when asked for a list; this can cause an out-of-bounds access to buf in scsi_generic_set_vpd_bl_emulation. It should not happen, but it is technically not incorrect so handle it: do not check any by

Re: [Qemu-devel] [PATCH 1/4] scsi-generic: keep VPD page list sorted

2018-11-06 Thread Daniel Henrique Barboza
On 10/29/18 2:34 PM, Paolo Bonzini wrote: Block limits emulation is just placing 0xb0 as the final byte of the VPD pages list. However, VPD page numbers must be sorted, so change that to an in-place insert. Since I couldn't find any disk that triggered the loop more than once, this was teste

[Qemu-devel] [PATCH for-3.1] replay: Exit on errors reading from replay log

2018-11-06 Thread Peter Maydell
Currently replay_get_byte() does not check for an error from getc(). Coverity points out (CID 1390622) that this could result in unexpected behaviour (such as looping forever, if we use the replay_get_dword() return value for a loop count). We don't expect reads from the replay log to fail, and if

Re: [Qemu-devel] [PULL 02/33] tests: Move tests/hex-loader-check-data/ to tests/data/hex-loader/

2018-11-06 Thread Peter Maydell
On 6 November 2018 at 15:15, Philippe Mathieu-Daudé wrote: > No worry, I'm not mad at all, but there might be an issue in your git PR > workflow, this series also missed your maintainer S-o-b. > > Peter: Can you add a such check in your scripts? (during next merge window, > no hurry). > > Rather t

Re: [Qemu-devel] [Qemu-block] [PATCH 6/7] qcow2: aio support for compressed cluster read

2018-11-06 Thread Alberto Garcia
On Tue 06 Nov 2018 04:13:58 PM CET, Vladimir Sementsov-Ogievskiy wrote: > 06.11.2018 18:06, Alberto Garcia wrote: >> On Thu 01 Nov 2018 07:27:37 PM CET, Vladimir Sementsov-Ogievskiy wrote: >> >>> +buf = g_try_malloc(csize); >>> +if (!buf) { >>> +return -ENOMEM; >>> +} >>> +i

Re: [Qemu-devel] [PATCH 0/4] scsi-generic: fixes for Block Limits emulation

2018-11-06 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20181029173437.32559-1-pbonz...@redhat.com Subject: [Qemu-devel] [PATCH 0/4] scsi-generic: fixes for Block Limits emulation === TEST SCRIPT BEGIN === #!/bin/bash BASE=base n

[Qemu-devel] [PATCH for-3.1 2/4] slirp: Use g_new() to allocate sockets in socreate()

2018-11-06 Thread Peter Maydell
The slirp socreate() function can only fail if the attempt to malloc() the struct socket fails. Switch to using g_new() instead, which will allow us to remove the error-handling code from its callers. Signed-off-by: Peter Maydell --- We already use g_new/g_malloc in slirp, including for mbuf buff

[Qemu-devel] [PATCH for-3.1 4/4] slirp: fork_exec(): create and connect child socket before fork()

2018-11-06 Thread Peter Maydell
Currently fork_exec() fork()s, and then creates and connects the child socket which it uses for communication with the parent in the child process. This is awkward because the child has no mechanism to report failure back to the parent, which might end up blocked forever in accept(). The child code

[Qemu-devel] [PATCH for-3.1 3/4] slirp: Remove code that handles socreate() failure

2018-11-06 Thread Peter Maydell
Now that socreate() can never fail, we can remove the code that was trying to handle that situation. In particular this removes code in tcp_connect() that provoked Coverity to complain (CID 1005724): in closesocket(accept(inso->s, (struct sockaddr *)&addr, &addrlen)); if the accept() call fails t

[Qemu-devel] [PATCH for-3.1 0/4] slirp: fix coverity issues

2018-11-06 Thread Peter Maydell
There are three outstanding Coverity issues for the slirp code. This patchset fixes them: * easiest first, we explicitly check for so->s == -1 in slirp_send() to avoid possibly passing -1 to the send() function. In an ideal world we could assert() it wasn't -1, but the slirp code is too c

Re: [Qemu-devel] [Qemu-trivial] [PATCH v1] bt: use size_t type for length parameters instead of int

2018-11-06 Thread Laurent Vivier
On 06/11/2018 15:52, Thomas Huth wrote: > On 2018-11-02 10:05, P J P wrote: >> +-- On Sat, 27 Oct 2018, P J P wrote --+ >> |+-- On Sun, 21 Oct 2018, P J P wrote --+ >> || The length parameter values are not negative, thus use an unsigned >> || type 'size_t' for them. Many routines pass 'len' values

Re: [Qemu-devel] [PATCH] tests: tpm: Use g_test_message rather than fprintf

2018-11-06 Thread Thomas Huth
On 2018-11-06 16:13, Stefan Berger wrote: > Display a message during the test using g_test_message rather > than fprintf. > > Signed-off-by: Stefan Berger > --- > tests/tpm-tests.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tests/tpm-tests.c b/tests/tpm-tests.c > i

Re: [Qemu-devel] [PULL 02/33] tests: Move tests/hex-loader-check-data/ to tests/data/hex-loader/

2018-11-06 Thread Philippe Mathieu-Daudé
On 6/11/18 15:13, Michael S. Tsirkin wrote: On Tue, Nov 06, 2018 at 02:27:18PM +0100, Philippe Mathieu-Daudé wrote: On 5/11/18 19:14, Michael S. Tsirkin wrote: From: Peter Maydell Currently tests/hex-loader-check-data contains data files used by the hexloader-test, and configure individually

Re: [Qemu-devel] [Qemu-block] [PATCH 5/7] qcow2: use byte-based read in qcow2_decompress_cluster

2018-11-06 Thread Vladimir Sementsov-Ogievskiy
06.11.2018 16:53, Alberto Garcia wrote: > On Thu 01 Nov 2018 07:27:36 PM CET, Vladimir Sementsov-Ogievskiy wrote: > >> diff --git a/block/qcow2.c b/block/qcow2.c >> index e9d24b801e..950b9f7ec6 100644 >> --- a/block/qcow2.c >> +++ b/block/qcow2.c >> @@ -3956,14 +3956,15 @@ fail: >> int qcow2_deco

Re: [Qemu-devel] [Qemu-block] [PATCH 6/7] qcow2: aio support for compressed cluster read

2018-11-06 Thread Vladimir Sementsov-Ogievskiy
06.11.2018 18:06, Alberto Garcia wrote: > On Thu 01 Nov 2018 07:27:37 PM CET, Vladimir Sementsov-Ogievskiy wrote: > >> +buf = g_try_malloc(csize); >> +if (!buf) { >> +return -ENOMEM; >> +} >> +iov.iov_base = buf; >> +iov.iov_len = csize; >> +qemu_iovec_init_external(

[Qemu-devel] [PATCH for-3.1 1/4] slirp: Don't pass possibly -1 fd to send()

2018-11-06 Thread Peter Maydell
Coverity complains (CID 1005726) that we might pass -1 as the fd argument to send() in slirp_send(), because we previously checked for "so->s == -1 && so->extra". The case of "so->s == -1 but so->extra NULL" should not in theory happen, but it is hard to guarantee because various places in the cod

Re: [Qemu-devel] [Qemu-block] [PATCH 6/7] qcow2: aio support for compressed cluster read

2018-11-06 Thread Alberto Garcia
On Thu 01 Nov 2018 07:27:37 PM CET, Vladimir Sementsov-Ogievskiy wrote: > +buf = g_try_malloc(csize); > +if (!buf) { > +return -ENOMEM; > +} > +iov.iov_base = buf; > +iov.iov_len = csize; > +qemu_iovec_init_external(&local_qiov, &iov, 1); > > -iov.iov_base

[Qemu-devel] [PATCH] tests: tpm: Use g_test_message rather than fprintf

2018-11-06 Thread Stefan Berger
Display a message during the test using g_test_message rather than fprintf. Signed-off-by: Stefan Berger --- tests/tpm-tests.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/tpm-tests.c b/tests/tpm-tests.c index 93a5beba01..5f217a2d92 100644 --- a/tests/tpm-tests.c +++

Re: [Qemu-devel] [PATCH v6 04/10] hw/m68k: add macfb video card

2018-11-06 Thread Thomas Huth
On 2018-11-02 16:22, Mark Cave-Ayland wrote: > From: Laurent Vivier > > Co-developed-by: Mark Cave-Ayland > Signed-off-by: Mark Cave-Ayland > Signed-off-by: Laurent Vivier > Reviewed-by: Hervé Poussineau > --- > arch_init.c| 4 + > hw/display/Makefile.objs | 1 + > hw/d

Re: [Qemu-devel] [PATCH v6 02/10] hw/m68k: implement ADB bus support for via

2018-11-06 Thread Thomas Huth
On 2018-11-02 16:22, Mark Cave-Ayland wrote: > From: Laurent Vivier > > Co-developed-by: Mark Cave-Ayland > Signed-off-by: Mark Cave-Ayland > Signed-off-by: Laurent Vivier > Reviewed-by: Hervé Poussineau > --- > hw/misc/mac_via.c | 190 > +

Re: [Qemu-devel] [PATCH v1] bt: use size_t type for length parameters instead of int

2018-11-06 Thread Philippe Mathieu-Daudé
On 21/10/18 19:58, P J P wrote: From: Prasad J Pandit The length parameter values are not negative, thus use an unsigned type 'size_t' for them. Many routines pass 'len' values to memcpy(3) calls. If it was negative, it could lead to memory corruption issues. Add check to avoid it. Reported-by

Re: [Qemu-devel] [PATCH v6 00/10] hw/m68k: add Apple Machintosh Quadra 800 machine

2018-11-06 Thread Thomas Huth
On 2018-11-04 14:41, Mark Cave-Ayland wrote: > On 04/11/2018 06:53, no-re...@patchew.org wrote: > >> Hi, >> >> This series seems to have some coding style problems. See output below for >> more information: >> >> Type: series >> Message-id: 20181102152257.20637-1-mark.cave-ayl...@ilande.co.uk >> S

Re: [Qemu-devel] [PATCH v1] bt: use size_t type for length parameters instead of int

2018-11-06 Thread Thomas Huth
On 2018-11-02 10:05, P J P wrote: > +-- On Sat, 27 Oct 2018, P J P wrote --+ > |+-- On Sun, 21 Oct 2018, P J P wrote --+ > || The length parameter values are not negative, thus use an unsigned > || type 'size_t' for them. Many routines pass 'len' values to memcpy(3) > || calls. If it was negative,

Re: [Qemu-devel] [PATCH] tests: Fix Python 3 detection on older GNU make versions

2018-11-06 Thread Philippe Mathieu-Daudé
Hi Peter, Can you apply this patch as a CI bug-fix? Thanks, Phil. On 6/11/18 15:27, Philippe Mathieu-Daudé wrote: On 6/11/18 15:13, Eduardo Habkost wrote: The $(SHELLSTATUS) variable requires GNU make >= 4.2, but Travis seems to provide an older version.  Change the existing rules to use com

Re: [Qemu-devel] [PULL v2 2/5] tests/tpm: Display if swtpm is not found or --tpm2 not supported

2018-11-06 Thread Stefan Berger
On 11/6/18 6:51 AM, Thomas Huth wrote: On 2018-10-30 22:47, Stefan Berger wrote: From: Marc-André Lureau If swtpm is not found in $PATH or --tpm2 isn't supported, we display this in the test log. We cannot mark the test as skipped due to a bug in certain versions of the gtester environment tha

Re: [Qemu-devel] [PATCH v2 4/6] Warn on obsolete and deprecated devices.

2018-11-06 Thread Michael S. Tsirkin
On Tue, Nov 06, 2018 at 11:23:33AM +0100, Gerd Hoffmann wrote: > Print a warning for deprecated and obsolete devices. > Also add support state to device listing. > > Signed-off-by: Gerd Hoffmann Should we also add a runtime flag to block these? E.g. I can see libvirt doing that and passing the r

Re: [Qemu-devel] [PATCH 2/2] tpm: use loop iterator to set sts data field

2018-11-06 Thread Stefan Berger
On 11/6/18 3:13 AM, Marc-André Lureau wrote: Hi On Tue, Nov 6, 2018 at 9:24 AM P J P wrote: From: Prasad J Pandit When TIS request is done, set 'sts' data field across all localities. The code certainly meant to set the field across all localities. However I don't see in the "TCG PC Client

Re: [Qemu-devel] [PATCH] tests: Fix Python 3 detection on older GNU make versions

2018-11-06 Thread Philippe Mathieu-Daudé
On 6/11/18 15:13, Eduardo Habkost wrote: The $(SHELLSTATUS) variable requires GNU make >= 4.2, but Travis seems to provide an older version. Change the existing rules to use command output instead of exit code, to make it compatible with older GNU make versions. You were quicker, I just found

Re: [Qemu-devel] [PATCH v2 2/6] add QemuSupportState

2018-11-06 Thread Eduardo Habkost
On Tue, Nov 06, 2018 at 11:23:31AM +0100, Gerd Hoffmann wrote: > Indicates support state for something (device, backend, subsystem, ...) > in qemu. Add QemuSupportState field to ObjectClass. Add some support > code. > > TODO: wire up to qom-list-types > > Signed-off-by: Gerd Hoffmann > --- [..

Re: [Qemu-devel] [PATCH 2/2] tpm: use loop iterator to set sts data field

2018-11-06 Thread Stefan Berger
On 11/6/18 12:21 AM, P J P wrote: From: Prasad J Pandit When TIS request is done, set 'sts' data field across all localities. Signed-off-by: Prasad J Pandit Reviewed-by: Stefan Berger --- hw/tpm/tpm_tis.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/tpm/tpm

Re: [Qemu-devel] [PULL 0/1] Seabios 20181106 patches

2018-11-06 Thread Peter Maydell
; > are available in the git repository at: > > git://git.kraxel.org/qemu tags/seabios-20181106-pull-request > > for you to fetch changes up to 0b8f74488e50f98b04e63157f85fde8a13f8d6aa: > > update seabios to master snapshot (2018-11-06 12:23:58 +0100) > > ---

Re: [Qemu-devel] aarch32 acquire/release vs mttcg

2018-11-06 Thread Alex Bennée
Peter Maydell writes: > Looking through code I noticed that in target/arm/translate.c there > is the following comment in the decode for the load-acquire/store-release > instructions: > > /* Since the emulation does not have barriers, > the acquire/release semantics need no speci

Re: [Qemu-devel] [Qemu-block] [PATCH 7/7] qcow2: do decompression in threads

2018-11-06 Thread Alberto Garcia
On Thu 01 Nov 2018 07:27:38 PM CET, Vladimir Sementsov-Ogievskiy wrote: > Do decompression in threads, like it is already done for compression. > This improves asynchronous compressed reads performance. > > Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Alberto Garcia Berto

[Qemu-devel] [PATCH] tests: Fix Python 3 detection on older GNU make versions

2018-11-06 Thread Eduardo Habkost
The $(SHELLSTATUS) variable requires GNU make >= 4.2, but Travis seems to provide an older version. Change the existing rules to use command output instead of exit code, to make it compatible with older GNU make versions. Signed-off-by: Eduardo Habkost --- I think that's the cause of the Travis

Re: [Qemu-devel] [PULL 02/33] tests: Move tests/hex-loader-check-data/ to tests/data/hex-loader/

2018-11-06 Thread Michael S. Tsirkin
On Tue, Nov 06, 2018 at 02:27:18PM +0100, Philippe Mathieu-Daudé wrote: > On 5/11/18 19:14, Michael S. Tsirkin wrote: > > From: Peter Maydell > > > > Currently tests/hex-loader-check-data contains data files used > > by the hexloader-test, and configure individually symlinks those > > data files

Re: [Qemu-devel] [PATCH v15 23/26] sched: early boot clock

2018-11-06 Thread Steven Sistare
Pavel has a new email address, cc'd - steve On 11/6/2018 12:42 AM, Dominique Martinet wrote: > (added various kvm/virtualization lists in Cc as well as qemu as I don't > know who's "wrong" here) > > Pavel Tatashin wrote on Thu, Jul 19, 2018: >> Allow sched_clock() to be used before schec_clock_in

Re: [Qemu-devel] [PATCH v15 23/26] sched: early boot clock

2018-11-06 Thread Dominique Martinet
(added various kvm/virtualization lists in Cc as well as qemu as I don't know who's "wrong" here) Pavel Tatashin wrote on Thu, Jul 19, 2018: > Allow sched_clock() to be used before schec_clock_init() is called. > This provides with a way to get early boot timestamps on machines with > unstable clo

Re: [Qemu-devel] [Qemu-block] [PATCH 5/7] qcow2: use byte-based read in qcow2_decompress_cluster

2018-11-06 Thread Alberto Garcia
On Thu 01 Nov 2018 07:27:36 PM CET, Vladimir Sementsov-Ogievskiy wrote: > diff --git a/block/qcow2.c b/block/qcow2.c > index e9d24b801e..950b9f7ec6 100644 > --- a/block/qcow2.c > +++ b/block/qcow2.c > @@ -3956,14 +3956,15 @@ fail: > int qcow2_decompress_cluster(BlockDriverState *bs, uint64_t clus

Re: [Qemu-devel] [PULL 0/5] target-arm queue

2018-11-06 Thread Peter Maydell
61f0f4b4947: > > Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20181105' into > staging (2018-11-06 09:10:46 +) > > are available in the Git repository at: > > https://git.linaro.org/people/pmaydell/qemu-arm.git > tags/p

Re: [Qemu-devel] [PULL 11/15] Bootstrap Python venv for tests

2018-11-06 Thread Philippe Mathieu-Daudé
On 6/11/18 14:10, Peter Maydell wrote: On 31 October 2018 at 00:31, Eduardo Habkost wrote: From: Cleber Rosa A number of QEMU tests are written in Python, and may benefit from an untainted Python venv. By using make rules, tests that depend on specific Python libs can set that rule as a requ

[Qemu-devel] [Bug 1801933] [NEW] default memory parameter too small on x86_64 today

2018-11-06 Thread johann peyrard
Public bug reported: Launching a centos74 iso VM today does not work anymore on x86_64 without increasing the size of the memory parameter. For example with this command : $ /opt/qemu-3.0.0/bin/qemu-system-x86_64 --curses -enable-kvm -drive file=file.dd,index=0,media=disk -drive file=centos- x8

Re: [Qemu-devel] [PATCH v1 1/1] riscv: spike: Fix memory leak in the board init

2018-11-06 Thread Peter Maydell
On 5 November 2018 at 19:44, Alistair Francis wrote: > Coverity caught a malloc() call that was never freed. This patch ensures > that we free the memory but also updates the allocation to use > g_strdup_printf() instead of malloc(). > > Signed-off-by: Alistair Francis > Suggested-by: Peter Mayde

Re: [Qemu-devel] [PULL 01/33] tests: Move tests/acpi-test-data/ to tests/data/acpi/

2018-11-06 Thread Philippe Mathieu-Daudé
On 5/11/18 19:14, Michael S. Tsirkin wrote: From: Peter Maydell Currently tests/acpi-test-data contains data files used by the bios-tables-test, and configure individually symlinks those data files into the build directory using a wildcard. Using a wildcard like this is a bad idea, because if

[Qemu-devel] [PATCH] scripts/device-crash-test: Remove known crashes

2018-11-06 Thread Thomas Huth
Looks like we've fixed them all already in the past months, e.g. with: f7d6bfcdc0fe49040aac3ac131a319cb5427957e spapr_pci: fail gracefully with non-pseries machine types 2363d5ee231bf047479422d56d3b85b7d37a7c23 hw/ppc/spapr_cpu_core: Add a proper check for spapr machine ef0e8fc768a561dd13a8

Re: [Qemu-devel] [PULL 02/33] tests: Move tests/hex-loader-check-data/ to tests/data/hex-loader/

2018-11-06 Thread Philippe Mathieu-Daudé
On 5/11/18 19:14, Michael S. Tsirkin wrote: From: Peter Maydell Currently tests/hex-loader-check-data contains data files used by the hexloader-test, and configure individually symlinks those data files into the build directory using a wildcard. Using a wildcard like this is a bad idea, becaus

Re: [Qemu-devel] [PULL 03/33] configure: Rename FILES variable to LINKS

2018-11-06 Thread Philippe Mathieu-Daudé
On 5/11/18 19:14, Michael S. Tsirkin wrote: From: Peter Maydell The FILES variable is used to accumulate a list of things to symlink from the source tree into the build tree. These don't have to be individual files; symlinking an entire directory of data files is also fine. Rename it to somet

Re: [Qemu-devel] [PULL 11/15] Bootstrap Python venv for tests

2018-11-06 Thread Peter Maydell
On 31 October 2018 at 00:31, Eduardo Habkost wrote: > From: Cleber Rosa > > A number of QEMU tests are written in Python, and may benefit > from an untainted Python venv. > > By using make rules, tests that depend on specific Python libs > can set that rule as a requirement, along with rules that

Re: [Qemu-devel] [PATCH v3] file-posix: Use error API properly

2018-11-06 Thread Kevin Wolf
Am 01.11.2018 um 07:29 hat Fam Zheng geschrieben: > Use error_report for situations that affect user operation (i.e. we're > actually returning error), and warn_report/warn_report_err when some > less critical error happened but the user operation can still carry on. > > For raw_normalize_devicep

Re: [Qemu-devel] [PULL 00/33] pci, pc, virtio: fixes, features

2018-11-06 Thread Peter Maydell
On 6 November 2018 at 11:20, Peter Maydell wrote: > On 6 November 2018 at 11:07, Michael S. Tsirkin wrote: >> On Tue, Nov 06, 2018 at 09:18:49AM +0100, Thomas Huth wrote: >>> On 2018-11-05 19:14, Michael S. Tsirkin wrote: >>> > The following changes since commit >>> > b2f7a038bb4c4fc5ce6b8486e85

Re: [Qemu-devel] [PATCH] ivshmem: fix memory backend leak

2018-11-06 Thread Paolo Bonzini
On 01/11/2018 11:44, Igor Mammedov wrote: > object_new() returns a new backend with refcount == 1 and > then later object_property_add_child() increases refcount to 2 > So when ivshmem is desroyed, the backend it has created isn't > destroyed along with it as children cleanup will bring > backend's

Re: [Qemu-devel] [PATCH] lsi53c895a: check script ram address value

2018-11-06 Thread li qiang
在 2018/11/6 20:28, Paolo Bonzini 写道: > On 06/11/2018 13:27, li qiang wrote: >> The addr is 0~0x1fff, but when addr is at the near the end ,for example >> 0x1fffe, the add>>2 can be 2047 >> >> and as script_ram is a uint32_t and so s->script_ram[addr >> 2] can read >> out of the script_ram. > How s

Re: [Qemu-devel] [PATCH] target/ppc: fix mtmsr instruction for icount

2018-11-06 Thread 'David Gibson'
On Tue, Nov 06, 2018 at 09:10:45AM +0300, Pavel Dovgalyuk wrote: > > From: David Gibson [mailto:da...@gibson.dropbear.id.au] > > On Tue, Oct 30, 2018 at 12:30:31PM +0300, Pavel Dovgalyuk wrote: > > > This patch fixes processing of mtmsr instructions in icount mode. > > > In this mode writing to int

Re: [Qemu-devel] [PATCH] lsi53c895a: check script ram address value

2018-11-06 Thread Peter Maydell
On 6 November 2018 at 12:27, li qiang wrote: > The addr is 0~0x1fff, but when addr is at the near the end ,for example > 0x1fffe, the add>>2 can be 2047 > > and as script_ram is a uint32_t and so s->script_ram[addr >> 2] can read > out of the script_ram. But script_ram is declared as uint32_t s

[Qemu-devel] [PATCH v3 2/2] tests/test-char: add muxed chardev testing for open/close

2018-11-06 Thread Artem Pisarenko
Validate that frontend callbacks for CHR_EVENT_OPENED/CHR_EVENT_CLOSED events are being issued when expected and in strictly pairing order. Signed-off-by: Artem Pisarenko --- tests/test-char.c | 80 +-- 1 file changed, 78 insertions(+), 2 delet

Re: [Qemu-devel] [PATCH v2 2/2] tests/test-char: add muxed chardev testing for open/close

2018-11-06 Thread Artem Pisarenko
> this is unnecessary change, I can drop on commit Oops, didn't noticed your message before sent v3.

[Qemu-devel] [PATCH v3 1/2] chardev: fix mess in OPENED/CLOSED events when muxed

2018-11-06 Thread Artem Pisarenko
When chardev is multiplexed (mux=on) there are a lot of cases where CHR_EVENT_OPENED/CHR_EVENT_CLOSED events pairing (expected from frontend side) is broken. There are either generation of multiple repeated or extra CHR_EVENT_OPENED events, or CHR_EVENT_CLOSED just isn't generated at all. This is m

Re: [Qemu-devel] [PATCH] lsi53c895a: check script ram address value

2018-11-06 Thread Peter Maydell
On 6 November 2018 at 12:38, li qiang wrote: > > 在 2018/11/6 20:28, Paolo Bonzini 写道: >> On 06/11/2018 13:27, li qiang wrote: >>> The addr is 0~0x1fff, but when addr is at the near the end ,for example >>> 0x1fffe, the add>>2 can be 2047 >>> >>> and as script_ram is a uint32_t and so s->script_ram

[Qemu-devel] [PATCH v3 0/2] chardev: fix mess in OPENED/CLOSED events when muxed

2018-11-06 Thread Artem Pisarenko
This issue actually more complex. Idea of generating events from inside function called '*_set_handlers' isn't good, at least its implicit nature, and especially a fact, that function decides about open state (see 'fe_open' variable), but generates event only in one direction. Combined with 'mu

Re: [Qemu-devel] [PATCH] lsi53c895a: check script ram address value

2018-11-06 Thread Paolo Bonzini
On 06/11/2018 13:27, li qiang wrote: > The addr is 0~0x1fff, but when addr is at the near the end ,for example > 0x1fffe, the add>>2 can be 2047 > > and as script_ram is a uint32_t and so s->script_ram[addr >> 2] can read > out of the script_ram. How so? s->script_ram has size 2048, it's okay

Re: [Qemu-devel] [PATCH] lsi53c895a: check script ram address value

2018-11-06 Thread Paolo Bonzini
On 06/11/2018 13:03, Peter Maydell wrote: > When can this masking have any effect? These functions are > the read and write ops for lsi_ram_ops, which we register with > memory_region_init_io(&s->ram_io, OBJECT(s), &lsi_ram_ops, s, > "lsi-ram", 0x2000); > which specifi

Re: [Qemu-devel] [PATCH] lsi53c895a: check script ram address value

2018-11-06 Thread li qiang
在 2018/11/6 20:03, Peter Maydell 写道: > On 6 November 2018 at 11:53, P J P wrote: >> From: Prasad J Pandit >> >> While accessing script ram[2048] via 'lsi_ram_read/write' routines, >> 'addr' could exceed the ram range. Mask high order bits to avoid >> OOB access. >> >> Reported-by: Mark Kanda >>

[Qemu-devel] [PATCH v2 3/5] migration: use threaded workqueue for compression

2018-11-06 Thread guangrong . xiao
From: Xiao Guangrong Adapt the compression code to the threaded workqueue Signed-off-by: Xiao Guangrong --- migration/ram.c | 313 +--- 1 file changed, 115 insertions(+), 198 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index

Re: [Qemu-devel] [PATCH] gtk: Fix mouse offset in scaled gtk-gl display for VFIO/iGVT-g DMA Buf mode

2018-11-06 Thread Gerd Hoffmann
On Wed, Oct 31, 2018 at 06:24:56AM +, Chen Zhang wrote: > The issue was reported as in https://bugs.launchpad.net/qemu/+bug/1793859 > > When an OpenGL accelerated GTK window is used for iGVT-g DMA Buf device, > window scaling would cause guest cursor to move in undesirable velocity. > > To fi

[Qemu-devel] [PATCH v2 1/5] bitops: introduce change_bit_atomic

2018-11-06 Thread guangrong . xiao
From: Xiao Guangrong It will be used by threaded workqueue Signed-off-by: Xiao Guangrong --- include/qemu/bitops.h | 13 + 1 file changed, 13 insertions(+) diff --git a/include/qemu/bitops.h b/include/qemu/bitops.h index 3f0926cf40..c522958852 100644 --- a/include/qemu/bitops.h ++

[Qemu-devel] [PATCH v2 5/5] tests: add threaded-workqueue-bench

2018-11-06 Thread guangrong . xiao
From: Xiao Guangrong It's the benhcmark of threaded-workqueue, also it's a good example to show how threaded-workqueue is used Signed-off-by: Xiao Guangrong --- tests/Makefile.include | 5 +- tests/threaded-workqueue-bench.c | 256 +++ 2 files ch

[Qemu-devel] [PATCH v2 4/5] migration: use threaded workqueue for decompression

2018-11-06 Thread guangrong . xiao
From: Xiao Guangrong Adapt the compression code to the threaded workqueue Signed-off-by: Xiao Guangrong --- migration/ram.c | 225 1 file changed, 81 insertions(+), 144 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index a

[Qemu-devel] [PATCH v2 2/5] util: introduce threaded workqueue

2018-11-06 Thread guangrong . xiao
From: Xiao Guangrong This modules implements the lockless and efficient threaded workqueue. Three abstracted objects are used in this module: - Request. It not only contains the data that the workqueue fetches out to finish the request but also offers the space to save the result af

[Qemu-devel] [PATCH v2 0/5] migration: improve multithreads

2018-11-06 Thread guangrong . xiao
From: Xiao Guangrong Changelog in v2: These changes are based on Paolo's suggestion: 1) rename the lockless multithreads model to threaded workqueue 2) hugely improve the internal design, that make all the request be a large array, properly partition it, assign requests to threads respectiv

[Qemu-devel] [PATCH] block/nvme: call blk_drain in NVMe reset code to avoid lockups

2018-11-06 Thread Igor Druzhinin
When blk_flush called in NVMe reset path S/C queues are already freed which means that re-entering AIO handling loop having some IO requests unfinished will lockup or crash as their SG structures being potentially reused. Call blk_drain before freeing the queues to avoid this nasty scenario. Signe

Re: [Qemu-devel] [PATCH] lsi53c895a: check script ram address value

2018-11-06 Thread Peter Maydell
On 6 November 2018 at 11:53, P J P wrote: > From: Prasad J Pandit > > While accessing script ram[2048] via 'lsi_ram_read/write' routines, > 'addr' could exceed the ram range. Mask high order bits to avoid > OOB access. > > Reported-by: Mark Kanda > Signed-off-by: Prasad J Pandit > --- > hw/scs

[Qemu-devel] [PATCH] lsi53c895a: check script ram address value

2018-11-06 Thread P J P
From: Prasad J Pandit While accessing script ram[2048] via 'lsi_ram_read/write' routines, 'addr' could exceed the ram range. Mask high order bits to avoid OOB access. Reported-by: Mark Kanda Signed-off-by: Prasad J Pandit --- hw/scsi/lsi53c895a.c | 2 ++ 1 file changed, 2 insertions(+) diff

[Qemu-devel] aarch32 acquire/release vs mttcg

2018-11-06 Thread Peter Maydell
Looking through code I noticed that in target/arm/translate.c there is the following comment in the decode for the load-acquire/store-release instructions: /* Since the emulation does not have barriers, the acquire/release semantics need no special handling */ This is out

Re: [Qemu-devel] [PULL v2 2/5] tests/tpm: Display if swtpm is not found or --tpm2 not supported

2018-11-06 Thread Thomas Huth
On 2018-10-30 22:47, Stefan Berger wrote: > From: Marc-André Lureau > > If swtpm is not found in $PATH or --tpm2 isn't supported, we display > this in the test log. We cannot mark the test as skipped due to a bug in > certain versions of the gtester environment that interprets a skipped test > as

Re: [Qemu-devel] [PATCH v3] oslib-posix: Use MAP_STACK in qemu_alloc_stack() on OpenBSD

2018-11-06 Thread Peter Maydell
On 5 November 2018 at 22:44, Brad Smith wrote: > ping. > Thanks for the ping, applied to master for rc0. -- PMM

[Qemu-devel] [PULL 3/5] hw/arm/exynos4210: Zero memory allocated for Exynos4210State

2018-11-06 Thread Peter Maydell
In exynos4210_init() we allocate memory for an Exynos4210State struct. Generally devices can assume that the memory allocated for their state struct is zero-initialized; we broke that assumption here by using g_new(). Use g_new0() instead. (In particular, some code assumes that the various irq arra

[Qemu-devel] [PULL 4/5] target/arm: Set S and PTW in 64-bit PAR format

2018-11-06 Thread Peter Maydell
In do_ats_write() we construct a PAR value based on the result of the translation. A comment says "S2WLK and FSTAGE are always zero, because we don't implement virtualization". Since we do in fact now implement virtualization, add the missing code that sets these bits based on the reported ARMMMUF

[Qemu-devel] [PULL 1/5] target/arm: Remove can't-happen if() from handle_vec_simd_shli()

2018-11-06 Thread Peter Maydell
In handle_vec_simd_shli() we have a check: if (size > 3 && !is_q) { unallocated_encoding(s); return; } However this can never be true, because we calculate int size = 32 - clz32(immh) - 1; where immh is a 4 bit field which we know cannot be all-zeroes. So the clz32()

[Qemu-devel] [PULL 2/5] milkymist: Check for failure trying to load BIOS image

2018-11-06 Thread Peter Maydell
Check the return value from load_image_targphys(), which tells us whether our attempt to load the BIOS image into RAM failed. (Spotted by Coverity, CID 1190305.) Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Acked-by: Michael Walle Message-id: 20181030170032.1844-1-peter.mayd

[Qemu-devel] [PULL 0/5] target-arm queue

2018-11-06 Thread Peter Maydell
#x27; into staging (2018-11-06 09:10:46 +) are available in the Git repository at: https://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20181106 for you to fetch changes up to 23463e0e4aeb2f0a9c60549a2c163f4adc0b8512: target/arm: Fix ATS1Hx instructions (2018-11-06 11:3

[Qemu-devel] [PULL 5/5] target/arm: Fix ATS1Hx instructions

2018-11-06 Thread Peter Maydell
ATS1HR and ATS1HW (which allow AArch32 EL2 to do address translations on the EL2 translation regime) were implemented in commit 14db7fe09a2c8. However, we got them wrong: these should do stage 1 address translations as defined for NS-EL2, which is ARMMMUIdx_S1E2. We were incorrectly making them per

Re: [Qemu-devel] [PATCH v2 1/2] chardev: fix mess in OPENED/CLOSED events when muxed

2018-11-06 Thread Marc-André Lureau
Hi On Mon, Nov 5, 2018 at 4:46 PM Artem Pisarenko wrote: > > When chardev is multiplexed (mux=on) there are a lot of cases, when > CHR_EVENT_OPENED/CHR_EVENT_CLOSED events pairing (expected from > frontend side) is broken. There are either generation of multiple > repeated or extra CHR_EVENT_OPEN

Re: [Qemu-devel] [Qemu-block] [PATCH 1/2] The discard flag for block stream operation

2018-11-06 Thread Andrey Shinkevich
Berto, Well noted about the "after implementation". Kindly, Andrey Shinkevich On 05.11.2018 19:08, Alberto Garcia wrote: > On Wed 31 Oct 2018 05:47:19 PM CET, Andrey Shinkevich > wrote: >> Adding a parameter to QMP block-stream command to allow discarding >> blocks in the backing chain while

Re: [Qemu-devel] [PATCH 1/2] The discard flag for block stream operation

2018-11-06 Thread Andrey Shinkevich
OK, David, I will implement that with the next series. Kindly, Andrey Shinkevich On 31.10.2018 20:38, Dr. David Alan Gilbert wrote: > * Andrey Shinkevich (andrey.shinkev...@virtuozzo.com) wrote: >> Adding a parameter to QMP block-stream command to allow discarding >> blocks in the backing chai

[Qemu-devel] [PULL 0/1] Seabios 20181106 patches

2018-11-06 Thread Gerd Hoffmann
The following changes since commit 7d56239f159afc2e7bd42623947e56ba48f37836: Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20181102' into staging (2018-11-02 17:17:12 +) are available in the git repository at: git://git.kraxel.org/qemu tags/seabios-201

Re: [Qemu-devel] [PULL 00/33] pci, pc, virtio: fixes, features

2018-11-06 Thread Peter Maydell
On 6 November 2018 at 11:07, Michael S. Tsirkin wrote: > On Tue, Nov 06, 2018 at 09:18:49AM +0100, Thomas Huth wrote: >> On 2018-11-05 19:14, Michael S. Tsirkin wrote: >> > The following changes since commit >> > b2f7a038bb4c4fc5ce6b8486e8513dfd97665e2a: >> > >> > Merge remote-tracking branch '

Re: [Qemu-devel] [PATCH v2 2/2] tests/test-char: add muxed chardev testing for open/close

2018-11-06 Thread Marc-André Lureau
Hi On Mon, Nov 5, 2018 at 4:47 PM Artem Pisarenko wrote: > > Validate that frontend callbacks for CHR_EVENT_OPENED/CHR_EVENT_CLOSED > events are being issued when expected and in strictly pairing order. > > Signed-off-by: Artem Pisarenko > --- > tests/test-char.c | 80 > +++

Re: [Qemu-devel] [PATCH v2 1/1] include: Add a comment to explain the origin of sizes' lookup table

2018-11-06 Thread Kevin Wolf
Am 06.11.2018 um 09:56 hat Leonid Bloch geschrieben: > Hi Phil, Hi Eric, > > (Eric, for some reason you weren't CC'd to this thread - sorry.) > > On 11/5/18 5:58 PM, Philippe Mathieu-Daudé wrote: > > Hi Leonid, > > > > On 4/11/18 19:07, Leonid Bloch wrote: > >> The lookup table for power-of-two

Re: [Qemu-devel] [PULL 00/33] pci, pc, virtio: fixes, features

2018-11-06 Thread Michael S. Tsirkin
On Tue, Nov 06, 2018 at 09:18:49AM +0100, Thomas Huth wrote: > On 2018-11-05 19:14, Michael S. Tsirkin wrote: > > The following changes since commit b2f7a038bb4c4fc5ce6b8486e8513dfd97665e2a: > > > > Merge remote-tracking branch 'remotes/rth/tags/pull-softfloat-20181104' > > into staging (2018-1

[Qemu-devel] [PATCH v4 14/16] gdbstub: gdb_set_stop_cpu: ignore request when process is not attached

2018-11-06 Thread Luc Michel
When gdb_set_stop_cpu() is called with a CPU associated to a process currently not attached by the GDB client, return without modifying the stop CPU. Otherwise, GDB gets confused if it receives packets with a thread-id it does not know about. Signed-off-by: Luc Michel Acked-by: Alistair Francis

[Qemu-devel] [PATCH v4 11/16] gdbstub: add support for extended mode packet

2018-11-06 Thread Luc Michel
Add support for the '!' extended mode packet. This is required for the multiprocess extension. Signed-off-by: Luc Michel --- gdbstub.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gdbstub.c b/gdbstub.c index bd4895ac0a..4132227092 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1294,10 +129

[Qemu-devel] [PATCH v4 13/16] gdbstub: processes initialization on new peer connection

2018-11-06 Thread Luc Michel
When a new connection is established, we set the first process to be attached, and the others detached. The first CPU of the first process is selected as the current CPU. Signed-off-by: Luc Michel Reviewed-by: Alistair Francis --- gdbstub.c | 20 +++- 1 file changed, 15 insertio

[Qemu-devel] [PATCH v4 12/16] gdbstub: add support for vAttach packets

2018-11-06 Thread Luc Michel
Add support for the vAttach packets. In multiprocess mode, GDB sends them to attach to additional processes. Signed-off-by: Luc Michel --- gdbstub.c | 35 +++ 1 file changed, 35 insertions(+) diff --git a/gdbstub.c b/gdbstub.c index 4132227092..ba365808db 100644

[Qemu-devel] [PATCH v4 08/16] gdbstub: add multiprocess support to Xfer:features:read:

2018-11-06 Thread Luc Michel
Change the Xfer:features:read: packet handling to support the multiprocess extension. This packet is used to request the XML description of the CPU. In multiprocess mode, different descriptions can be sent for different processes. This function now takes the process to send the description for as

[Qemu-devel] [PATCH v4 16/16] arm/xlnx-zynqmp: put APUs and RPUs in separate CPU clusters

2018-11-06 Thread Luc Michel
Create two separate CPU clusters for APUs and RPUs. Signed-off-by: Luc Michel --- include/hw/arm/xlnx-zynqmp.h | 3 +++ hw/arm/xlnx-zynqmp.c | 21 + 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/include/hw/arm/xlnx-zynqmp.h b/include/hw/arm/xlnx-zyn

[Qemu-devel] [PATCH v4 15/16] gdbstub: add multiprocess extension support

2018-11-06 Thread Luc Michel
Add multiprocess extension support by enabling multiprocess mode when the peer requests it, and by replying that we actually support it in the qSupported reply packet. Signed-off-by: Luc Michel Reviewed-by: Philippe Mathieu-Daudé Acked-by: Alistair Francis --- gdbstub.c | 6 ++ 1 file chan

[Qemu-devel] [PATCH v4 03/16] gdbstub: add multiprocess support to '?' packets

2018-11-06 Thread Luc Michel
The gdb_get_cpu_pid() function does the PID lookup for the given CPU. It checks if the CPU is a direct child of a CPU cluster. If it is, the returned PID is the cluster ID plus one (cluster IDs start at 0, GDB PIDs at 1). When the CPU is not a child of such a container, the PID of the first process

[Qemu-devel] [PATCH v4 00/16] gdbstub: support for the multiprocess extension

2018-11-06 Thread Luc Michel
changes since v3: - patch 1cpu_cluster.h: remove QEMU_ from the multiple includes guard #ifdef/#define [Alistair] - patch 1cpu_cluster.c: include osdep.h first [Alistair] - patch 1use uint64_t for cluster ID for prosperity :) [Philippe] - patch 1auto-assign

<    1   2   3   >