[Qemu-devel] [PATCH v3 03/23] libqtest: Clean up how we read the QMP greeting

2018-08-06 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 v3 00/23] tests: Compile-time format string checking for libqtest.h

2018-08-06 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 v3 18/23] migration-test: Clean up string interpolation into QMP, part 1

2018-08-06 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 v3 17/23] migration-test: Make wait_command() cope with '%'

2018-08-06 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 v3 01/23] libqtest: Rename functions to send QMP messages

2018-08-06 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

Re: [Qemu-devel] [PATCH v3 04/23] libqtest: Remove qtest_qmp_discard_response() & friends

2018-08-06 Thread Thomas Huth
On 08/06/2018 08:53 AM, Markus Armbruster wrote: > qtest_qmp_discard_response(...) is shorthand for > qobject_unref(qtest_qmp(...), except it's not actually shorter. > Moreover, the presence of these functions encourage sloppy testing. > Remove them from libqtest. Add them as macros to the tests t

[Qemu-devel] [PATCH v3 21/23] libqtest: Enable compile-time format string checking

2018-08-06 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 Reviewed-by: Philippe Mathieu-Daud

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

2018-08-06 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 v3 19/23] migration-test: Clean up string interpolation into QMP, part 2

2018-08-06 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 v3 23/23] libqtest: Rename qtest_FOOv() to qtest_vFOO() for consistency

2018-08-06 Thread Markus Armbruster
13 of 13 C99 library function pairs taking ... or a va_list parameter are called FOO() and vFOO(). In QEMU, we sometimes call the one taking a va_list FOOv() instead. Bad taste. libqtest.h uses both spellings. Normalize it to the standard spelling. Signed-off-by: Markus Armbruster Reviewed-by

[Qemu-devel] [PATCH v3 22/23] libqtest: Replace qtest_startf() by qtest_initf()

2018-08-06 Thread Markus Armbruster
qtest_init() creates a new QTestState, and leaves @global_qtest alone. qtest_start() additionally assigns it to @global_qtest, but qtest_startf() additionally assigns NULL to @global_qtest. This makes no sense. Replace it by qtest_initf() that works like qtest_init(), i.e. leaves @global_qtest al

[Qemu-devel] [PATCH v3 16/23] tests: New helper qtest_qmp_receive_success()

2018-08-06 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 v3 15/23] migration-test: Make wait_command() return the "return" member

2018-08-06 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 Reviewed-by: Juan Quintela Reviewed-by: Eric Blake --- tests/migration-test.c |

[Qemu-devel] [PATCH v3 14/23] tests: Clean up string interpolation around qtest_qmp_device_add()

2018-08-06 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 v3 12/23] tests: Clean up string interpolation into QMP input (simple cases)

2018-08-06 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 0/6] qcow2: Make the L2 cache cover the whole image by default

2018-08-06 Thread Alberto Garcia
On Fri 03 Aug 2018 04:55:42 PM CEST, Kevin Wolf wrote: > By the way, weren't you working on subclusters a while ago? How did > that go? Because I think those would enable us to use larger cluster > sizes and therefore reduce the metadata sizes as well. I had a working prototype, but the changes to

Re: [Qemu-devel] [PATCH 0/3] x86/cpu: Enable a few new cpu features

2018-08-06 Thread Liu, Jingqi
Hi Paolo & Eduardo, Do you have any comments for the series ? Thanks On 7/16/2018 10:59 PM, Paolo Bonzini wrote: On 10/07/2018 10:57, Jingqi Liu wrote: Enable a few new cpu features including UMONITOR, UMWAIT, TPAUSE, MOVDIRI and MOVDIR64B. UMONITOR, UMWAIT, and TPAUSE are a set of user wait

Re: [Qemu-devel] [PULL 0/5] pc, virtio: fixes

2018-08-06 Thread Peter Maydell
On 3 August 2018 at 19:14, Michael S. Tsirkin wrote: > On Fri, Aug 03, 2018 at 11:45:36AM +0100, Peter Maydell wrote: >> On 3 August 2018 at 10:27, Michael S. Tsirkin wrote: >> > Please consider for 3.0 if there is another rc. >> > >> > The following changes since commit >> > f7502360397d291be04

Re: [Qemu-devel] [Qemu-ppc] [PULL 0/2] ppc-for-3.0 queue 20180801

2018-08-06 Thread Peter Maydell
On 5 August 2018 at 16:38, BALATON Zoltan wrote: > Now that it looks like we'll have an rc4 due to other fixes can these be > included as well despite not being regressions? These may not have been > serious enough to fix when we wouldn't have rc4 otherwise but holding on to > broken implementatio

Re: [Qemu-devel] RDMA wrongly detected as being supported on FreeBSD

2018-08-06 Thread Thomas Huth
On 07/28/2018 05:50 AM, Rebecca Cran wrote: > On 7/25/18 5:14 AM, Thomas Huth wrote: > >> >> Note that the error has been reported to happen on FreeBSD - so I doubt >> that this header should be here. >> >> Anyway, our include/standard-headers/linux/types.h is also empty ... so >> could you try w

Re: [Qemu-devel] [PATCH v6 03/12] migration: avoid concurrent invoke channel_close by different threads

