Re: [Qemu-devel] [RFC] Defining firmware (OVMF, et al) metadata format & file

2018-03-09 Thread Kashyap Chamarthy
On Thu, Mar 08, 2018 at 09:47:27PM +0100, Laszlo Ersek wrote: > On 03/08/18 16:47, Daniel P. Berrangé wrote: > > On Thu, Mar 08, 2018 at 12:10:30PM +0100, Laszlo Ersek wrote: [...] > >> For OVMF (x86), I guess the initial set of properties should come from > >> the "-D FOO[=BAR]" build flags

Re: [Qemu-devel] Apparently fpu/softfloat.c:1374 is reachable

2018-03-09 Thread Michael Clark
On Fri, 9 Mar 2018 at 11:45 PM, Peter Maydell wrote: > On 9 March 2018 at 04:22, Michael Clark wrote: > > I need to dig into this. I'll need to take the assertions out, or run > with > > tracing to see which fcvt test is triggering this unreachable

Re: [Qemu-devel] [PATCH v3 12/12] intel_iommu: bind device to PASID tagged AddressSpace

2018-03-09 Thread Liu, Yi L
> From: Peter Xu [mailto:pet...@redhat.com] > Sent: Friday, March 9, 2018 3:59 PM > Subject: Re: [PATCH v3 12/12] intel_iommu: bind device to PASID tagged > AddressSpace > > On Thu, Mar 08, 2018 at 09:39:18AM +, Liu, Yi L wrote: > > > From: Peter Xu [mailto:pet...@redhat.com] > > > Sent:

[Qemu-devel] [PATCH] build: try improve handling of clang warnings

2018-03-09 Thread Gerd Hoffmann
This patch disables the pragma diagnostic -Wunused-but-set-variable for clang in util/coroutine-ucontext.c. This in turn allows us to remove it from the configure check, so the CONFIG_PRAGMA_DIAGNOSTIC_AVAILABLE will succeed for clang. With that in place clang builds (linux) will use -Werror by

Re: [Qemu-devel] [PATCH v2] ppc440_pcix: Change some error_report to qemu_log_mask(LOG_UNIMP, ...)

2018-03-09 Thread BALATON Zoltan
On Fri, 9 Mar 2018, Peter Maydell wrote: On 9 March 2018 at 03:05, David Gibson wrote: On Fri, Mar 09, 2018 at 10:44:46AM +1100, David Gibson wrote: On Thu, Mar 08, 2018 at 12:08:08PM +0100, BALATON Zoltan wrote: Using log unimp is more appropriate for these

Re: [Qemu-devel] Apparently fpu/softfloat.c:1374 is reachable

2018-03-09 Thread Peter Maydell
On 9 March 2018 at 04:22, Michael Clark wrote: > I need to dig into this. I'll need to take the assertions out, or run with > tracing to see which fcvt test is triggering this unreachable piece of > code. FYI. I can look into it. >

Re: [Qemu-devel] [PULL 0/8] Ui 20180308 patches

2018-03-09 Thread Peter Maydell
On 9 March 2018 at 10:41, Gerd Hoffmann wrote: > Well, I can add -Wno-address-of-packed-member to the list of flags > configure tries to use with the compiler. That gets me past that > warning, but the build will stop on the next then. qemu simply doesn't > build

Re: [Qemu-devel] [PATCH 02/25] hw/dma/i8257: Rename DMA_init() to i8257_dma_init()

2018-03-09 Thread Philippe Mathieu-Daudé
Hi Mark, On 03/09/2018 11:32 AM, Mark Cave-Ayland wrote: > On 08/03/18 22:39, Philippe Mathieu-Daudé wrote: > >> - Move the header from hw/isa/ to hw/dma/ >> - Remove the old i386/pc dependency >> - use a bool type for the high_page_enable argument >> >> Signed-off-by: Philippe Mathieu-Daudé

[Qemu-devel] [PATCH 2/2] qemu-iotests: set exec permission for tests lacking it

2018-03-09 Thread Amador Pahim
Some tests are not executables. This patch sets the executable permission for those tests lacking that. Signed-off-by: Amador Pahim --- tests/qemu-iotests/096 | 0 tests/qemu-iotests/124 | 0 tests/qemu-iotests/129 | 0 tests/qemu-iotests/132 | 0 tests/qemu-iotests/136 | 0

[Qemu-devel] [PATCH 0/2] qemu-iotests fixes

2018-03-09 Thread Amador Pahim
- Skipping test 205 for unsupported formats. - Setting execution permission on test files. Amador Pahim (2): qemu-iotests: skip test 205 for unsupported formats qemu-iotests: set exec permission for tests lacking it tests/qemu-iotests/096 | 0 tests/qemu-iotests/124 | 0

[Qemu-devel] [PATCH 1/2] qemu-iotests: skip test 205 for unsupported formats

