Re: [Qemu-devel] [libvirt] [PULL 25/26] block: Remove deprecated -drive option serial

2018-07-12 Thread Markus Armbruster
Peter Krempa writes: > On Tue, Jul 10, 2018 at 17:01:22 +0200, Cornelia Huck wrote: >> On Tue, 10 Jul 2018 16:39:31 +0200 >> Peter Krempa wrote: >> > On Tue, Jul 10, 2018 at 16:22:08 +0200, Cornelia Huck wrote: >> > > On Tue, 10 Jul 2018 07:59:15 +0200 >> > > Markus Armbruster wrote: > > [...]

Re: [Qemu-devel] [libvirt] [PULL 25/26] block: Remove deprecated -drive option serial

2018-07-12 Thread Peter Krempa
On Thu, Jul 12, 2018 at 08:38:25 +0200, Markus Armbruster wrote: > Kevin Wolf writes: > > Am 10.07.2018 um 16:22 hat Cornelia Huck geschrieben: > >> On Tue, 10 Jul 2018 07:59:15 +0200 > >> Markus Armbruster wrote: > >> Would that be workable? > > > > I think the function should just take a messag

Re: [Qemu-devel] [PATCH] linux-user: ppc64: use the correct values for F_*LK64s

2018-07-12 Thread Shivaprasad G Bhat
On 07/12/2018 02:21 AM, Laurent Vivier wrote: Le 11/07/2018 à 15:04, Laurent Vivier a écrit : Le 11/07/2018 à 12:55, Shivaprasad G Bhat a écrit : Qemu includes the glibc headers for the host defines and target headers are part of the qemu source themselves. The glibc has the F_GETLK64, F_SET

Re: [Qemu-devel] [PATCH] linux-user: ppc64: use the correct values for F_*LK64s

2018-07-12 Thread Laurent Vivier
Le 12/07/2018 à 09:00, Shivaprasad G Bhat a écrit : > > > On 07/12/2018 02:21 AM, Laurent Vivier wrote: >> Le 11/07/2018 à 15:04, Laurent Vivier a écrit : >>> Le 11/07/2018 à 12:55, Shivaprasad G Bhat a écrit : Qemu includes the glibc headers for the host defines and target headers are

Re: [Qemu-devel] [PULL v2 03/24] linux-user: Use safe_syscall wrapper for fcntl