2018-08-06 Thread 858585 jemmy
This patch causes compile error when make check. LINKtests/test-qdist migration/qemu-file.o: In function `qemu_fclose': /tmp/qemu-test/src/migration/qemu-file.c:331: undefined reference to `migrate_get_current' /tmp/qemu-test/src/migration/qemu-file.c:333: undefined reference to `migrate_get

Re: [Qemu-devel] [PULL 0/5] pc, virtio: fixes

2018-08-06 Thread Peter Maydell
On 3 August 2018 at 10:27, Michael S. Tsirkin wrote: > Please consider for 3.0 if there is another rc. > > The following changes since commit f7502360397d291be04bc040e9f96c92ff2d8030: > > Update version for v3.0.0-rc3 release (2018-07-31 19:30:17 +0100) > > are available in the Git repository at

Re: [Qemu-devel] [Qemu-arm] [PATCH 1/3] hw/intc/arm_gicv3_common: Give no-migration-shift-bug subsection a needed function

2018-08-06 Thread Peter Maydell
Forgot to cc Shannon on this one. Given that the missing .needed function meant we weren't ever transmitting the subsection with the no-shift-bug flag, this ought to mean that for current master migration of KVM goes wrong (since the destination thinks the source has the bug when it does not). I'm

[Qemu-devel] [PATCH 0/7] arm: nRF51 Devices and Microbit Support

2018-08-06 Thread Steffen Görtz
This series contains additional peripheral devices for the nRF51822 microcontroller. Furthermore it includes a device to demultiplex the row and column strobes used in embedded devices to drive 2D LED dot-matrices. Included devices: - Random Number Generator - Non-volatile Memories - General purpo

[Qemu-devel] [PATCH 3/7] tests: Add bbc:microbit / nRF51 test suite

2018-08-06 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 | 126 + 2 files changed,

[Qemu-devel] [PATCH 1/7] hw/misc/nrf51_rng: Add NRF51 random number generator peripheral

2018-08-06 Thread Steffen Görtz
Add a model of the NRF51 random number generator peripheral. This is a simple random generator that continuously generates new random values after startup. Reference Manual: http://infocenter.nordicsemi.com/pdf/nRF51_RM_v3.0.pdf Signed-off-by: Steffen Görtz --- hw/misc/Makefile.objs | 1

[Qemu-devel] [PATCH 5/7] tests/microbit-test: Add Tests for nRF51 GPIO

2018-08-06 Thread Steffen Görtz
The test suite for the nRF51 GPIO peripheral for now only tests initial state. Additionally a set of tests testing an implementation detail of the model are included. Signed-off-by: Steffen Görtz --- tests/microbit-test.c | 96 +++ 1 file changed, 96 inser

[Qemu-devel] [PATCH 6/7] hw/timer/nrf51_timer: Add nRF51 Timer peripheral

2018-08-06 Thread Steffen Görtz
This patch adds the model for the nRF51 timer peripheral. Currently, only the TIMER mode is implemented. Signed-off-by: Steffen Görtz --- hw/timer/Makefile.objs | 1 + hw/timer/nrf51_timer.c | 382 + hw/timer/trace-events | 5 + includ

[Qemu-devel] [PATCH 2/7] hw/nvram/nrf51_nvm: Add nRF51 non-volatile memories

2018-08-06 Thread Steffen Görtz
The nRF51 contains three regions of non-volatile memory (NVM): - CODE (R/W): contains code - FICR (R): Factory information like code size, chip id etc. - UICR (R/W): Changeable configuration data. Lock bits, Code protection configuration, Bootloader address, Nordic SoftRadio configuration, Firm

[Qemu-devel] [PATCH 7/7] hw/display/led_matrix: Add LED matrix display device