2018-03-09 Thread Amador Pahim
Using bochs or cloop, qemu-img will fail with: Format driver 'bochs' does not support image creation Signed-off-by: Amador Pahim --- tests/qemu-iotests/205 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/qemu-iotests/205 b/tests/qemu-iotests/205 index

Re: [Qemu-devel] [PULL 0/8] Ui 20180308 patches

2018-03-09 Thread Gerd Hoffmann
On Fri, Mar 09, 2018 at 10:48:13AM +0100, Thomas Huth wrote: > On 09.03.2018 10:44, Gerd Hoffmann wrote: > > On Fri, Mar 09, 2018 at 10:15:33AM +0100, Gerd Hoffmann wrote: > >> On Fri, Mar 09, 2018 at 09:46:44AM +0100, Thomas Huth wrote: > >>> On 09.03.2018 08:50, Gerd Hoffmann wrote: > Hi,

Re: [Qemu-devel] [PATCH v2] ppc440_pcix: Change some error_report to qemu_log_mask(LOG_UNIMP, ...)

2018-03-09 Thread Peter Maydell
On 9 March 2018 at 03:05, David Gibson wrote: > On Fri, Mar 09, 2018 at 10:44:46AM +1100, David Gibson wrote: >> On Thu, Mar 08, 2018 at 12:08:08PM +0100, BALATON Zoltan wrote: >> > Using log unimp is more appropriate for these messages and this also >> > silences

Re: [Qemu-devel] [PULL 00/11] s390x patches for the 2.12 softfreeze

2018-03-09 Thread Peter Maydell
On 8 March 2018 at 18:04, Cornelia Huck wrote: > Note that this currently does not work on s390x/tcg (needs "memory: fix > flatview_access_valid RCU read lock/unlock imbalance", which hopefully > should be submitted soon) -- s390x/kvm is fine. > > The following changes since

Re: [Qemu-devel] [PATCH 07/25] hw/isa/pc87312: Use 'unsigned int' for the irq value

2018-03-09 Thread Mark Cave-Ayland
On 08/03/18 22:39, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé --- hw/isa/pc87312.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/isa/pc87312.c b/hw/isa/pc87312.c index 105c23e680..fda91fed21 100644 ---

Re: [Qemu-devel] [PATCH 05/25] hw/isa/pc87312: Rename the device type as TYPE_PC87312_SUPERIO

2018-03-09 Thread Mark Cave-Ayland
On 08/03/18 22:39, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé Acked-by: David Gibson (hw/ppc) --- include/hw/isa/pc87312.h | 4 ++-- hw/isa/pc87312.c | 2 +- hw/ppc/prep.c| 2 +- 3 files changed, 4

Re: [Qemu-devel] [PATCH 03/25] hw/input/i8042: Extract declarations from i386/pc.h into input/i8042.h

2018-03-09 Thread Mark Cave-Ayland
On 08/03/18 22:39, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé Acked-by: David Gibson (hw/ppc) --- include/hw/i386/pc.h | 9 - include/hw/input/i8042.h | 24 hw/alpha/dp264.c

Re: [Qemu-devel] [PATCH 02/25] hw/dma/i8257: Rename DMA_init() to i8257_dma_init()

2018-03-09 Thread Mark Cave-Ayland
On 08/03/18 22:39, Philippe Mathieu-Daudé wrote: - Move the header from hw/isa/ to hw/dma/ - Remove the old i386/pc dependency - use a bool type for the high_page_enable argument Signed-off-by: Philippe Mathieu-Daudé --- include/hw/{isa => dma}/i8257.h | 6 ++

Re: [Qemu-devel] [PATCH 01/25] hw/isa: Move parallel_hds_isa_init() to hw/char/parallel-isa.c

2018-03-09 Thread Mark Cave-Ayland
On 08/03/18 22:39, Philippe Mathieu-Daudé wrote: Again... (after 07dc788054d7 and 9157eee1b1c0). We now extract the ISA bus specific helpers. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/char/parallel.h | 14 ++ include/hw/i386/pc.h | 8

Re: [Qemu-devel] [PATCH] s390x/virtio: Convert virtio-ccw from *_exit to *_unrealize

2018-03-09 Thread Cornelia Huck
On Fri, 9 Mar 2018 10:23:31 +0100 Pierre Morel wrote: > On 07/03/2018 17:29, Nia Alarie wrote: > > Signed-off-by: Nia Alarie > > What you do seems right to me, naming seems more logical, but  can you > please > add a little commit message

Re: [Qemu-devel] [PATCH v2 8/8] ovmf: add DxeTpm2MeasureBootLib

2018-03-09 Thread Laszlo Ersek
On 03/09/18 01:39, Yao, Jiewen wrote: > Very good question. > Comment below: > >> -Original Message- >> From: Laszlo Ersek [mailto:ler...@redhat.com] >> Sent: Friday, March 9, 2018 3:54 AM >> To: marcandre.lur...@redhat.com; edk2-de...@lists.01.org; Yao, Jiewen >> >>