2018-07-12 Thread Laurent Vivier
Le 28/06/2016 à 21:12, riku.voi...@linaro.org a écrit : > From: Peter Maydell > > Use the safe_syscall wrapper for fcntl. This is straightforward now > that we always use 'struct fcntl64' on the host, as we don't need > to select whether to call the host's fcntl64 or fcntl syscall > (a detail tha

Re: [Qemu-devel] [libvirt] [PULL 25/26] block: Remove deprecated -drive option serial

2018-07-12 Thread Peter Krempa
On Thu, Jul 12, 2018 at 08:59:44 +0200, Markus Armbruster wrote: > Peter Krempa writes: > > On Tue, Jul 10, 2018 at 17:01:22 +0200, Cornelia Huck wrote: > >> On Tue, 10 Jul 2018 16:39:31 +0200 > >> Peter Krempa wrote: [...] > > An option is to do a automatic testing where one of this approaches

Re: [Qemu-devel] [Qemu-ppc] [PATCH v2 2/2] vga: don't pick cirrus by default

2018-07-12 Thread Sebastian Bauer
Hi, Am 2018-07-12 06:57, schrieb Thomas Huth: This is doable too, if we have a clear consensus on what would be a reasonable default on TYPE_MACHINE. Personally I prefer the default on TYPE_MACHINE to be "none". Yes, please, no magic default hardware for all machines. That will only cause conf

Re: [Qemu-devel] [PATCH 07/12] migration: hold the lock only if it is really needed

2018-07-12 Thread Xiao Guangrong
On 07/11/2018 04:21 PM, Peter Xu wrote: On Thu, Jun 28, 2018 at 05:33:58PM +0800, Xiao Guangrong wrote: On 06/19/2018 03:36 PM, Peter Xu wrote: On Mon, Jun 04, 2018 at 05:55:15PM +0800, guangrong.x...@gmail.com wrote: From: Xiao Guangrong Try to hold src_page_req_mutex only if the queue

Re: [Qemu-devel] [libvirt] [PULL 25/26] block: Remove deprecated -drive option serial

2018-07-12 Thread Cornelia Huck
On Thu, 12 Jul 2018 08:51:16 +0200 Markus Armbruster wrote: > Markus Armbruster writes: > > > Kevin Wolf writes: > > > >> Am 10.07.2018 um 16:22 hat Cornelia Huck geschrieben: > >>> On Tue, 10 Jul 2018 07:59:15 +0200 > >>> Markus Armbruster wrote: > >>> > >>> > In addition to actively

Re: [Qemu-devel] [PATCH] hw/arm/bcm283x: Fix crash with device_add bcm2837 on unsupported machines

2018-07-12 Thread Paolo Bonzini
On 11/07/2018 21:59, Eduardo Habkost wrote: > > What exactly guarantees there will be no other references to > (e.g.) `&s->control` when `s` is freed? > > We know the references added by object_initialize(), > object_property_add_child() and qdev_set_parent_bus() will be > dropped, but what about

Re: [Qemu-devel] [PATCH] hw/arm/bcm283x: Fix crash with device_add bcm2837 on unsupported machines

2018-07-12 Thread Paolo Bonzini
On 11/07/2018 22:23, Eduardo Habkost wrote: > On Wed, Jul 11, 2018 at 10:16:42PM +0200, Paolo Bonzini wrote: >> On 11/07/2018 20:30, Eduardo Habkost wrote: The theoretical behavior should be: >>> It's not clear below where you expect >>> qdev_set_parent_bus(..., sysbus_get_default()) >>> to

Re: [Qemu-devel] [PATCH 07/12] migration: hold the lock only if it is really needed

2018-07-12 Thread Peter Xu
On Thu, Jul 12, 2018 at 03:47:57PM +0800, Xiao Guangrong wrote: > > > On 07/11/2018 04:21 PM, Peter Xu wrote: > > On Thu, Jun 28, 2018 at 05:33:58PM +0800, Xiao Guangrong wrote: > > > > > > > > > On 06/19/2018 03:36 PM, Peter Xu wrote: > > > > On Mon, Jun 04, 2018 at 05:55:15PM +0800, guangrong

Re: [Qemu-devel] [PATCH] fix gdbserver_state pointer validation

2018-07-12 Thread stephane duverger
Hi Phil, Well, at least we agree the gdb stub code is not straightforward. > > And apparently without seeing the bigger picture about how you are using > this, I am missing something. Sorry for that, i will try to explain it clearly. This is something rather simple indeed: 1 - during MachineSta

Re: [Qemu-devel] [PULL v2 03/24] linux-user: Use safe_syscall wrapper for fcntl

2018-07-12 Thread Peter Maydell
On 12 July 2018 at 08:18, Laurent Vivier wrote: > Le 28/06/2016 à 21:12, riku.voi...@linaro.org a écrit : >> From: Peter Maydell >> >> Use the safe_syscall wrapper for fcntl. This is straightforward now >> that we always use 'struct fcntl64' on the host, as we don't need >> to select whether to c

Re: [Qemu-devel] [PATCH for 3.0 10/10] docker: add expansion for docker-test-FOO to Makefile.include

2018-07-12 Thread Alex Bennée
Fam Zheng writes: > On Tue, 07/10 22:04, Alex Bennée wrote: >> >> Philippe Mathieu-Daudé writes: >> >> > On 07/09/2018 12:21 PM, Alex Bennée wrote: >> >> This allows us to run a particular test on all docker images. For >> >> example: >> >> >> >> make docker-test-unit >> >> >> >> Will run th

Re: [Qemu-devel] [PATCH for-3.0 0/9] migration: postcopy recovery unit test, bug fixes

2018-07-12 Thread Dr. David Alan Gilbert
* Balamuruhan S (bal...@linux.vnet.ibm.com) wrote: > On Fri, Jul 06, 2018 at 11:56:59AM +0100, Dr. David Alan Gilbert wrote: > > * Dr. David Alan Gilbert (dgilb...@redhat.com) wrote: > > > * Peter Xu (pet...@redhat.com) wrote: > > > > Based-on: <20180627132246.5576-1-pet...@redhat.com> > > > > > >

Re: [Qemu-devel] [PATCH] ppc/xics: split ICP into icp-base and icp class

2018-07-12 Thread Greg Kurz
On Thu, 12 Jul 2018 14:40:34 +1000 David Gibson wrote: > On Wed, Jul 11, 2018 at 11:26:41AM +0200, Greg Kurz wrote: > > On Wed, 11 Jul 2018 11:28:02 +1000 > > David Gibson wrote: > > > > > On Tue, Jul 10, 2018 at 05:55:14PM +0200, Greg Kurz wrote: > > > > Recent cleanup in commit a028dd423e

Re: [Qemu-devel] [PATCH v0 1/7] migration: add background snapshot capability

2018-07-12 Thread Dr. David Alan Gilbert
* Denis Plotnikov (dplotni...@virtuozzo.com) wrote: > The capability is used for the background vmstate saving > using the migration infrastructure. > Background vmstate saving means that the majority of vmstate > (RAM) is saved in the background when VM's vCPUS are running. > This helps to reduce

Re: [Qemu-devel] [PATCH 1/2] qdev: add HotplugHandler->post_plug() callback

2018-07-12 Thread Igor Mammedov
On Wed, 11 Jul 2018 18:48:21 +0200 Paolo Bonzini wrote: > On 11/07/2018 17:22, Igor Mammedov wrote: > > It also seems wrong to call _plug handler on maybe partially > > initialized device so perhaps we should first finish devices/children > > realization then do reset and only after that call _pl

Re: [Qemu-devel] [libvirt] [PULL 25/26] block: Remove deprecated -drive option serial

2018-07-12 Thread Kevin Wolf
Am 12.07.2018 um 09:48 hat Cornelia Huck geschrieben: > On Thu, 12 Jul 2018 08:51:16 +0200 > Markus Armbruster wrote: > > > Markus Armbruster writes: > > > > > Kevin Wolf writes: > > > > > >> Am 10.07.2018 um 16:22 hat Cornelia Huck geschrieben: > > >>> On Tue, 10 Jul 2018 07:59:15 +0200 >

Re: [Qemu-devel] [PATCH v2 2/5] i386: Add CPUID bit and feature words for IA32_ARCH_CAPABILITIES MSR

2018-07-12 Thread Robert Hoo
On Tue, 2018-07-03 at 08:00 -0300, Eduardo Habkost wrote: > On Tue, Jul 03, 2018 at 03:35:13PM +0800, Robert Hoo wrote: > > On Thu, 2018-06-28 at 15:28 -0300, Eduardo Habkost wrote: > > > On Wed, Jun 27, 2018 at 07:27:21PM +0800, Robert Hoo wrote: > > > > Support of IA32_PRED_CMD MSR already be enu

Re: [Qemu-devel] [PATCH v0 2/7] bitops: add some atomic versions of bitmap operations

2018-07-12 Thread Dr. David Alan Gilbert
* Denis Plotnikov (dplotni...@virtuozzo.com) wrote: > 1. test bit > 2. test and set bit > > Signed-off-by: Denis Plotnikov > --- > include/qemu/bitops.h | 24 > 1 file changed, 24 insertions(+) > > diff --git a/include/qemu/bitops.h b/include/qemu/bitops.h > index 3f092

Re: [Qemu-devel] [PATCH V5] qemu-img: align result of is_allocated_sectors

2018-07-12 Thread Peter Lieven
Am 11.07.2018 um 10:25 schrieb Kevin Wolf: Am 10.07.2018 um 22:16 hat Peter Lieven geschrieben: Am 10.07.2018 um 17:31 schrieb Kevin Wolf : Am 10.07.2018 um 17:05 hat Peter Lieven geschrieben: We currently don't enforce that the sparse segments we detect during convert are aligned. This lead

Re: [Qemu-devel] [PATCH V5] qemu-img: align result of is_allocated_sectors

2018-07-12 Thread Peter Lieven
Am 11.07.2018 um 10:25 schrieb Kevin Wolf: Am 10.07.2018 um 22:16 hat Peter Lieven geschrieben: Am 10.07.2018 um 17:31 schrieb Kevin Wolf : Am 10.07.2018 um 17:05 hat Peter Lieven geschrieben: We currently don't enforce that the sparse segments we detect during convert are aligned. This lead

[Qemu-devel] [Bug 1774677] Re: -icount increases boot time by >10x

2018-07-12 Thread Andreas Gustafsson
I tested Pavel's patch, applying it to master (c447afd5783b9237fa51b7a85777007d8d568bfc), but I'm afraid it only made things worse - qemu has now been booting the test kernel for 30 minutes but the boot has still not completed. The last console messages printed were: piix :00:01.1: not 100% n

[Qemu-devel] [PULL for-3.0 1/2] s390x/storage attributes: fix CMMA_BLOCK_SIZE usage

2018-07-12 Thread Cornelia Huck
From: Claudio Imbrenda The macro CMMA_BLOCK_SIZE was defined but not used, and a hardcoded value was instead used in the code. This patch fixes the value of CMMA_BLOCK_SIZE and uses it in the appropriate place in the code, and fixes another case of hardcoded value in the KVM backend, replacing i

[Qemu-devel] [PULL for-3.0 0/2] s390x changes for 3.0-rc

2018-07-12 Thread Cornelia Huck
The following changes since commit c447afd5783b9237fa51b7a85777007d8d568bfc: Update version for v3.0.0-rc0 release (2018-07-10 18:19:50 +0100) are available in the Git repository at: git://github.com/cohuck/qemu tags/s390x-20180712 for you to fetch changes up to

[Qemu-devel] [PULL for-3.0 2/2] error: Remove NULL checks on error_propagate() calls

2018-07-12 Thread Cornelia Huck
From: Philippe Mathieu-Daudé Patch created mechanically by rerunning: $ spatch --sp-file scripts/coccinelle/error_propagate_null.cocci \ --macro-file scripts/cocci-macro-file.h \ --dir . --in-place Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Markus Armbruster

Re: [Qemu-devel] [virtio-dev] Re: [PATCH v3 0/3] Use of unique identifier for pairing virtio and passthrough devices...

2018-07-12 Thread Siwei Liu
On Wed, Jul 11, 2018 at 2:53 AM, Cornelia Huck wrote: > On Tue, 10 Jul 2018 17:07:37 -0700 > Siwei Liu wrote: > >> On Mon, Jul 9, 2018 at 6:54 PM, Michael S. Tsirkin wrote: >> > On Mon, Jul 09, 2018 at 06:11:53PM -0700, si-wei liu wrote: >> >> The plan is to enable group ID based matching in the

[Qemu-devel] [Bug 1774677] Re: -icount increases boot time by >10x

2018-07-12 Thread Pavel Dovgalyuk
We figured out that there are races or something. I run QEMU under Ubuntu in VirtualBox (which has 1 CPU) and it works normally. On the real machine with multiple cores QEMU stalls with this patch. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscrib

Re: [Qemu-devel] [PATCH v0 3/7] threads: add infrastructure to process sigsegv

2018-07-12 Thread Dr. David Alan Gilbert
* Denis Plotnikov (dplotni...@virtuozzo.com) wrote: > Allows to define sigsegv handler temporary for all threads. > This is useful to implement copy-on-write logic while > linux usefaultfd doesn't support write-protected faults. > In the future, switch to using WP userfaultfd when it's > available.

[Qemu-devel] [PATCH] ppc/xics: fix ICP reset path

2018-07-12 Thread Greg Kurz
Recent cleanup in commit a028dd423ee6 dropped the ICPStateClass::reset handler. It is now up to child ICP classes to call the DeviceClass::reset handler of the parent class, thanks to device_class_set_parent_reset(). This is a better object programming pattern, but unfortunately it causes QEMU to c

Re: [Qemu-devel] [PULL 0/1] Monitor patches for 2018-07-11

2018-07-12 Thread Peter Maydell
On 11 July 2018 at 20:14, Markus Armbruster wrote: > The following changes since commit c447afd5783b9237fa51b7a85777007d8d568bfc: > > Update version for v3.0.0-rc0 release (2018-07-10 18:19:50 +0100) > > are available in the Git repository at: > > git://repo.or.cz/qemu/armbru.git tags/pull-mon

Re: [Qemu-devel] [PATCH] nvic: Change NVIC to support ARMv6-M

2018-07-12 Thread Stefan Hajnoczi
On Wed, Jul 11, 2018 at 02:33:14PM +0100, Peter Maydell wrote: > On 11 July 2018 at 14:25, Stefan Hajnoczi wrote: > > On Tue, Jul 10, 2018 at 06:33:35PM +0300, Julia Suvorova via Qemu-devel > > wrote: > >> The differences from ARMv7-M NVIC are: > >> * ARMv6-M only supports up to 32 external int

[Qemu-devel] [RFC v3 0/2] Add NRF51 SOC non-volatile memory controller

2018-07-12 Thread Steffen Görtz
Add some non-volatile memories and a non-volatile memory controller for the nRF51. Furthermore, a testsuite for the bbc:microbit and nrf51 soc was added. Examination of the real device showed that NVMs remained unchanged when the write/erase enabled bits are not set in the controller, so we can sa

[Qemu-devel] [RFC v3 2/2] tests: Add bbc:microbit / nRF51 test suite

2018-07-12 Thread Steffen Görtz
The microbit-test includes tests for the nRF51 NVMC peripheral and will host future nRF51 peripheral tests and board-level bbc:microbit tests. Signed-off-by: Steffen Görtz --- tests/Makefile.include | 2 + tests/microbit-test.c | 118 + 2 files changed,

[Qemu-devel] [RFC v3 1/2] arm: Add NRF51 SOC non-volatile memory controller

2018-07-12 Thread Steffen Görtz
Changes in V3: - NVMs consolidated in one file - Removed bitfields - Add VMState - Add reset Changes in V1/V2: - Code style changes Signed-off-by: Steffen Görtz --- hw/nvram/Makefile.objs | 1 + hw/nvram/nrf51_nvm.c | 401 +++ include/hw/arm/nrf51

Re: [Qemu-devel] [PATCH for 3.0 09/10] docker: add test-unit runner

2018-07-12 Thread Alex Bennée
Fam Zheng writes: > On Mon, 07/09 16:21, Alex Bennée wrote: >> This test doesn't even build QEMU, it just runs all the unit tests. >> Intended to make checking unit tests on all docker images easier. >> >> Signed-off-by: Alex Bennée >> --- >> tests/docker/test-unit | 19 +++ >>

Re: [Qemu-devel] [PATCH for 3.0 02/10] docker: debian-tricore add git tools

2018-07-12 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > On 07/09/2018 12:21 PM, Alex Bennée wrote: >> As we check out we need git installed before we start. We would have >> had this based on the heavier qemu:debian9 image but we only use plain >> debian:9 here. > > I first thought "weird, I checked this already" the

Re: [Qemu-devel] [RFC PATCH for-3.1 1/2] docker: Fix TriCore binutils build

2018-07-12 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > - Use recent 'missing' from libtool, > - Fix 'ylwrap' permissions > > Signed-off-by: Philippe Mathieu-Daudé > --- > Shippable runs 'clang --version'. > > .../dockerfiles/debian-tricore-cross.docker | 23 --- > 1 file changed, 20 insertions(+)

[Qemu-devel] [Bug 1772075] Re: Segmentation fault on aarch64 vm at powerdown

2018-07-12 Thread M0Rf30
https://mega.nz/#!M15RiY5S!7CvVemQAOQnxTcdcRnLNGqxlH6SAeL3oit_uWCs-yck here the sd image -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1772075 Title: Segmentation fault on aarch64 vm at powerdown

[Qemu-devel] [PATCH 00/20] tests: Compile-time format string checking for libqtest.h

2018-07-12 Thread Markus Armbruster
This is a reboot of "[PATCH 0/9] tests: Clean up around qmp() and hmp()" I sent about a year ago. Back then, Eric folded it into his "Clean up around qmp() and hmp()" series, which stalled after v4. My reboot tries to avoid that fate by reducing mission creep. There are plenty of good ideas in E

[Qemu-devel] [PATCH 16/20] migration-test: Make wait_command() cope with '%'

2018-07-12 Thread Markus Armbruster
wait_command() passes its argument @command to qtest_qmp_send(). Falls apart if @command contain '%'. Two ways to disarm this trap: suppress interpretation of '%' by passing @command as argument to format string "%s", or fix it by having wait_command() take the variable arguments to go with @comma

[Qemu-devel] [PATCH 07/20] libqtest: Simplify qmp_fd_vsend() a bit

2018-07-12 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- tests/libqtest.c | 18 +++--- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/tests/libqtest.c b/tests/libqtest.c index c2c08a890c..3bfb062fcb 100644 --- a/tests/libqtest.c +++ b/tests/libqtest.c @@ -488,24 +488,20 @@ QDict *qtest_qm

[Qemu-devel] [PATCH 03/20] libqtest: Clean up how we read device_del messages

2018-07-12 Thread Markus Armbruster
qtest_qmp_device_del() still uses the qmp("") hack to receive a message, even though we have qmp_receive() since commit 66e0c7b187e. Put it to use. Bonus: gets rid of empty format strings. A step towards compile-time format string checking without triggering -Wformat-zero-length. Signed-off-by:

[Qemu-devel] [PATCH 12/20] cpu-plug-test: Don't pass integers as strings to device_add

2018-07-12 Thread Markus Armbruster
test_plug_with_device_add_x86() plugs Haswell-i386-cpu and Haswell-x86_64-cpu with device_add. It passes socket-id, core-id, thread-id as JSON strings. The properties are actually integers. test_plug_with_device_add_coreid() plugs power8_v2.0-spapr-cpu-core and qemu-s390x-cpu with device_add. I

[Qemu-devel] [PATCH 06/20] qobject: New qobject_from_vjsonf_nofail(), qdict_from_vjsonf_nofail()

2018-07-12 Thread Markus Armbruster
Every printf()-like function sooner or later needs its vprintf()-like buddy. The next commit will need qobject_from_jsonf_nofail()'s buddy, and qdict_from_jsonf_nofail()'s buddy will be used later in this series. Add both. Signed-off-by: Markus Armbruster --- include/qapi/qmp/qjson.h | 4

[Qemu-devel] [PATCH 17/20] migration-test: Clean up string interpolation into QMP, part 1

2018-07-12 Thread Markus Armbruster
Leaving interpolation into JSON to qmp() is more robust than building QMP input manually, as explained in the recent commit "tests: Clean up string interpolation into QMP input (simple cases)". migrate_recover() builds QMP input manually because wait_command() can't interpolate. Well, it can sinc

[Qemu-devel] [PATCH 09/20] qobject: qobject_from_jsonv() is dangerous, hide it away

2018-07-12 Thread Markus Armbruster
qobject_from_jsonv() takes ownership of %p arguments. On failure, we can't generally know whether we failed before or after %p, so ownership becomes indeterminate. To avoid leaks, callers passing %p must terminate on error, e.g. by passing &error_abort. Trap for the unwary; document and give the

[Qemu-devel] [PATCH 02/20] libqtest: Rename functions to send QMP messages

2018-07-12 Thread Markus Armbruster
The functions to receive messages are called qtest_qmp_receive() and qmp_receive(), qmp_fd_receive(). The ones to send messages are called qtest_async_qmp(), qtest_async_qmpv(), qmp_async(), qmp_fd_send(), qmp_fd_sendv(). Inconsistent. Rename the *_async* ones to qmp_send(), qtest_qmp_send(), qt

[Qemu-devel] [PATCH 04/20] libqtest: Clean up how we read the QMP greeting

2018-07-12 Thread Markus Armbruster
qtest_init() still uses the qtest_qmp_discard_response(s, "") hack to receive the greeting, even though we have qtest_qmp_receive() since commit 66e0c7b187e. Put it to use. Bonus: gets rid of an empty format string. A step towards compile-time format string checking without triggering -Wformat-z

[Qemu-devel] [PATCH 19/20] migration-test: Clean up string interpolation into QMP, part 3

2018-07-12 Thread Markus Armbruster
Leaving interpolation into JSON to qmp() is more robust than building QMP input manually, as explained in the recent commit "tests: Clean up string interpolation into QMP input (simple cases)". migration-test.c interpolates strings into JSON in a few places: * migrate_set_parameter() interpolates

[Qemu-devel] [PATCH 18/20] migration-test: Clean up string interpolation into QMP, part 2

2018-07-12 Thread Markus Armbruster
Leaving interpolation into JSON to qmp() is more robust than building QMP input manually, as explained in the recent commit "tests: Clean up string interpolation into QMP input (simple cases)". migrate() interpolates members into a JSON object. Change it to take its extra QMP arguments as argumen

[Qemu-devel] [PATCH 20/20] libqtest: Enable compile-time format string checking

2018-07-12 Thread Markus Armbruster
qtest_qmp() & friends pass their format string and variable arguments to qobject_from_vjsonf_nofail(). Unlike qobject_from_jsonv(), they aren't decorated with GCC_FMT_ATTR(). Fix that to get compile-time format string checking. Signed-off-by: Markus Armbruster --- tests/libqtest.h | 32 +++

[Qemu-devel] [PATCH 14/20] migration-test: Make wait_command() return the "return" member

2018-07-12 Thread Markus Armbruster
All callers of wait_command() are only interested in the success response's "return" member. Lift its extraction into wait_command(). Cc: Juan Quintela Cc: Dr. David Alan Gilbert Signed-off-by: Markus Armbruster --- tests/migration-test.c | 38 +++--- 1 file ch

[Qemu-devel] [PATCH 10/20] tests: Pass literal format strings directly to qmp_FOO()

2018-07-12 Thread Markus Armbruster
The qmp_FOO() take a printf-like format string. In a few places, we assign a string literal to a variable and pass that instead of simply passing the literal. Clean that up. Bonus: gets rid of non-literal format strings. A step towards compile-time format string checking without triggering -Wfo

[Qemu-devel] [PATCH 15/20] tests: New helper qtest_qmp_receive_success()

2018-07-12 Thread Markus Armbruster
Commit b21373d0713 copied wait_command() from tests/migration-test.c to tests/tpm-util.c. Replace both copies by new libqtest helper qtest_qmp_receive_success(). Also use it to simplify qtest_qmp_device_del(). Bonus: gets rid of a non-literal format string. A step towards compile-time format st

[Qemu-devel] [PATCH 13/20] tests: Clean up string interpolation around qtest_qmp_device_add()

2018-07-12 Thread Markus Armbruster
Leaving interpolation into JSON to qmp() is more robust than building QMP input manually, as explained in the commit before previous. qtest_qmp_device_add() and its wrappers interpolate into JSON as follows: * qtest_qmp_device_add() interpolates members into a JSON object. * So do its wrappers q

[Qemu-devel] [PATCH 05/20] qobject: Replace qobject_from_jsonf() by qobject_from_jsonf_nofail()

2018-07-12 Thread Markus Armbruster
Commit ab45015a968 "qobject: Let qobject_from_jsonf() fail instead of abort" removed only one of two ways qobject_from_jsonf() can abort. Wrong. Its rationale for letting it fail is that all remaining users cope fine with failure. Well, they're just fine with aborting, too; it's what they do on f

Re: [Qemu-devel] [libvirt] [PULL 25/26] block: Remove deprecated -drive option serial

2018-07-12 Thread Markus Armbruster
Cornelia Huck writes: > On Thu, 12 Jul 2018 08:51:16 +0200 > Markus Armbruster wrote: > >> Markus Armbruster writes: >> >> > Kevin Wolf writes: >> > >> >> I think the function should just take a message: >> >> >> >> /* Works like error_report(), except for the WARNING/ERROR prefix >> >>

[Qemu-devel] [PATCH 11/20] tests: Clean up string interpolation into QMP input (simple cases)

2018-07-12 Thread Markus Armbruster
When you build QMP input manually like this cmd = g_strdup_printf("{ 'execute': 'migrate'," "'arguments': { 'uri': '%s' } }", uri); rsp = qmp(cmd); g_free(cmd); you're responsible for escaping the interpolated values for JSON. Not d

Re: [Qemu-devel] [PATCH 18/20] migration-test: Clean up string interpolation into QMP, part 2

2018-07-12 Thread Juan Quintela
Markus Armbruster wrote: > Leaving interpolation into JSON to qmp() is more robust than building > QMP input manually, as explained in the recent commit "tests: Clean up > string interpolation into QMP input (simple cases)". > > migrate() interpolates members into a JSON object. Change it to take

[Qemu-devel] [PATCH 01/20] libqtest: Document calling conventions

2018-07-12 Thread Markus Armbruster
From: Eric Blake We have two flavors of vararg usage in qtest: qtest_hmp() etc. work like sprintf(), and qtest_qmp() etc. work like qobject_from_jsonf(). Spell that out in the comments. Also add GCC_FMT_ATTR() to qtest_hmp() etc. so that the compiler can flag incorrect use. We have some cleanup

Re: [Qemu-devel] [PATCH 14/20] migration-test: Make wait_command() return the "return" member

2018-07-12 Thread Juan Quintela
Markus Armbruster wrote: > All callers of wait_command() are only interested in the success > response's "return" member. Lift its extraction into wait_command(). > > Cc: Juan Quintela > Cc: Dr. David Alan Gilbert > Signed-off-by: Markus Armbruster Reviewed-by: Juan Quintela Nice simplifica

[Qemu-devel] [PATCH 08/20] test-qobject-input-visitor: Avoid format string ambiguity

2018-07-12 Thread Markus Armbruster
When visitor_input_test_init_internal()'s argument @ap is null, then @json_string is interpreted literally, else it's gets %-escapes interpolated. This is awkward. One caller always passes null @ap, and the others never do. Lift the building of the QObject into the callers, where it can be done

Re: [Qemu-devel] [PATCH 16/20] migration-test: Make wait_command() cope with '%'

2018-07-12 Thread Juan Quintela
Markus Armbruster wrote: > wait_command() passes its argument @command to qtest_qmp_send(). > Falls apart if @command contain '%'. Two ways to disarm this trap: > suppress interpretation of '%' by passing @command as argument to > format string "%s", or fix it by having wait_command() take the >

Re: [Qemu-devel] [libvirt] [PULL 25/26] block: Remove deprecated -drive option serial

2018-07-12 Thread Markus Armbruster
Peter Krempa writes: > On Thu, Jul 12, 2018 at 08:38:25 +0200, Markus Armbruster wrote: >> Kevin Wolf writes: >> > Am 10.07.2018 um 16:22 hat Cornelia Huck geschrieben: >> >> On Tue, 10 Jul 2018 07:59:15 +0200 >> >> Markus Armbruster wrote: >> >> Would that be workable? >> > >> > I think the fu

Re: [Qemu-devel] [PATCH 17/20] migration-test: Clean up string interpolation into QMP, part 1

2018-07-12 Thread Juan Quintela
Markus Armbruster wrote: > Leaving interpolation into JSON to qmp() is more robust than building > QMP input manually, as explained in the recent commit "tests: Clean up > string interpolation into QMP input (simple cases)". > > migrate_recover() builds QMP input manually because wait_command() >

Re: [Qemu-devel] [PATCH 15/20] tests: New helper qtest_qmp_receive_success()

2018-07-12 Thread Juan Quintela
Markus Armbruster wrote: > Commit b21373d0713 copied wait_command() from tests/migration-test.c > to tests/tpm-util.c. Replace both copies by new libqtest helper > qtest_qmp_receive_success(). Also use it to simplify > qtest_qmp_device_del(). > > Bonus: gets rid of a non-literal format string.

Re: [Qemu-devel] [PATCH 19/20] migration-test: Clean up string interpolation into QMP, part 3

2018-07-12 Thread Juan Quintela
Markus Armbruster wrote: > Leaving interpolation into JSON to qmp() is more robust than building > QMP input manually, as explained in the recent commit "tests: Clean up > string interpolation into QMP input (simple cases)". > > migration-test.c interpolates strings into JSON in a few places: > >

Re: [Qemu-devel] [PULL 0/1] VFIO fixes for qemu-3.0-rc1

2018-07-12 Thread Peter Maydell
On 11 July 2018 at 20:55, Alex Williamson wrote: > The following changes since commit c447afd5783b9237fa51b7a85777007d8d568bfc: > > Update version for v3.0.0-rc0 release (2018-07-10 18:19:50 +0100) > > are available in the Git repository at: > > git://github.com/awilliam/qemu-vfio.git tags/vfi

Re: [Qemu-devel] [virtio-dev] Re: [PATCH v3 0/3] Use of unique identifier for pairing virtio and passthrough devices...

2018-07-12 Thread Cornelia Huck
On Thu, 12 Jul 2018 02:37:03 -0700 Siwei Liu wrote: > On Wed, Jul 11, 2018 at 2:53 AM, Cornelia Huck wrote: > > On Tue, 10 Jul 2018 17:07:37 -0700 > > Siwei Liu wrote: > > > >> On Mon, Jul 9, 2018 at 6:54 PM, Michael S. Tsirkin > >> wrote: > >> > On Mon, Jul 09, 2018 at 06:11:53PM -0700,

Re: [Qemu-devel] [PATCH V5] qemu-img: align result of is_allocated_sectors

2018-07-12 Thread Kevin Wolf
Am 12.07.2018 um 11:26 hat Peter Lieven geschrieben: > Am 11.07.2018 um 10:25 schrieb Kevin Wolf: > > Am 10.07.2018 um 22:16 hat Peter Lieven geschrieben: > > > > > > > Am 10.07.2018 um 17:31 schrieb Kevin Wolf : > > > > > > > > Am 10.07.2018 um 17:05 hat Peter Lieven geschrieben: > > > > > We cu

Re: [Qemu-devel] [libvirt] [PULL 25/26] block: Remove deprecated -drive option serial

2018-07-12 Thread Markus Armbruster
Peter Krempa writes: > On Thu, Jul 12, 2018 at 08:59:44 +0200, Markus Armbruster wrote: >> Peter Krempa writes: >> > On Tue, Jul 10, 2018 at 17:01:22 +0200, Cornelia Huck wrote: >> >> On Tue, 10 Jul 2018 16:39:31 +0200 >> >> Peter Krempa wrote: > > [...] > >> > An option is to do a automatic te

Re: [Qemu-devel] [PATCH v0 4/7] migration: add background snapshot infrastructure

2018-07-12 Thread Dr. David Alan Gilbert
* Denis Plotnikov (dplotni...@virtuozzo.com) wrote: > It allows to intercept VM's RAM access and write them into the > snapshot. This is too big for me to properly review; it needs splitting into smaller chunks. However, there are some comments below. > Signed-off-by: Denis Plotnikov > --- > in

Re: [Qemu-devel] [PATCH 1/5] nvme: PCI/e configuration from specification

2018-07-12 Thread Kevin Wolf
Am 22.06.2018 um 13:22 hat Shimi Gersner geschrieben: > PCI/e configuration currently does not meets specifications. > > Patch includes various configuration changes to support specifications > - BAR2 to return zero when read and CMD.IOSE is not set. > - Expose NVME configuration through IO space

Re: [Qemu-devel] [PATCH] hw/arm/bcm283x: Fix crash with device_add bcm2837 on unsupported machines

2018-07-12 Thread Markus Armbruster
Thomas Huth writes: > On 09.07.2018 23:42, Peter Maydell wrote: >> On 9 July 2018 at 22:03, Thomas Huth wrote: [...] > Hmm, maybe we need a qtest that first executes "info qtree", then runs > 'device-list-properties' for all devices and finally checks "info qtree" > again ... since 'device-list-

Re: [Qemu-devel] [PATCH] hw/arm/bcm283x: Fix crash with device_add bcm2837 on unsupported machines

2018-07-12 Thread Markus Armbruster
Peter Maydell writes: > On 11 July 2018 at 17:12, Eduardo Habkost wrote: >> On Wed, Jul 11, 2018 at 09:21:48AM +0200, Thomas Huth wrote: >>> Hm, ok, so how to continue here now? Shall we at least mark the >>> bcm2836/7 devices with user_creatable=false, so that users can not crash >>> their QEMU

Re: [Qemu-devel] [PATCH 7/7] tests/qgraph: sdhci test node

2018-07-12 Thread Paolo Bonzini
On 11/07/2018 19:52, Emanuele wrote: >>> >> Do you intend to delete this comment before this series is merged?  It >> seems like a TODO that doesn't need to be kept around. > Paolo suggested me to put it there, because there still are some devices > that need to be implemented. >> >>> +    qos_add_

Re: [Qemu-devel] [PATCH 02/12] monitor: consitify qmp_send_response() QDict argument

2018-07-12 Thread Markus Armbruster
Marc-André Lureau writes: > Signed-off-by: Marc-André Lureau > --- > monitor.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/monitor.c b/monitor.c > index 3c9c97b73f..fc481d902d 100644 > --- a/monitor.c > +++ b/monitor.c > @@ -504,9 +504,9 @@ int monitor_fprintf(F

Re: [Qemu-devel] [PATCH 03/12] qmp: constify qmp_is_oob()

2018-07-12 Thread Markus Armbruster
Marc-André Lureau writes: > Signed-off-by: Marc-André Lureau > --- > include/qapi/qmp/dispatch.h | 2 +- > qapi/qmp-dispatch.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/include/qapi/qmp/dispatch.h b/include/qapi/qmp/dispatch.h > index 4e2e749faf..68a528

Re: [Qemu-devel] [PATCH v3 07/20] intc/arm_gic: Add virtualization extensions helper macros and functions

2018-07-12 Thread Peter Maydell
On 29 June 2018 at 14:29, Luc Michel wrote: > Add some helper macros and functions related to the virtualization > extensions to gic_internal.h. > > The GICH_LR_* macros help extracting specific fields of a list register > value. The only tricky one is the priority field as only the MSB are > stor

Re: [Qemu-devel] [PATCH v3 08/20] intc/arm_gic: Refactor secure/ns access check in the CPU interface

2018-07-12 Thread Peter Maydell
On 29 June 2018 at 14:29, Luc Michel wrote: > An access to the CPU interface is non-secure if the current GIC instance > implements the security extensions, and the memory access is actually > non-secure. Until then, it was checked with tests such as > if (s->security_extn && !attrs.secure) { ..

Re: [Qemu-devel] [PATCH v3 12/20] intc/arm_gic: Implement virtualization extensions in gic_complete_irq

2018-07-12 Thread Peter Maydell
On 29 June 2018 at 14:29, Luc Michel wrote: > Implement virtualization extensions in the gic_complete_irq() function. > When a guest tries to end an IRQ that does not exist in the LRs, the > EOICount field of the virtual interface HCR register is incremented by > one, and the request is ignored. >

Re: [Qemu-devel] [PATCH v3 09/20] intc/arm_gic: Add virtualization enabled IRQ helper functions

2018-07-12 Thread Peter Maydell
On 29 June 2018 at 14:29, Luc Michel wrote: > Add some helper functions to gic_internal.h to get or change the state > of an IRQ. When the current CPU is not a vCPU, the call is forwarded to > the GIC distributor. Otherwise, it acts on the list register matching > the IRQ in the current CPU virtua

Re: [Qemu-devel] [PATCH v3 10/20] intc/arm_gic: Implement virtualization extensions in gic_(activate_irq|drop_prio)

2018-07-12 Thread Peter Maydell
On 29 June 2018 at 14:29, Luc Michel wrote: > Implement virtualization extensions in gic_activate_irq() and > gic_drop_prio() and in gic_get_prio_from_apr_bits() called by > gic_drop_prio(). > > When the current CPU is a vCPU: > - Use GIC_VIRT_MIN_BPR and GIC_VIRT_NR_APRS instead of their non-vi

Re: [Qemu-devel] [PATCH] hw/arm/bcm283x: Fix crash with device_add bcm2837 on unsupported machines

2018-07-12 Thread Peter Maydell
On 12 July 2018 at 13:06, Markus Armbruster wrote: > Peter Maydell writes: > >> On 11 July 2018 at 17:12, Eduardo Habkost wrote: >>> On Wed, Jul 11, 2018 at 09:21:48AM +0200, Thomas Huth wrote: Hm, ok, so how to continue here now? Shall we at least mark the bcm2836/7 devices with user_

[Qemu-devel] [PATCH V6] qemu-img: align result of is_allocated_sectors

2018-07-12 Thread Peter Lieven
We currently don't enforce that the sparse segments we detect during convert are aligned. This leads to unnecessary and costly read-modify-write cycles either internally in Qemu or in the background on the storage device as nearly all modern filesystems or hardware have a 4k alignment internally.

Re: [Qemu-devel] [PATCH for-3.0] target/arm: Fix LD1W and LDFF1W (scalar plus vector)

2018-07-12 Thread Alex Bennée
Richard Henderson writes: > 'I' was being double-incremented; correctly within the inner loop > and incorrectly within the outer loop. > > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée Tested-by: Alex Bennée > --- > > Fixes a SIGSEGV within one of these generated helpers, > exp

Re: [Qemu-devel] [PATCH 04/12] Revert "qmp: isolate responses into io thread"

2018-07-12 Thread Markus Armbruster
Marc-André Lureau writes: > This reverts commit abe3cd0ff7f774966da6842620806ab7576fe4f3. > > There is no need to add an additional queue to send the reply to the > IOThread, because QMP response is thread safe, and chardev write path > is thread safe. It will schedule the watcher in the associat

Re: [Qemu-devel] [PATCH] hw/arm/bcm283x: Fix crash with device_add bcm2837 on unsupported machines

2018-07-12 Thread Markus Armbruster
Peter Maydell writes: > On 12 July 2018 at 13:06, Markus Armbruster wrote: >> Peter Maydell writes: >> >>> On 11 July 2018 at 17:12, Eduardo Habkost wrote: On Wed, Jul 11, 2018 at 09:21:48AM +0200, Thomas Huth wrote: > Hm, ok, so how to continue here now? Shall we at least mark the >>

Re: [Qemu-devel] [PATCH v3 11/20] intc/arm_gic: Implement virtualization extensions in gic_acknowledge_irq

2018-07-12 Thread Peter Maydell
On 29 June 2018 at 14:29, Luc Michel wrote: > Implement virtualization extensions in the gic_acknowledge_irq() > function. This function changes the state of the highest priority IRQ > from pending to active. > > When the current CPU is a vCPU, modifying the state of an IRQ modifies > the correspo

Re: [Qemu-devel] [PATCH 5/9] monitor: suspend monitor instead of send CMD_DROP

2018-07-12 Thread Markus Armbruster
Markus Armbruster writes: > Peter Xu writes: > >> On Fri, Jul 06, 2018 at 03:19:56PM +0200, Markus Armbruster wrote: [...] > Marc-André, I trust you'll respin the monitor core parts of "[PATCH v3 > 00/38] RFC: monitor: add asynchronous command type" as a separate series > for 3.1. Please includ

Re: [Qemu-devel] [PATCH] headers: fix linux/mod_devicetable.h inclusions

2018-07-12 Thread Randy Dunlap
On 07/09/2018 08:19 AM, Arnd Bergmann wrote: > A couple of drivers produced build errors after the mod_devicetable.h > header was split out from the platform_device one, e.g. > > drivers/media/platform/davinci/vpbe_osd.c:42:40: error: array type has > incomplete element type 'struct platform_devi

[Qemu-devel] Question: SRIOV support over Win Hyper-V VM running in QEMU process on Linux host

2018-07-12 Thread Elijah Shakkour
Hey, Our team is adding a NIC functional emulation to QEMU. One of the features we are adding to this NIC is SRIOV. Here is the error message I get when checking SRIOV support of our emulated NIC on Win2016 server (the hyper-v VM). " SR-IOV cannot be used on this system as the PCI Express hard

Re: [Qemu-devel] [PATCH v3 13/20] intc/arm_gic: Implement virtualization extensions in gic_cpu_(read|write)

2018-07-12 Thread Peter Maydell
On 29 June 2018 at 14:29, Luc Michel wrote: > Implement virtualization extensions in the gic_cpu_read() and > gic_cpu_write() functions. Those are the last bits missing to fully > support virtualization extensions in the CPU interface path. > > Signed-off-by: Luc Michel > --- > hw/intc/arm_gic.c

[Qemu-devel] [PULL 0/1] seccomp branch queue

2018-07-12 Thread Eduardo Otubo
The following changes since commit c447afd5783b9237fa51b7a85777007d8d568bfc: Update version for v3.0.0-rc0 release (2018-07-10 18:19:50 +0100) are available in the Git repository at: https://github.com/otubo/qemu.git tags/pull-seccomp-20180712 for you to fetch changes up to

[Qemu-devel] [PULL 1/1] seccomp: allow sched_setscheduler() with SCHED_IDLE policy

2018-07-12 Thread Eduardo Otubo
From: Marc-André Lureau Current and upcoming mesa releases rely on a shader disk cash. It uses a thread job queue with low priority, set with sched_setscheduler(SCHED_IDLE). However, that syscall is rejected by the "resourcecontrol" seccomp qemu filter. Since it should be safe to allow lowering

Re: [Qemu-devel] [PATCH 04/12] Revert "qmp: isolate responses into io thread"

2018-07-12 Thread Marc-André Lureau
Hi On Thu, Jul 12, 2018 at 3:14 PM, Markus Armbruster wrote: > Marc-André Lureau writes: > >> This reverts commit abe3cd0ff7f774966da6842620806ab7576fe4f3. >> >> There is no need to add an additional queue to send the reply to the >> IOThread, because QMP response is thread safe, and chardev wri

Re: [Qemu-devel] [PATCH v3 14/20] intc/arm_gic: Wire the vCPU interface

2018-07-12 Thread Peter Maydell
On 29 June 2018 at 14:29, Luc Michel wrote: > Add the read/write functions to handle accesses to the vCPU interface. > Those accesses are forwarded to the real CPU interface, with the CPU id > being converted to the corresponding vCPU id (vCPU id = CPU id + > GIC_NCPU). > > As for the CPU interfac

  1   2   3   >