2018-08-06 Thread Steffen Görtz
The LEDs are not individually connected to the output pins of the microcontroller. Instead, the LEDs share pins for rows and columns. The pattern for a row or a column is only displayed for a short moment. The slowness of the human eye results in a complete and flicker-free image (persistence of vi

[Qemu-devel] [PATCH 4/7] hw/gpio/nrf51_gpio: Add nRF51 GPIO peripheral

2018-08-06 Thread Steffen Görtz
This adds a model of the nRF51 GPIO peripheral. Reference Manual: http://infocenter.nordicsemi.com/pdf/nRF51_RM_v3.0.pdf The nRF51 series microcontrollers support up to 32 GPIO pins in various configurations. The pins can be used as input pins with pull-ups or pull-down. Furthermore, three diffe

Re: [Qemu-devel] [PATCH 0/7] arm: nRF51 Devices and Microbit Support

2018-08-06 Thread Peter Maydell
On 6 August 2018 at 11:01, Steffen Görtz wrote: > This series contains additional peripheral devices for the nRF51822 > microcontroller. Furthermore it includes a device to demultiplex > the row and column strobes used in embedded devices to drive > 2D LED dot-matrices. > > Included devices: > - R

[Qemu-devel] [Bug 1784900] Re: QEMU (frontend) crashes upon warm reboot with virtio-gpu device and vga=775 on Linux cmdline

2018-08-06 Thread elmarco
see also "[PATCH] virtio-gpu: fix crashes upon warm reboot with vga mode" for a potential fix -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1784900 Title: QEMU (frontend) crashes upon warm reboot w

[Qemu-devel] [Bug 1785308] Re: 0x8 exception encountered but not handled

2018-08-06 Thread Dr. David Alan Gilbert
Hi Ra, We'll need a bit more detail to be able to help here. The fact something works in Bochs but doesn't work in qemu doesn't necessarily mean it's a qemu bug - for example the OS might be hitting something undefined or a timing issue; so we'd need some information on how the double page faul

Re: [Qemu-devel] [PULL 0/2] ppc-for-3.0 queue 20180801

2018-08-06 Thread Peter Maydell
On 1 August 2018 at 04:53, David Gibson wrote: > The following changes since commit f7502360397d291be04bc040e9f96c92ff2d8030: > > Update version for v3.0.0-rc3 release (2018-07-31 19:30:17 +0100) > > are available in the Git repository at: > > git://github.com/dgibson/qemu.git tags/ppc-for-3.0

Re: [Qemu-devel] [PATCH 0/7] arm: nRF51 Devices and Microbit Support

2018-08-06 Thread Steffen Görtz
>> Microbit board-level Devices: >> - LED Matrix >> >> Instantiate of the devices is done in an upcoming patch series. > > Thanks for gathering together these patches in one series. > This and the other Cortex-M0-related patchsets are on my queue > to review, but I won't be able to get to them f

Re: [Qemu-devel] [PATCH 0/6] qcow2: Make the L2 cache cover the whole image by default

2018-08-06 Thread Kevin Wolf
Am 06.08.2018 um 09:47 hat Alberto Garcia geschrieben: > On Fri 03 Aug 2018 04:55:42 PM CEST, Kevin Wolf wrote: > > By the way, weren't you working on subclusters a while ago? How did > > that go? Because I think those would enable us to use larger cluster > > sizes and therefore reduce the metadat

Re: [Qemu-devel] [PATCH 1/6] target/s390x: add BAL and BALR instructions

2018-08-06 Thread David Hildenbrand
On 05.08.2018 20:28, Pavel Zbitskiy wrote: > These instructions are provided for compatibility purposes and are > used only by old software, in the new code BAS and BASR are preferred. > The difference between the old and new instruction exists only in the > 24-bit mode. > > Signed-off-by: Pavel Z

Re: [Qemu-devel] [PATCH 2/6] target/s390x: fix CSST decoding and runtime alignment check

2018-08-06 Thread David Hildenbrand
On 05.08.2018 20:28, Pavel Zbitskiy wrote: > CSST is defined as: > > C(0xc802, CSST,SSF, CASS, la1, a2, 0, 0, csst, 0) > > It means that the first parameter is handled by in1_la1(). > in1_la1() fills addr1 field, and not in1. > > Furthermore, when extract32() is used for the alignment

Re: [Qemu-devel] [PATCH 0/6] qcow2: Make the L2 cache cover the whole image by default

2018-08-06 Thread Alberto Garcia
On Mon 06 Aug 2018 12:45:20 PM CEST, Kevin Wolf wrote: > Am 06.08.2018 um 09:47 hat Alberto Garcia geschrieben: >> On Fri 03 Aug 2018 04:55:42 PM CEST, Kevin Wolf wrote: >> > By the way, weren't you working on subclusters a while ago? How did >> > that go? Because I think those would enable us to u

Re: [Qemu-devel] [PATCH 3/6] target/s390x: fix ipm polluting irrelevant bits

2018-08-06 Thread David Hildenbrand
On 05.08.2018 20:28, Pavel Zbitskiy wrote: > Suppose psw.mask=0x8000, cc=2, r1=0 and we do "ipm 1". > This command must touch only bits 32-39, so the expected output > is r1=0x2000. However, currently qemu yields r1=0x20008000, > because irrelevant parts of PSW leak into r1 during p

Re: [Qemu-devel] [PATCH 0/6] qcow2: Make the L2 cache cover the whole image by default

2018-08-06 Thread Kevin Wolf
Am 06.08.2018 um 13:07 hat Alberto Garcia geschrieben: > On Mon 06 Aug 2018 12:45:20 PM CEST, Kevin Wolf wrote: > > Am 06.08.2018 um 09:47 hat Alberto Garcia geschrieben: > >> On Fri 03 Aug 2018 04:55:42 PM CEST, Kevin Wolf wrote: > >> > By the way, weren't you working on subclusters a while ago? H

Re: [Qemu-devel] [PATCH 5/6] target/s390x: fix PACK reading 1 byte less and writing 1 byte more

2018-08-06 Thread David Hildenbrand
On 05.08.2018 20:28, Pavel Zbitskiy wrote: > PACK fails on the test from the Principles of Operation: F1F2F3F4 > becomes 234C instead of 0001234C due to an off-by-one error. > Furthermore, it overwrites one extra byte to the left of F1. > > Signed-off-by: Pavel Zbitskiy > --- > target/s390x/

Re: [Qemu-devel] [PATCH 0/6] qcow2: Make the L2 cache cover the whole image by default

2018-08-06 Thread Alberto Garcia
On Mon 06 Aug 2018 01:30:33 PM CEST, Kevin Wolf wrote: > Am 06.08.2018 um 13:07 hat Alberto Garcia geschrieben: >> On Mon 06 Aug 2018 12:45:20 PM CEST, Kevin Wolf wrote: >> > Am 06.08.2018 um 09:47 hat Alberto Garcia geschrieben: >> >> On Fri 03 Aug 2018 04:55:42 PM CEST, Kevin Wolf wrote: >> >> >

Re: [Qemu-devel] [PATCH v2 06/13] hw/rdma: Delete useless structure RdmaRmUserMR

2018-08-06 Thread Marcel Apfelbaum
On 08/05/2018 06:35 PM, Yuval Shaia wrote: The structure RdmaRmUserMR has no benefits, remove it an move all its fields to struct RdmaRmMR. Signed-off-by: Yuval Shaia --- hw/rdma/rdma_backend.c | 3 +-- hw/rdma/rdma_rm.c | 16 hw/rdma/rdma_rm_defs.h | 10 +++---

Re: [Qemu-devel] [PATCH v2 07/13] hw/rdma: Do not allocate memory for non-dma MR

2018-08-06 Thread Marcel Apfelbaum
On 08/05/2018 06:35 PM, Yuval Shaia wrote: There is no use in the memory allocated for non-dma MR. Delete the code that allocates it. Signed-off-by: Yuval Shaia --- hw/rdma/rdma_rm.c | 52 +++ 1 file changed, 21 insertions(+), 31 deletions(-) d

Re: [Qemu-devel] [PATCH v2 13/13] hw/rdma: Add reference to pci_dev in backend_dev

2018-08-06 Thread Marcel Apfelbaum
On 08/05/2018 06:35 PM, Yuval Shaia wrote: The field backend_dev->dev is not initialized, fix it. Signed-off-by: Yuval Shaia --- hw/rdma/rdma_backend.c| 6 +- hw/rdma/rdma_backend.h| 2 +- hw/rdma/vmw/pvrdma_main.c | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) di