Re: [Qemu-devel] [PATCH v3 07/12] vfio/pci: register sva notifier

2018-03-09 Thread Liu, Yi L
> From: Peter Xu [mailto:pet...@redhat.com] > Sent: Friday, March 9, 2018 3:06 PM > To: Liu, Yi L [...] > > > > > > + > > > > > > static void vfio_pci_device_sva_register_notifier(PCIBus *bus, > > > > > >int32_t devfn, IOMMUSVAContext *sva_ctx) >

[Qemu-devel] [Bug 1754605] Re: ppc64 migration bad_dest test is failed with failed to connect to socket

2018-03-09 Thread R.Nageswara Sastry
Thank you very much for your quick reply. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1754605 Title: ppc64 migration bad_dest test is failed with failed to connect to socket Status in QEMU:

Re: [Qemu-devel] [PATCH v2 0/2] Avoid QEMU specific types in trace probes

2018-03-09 Thread Stefan Hajnoczi
On Thu, Mar 08, 2018 at 03:55:22PM +, Daniel P. Berrangé wrote: > Changed in v2: > > - Split into 2 patches > - Added ptrdiff_t type to whitelist > > Daniel P. Berrangé (2): > trace: remove use of QEMU specific types from trace probes > trace: only permit standard C types and fixed

Re: [Qemu-devel] [PATCH v12 28/28] tests/qmp-test: blacklist sev specific qmp commands

2018-03-09 Thread Dr. David Alan Gilbert
* Eduardo Habkost (ehabk...@redhat.com) wrote: > On Thu, Mar 08, 2018 at 02:18:55PM -0600, Brijesh Singh wrote: > > > > > > On 3/8/18 11:08 AM, Daniel P. Berrangé wrote: > > > On Thu, Mar 08, 2018 at 06:49:01AM -0600, Brijesh Singh wrote: > > >> Blacklist the following commands to fix the 'make

Re: [Qemu-devel] [RFC] Defining firmware (OVMF, et al) metadata format & file

2018-03-09 Thread Kashyap Chamarthy
On Thu, Mar 08, 2018 at 08:52:45AM +0100, Gerd Hoffmann wrote: > Hi, > > > > [*] Open question: Who, between QEMU and libvirt, should define the said > > > firmware metadata format and file? > > > > IMHO QEMU should be defining the format, because the file will contain > > info about certain

Re: [Qemu-devel] [PATCH v7 00/23] Migration: postcopy failure recovery

2018-03-09 Thread no-reply
Hi, This series failed build test on ppcle host. Please find the details below. Subject: [Qemu-devel] [PATCH v7 00/23] Migration: postcopy failure recovery Type: series Message-id: 20180309091535.13315-1-pet...@redhat.com === TEST SCRIPT BEGIN === #!/bin/bash # Testing script will be invoked

[Qemu-devel] [Bug 1754605] Re: ppc64 migration bad_dest test is failed with failed to connect to socket

2018-03-09 Thread Dr. David Alan Gilbert
This is fixed by 'tests: Silence migration-test 'bad' test' which I posted a few days ago; hopefully I'll send a pull with it today ** Changed in: qemu Status: New => In Progress ** Changed in: qemu Assignee: (unassigned) => Dr. David Alan Gilbert (dgilbert-h) -- You received this

Re: [Qemu-devel] [PATCH v7 00/23] Migration: postcopy failure recovery

2018-03-09 Thread no-reply
Hi, This series failed docker-build@min-glib 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: 20180309091535.13315-1-pet...@redhat.com Subject: [Qemu-devel] [PATCH v7 00/23]

Re: [Qemu-devel] [PATCH v7 00/23] Migration: postcopy failure recovery

2018-03-09 Thread no-reply
Hi, This series failed docker-quick@centos6 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: 20180309091535.13315-1-pet...@redhat.com Subject: [Qemu-devel] [PATCH v7 00/23]

Re: [Qemu-devel] [PATCH v7 00/23] Migration: postcopy failure recovery

2018-03-09 Thread no-reply
Hi, This series failed docker-mingw@fedora 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: 20180309091535.13315-1-pet...@redhat.com Subject: [Qemu-devel] [PATCH v7 00/23]

Re: [Qemu-devel] [PULL 0/8] Ui 20180308 patches

2018-03-09 Thread Thomas Huth
On 09.03.2018 10:44, Gerd Hoffmann wrote: > On Fri, Mar 09, 2018 at 10:15:33AM +0100, Gerd Hoffmann wrote: >> On Fri, Mar 09, 2018 at 09:46:44AM +0100, Thomas Huth wrote: >>> On 09.03.2018 08:50, Gerd Hoffmann wrote: Hi, > Maybe I should move the code to a separate source file so

[Qemu-devel] [Bug 1754605] [NEW] ppc64 migration bad_dest test is failed with failed to connect to socket