Re: [Qemu-devel] [RFC v3 1/6] pci_expander_bridge: add type TYPE_PXB_PCIE_HOST

2018-08-06 Thread Marcel Apfelbaum
On 08/02/2018 05:45 AM, Zihan Yang wrote: The inner host bridge created by pxb-pcie is TYPE_PXB_PCI_HOST by default, change it to a new type TYPE_PXB_PCIE_HOST to better utilize ECAM of PCIe After an offline conversation we decided to not review this version and wait for the next one, that w

[Qemu-devel] [PATCH] docs/migration: Clarify pre_load in subsections

2018-08-06 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Clarify that the pre_load function in a subsection is only called if the subsection is found; to handle a missing subsection you may set values in the pre_load of the parent vmsd. Signed-off-by: Dr. David Alan Gilbert --- docs/devel/migration.rst | 15 +--

Re: [Qemu-devel] [PATCH 2/2] fw_cfg: set the get_boot_devices_list() ignore_suffixes parameter from machine property

2018-08-06 Thread Laszlo Ersek
On 08/06/18 07:50, Thomas Huth wrote: > On 08/05/2018 01:28 PM, Mark Cave-Ayland wrote: >> For the older machines (such as Mac and SPARC) the DT nodes representing >> bootdevices for disk nodes are irregular for mainly historical reasons, and >> should be handled on an individual basis via a custom

Re: [Qemu-devel] [PATCH] docs/migration: Clarify pre_load in subsections

2018-08-06 Thread Peter Maydell
On 6 August 2018 at 13:13, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Clarify that the pre_load function in a subsection is only called if > the subsection is found; to handle a missing subsection you may > set values in the pre_load of the parent vmsd. NB: I did a

[Qemu-devel] [PATCH for-3.0 v2 5/5] hw/intc/arm_gicv3_common: Move gicd shift bug handling to gicv3_post_load

2018-08-06 Thread Peter Maydell
The code currently in gicv3_gicd_no_migration_shift_bug_post_load() that handles migration from older QEMU versions with a particular bug is misplaced. We need to run this after migration in all cases, not just the cases where the "arm_gicv3/gicd_no_migration_shift_bug" subsection is present, so it

[Qemu-devel] [PATCH for-3.0 v2 0/5] Arm migration fixes for 3.0

2018-08-06 Thread Peter Maydell
This patchset primarily fixes problems with Arm migration induced by a bug in the core vmstate handling of subsections: currently the migration code incorrectly treats a subsection with no .needed function pointer as if it was the subsection list terminator -- it is ignored and so is everything aft

[Qemu-devel] [PATCH for-3.0 v2 3/5] target/arm: Add dummy needed functions to M profile vmstate subsections

2018-08-06 Thread Peter Maydell
Currently the migration code incorrectly treats a subsection with no .needed function pointer as if it was the subsection list terminator -- it is ignored and so is everything after it. Work around this by giving various M profile vmstate structs a 'needed' function that always returns true. We reu

[Qemu-devel] [PATCH for-3.0 v2 4/5] hw/intc/arm_gicv3_common: Move post_load hooks to top-level VMSD

2018-08-06 Thread Peter Maydell
Contrary to the the impression given in docs/devel/migration.rst, the migration code does not run the pre_load hook for a subsection unless the subsection appears on the wire, and so this is not a place where you can set the default value for state for the "subsection not present" case. Instead thi