2018-03-09 Thread R.Nageswara Sastry
Public bug reported: On ppc64le machine the following test failed. # QTEST_QEMU_BINARY=ppc64-softmmu/qemu-system-ppc64 tests/migration-test V=1 /ppc64/migration/deprecated: OK /ppc64/migration/bad_dest: qemu-system-ppc64: Failed to connect socket: Connection refused OK

Re: [Qemu-devel] [PULL 0/8] Ui 20180308 patches

2018-03-09 Thread Gerd Hoffmann
On Fri, Mar 09, 2018 at 10:15:33AM +0100, Gerd Hoffmann wrote: > On Fri, Mar 09, 2018 at 09:46:44AM +0100, Thomas Huth wrote: > > On 09.03.2018 08:50, Gerd Hoffmann wrote: > > > Hi, > > > > > >> Maybe I should move the code to a separate source file so it can be > > >> built with different

[Qemu-devel] [PATCH v7 19/23] migration: init dst in migration_object_init too

2018-03-09 Thread Peter Xu
Though we may not need it, now we init both the src/dst migration objects in migration_object_init() so that even incoming migration object would be thread safe (it was not). Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Peter Xu ---

[Qemu-devel] [PATCH v7 11/23] migration: new cmd MIG_CMD_RECV_BITMAP

2018-03-09 Thread Peter Xu
Add a new vm command MIG_CMD_RECV_BITMAP to request received bitmap for one ramblock. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Peter Xu --- migration/savevm.c | 61 ++ migration/savevm.h |

[Qemu-devel] [PATCH v7 09/23] migration: new state "postcopy-recover"