[Qemu-devel] [PATCH for-3.0 v2 1/5] hw/intc/arm_gicv3_common: Give no-migration-shift-bug subsection a needed function

2018-08-06 Thread Peter Maydell
Currently the migration code incorrectly treats a subsection with no .needed function pointer as if it was the subsection list terminator -- it is ignored and so is everything after it. Work around this by giving vmstate_gicv3_gicd_no_migration_shift_bug a 'needed' function that always returns true

[Qemu-devel] [PATCH for-3.0 v2 2/5] hw/intc/arm_gicv3_common: Combine duplicate .subsections in vmstate_gicv3_cpu

2018-08-06 Thread Peter Maydell
Commit 6692aac411199064 accidentally introduced a second initialization of the .subsections field of vmstate_gicv3_cpu, instead of adding the new subsection to the existing list. The effect of this was probably that migration of GICv3 with virtualization enabled was broken (or alternatively that mi

[Qemu-devel] [PATCH] qapi/block: Document restrictions for node names

2018-08-06 Thread Kevin Wolf
blockdev-add fails if an invalid node name is given, so we should document what a valid node name even is. Reported-by: Cong Li Signed-off-by: Kevin Wolf --- qapi/block-core.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/qapi/block-core.json b/qapi/block-core.json index 62a92fa4f4.

Re: [Qemu-devel] [PATCH 6/6] target/s390x: implement CVB, CVBY and CVBG

2018-08-06 Thread David Hildenbrand
On 05.08.2018 20:28, Pavel Zbitskiy wrote: > Convert to Binary - counterparts of the already implemented Convert > to Decimal (CVD*) instructions. > Example from the Principles of Operation: 25594C becomes 63FA. > > Signed-off-by: Pavel Zbitskiy > --- > target/s390x/helper.h | 2 ++ > targ

[Qemu-devel] [PATCH v6 00/11] Enable postcopy RDMA live migration

2018-08-06 Thread Lidong Chen
The RDMA QIOChannel does not support bi-directional communication, so when RDMA live migration with postcopy enabled, the source qemu return path get qemu file error. These patches implement bi-directional communication for RDMA QIOChannel and disable the RDMA WRITE during the postcopy phase.

[Qemu-devel] [PATCH v6 02/11] migration: create a dedicated connection for rdma return path

2018-08-06 Thread Lidong Chen
From: Lidong Chen If start a RDMA migration with postcopy enabled, the source qemu establish a dedicated connection for return path. Signed-off-by: Lidong Chen Reviewed-by: Dr. David Alan Gilbert --- migration/rdma.c | 94 ++-- 1 file change

[Qemu-devel] [PATCH v6 06/11] migration: invoke qio_channel_yield only when qemu_in_coroutine()

2018-08-06 Thread Lidong Chen
From: Lidong Chen when qio_channel_read return QIO_CHANNEL_ERR_BLOCK, the source qemu crash. The backtrace is: (gdb) bt #0 0x7fb20aba91d7 in raise () from /lib64/libc.so.6 #1 0x7fb20abaa8c8 in abort () from /lib64/libc.so.6 #2 0x7fb20aba2146 in __assert_fail_base (

[Qemu-devel] [PATCH v6 10/11] migration: remove the unnecessary RDMA_CONTROL_ERROR message

2018-08-06 Thread Lidong Chen
It's not necessary to send RDMA_CONTROL_ERROR when clean up rdma resource. If rdma->error_state is ture, the message may not send successfully. and the cm event can also notify the peer qemu. Signed-off-by: Lidong Chen --- migration/rdma.c | 11 --- 1 file changed, 11 deletions(-) diff

[Qemu-devel] [PATCH v6 01/11] migration: disable RDMA WRITE after postcopy started

2018-08-06 Thread Lidong Chen
From: Lidong Chen RDMA WRITE operations are performed with no notification to the destination qemu, then the destination qemu can not wakeup. This patch disable RDMA WRITE after postcopy started. Signed-off-by: Lidong Chen Reviewed-by: Dr. David Alan Gilbert --- migration/qemu-file.c | 8 +++

[Qemu-devel] [PATCH v6 04/11] migration: Stop rdma yielding during incoming postcopy

2018-08-06 Thread Lidong Chen
From: Lidong Chen During incoming postcopy, the destination qemu will invoke qemu_rdma_wait_comp_channel in a seprate thread. So does not use rdma yield, and poll the completion channel fd instead. Signed-off-by: Lidong Chen Reviewed-by: Dr. David Alan Gilbert --- migration/rdma.c | 4 +++- 1

[Qemu-devel] [PATCH v6 08/11] migration: implement the shutdown for RDMA QIOChannel

2018-08-06 Thread Lidong Chen
From: Lidong Chen Because RDMA QIOChannel not implement shutdown function, If the to_dst_file was set error, the return path thread will wait forever. and the migration thread will wait return path thread exit. the backtrace of return path thread is: (gdb) bt #0 0x7f372a76bb0f in ppoll

[Qemu-devel] [PATCH v6 03/11] migration: implement bi-directional RDMA QIOChannel

2018-08-06 Thread Lidong Chen
From: Lidong Chen This patch implements bi-directional RDMA QIOChannel. Because different threads may access RDMAQIOChannel currently, this patch use RCU to protect it. Signed-off-by: Lidong Chen Reviewed-by: Dr. David Alan Gilbert --- migration/colo.c | 2 + migration/migration.c

[Qemu-devel] [PATCH v6 05/11] migration: implement io_set_aio_fd_handler function for RDMA QIOChannel

2018-08-06 Thread Lidong Chen
From: Lidong Chen if qio_channel_rdma_readv return QIO_CHANNEL_ERR_BLOCK, the destination qemu crash. The backtrace is: (gdb) bt #0 0x in ?? () #1 0x008db50e in qio_channel_set_aio_fd_handler (ioc=0x38111e0, ctx=0x3726080, io_read=0x8db841 , io_write=0x

[Qemu-devel] [PATCH v6 07/11] migration: poll the cm event while wait RDMA work request completion

2018-08-06 Thread Lidong Chen
From: Lidong Chen If the peer qemu is crashed, the qemu_rdma_wait_comp_channel function maybe loop forever. so we should also poll the cm event fd, and when receive RDMA_CM_EVENT_DISCONNECTED and RDMA_CM_EVENT_DEVICE_REMOVAL, we consider some error happened. Signed-off-by: Lidong Chen Signed-of

[Qemu-devel] [PATCH v6 11/11] migration: create a dedicated thread to release rdma resource

2018-08-06 Thread Lidong Chen
ibv_dereg_mr wait for a long time for big memory size virtual server. The test result is: 10GB 326ms 20GB 699ms 30GB 1021ms 40GB 1387ms 50GB 1712ms 60GB 2034ms 70GB 2457ms 80GB 2807ms 90GB 3107ms 100GB 3474ms 110GB 3735ms 120GB 4064ms 130GB 4567ms 140GB 4886ms

[Qemu-devel] [PATCH v6 09/11] migration: poll the cm event for destination qemu

2018-08-06 Thread Lidong Chen
The destination qemu only poll the comp_channel->fd in qemu_rdma_wait_comp_channel. But when source qemu disconnnect the rdma connection, the destination qemu should be notified. Signed-off-by: Lidong Chen --- migration/migration.c | 3 ++- migration/rdma.c | 32 +++

Re: [Qemu-devel] [PATCH] virtio-gpu: fix crashes upon warm reboot with vga mode

2018-08-06 Thread Peter Maydell
On 3 August 2018 at 16:32, Marc-André Lureau wrote: > With vga=775 on the Linux command line a first boot of the VM running > Linux works fine. After a warm reboot it crashes during Linux boot. > > Before that, valgrind points out bad memory write to console > surface. The VGA code is not aware th

Re: [Qemu-devel] [PATCH v6 61/77] linux-user: Add syscall numbers for nanoMIPS

2018-08-06 Thread Aleksandar Markovic
ping (Riku, Laurent?) > From: Stefan Markovic > Sent: Thursday, August 2, 2018 4:16 PM > To: qemu-devel@nongnu.org > > Subject: [PATCH v6 61/77] linux-user: Add syscall numbers for nanoMIPS > > From: Aleksandar Rikalo > > Add syscall numbers for nanoMIPS. nanoMIPS redefines its ABI > compare

Re: [Qemu-devel] [PATCH] virtio-gpu: fix crashes upon warm reboot with vga mode

2018-08-06 Thread Marc-André Lureau
On Mon, Aug 6, 2018 at 3:39 PM, Peter Maydell wrote: > On 3 August 2018 at 16:32, Marc-André Lureau > wrote: >> With vga=775 on the Linux command line a first boot of the VM running >> Linux works fine. After a warm reboot it crashes during Linux boot. >> >> Before that, valgrind points out bad m

[Qemu-devel] [Bug 1785308] Re: 0x8 exception encountered but not handled

2018-08-06 Thread Ra Cohen
Hi David, The OS is hitting something undefined. It's built on exploiting the x86 architecture to run computations of the MMU rather than the CPU: https://github.com/jbangert/trapcc I've tried it on the 3 most recent versions of QEMU for Windows. I'll give it a go with KVM and tcg and get ba

Re: [Qemu-devel] [PATCH 1/7] hw/misc/nrf51_rng: Add NRF51 random number generator peripheral

2018-08-06 Thread Stefan Hajnoczi
On Mon, Aug 6, 2018 at 11:01 AM, Steffen Görtz wrote: > +#define NRF51_TRIGGER_TASK 0x01 > +#define NRF51_EVENT_CLEAR 0x00 Please consider putting these generic constants into hw/arm/nrf51.h or a similar file that all nRF51 devices can include. That way code duplication is eliminated. Reviewed

Re: [Qemu-devel] [PATCH for-3.0 v2 0/5] Arm migration fixes for 3.0

2018-08-06 Thread Richard Henderson
On 08/06/2018 05:34 AM, Peter Maydell wrote: > Peter Maydell (5): > hw/intc/arm_gicv3_common: Give no-migration-shift-bug subsection a > needed function > hw/intc/arm_gicv3_common: Combine duplicate .subsections in > vmstate_gicv3_cpu > target/arm: Add dummy needed functions to M prof

[Qemu-devel] [PATCH] qcow2: Release dirty entries with cache-clean-interval

2018-08-06 Thread Alberto Garcia
The cache-clean-interval option is used to periodically release unused entries from the L2 and refcount caches. Dirty cache entries are left untouched, even if they are otherwise valid candidates for removal. This patch allows releasing those entries by flushing them to disk first. Signed-off-by:

Re: [Qemu-devel] [PATCH] qapi/block: Document restrictions for node names

2018-08-06 Thread Eric Blake
On 08/06/2018 07:37 AM, Kevin Wolf wrote: blockdev-add fails if an invalid node name is given, so we should document what a valid node name even is. Reported-by: Cong Li Signed-off-by: Kevin Wolf --- qapi/block-core.json | 3 +++ 1 file changed, 3 insertions(+) Reviewed-by: Eric Blake

Re: [Qemu-devel] [PATCH] tcg/optimize: Do not skip default processing of dup_vec

2018-08-06 Thread Peter Maydell
On 6 August 2018 at 06:29, Laurent Desnogues wrote: > Hello, > > On Mon, Aug 6, 2018 at 1:32 AM, Richard Henderson > wrote: >> If we do not opimize away dup_vec, we must mark its output as changed. >> >> Fixes: 170ba88f45b >> Reported-by: Laurent Desnogues >> Signed-off-by: Richard Henderson >

[Qemu-devel] [PATCH v2 00/34] Qtest driver framework

2018-08-06 Thread Emanuele Giuseppe Esposito
qgraph API for the qtest driver framework This series of patches introduce a different qtest driver organization, viewing machines, drivers and tests as node in a graph, each having one or multiple edges relations. The idea is to have a framework where each test asks for a specific driver, and th

[Qemu-devel] [PATCH v2 02/34] tests/qgraph: rename qpci_init_pc functions

2018-08-06 Thread Emanuele Giuseppe Esposito
Rename qpci_init_pc in qpci_new_pc, since the function actually allocates a new QPCIBusPC and initialize it. Signed-off-by: Emanuele Giuseppe Esposito --- tests/e1000e-test.c | 2 +- tests/i440fx-test.c | 2 +- tests/ide-test.c | 2 +- tests/libqos/ahci.c | 2 +- tests

[Qemu-devel] [PATCH v2 05/34] tests/qgraph: sdhci driver and interface nodes

2018-08-06 Thread Emanuele Giuseppe Esposito
Add qgraph nodes for sdhci-pci and generic-sdhci (memory mapped) drivers. Both drivers implement (produce) the same interface sdhci, that provides the readw - readq - writeq functions. Signed-off-by: Emanuele Giuseppe Esposito --- tests/Makefile.include | 1 + tests/libqos/sdhci.c | 163

[Qemu-devel] [PATCH v2 17/34] test/qgraph: arm/virt machine node

2018-08-06 Thread Emanuele Giuseppe Esposito
Add arm/virt machine to the graph. This machine contains virtio-mmio, so its constructor must take care of setting it properly when called. Signed-off-by: Emanuele Giuseppe Esposito --- tests/Makefile.include | 1 + tests/libqos/virt-machine.c | 90 + 2

[Qemu-devel] [PATCH v2 07/34] tests/qgraph: arm/raspi2 machine node

2018-08-06 Thread Emanuele Giuseppe Esposito
Add arm/raspi2 machine to the graph. This machine contains a generic-sdhci, so its constructor must take care of setting it properly when called. Signed-off-by: Emanuele Giuseppe Esposito --- tests/Makefile.include| 1 + tests/libqos/raspi2-machine.c | 82 +++

[Qemu-devel] [PATCH v2 03/34] tests/qgraph: pci-pc driver and interface nodes

2018-08-06 Thread Emanuele Giuseppe Esposito
Add pci-bus-pc node, move QPCIBusPC struct declaration in its header (since it will be needed by other drivers) and introduce a setter method for drivers that do not need to allocate but have to initialize QPCIBusPC. Signed-off-by: Emanuele Giuseppe Esposito --- tests/Makefile.include | 4 +++-

[Qemu-devel] [PATCH v2 06/34] tests/qgraph: sdhci test node

2018-08-06 Thread Emanuele Giuseppe Esposito
Convert tests/sdhci-test in first qgraph test node, sdhci-test. This test consumes an sdhci interface and checks that its function return the expected values. Note that this test does not allocate any sdhci structure, it's all done by the qtest walking graph mechanism Signed-off-by: Emanuele Gius

[Qemu-devel] [PATCH v2 20/34] test/qgraph: virtio-console test node

2018-08-06 Thread Emanuele Giuseppe Esposito
Convert tests/virtio-console-test in qgraph test node, virtio-console-test. This test consumes a virtio-serial interface and checks that its function return the expected values. Note that this test does not allocate any virtio-console structure, it's all done by the qtest walking graph mechanism

[Qemu-devel] [PATCH v2 12/34] test/qgraph: e1000e-test node

2018-08-06 Thread Emanuele Giuseppe Esposito
Convert tests/e1000e-test in qgraph test node, e1000e-test. This test consumes an e1000e interface and checks that its function return the expected values. Note that this test does not allocate any e1000e structure, it's all done by the qtest walking graph mechanism Signed-off-by: Emanuele Giusep

[Qemu-devel] [PATCH v2 04/34] tests/qgraph: x86_64/pc machine node

2018-08-06 Thread Emanuele Giuseppe Esposito
Add pc machine for the x86_64 QEMU binary. This machine contains an i440FX-pcihost driver, that contains itself a pci-bus-pc that produces the pci-bus interface. Signed-off-by: Emanuele Giuseppe Esposito --- tests/Makefile.include | 3 + tests/libqos/x86_64_pc-machine.c | 110 ++

[Qemu-devel] [PATCH v2 08/34] tests/qgraph: rename qpci_init_spapr functions

2018-08-06 Thread Emanuele Giuseppe Esposito
Rename qpci_init_spapr in qpci_new_spapr, since the function actually allocates a new QPCIBusSPAPR and initialize it. Signed-off-by: Emanuele Giuseppe Esposito --- tests/libqos/libqos-spapr.c | 2 +- tests/libqos/pci-spapr.c| 2 +- tests/libqos/pci-spapr.h| 2 +- 3 files changed, 3 inser

[Qemu-devel] [PATCH v2 21/34] test/qgraph: virtio-serial test node

2018-08-06 Thread Emanuele Giuseppe Esposito
Convert tests/virtio-serial-test in qgraph test node, virtio-serial-test. This test consumes a virtio-serial interface and checks that its function return the expected values. Note that this test does not allocate any virtio-serial structure, it's all done by the qtest walking graph mechanism Sig

[Qemu-devel] [PATCH v2 10/34] tests/qgraph: ppc64/pseries machine node

2018-08-06 Thread Emanuele Giuseppe Esposito
Add pseries machine for the ppc64 QEMU binary. This machine contains a spapr-pci-host-bridge driver, that contains itself a pci-bus-spapr that produces the pci-bus interface. Signed-off-by: Emanuele Giuseppe Esposito --- tests/Makefile.include | 1 + tests/libqos/ppc64_pseries-m

[Qemu-devel] [PATCH v2 13/34] test/qgraph: virtio_start_device function

2018-08-06 Thread Emanuele Giuseppe Esposito
This function is intended to group all the qvirtio_* functions that start the qvirtio devices. Applied in all tests using this combination of functions. Signed-off-by: Emanuele Giuseppe Esposito --- tests/libqos/virtio.c| 8 tests/libqos/virtio.h| 1 + tests/vhost-user-test.c

[Qemu-devel] [PATCH v2 24/34] test/qgraph: virtio-balloon driver and interface nodes

2018-08-06 Thread Emanuele Giuseppe Esposito
Add qgraph nodes for virtio-balloon-pci and virtio-balloon-device. Both nodes produce virtio-balloon, but virtio-balloon-pci receives a pci-bus and uses virtio-pci QOSGraphObject and functions, while virtio-balloon-device receives a virtio and implements its own functions Signed-off-by: Emanuele G

[Qemu-devel] [PATCH v2 09/34] tests/qgraph: pci-spapr driver and interface nodes

2018-08-06 Thread Emanuele Giuseppe Esposito
Add pci-bus-spapr node, that produces pci-bus. Move QPCIBusSPAPR struct declaration in its header (since it will be needed by other drivers) and introduce a setter method for drivers that do not need to allocate but have to initialize QPCIBusSPAPR. Signed-off-by: Emanuele Giuseppe Esposito --- t

[Qemu-devel] [PATCH v2 15/34] tests/qgraph: rename qvirtio_mmio_init_device functions

2018-08-06 Thread Emanuele Giuseppe Esposito
Rename qvirtio_mmio_init_device in qvirtio_mmio_device_new, since the function actually allocates a new QVirtioMMIODevice and initialize it. Signed-off-by: Emanuele Giuseppe Esposito --- tests/libqos/virtio-mmio.c | 2 +- tests/libqos/virtio-mmio.h | 2 +- tests/virtio-blk-test.c| 2 +- 3 fi

[Qemu-devel] [PATCH v2 11/34] test/qgraph: e1000e driver and interface nodes

2018-08-06 Thread Emanuele Giuseppe Esposito
Add qgraph nodes for virtio-e1000e. It consumes a pci-bus, and it's directly used by tests (e1000e is pci based). Signed-off-by: Emanuele Giuseppe Esposito --- tests/Makefile.include | 1 + tests/libqos/e1000e.c | 262 + tests/libqos/e1000e.h | 53 +++

[Qemu-devel] [PATCH v2 14/34] test/qgraph: virtio-pci driver and interface nodes

2018-08-06 Thread Emanuele Giuseppe Esposito
Add QOSGraphObject to QVirtioPCIDevice structure, with a basic constructor. virtio-pci is not present in qgraph, since it will be used as starting point by its subclasses (virtio-*-pci) Signed-off-by: Emanuele Giuseppe Esposito --- tests/Makefile.include| 2 +- tests/libqos/virtio-pci.c | 8

[Qemu-devel] [PATCH v2 25/34] test/qgraph: virtio-balloon test node

2018-08-06 Thread Emanuele Giuseppe Esposito
Convert tests/virtio-balloon-test in qgraph test node, virtio-balloon-test. This test consumes a virtio-balloon interface and checks that its function return the expected values. Note that this test does not allocate any virtio-balloon structure, it's all done by the qtest walking graph mechanism

  1   2   3   >