2018-03-09 Thread Peter Xu
Introducing new migration state "postcopy-recover". If a migration procedure is paused and the connection is rebuilt afterward successfully, we'll switch the source VM state from "postcopy-paused" to the new state "postcopy-recover", then we'll do the resume logic in the migration thread (along

[Qemu-devel] [PATCH v7 08/23] migration: rebuild channel on source

2018-03-09 Thread Peter Xu
This patch detects the "resume" flag of migration command, rebuild the channels only if the flag is set. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Peter Xu --- migration/migration.c | 91 +++ 1

[Qemu-devel] [PATCH v7 05/23] migration: allow src return path to pause

2018-03-09 Thread Peter Xu
Let the thread pause for network issues. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Peter Xu --- migration/migration.c | 35 +-- migration/migration.h | 1 + migration/trace-events | 2 ++ 3 files changed, 36

Re: [Qemu-devel] [PATCH] scsi: support NDOB (no data-out buffer) for WRITE SAME commands

2018-03-09 Thread Fam Zheng
On Thu, 03/08 16:51, Paolo Bonzini wrote: > A NDOB bit set to one specifies that the disk shall not transfer data > from the data-out buffer and shall process the command as if the data-out > buffer contained user data set to all zeroes. > > Signed-off-by: Paolo Bonzini >

Re: [Qemu-devel] [PULL 0/8] Ui 20180308 patches

2018-03-09 Thread Gerd Hoffmann
On Fri, Mar 09, 2018 at 09:46:44AM +0100, Thomas Huth wrote: > On 09.03.2018 08:50, Gerd Hoffmann wrote: > > Hi, > > > >> Maybe I should move the code to a separate source file so it can be > >> built with different compiler flags, without needing #pragma? I don't > >> feel like building all

[Qemu-devel] [Bug 1754597] Re: qemu-system-x86_64 broken on ubuntu 17.10

2018-03-09 Thread Thomas Huth
** Project changed: qemu => qemu (Ubuntu) -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1754597 Title: qemu-system-x86_64 broken on ubuntu 17.10 Status in qemu package in Ubuntu: New Bug

Re: [Qemu-devel] [PATCH] s390x/virtio: Convert virtio-ccw from *_exit to *_unrealize

2018-03-09 Thread Pierre Morel
On 07/03/2018 17:29, Nia Alarie wrote: Signed-off-by: Nia Alarie What you do seems right to me, naming seems more logical, but  can you please add a little commit message explaining why you change the interface? Thanks, Pierre --- hw/s390x/virtio-ccw.c | 34

[Qemu-devel] [PATCH v7 03/23] migration: implement "postcopy-pause" src logic

2018-03-09 Thread Peter Xu
Now when network down for postcopy, the source side will not fail the migration. Instead we convert the status into this new paused state, and we will try to wait for a rescue in the future. If a recovery is detected, migration_thread() will reset its local variables to prepare for that.

[Qemu-devel] [PATCH v7 23/23] migration/hmp: add migrate_pause command

2018-03-09 Thread Peter Xu
Wrapper for QMP command "migrate-pause". Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Peter Xu --- hmp-commands.hx | 14 ++ hmp.c | 9 + hmp.h | 1 + 3 files changed, 24 insertions(+) diff --git

[Qemu-devel] [PATCH v7 22/23] migration/qmp: add command migrate-pause

2018-03-09 Thread Peter Xu
It pauses an ongoing migration. Currently it only supports postcopy. Note that this command will work on either side of the migration. Basically when we trigger this on one side, it'll interrupt the other side as well since the other side will get notified on the disconnect event. However, it's

[Qemu-devel] [PATCH v7 21/23] hmp/migration: add migrate_recover command

2018-03-09 Thread Peter Xu
Sister command to migrate-recover in QMP. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Peter Xu --- hmp-commands.hx | 13 + hmp.c | 10 ++ hmp.h | 1 + 3 files changed, 24 insertions(+) diff --git

[Qemu-devel] [PATCH v7 02/23] migration: new postcopy-pause state

2018-03-09 Thread Peter Xu
Introducing a new state "postcopy-paused", which can be used when the postcopy migration is paused. It is targeted for postcopy network failure recovery. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Peter Xu --- migration/migration.c | 2 ++

[Qemu-devel] [PATCH v7 15/23] migration: introduce SaveVMHandlers.resume_prepare

2018-03-09 Thread Peter Xu
This is hook function to be called when a postcopy migration wants to resume from a failure. For each module, it should provide its own recovery logic before we switch to the postcopy-active state. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Peter Xu

[Qemu-devel] [PATCH v7 20/23] qmp/migration: new command migrate-recover

2018-03-09 Thread Peter Xu
The first allow-oob=true command. It's used on destination side when the postcopy migration is paused and ready for a recovery. After execution, a new migration channel will be established for postcopy to continue. Signed-off-by: Peter Xu --- migration/migration.c | 24

[Qemu-devel] [PATCH v7 18/23] migration: final handshake for the resume

2018-03-09 Thread Peter Xu
Finish the last step to do the final handshake for the recovery. First source sends one MIG_CMD_RESUME to dst, telling that source is ready to resume. Then, dest replies with MIG_RP_MSG_RESUME_ACK to source, telling that dest is ready to resume (after switch to postcopy-active state). When

[Qemu-devel] [PATCH v7 00/23] Migration: postcopy failure recovery

2018-03-09 Thread Peter Xu
Based-on: <20180309090006.10018-1-pet...@redhat.com> This series is based on the series: [PATCH v8 00/23] QMP: out-of-band (OOB) execution support Tree is pushed here for better reference and testing (online tree includes all pre-requisites e.g. monitor OOB series):

[Qemu-devel] [PATCH v7 12/23] migration: new message MIG_RP_MSG_RECV_BITMAP

2018-03-09 Thread Peter Xu
Introducing new return path message MIG_RP_MSG_RECV_BITMAP to send received bitmap of ramblock back to source. This is the reply message of MIG_CMD_RECV_BITMAP, it contains not only the header (including the ramblock name), and it was appended with the whole ramblock received bitmap on the

[Qemu-devel] [PATCH v7 13/23] migration: new cmd MIG_CMD_POSTCOPY_RESUME

2018-03-09 Thread Peter Xu
Introducing this new command to be sent when the source VM is ready to resume the paused migration. What the destination does here is basically release the fault thread to continue service page faults. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Peter Xu

[Qemu-devel] [PATCH v7 01/23] migration: let incoming side use thread context

2018-03-09 Thread Peter Xu
The old incoming migration is running in main thread and default gcontext. With the new qio_channel_add_watch_full() we can now let it run in the thread's own gcontext (if there is one). Currently this patch does nothing alone. But when any of the incoming migration is run in another iothread

[Qemu-devel] [PATCH v7 17/23] migration: setup ramstate for resume

2018-03-09 Thread Peter Xu
After we updated the dirty bitmaps of ramblocks, we also need to update the critical fields in RAMState to make sure it is ready for a resume. Signed-off-by: Peter Xu --- migration/ram.c| 45 - migration/trace-events | 1 +

[Qemu-devel] [PATCH v7 06/23] migration: allow fault thread to pause

2018-03-09 Thread Peter Xu
Allows the fault thread to stop handling page faults temporarily. When network failure happened (and if we expect a recovery afterwards), we should not allow the fault thread to continue sending things to source, instead, it should halt for a while until the connection is rebuilt. When the dest

[Qemu-devel] [PATCH v7 10/23] migration: wakeup dst ram-load-thread for recover

2018-03-09 Thread Peter Xu
On the destination side, we cannot wake up all the threads when we got reconnected. The first thing to do is to wake up the main load thread, so that we can continue to receive valid messages from source again and reply when needed. At this point, we switch the destination VM state from

[Qemu-devel] [PATCH v7 16/23] migration: synchronize dirty bitmap for resume

2018-03-09 Thread Peter Xu
This patch implements the first part of core RAM resume logic for postcopy. ram_resume_prepare() is provided for the work. When the migration is interrupted by network failure, the dirty bitmap on the source side will be meaningless, because even the dirty bit is cleared, it is still possible

[Qemu-devel] [PATCH v8 23/23] tests: qmp-test: add oob test

2018-03-09 Thread Peter Xu
Test the new OOB capability. Here we used the new "x-oob-test" command. Firstly, we send a lock=true and oob=false command to hang the main thread. Then send another lock=false and oob=true command (which will be run inside parser this time) to free that hanged command. Reviewed-by: Stefan

[Qemu-devel] [Bug 1754597] [NEW] qemu-system-x86_64 broken on ubuntu 17.10

2018-03-09 Thread eezacque
Public bug reported: I have run a virtual machine over the past three years without problems, but the update to Ubuntu 17.10 broke it: the machine falls into an infinite boot loop. $ qemu-system-x86_64 --version QEMU emulator version 2.10.1(Debian 1:2.10+dfsg-0ubuntu3.5) $ sudo

[Qemu-devel] [PATCH v7 07/23] qmp: hmp: add migrate "resume" option

2018-03-09 Thread Peter Xu
It will be used when we want to resume one paused migration. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Peter Xu --- hmp-commands.hx | 7 --- hmp.c | 4 +++- migration/migration.c | 2 +- qapi/migration.json | 5 -

[Qemu-devel] [PATCH v7 14/23] migration: new message MIG_RP_MSG_RESUME_ACK

2018-03-09 Thread Peter Xu
Creating new message to reply for MIG_CMD_POSTCOPY_RESUME. One uint32_t is used as payload to let the source know whether destination is ready to continue the migration. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Peter Xu ---

[Qemu-devel] [PATCH v8 21/23] qmp: add command "x-oob-test"

2018-03-09 Thread Peter Xu
This command is only used to test OOB functionality. It should not be used for any other purposes. Reviewed-by: Stefan Hajnoczi Reviewed-by: Fam Zheng Signed-off-by: Peter Xu --- qapi/misc.json | 18 ++ qmp.c |

[Qemu-devel] [PATCH v8 19/23] qmp: isolate responses into io thread

2018-03-09 Thread Peter Xu
For those monitors who have enabled IO thread, we'll offload the responding procedure into IO thread. The main reason is that chardev is not thread safe, and we need to do all the read/write IOs in the same thread. For use_io_thr=true monitors, that thread is the IO thread. We do this isolation

[Qemu-devel] [PATCH v7 04/23] migration: allow dst vm pause on postcopy

2018-03-09 Thread Peter Xu
When there is IO error on the incoming channel (e.g., network down), instead of bailing out immediately, we allow the dst vm to switch to the new POSTCOPY_PAUSE state. Currently it is still simple - it waits the new semaphore, until someone poke it for another attempt. One note is that here on

[Qemu-devel] [PATCH v8 20/23] monitor: enable IO thread for (qmp & !mux) typed

2018-03-09 Thread Peter Xu
Start to use dedicate IO thread for QMP monitors that are not using MUXed chardev. Reviewed-by: Fam Zheng Reviewed-by: Stefan Hajnoczi Signed-off-by: Peter Xu --- monitor.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff

[Qemu-devel] [PATCH v8 18/23] qmp: support out-of-band (oob) execution

2018-03-09 Thread Peter Xu
Having "allow-oob" to true for a command does not mean that this command will always be run in out-of-band mode. The out-of-band quick path will only be executed if we specify the extra "run-oob" flag when sending the QMP request: { "execute": "command-that-allows-oob", "arguments":

[Qemu-devel] [PATCH v8 22/23] tests: qmp-test: verify command batching

2018-03-09 Thread Peter Xu
OOB introduced DROP event for flow control. This should not affect old QMP clients. Add a command batching check to make sure of it. Reviewed-by: Stefan Hajnoczi Signed-off-by: Peter Xu --- tests/qmp-test.c | 22 ++ 1 file changed,

[Qemu-devel] [PATCH v8 12/23] monitor: let suspend_cnt be thread safe

2018-03-09 Thread Peter Xu
Monitor code now can be run in more than one thread. Let it be thread safe when accessing suspend_cnt counter. Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi Signed-off-by: Peter Xu --- monitor.c | 15 --- 1 file

[Qemu-devel] [PATCH v8 14/23] monitor: separate QMP parser and dispatcher

2018-03-09 Thread Peter Xu
Originally QMP goes through these steps: JSON Parser --> QMP Dispatcher --> Respond /|\(2)(3) | (1) | \|/ (4) +- main thread + This patch does this: JSON Parser QMP Dispatcher --> Respond /|\ |

[Qemu-devel] [PATCH v8 17/23] qapi: introduce new cmd option "allow-oob"

2018-03-09 Thread Peter Xu
Here "oob" stands for "Out-Of-Band". When "allow-oob" is set, it means the command allows out-of-band execution. The "oob" idea is proposed by Markus Armbruster in following thread: https://lists.gnu.org/archive/html/qemu-devel/2017-09/msg02057.html This new "allow-oob" boolean will be

[Qemu-devel] [PATCH v8 11/23] monitor: introduce monitor_qmp_respond()

2018-03-09 Thread Peter Xu
A tiny refactoring, preparing to split the QMP dispatcher away. Reviewed-by: Fam Zheng Reviewed-by: Stefan Hajnoczi Signed-off-by: Peter Xu --- monitor.c | 50 +- 1 file changed, 33

[Qemu-devel] [PATCH v8 10/23] qmp: introduce QMPCapability

2018-03-09 Thread Peter Xu
There were no QMP capabilities defined. Define the first "oob" as capability to allow out-of-band messages. After this patch, we will allow QMP clients to enable QMP capabilities when sending the first "qmp_capabilities" command. Originally we are starting QMP session with no arguments like:

[Qemu-devel] [PATCH v8 15/23] qmp: add new event "command-dropped"

2018-03-09 Thread Peter Xu
This event will be emitted if one QMP command is dropped. Along, declare an enum for the reasons. Reviewed-by: Fam Zheng Reviewed-by: Stefan Hajnoczi Signed-off-by: Peter Xu --- qapi/misc.json | 37 +

[Qemu-devel] [PATCH v8 16/23] monitor: send event when command queue full

2018-03-09 Thread Peter Xu
Set maximum QMP command queue length to 8. If queue full, instead of queue the command, we directly return a "command-dropped" event, telling client that specific command is dropped. Note that this flow control mechanism is only valid if OOB is enabled. If it's not, the effective queue length

[Qemu-devel] [PATCH v8 08/23] monitor: let mon_list be tail queue

2018-03-09 Thread Peter Xu
It was QLIST. I want to use this list to do monitor priority job later, which need tail insertion ability. So switching to a tail queue. Reviewed-by: Fam Zheng Reviewed-by: Stefan Hajnoczi Signed-off-by: Peter Xu --- monitor.c | 12

[Qemu-devel] [PATCH v8 05/23] monitor: move skip_flush into monitor_data_init

2018-03-09 Thread Peter Xu
It's part of the data init. Collect it. Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Fam Zheng Reviewed-by: Stefan Hajnoczi Signed-off-by: Peter Xu --- monitor.c | 8 1 file changed, 4 insertions(+),

[Qemu-devel] [PATCH v8 13/23] monitor: let suspend/resume work even with QMPs

2018-03-09 Thread Peter Xu
This patches allows QMP monitors to be suspended/resumed. One thing to mention is that for QMPs that are using IOThreads, we need an explicit kick for the IOThread in case it is sleeping. Meanwhile, we need to take special care on non-interactive HMPs. Currently only gdbserver is using that.

[Qemu-devel] [PATCH v8 09/23] monitor: allow using IO thread for parsing

2018-03-09 Thread Peter Xu
For each Monitor, add one field "use_io_thr" to show whether it will be using the dedicated monitor IO thread to handle input/output. When set, monitor IO parsing work will be offloaded to the dedicated monitor IO thread, rather than the original main loop thread. This only works for QMP. HMP

[Qemu-devel] [PATCH v8 07/23] monitor: unify global init

2018-03-09 Thread Peter Xu
There are many places where the monitor initializes its globals: - monitor_init_qmp_commands() at the very beginning - single function to init monitor_lock - in the first entry of monitor_init() using "is_first_init" Unify them a bit. monitor_lock is not used before monitor_init() (as confirmed

[Qemu-devel] [PATCH v8 04/23] qobject: let object_property_get_str() use new API

2018-03-09 Thread Peter Xu
We can simplify object_property_get_str() using the new qobject_get_try_str(). Reviewed-by: Fam Zheng Reviewed-by: Stefan Hajnoczi Reviewed-by: Eric Blake Signed-off-by: Peter Xu --- qom/object.c | 9 +++-- 1

[Qemu-devel] [PATCH v8 03/23] qobject: introduce qobject_get_try_str()

2018-03-09 Thread Peter Xu
A quick way to fetch string from qobject when it's a QString. Reviewed-by: Fam Zheng Reviewed-by: Stefan Hajnoczi Signed-off-by: Peter Xu --- include/qapi/qmp/qstring.h | 1 + qobject/qstring.c | 11 +++ 2 files

[Qemu-devel] [PATCH v8 06/23] monitor: move the cur_mon hack deeper for QMP

2018-03-09 Thread Peter Xu
In monitor_qmp_read(), we have the hack to temporarily replace the cur_mon pointer. Now we move this hack deeper inside the QMP dispatcher routine since the Monitor pointer can be actually obtained using container_of() upon the parser object, just like most of the other JSON parser users do.

[Qemu-devel] [PATCH v8 01/23] docs: update QMP documents for OOB commands

2018-03-09 Thread Peter Xu
Update both the developer and spec for the new QMP OOB (Out-Of-Band) command. Signed-off-by: Peter Xu --- docs/devel/qapi-code-gen.txt | 65 docs/interop/qmp-spec.txt| 30 +--- 2 files changed, 86 insertions(+),

[Qemu-devel] [PATCH v8 00/23] QMP: out-of-band (OOB) execution support

2018-03-09 Thread Peter Xu
Based-on: <20180306053320.15401-1-pet...@redhat.com> The series is based on the following series: [PATCH v2 0/9] chardev: qio related non-default context support (actually patch 9 is based on version 2.1, Dan's version) This version only contains some trivial changes, most of the work is

[Qemu-devel] [PATCH v8 02/23] qobject: introduce qstring_get_try_str()

2018-03-09 Thread Peter Xu
The only difference from qstring_get_str() is that it allows the qstring to be NULL. If so, NULL is returned. CC: Eric Blake CC: Markus Armbruster Reviewed-by: Fam Zheng Reviewed-by: Stefan Hajnoczi Reviewed-by: Eric

Re: [Qemu-devel] [PATCH] hw/ppc/spapr: Allow "spapr-vlan" as NIC model name beside "ibmveth"

2018-03-09 Thread David Gibson
On Fri, Mar 09, 2018 at 08:01:38AM +0100, Thomas Huth wrote: > With the new "--nic" command line parameter option, the "old" way of > specifying a NIC model via the nd_table[] is becoming more prominent > again. But for the pseries "spapr-vlan" device, there is a confusing > discrepancy between

Re: [Qemu-devel] [PULL 0/8] Ui 20180308 patches

2018-03-09 Thread Thomas Huth
On 09.03.2018 08:50, Gerd Hoffmann wrote: > Hi, > >> Maybe I should move the code to a separate source file so it can be >> built with different compiler flags, without needing #pragma? I don't >> feel like building all gtk code with -Wno-deprecated-declarations ... > > Hmm, that idea doesn't

[Qemu-devel] [PATCH 1/4] block: Pass "current_flags" in BdrvChildRole.inherit_options

2018-03-09 Thread Fam Zheng
So that the current flags can influence the returned flags in the coming patches. For now, 0 is passed everywhere and the parameter is not used. Signed-off-by: Fam Zheng --- block.c | 20 +--- block/block-backend.c | 3 ++- block/vvfat.c

[Qemu-devel] [PATCH 2/4] block: Fix write flags in bdrv_backing_options

2018-03-09 Thread Fam Zheng
When the child in question already has write access, we shouldn't change that just because the parent being open/reopen doesn't need it. But if we are inherenting the flags from a writable parent, we shouldn't copy the BDRV_O_RDWR flag, which is consistent with the BDRV_OPT_READ_ONLY option we

Re: [Qemu-devel] [PATCH v3 12/12] intel_iommu: bind device to PASID tagged AddressSpace

2018-03-09 Thread Tian, Kevin
> From: Peter Xu [mailto:pet...@redhat.com] > Sent: Friday, March 9, 2018 3:59 PM > > On Thu, Mar 08, 2018 at 09:39:18AM +, Liu, Yi L wrote: > > > From: Peter Xu [mailto:pet...@redhat.com] > > > Sent: Tuesday, March 6, 2018 7:44 PM > > > Subject: Re: [PATCH v3 12/12] intel_iommu: bind device

[Qemu-devel] [PATCH 0/4] block: Fix permission during reopen

2018-03-09 Thread Fam Zheng
We write open the whole backing chain during reopen. It is not necessary and will cause image locking problems if the backing image is shared. Fam Zheng (4): block: Pass "current_flags" in BdrvChildRole.inherit_options block: Fix write flags in bdrv_backing_options block: Use the actual

[Qemu-devel] [PATCH 4/4] iotests: Add regression test for commit base locking

2018-03-09 Thread Fam Zheng
Signed-off-by: Fam Zheng --- tests/qemu-iotests/153 | 6 ++ tests/qemu-iotests/153.out | 4 2 files changed, 10 insertions(+) diff --git a/tests/qemu-iotests/153 b/tests/qemu-iotests/153 index fa25eb24bd..5a82acebd3 100755 --- a/tests/qemu-iotests/153 +++

[Qemu-devel] [PATCH 3/4] block: Use the actual current_flags during reopen

2018-03-09 Thread Fam Zheng
This complies to the function contract and allows bdrv_backing_options to make the right decision. Signed-off-by: Fam Zheng --- block.c | 21 +++-- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/block.c b/block.c index 937f9fe159..1e2b0d822d

Re: [Qemu-devel] [PATCH v3 12/12] intel_iommu: bind device to PASID tagged AddressSpace

2018-03-09 Thread Peter Xu
On Thu, Mar 08, 2018 at 09:39:18AM +, Liu, Yi L wrote: > > From: Peter Xu [mailto:pet...@redhat.com] > > Sent: Tuesday, March 6, 2018 7:44 PM > > Subject: Re: [PATCH v3 12/12] intel_iommu: bind device to PASID tagged > > AddressSpace > > > > On Thu, Mar 01, 2018 at 06:33:35PM +0800, Liu, Yi L

<    1   2   3   4   5