Re: [Qemu-devel] [PATCH 3/3] s390x: deprecate s390-squash-mcss machine prop

2017-12-04 Thread Dong Jia Shi
* Dong Jia Shi [2017-12-05 15:43:00 +0800]: > * Cornelia Huck [2017-12-04 17:11:24 +0100]: > > [...] > > This one looks good to me too, so: > Reviewed-by: Dong Jia Shi > BTW, since we are deprecating

Re: [Qemu-devel] [PATCH 3/3] s390x: deprecate s390-squash-mcss machine prop

2017-12-04 Thread Dong Jia Shi
* Cornelia Huck [2017-12-04 17:11:24 +0100]: [...] This one looks good to me too, so: Reviewed-by: Dong Jia Shi > > (...) > > > > Looks sane. We should put a note into the 2.12 changelog as well. > > > > > > > I agree. Who would be

Re: [Qemu-devel] [PATCH v3 2/6] tests: migration test deprecated commands

2017-12-04 Thread Peter Xu
On Fri, Dec 01, 2017 at 01:58:09PM +0100, Juan Quintela wrote: > We now test the deprecated commands everytime that we test the new > commands. This makes unnecesary to add tests for deprecated commands. > > Signed-off-by: Juan Quintela > --- > tests/migration-test.c | 32

[Qemu-devel] [PATCH] MAITAINERS: List Fam Zheng as reviewer for SCSI patches

2017-12-04 Thread Fam Zheng
Just so that I notice those patches more easily. Signed-off-by: Fam Zheng --- MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 0255113470..64a138c380 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1000,6 +1000,7 @@ T: git

[Qemu-devel] [PATCH for-2.12] scsi-block: Add share-rw option

2017-12-04 Thread Fam Zheng
Scsi-block doesn't use the DEFINE_BLOCK_PROPERTIES() macro so it didn't gain the share-rw back when it was added to all other storage devices. This option is meaningful here, and need to be used when attaching a shared storage to guest. Signed-off-by: Fam Zheng ---

Re: [Qemu-devel] [virtio-dev] [PATCH v3 0/7] Vhost-pci for inter-VM communication

2017-12-04 Thread Jason Wang
On 2017年12月05日 15:15, Wei Wang wrote: On 12/05/2017 03:01 PM, Jason Wang wrote: On 2017年12月05日 11:33, Wei Wang wrote: Vhost-pci is a point-to-point based inter-VM communication solution. This patch series implements the vhost-pci-net device setup and emulation. The device is implemented

[Qemu-devel] [PATCH v5 28/28] hmp/migration: add migrate_recover command

2017-12-04 Thread Peter Xu
Sister command to migrate-recover in QMP. Signed-off-by: Peter Xu --- hmp-commands.hx | 13 + hmp.c | 10 ++ hmp.h | 1 + 3 files changed, 24 insertions(+) diff --git a/hmp-commands.hx b/hmp-commands.hx index 32fdd52212..79e28c5228

[Qemu-devel] [PATCH v5 25/28] io: let watcher of the channel run in same ctx

2017-12-04 Thread Peter Xu
Per-thread gcontext is only used in IOThread (please refer to callers of g_main_context_push_thread_default), so this patch only affects anything that will be run in an IOThread. It lets the watcher object be run in the same context as the caller that added the watcher. This patch is critical to

Re: [Qemu-devel] [virtio-dev] [PATCH v3 0/7] Vhost-pci for inter-VM communication

2017-12-04 Thread Wei Wang
On 12/05/2017 03:01 PM, Jason Wang wrote: On 2017年12月05日 11:33, Wei Wang wrote: Vhost-pci is a point-to-point based inter-VM communication solution. This patch series implements the vhost-pci-net device setup and emulation. The device is implemented as a virtio device, and it is set up via

[Qemu-devel] [PATCH v5 22/28] migration: final handshake for the resume

2017-12-04 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 v2] hw/ide: Remove duplicated definitions from ahci_internal.h

2017-12-04 Thread Thomas Huth
The same definitions can also be found in include/hw/ide/ahci.h so let's remove these #defines from ahci_internal.h. Signed-off-by: Thomas Huth --- v2: Also remove TYPE_ICH9_AHCI as suggested by John hw/ide/ahci_internal.h | 12 1 file changed, 12 deletions(-)

[Qemu-devel] [PATCH v5 17/28] migration: new cmd MIG_CMD_POSTCOPY_RESUME

2017-12-04 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

Re: [Qemu-devel] [PATCH v5 00/28] Migration: postcopy failure recovery

2017-12-04 Thread Peter Xu
On Tue, Dec 05, 2017 at 02:52:39PM +0800, Peter Xu wrote: > Tree is pushed here for better reference and testing (online tree > includes monitor OOB series): > > https://github.com/xzpeter/qemu/tree/postcopy-recover-all Sorry, now this series is depending on the OOB series. Hello, Patchew,

[Qemu-devel] [PATCH v5 11/28] migration: pass MigrationState to migrate_init()

2017-12-04 Thread Peter Xu
Let the callers take the object, then pass it to migrate_init(). Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Peter Xu --- migration/migration.c | 7 ++- migration/migration.h | 2 +- migration/savevm.c| 5 - 3 files changed, 7

[Qemu-devel] [PATCH v5 27/28] qmp/migration: new command migrate-recover

2017-12-04 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 | 18

[Qemu-devel] [PATCH v5 23/28] migration: free SocketAddress where allocated

2017-12-04 Thread Peter Xu
Freeing the SocketAddress struct in socket_start_incoming_migration is slightly confusing. Let's free the address in the same context where we allocated it. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Peter Xu --- migration/socket.c | 4 ++-- 1

[Qemu-devel] [PATCH v5 10/28] qmp: hmp: add migrate "resume" option

2017-12-04 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 -

Re: [Qemu-devel] [virtio-dev] [PATCH v3 0/7] Vhost-pci for inter-VM communication

2017-12-04 Thread Jason Wang
On 2017年12月05日 11:33, Wei Wang wrote: Vhost-pci is a point-to-point based inter-VM communication solution. This patch series implements the vhost-pci-net device setup and emulation. The device is implemented as a virtio device, and it is set up via the vhost-user protocol to get the neessary

[Qemu-devel] [PATCH v5 24/28] migration: init dst in migration_object_init too

2017-12-04 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 v5 16/28] migration: new message MIG_RP_MSG_RECV_BITMAP

2017-12-04 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 v5 26/28] migration: allow migrate_cancel to pause postcopy

2017-12-04 Thread Peter Xu
It was allowed in the past to even cancel a postcopy migration, but it does not really make sense, and no one should be using it, since cancelling a migration during postcopy means crashing the VM at no time. Let's just use re-use this command as a way to pause the postcopy migration when we

[Qemu-devel] [PATCH v5 09/28] migration: allow fault thread to pause

2017-12-04 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 v5 20/28] migration: synchronize dirty bitmap for resume

2017-12-04 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 v5 15/28] migration: new cmd MIG_CMD_RECV_BITMAP

2017-12-04 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 v5 19/28] migration: introduce SaveVMHandlers.resume_prepare

2017-12-04 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 v5 21/28] migration: setup ramstate for resume

2017-12-04 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. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Peter Xu --- migration/ram.c| 37

[Qemu-devel] [PATCH v5 07/28] migration: allow src return path to pause

2017-12-04 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

[Qemu-devel] [PATCH v5 12/28] migration: rebuild channel on source

2017-12-04 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 | 92 ++- 1

[Qemu-devel] [PATCH v5 14/28] migration: wakeup dst ram-load-thread for recover

2017-12-04 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 v5 18/28] migration: new message MIG_RP_MSG_RESUME_ACK

2017-12-04 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 v5 05/28] migration: implement "postcopy-pause" src logic

2017-12-04 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 v5 06/28] migration: allow dst vm pause on postcopy

2017-12-04 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 v5 08/28] migration: allow send_rq to fail

2017-12-04 Thread Peter Xu
We will not allow failures to happen when sending data from destination to source via the return path. However it is possible that there can be errors along the way. This patch allows the migrate_send_rp_message() to return error when it happens, and further extended it to

[Qemu-devel] [PATCH v5 02/28] migration: reuse mis->userfault_quit_fd

2017-12-04 Thread Peter Xu
It was only used for quitting the page fault thread before. Let it be something more useful - now we can use it to notify a "wake" for the page fault thread (for any reason), and it only means "quit" if the fault_thread_quit is set. Since we changed what it does, renaming it to

[Qemu-devel] [PATCH v5 13/28] migration: new state "postcopy-recover"

2017-12-04 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 v5 04/28] migration: new postcopy-pause state

2017-12-04 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 v5 00/28] Migration: postcopy failure recovery

2017-12-04 Thread Peter Xu
Tree is pushed here for better reference and testing (online tree includes monitor OOB series): https://github.com/xzpeter/qemu/tree/postcopy-recover-all This version removed quite a few patches related to migrate-incoming, instead I introduced a new command "migrate-recover" to trigger the

[Qemu-devel] [PATCH v5 03/28] migration: provide postcopy_fault_thread_notify()

2017-12-04 Thread Peter Xu
A general helper to notify the fault thread. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Peter Xu --- migration/postcopy-ram.c | 35 --- migration/postcopy-ram.h | 2 ++ 2 files changed, 22 insertions(+), 15

[Qemu-devel] [PATCH v5 01/28] migration: better error handling with QEMUFile

2017-12-04 Thread Peter Xu
If the postcopy down due to some reason, we can always see this on dst: qemu-system-x86_64: RP: Received invalid message 0x length 0x However in most cases that's not the real issue. The problem is that qemu_get_be16() has no way to show whether the returned data is valid or not, and

Re: [Qemu-devel] [for-2.12 0/7] PCI cleanups

2017-12-04 Thread Fam Zheng
On Tue, 12/05 16:11, David Gibson wrote: > On Tue, Dec 05, 2017 at 01:05:58PM +0800, Fam Zheng wrote: > > On Tue, 12/05 06:49, Michael S. Tsirkin wrote: > > > On Wed, Nov 29, 2017 at 05:18:47PM +0800, Fam Zheng wrote: > > > > On Wed, 11/29 01:02, no-re...@patchew.org wrote: > > > > >

[Qemu-devel] About the light VM solution!

2017-12-04 Thread Yang Zhong
Hello all, As you know, AWS has decided to switch to KVM in their clouds. This news make almost all china CSPs(clouds service provider) pay more attention on KVM/Qemu, especially light VM solution. Below are intel solution for light VM, qemu-lite.

[Qemu-devel] [PATCH v6 3/4] contrib/libvhost-user: enable virtio config space messages

2017-12-04 Thread Changpeng Liu
Enable VHOST_USER_GET_CONFIG/VHOST_USER_SET_CONFIG/VHOST_USER_SET_CONFIG_FD messages in libvhost-user library, users can implement their own I/O target based on the library. This enable the virtio config space delivered between Qemu host device and the I/O target, also event notifier is added in

[Qemu-devel] [PATCH v6 2/4] vhost-user-blk: introduce a new vhost-user-blk host device

2017-12-04 Thread Changpeng Liu
This commit introduces a new vhost-user device for block, it uses a chardev to connect with the backend, same with Qemu virito-blk device, Guest OS still uses the virtio-blk frontend driver. To use it, start QEMU with command line like this: qemu-system-x86_64 \ -chardev

[Qemu-devel] [PATCH v6 1/4] vhost-user: add new vhost user messages to support virtio config space

2017-12-04 Thread Changpeng Liu
Add VHOST_USER_GET_CONFIG/VHOST_USER_SET_CONFIG messages which can be used for live migration of vhost user devices, also vhost user devices can benefit from the messages to get/set virtio config space from/to the I/O target. For the purpose to support virtio config space change,

[Qemu-devel] [PATCH v6 4/4] contrib/vhost-user-blk: introduce a vhost-user-blk sample application

2017-12-04 Thread Changpeng Liu
This commit introcudes a vhost-user-blk backend device, it uses UNIX domain socket to communicate with QEMU. The vhost-user-blk sample application should be used with QEMU vhost-user-blk-pci device. To use it, complie with: make vhost-user-blk and start like this: vhost-user-blk -b /dev/sdb -s

[Qemu-devel] [PATCH v6 0/4] Introduce a new vhost-user-blk host device to QEMU

2017-12-04 Thread Changpeng Liu
Although virtio scsi specification was designed as a replacement for virtio_blk, there are still many users using virtio_blk. Qemu 2.9 introduced a new device vhost user scsi which can process I/O in user space for virtio_scsi, this commit introduces a new vhost user block host device, which can

Re: [Qemu-devel] [PATCH v3] rcu: reduce more than 7MB heap memory by malloc_trim()

2017-12-04 Thread Yang Zhong
On Mon, Dec 04, 2017 at 08:26:29PM +0800, Shannon Zhao wrote: > Hi Yang, > > On 2017/12/4 20:03, Yang Zhong wrote: > > On Fri, Dec 01, 2017 at 01:52:49PM +0100, Paolo Bonzini wrote: > >> > On 01/12/2017 11:56, Yang Zhong wrote: > >>> > > This issue should be caused by much times of system call

[Qemu-devel] [RFC v5 25/26] tests: qmp-test: verify command batching

2017-12-04 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. Signed-off-by: Peter Xu --- tests/qmp-test.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/tests/qmp-test.c

[Qemu-devel] [RFC v5 26/26] tests: qmp-test: add oob test

2017-12-04 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. Signed-off-by: Peter Xu

[Qemu-devel] [RFC v5 24/26] docs: update QMP documents for OOB commands

2017-12-04 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 | 51 +++- docs/interop/qmp-spec.txt| 49 -- 2 files

[Qemu-devel] [RFC v5 23/26] qmp: add command "x-oob-test"

2017-12-04 Thread Peter Xu
This command is only used to test OOB functionality. It should not be used for any other purposes. Signed-off-by: Peter Xu --- qapi-schema.json | 18 ++ qmp.c| 16 2 files changed, 34 insertions(+) diff --git a/qapi-schema.json

[Qemu-devel] [RFC v5 19/26] qapi: introduce new cmd option "allow-oob"

2017-12-04 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] [RFC v5 21/26] qmp: isolate responses into io thread

2017-12-04 Thread Peter Xu
For those monitors who has 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] [RFC v5 20/26] qmp: support out-of-band (oob) execution

2017-12-04 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] [RFC v5 17/26] qmp: add new event "request-dropped"

2017-12-04 Thread Peter Xu
This event will be emitted if one QMP request is dropped. Along, declare an enum for the reasons. Signed-off-by: Peter Xu --- qapi-schema.json | 34 ++ 1 file changed, 34 insertions(+) diff --git a/qapi-schema.json b/qapi-schema.json index

[Qemu-devel] [RFC v5 14/26] monitor: introduce monitor_qmp_respond()

2017-12-04 Thread Peter Xu
A tiny refactoring, preparing to split the QMP dispatcher away. Reviewed-by: Fam Zheng Signed-off-by: Peter Xu --- monitor.c | 48 +++- 1 file changed, 31 insertions(+), 17 deletions(-) diff --git a/monitor.c

[Qemu-devel] [RFC v5 18/26] monitor: send event when request queue full

2017-12-04 Thread Peter Xu
Set maximum QMP request queue length to 8. If queue full, instead of queue the command, we directly return a "request-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] [RFC v5 22/26] monitor: enable IO thread for (qmp & !mux) typed

2017-12-04 Thread Peter Xu
Start to use dedicate IO thread for QMP monitors that are not using MUXed chardev. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Peter Xu --- monitor.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/monitor.c b/monitor.c index

[Qemu-devel] [RFC v5 13/26] qmp: introduce some capability helpers

2017-12-04 Thread Peter Xu
Introduce qmp_cap_enabled() and qmp_oob_enabled() helpers. Signed-off-by: Peter Xu --- monitor.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/monitor.c b/monitor.c index 097312e65f..9666115259 100644 --- a/monitor.c +++ b/monitor.c @@ -1038,6 +1038,16 @@

[Qemu-devel] [RFC v5 10/26] monitor: allow to use IO thread for parsing

2017-12-04 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 dedicated monitor IO thread, rather than the original main loop thread. This only works for QMP. HMP will

[Qemu-devel] [RFC v5 12/26] qmp: negociate QMP capabilities

2017-12-04 Thread Peter Xu
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: { "execute": "qmp_capabilities" } Now we can enable some QMP capabilities using (take OOB as example, which

[Qemu-devel] [RFC v5 16/26] monitor: separate QMP parser and dispatcher

2017-12-04 Thread Peter Xu
Originally QMP goes throw these steps: JSON Parser --> QMP Dispatcher --> Respond /|\(2)(3) | (1) | \|/ (4) +- main thread + This patch does this: JSON Parser QMP Dispatcher --> Respond /|\ |

[Qemu-devel] [RFC v5 09/26] monitor: create monitor dedicate iothread

2017-12-04 Thread Peter Xu
Create one IOThread for the monitors, prepared to handle all the input/output IOs using existing iothread framework. Signed-off-by: Peter Xu --- monitor.c | 32 1 file changed, 32 insertions(+) diff --git a/monitor.c b/monitor.c index

[Qemu-devel] [RFC v5 11/26] qmp: introduce QMPCapability

2017-12-04 Thread Peter Xu
There was no QMP capabilities defined. Define the first "oob" as capability to allow out-of-band messages. Also, touch up qmp-test.c to test the new bits. Signed-off-by: Peter Xu --- monitor.c| 15 +-- qapi-schema.json | 13 +

[Qemu-devel] [RFC v5 15/26] monitor: let suspend_cnt be thread safe

2017-12-04 Thread Peter Xu
Monitor code now can be run in more than one thread. Let it be thread safe when accessing suspend_cnt counter. Signed-off-by: Peter Xu --- monitor.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/monitor.c b/monitor.c index

[Qemu-devel] [RFC v5 07/26] monitor: unify global init

2017-12-04 Thread Peter Xu
There are many places for monitor init its globals, at least: - 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. Reviewed-by: Fam Zheng Signed-off-by: Peter

[Qemu-devel] [RFC v5 08/26] monitor: let mon_list be tail queue

2017-12-04 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 Signed-off-by: Peter Xu --- monitor.c | 10 +- 1 file changed, 5 insertions(+), 5

[Qemu-devel] [RFC v5 06/26] monitor: move the cur_mon hack deeper for QMP

2017-12-04 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 passed in to that using the new JSON Parser opaque field now. This does not make much sense as a single patch.

[Qemu-devel] [RFC v5 04/26] monitor: move skip_flush into monitor_data_init

2017-12-04 Thread Peter Xu
It's part of the data init. Collect it. Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Fam Zheng Signed-off-by: Peter Xu --- monitor.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/monitor.c b/monitor.c

[Qemu-devel] [RFC v5 05/26] qjson: add "opaque" field to JSONMessageParser

2017-12-04 Thread Peter Xu
It'll be passed to emit() as well when it happens. Since at it, add a typedef for the emitter function. Reviewed-by: Fam Zheng Signed-off-by: Peter Xu --- include/qapi/qmp/json-streamer.h | 10 -- monitor.c| 7 ---

[Qemu-devel] [RFC v5 02/26] qobject: introduce qobject_get_try_str()

2017-12-04 Thread Peter Xu
A quick way to fetch string from qobject when it's a QString. Reviewed-by: Fam Zheng Signed-off-by: Peter Xu --- include/qapi/qmp/qstring.h | 1 + qobject/qstring.c | 11 +++ 2 files changed, 12 insertions(+) diff --git

[Qemu-devel] [RFC v5 03/26] qobject: let object_property_get_str() use new API

2017-12-04 Thread Peter Xu
We can simplify object_property_get_str() using the new qobject_get_try_str(). Reviewed-by: Fam Zheng Signed-off-by: Peter Xu --- qom/object.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/qom/object.c b/qom/object.c index

[Qemu-devel] [RFC v5 00/26] QMP: out-of-band (OOB) execution support

2017-12-04 Thread Peter Xu
This version is mostly document update, and dropped the single patch that is migration related (will be put into postcopy recovery series). v5 - rename "monitor_iothread" to "mon_iothread" [Dave] - add comment in monitor_cleanup(), note that when the hacks can be removed. [Dan] - add a note

[Qemu-devel] [RFC v5 01/26] qobject: introduce qstring_get_try_str()

2017-12-04 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 Signed-off-by: Peter Xu ---

Re: [Qemu-devel] [PATCH 2/3] s390x/css: advertise unrestricted cssids

2017-12-04 Thread Dong Jia Shi
* Halil Pasic [2017-12-04 16:07:27 +0100]: > > > On 12/04/2017 12:15 PM, Cornelia Huck wrote: > > On Fri, 1 Dec 2017 15:31:35 +0100 > > Halil Pasic wrote: > > > >> Let us advertise the changes introduced by "s390x/css: unrestrict cssids" >

Re: [Qemu-devel] [PATCH 1/3] s390x/css: unrestrict cssids

2017-12-04 Thread Dong Jia Shi
* Halil Pasic [2017-12-01 15:31:34 +0100]: [...] No comment for the message part. The code looks good to me. So after squashing with patch #2: Reviewed-by: Dong Jia Shi > --- > hw/s390x/3270-ccw.c| 2 +- > hw/s390x/css.c

[Qemu-devel] [PULL 0/1] ppc-for-2.11 queue 20171205

2017-12-04 Thread David Gibson
The following changes since commit 2a4c7e839101a52f7bf9ba4dd64e466518565352: Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging (2017-12-04 17:19:04 +) are available in the Git repository at: git://github.com/dgibson/qemu.git tags/ppc-for-2.11-20171205 for you

[Qemu-devel] [PULL 1/1] target/ppc: Fix system lockups caused by interrupt_request state corruption

2017-12-04 Thread David Gibson
From: Richard Purdie Occasionally in Linux guests on x86_64 we're seeing logs like: ppc_set_irq: 0x55b4e0d562f0 n_IRQ 8 level 1 => pending 0100req 0004 when they should read: ppc_set_irq: 0x55b4e0d562f0 n_IRQ 8 level 1 => pending 0100req

Re: [Qemu-devel] [for-2.12 0/7] PCI cleanups

2017-12-04 Thread David Gibson
On Tue, Dec 05, 2017 at 01:05:58PM +0800, Fam Zheng wrote: > On Tue, 12/05 06:49, Michael S. Tsirkin wrote: > > On Wed, Nov 29, 2017 at 05:18:47PM +0800, Fam Zheng wrote: > > > On Wed, 11/29 01:02, no-re...@patchew.org wrote: > > > > /tmp/cc3Czn0R.s: Fatal error: can't write 3947 bytes to section

Re: [Qemu-devel] [for-2.12 0/7] PCI cleanups

2017-12-04 Thread Fam Zheng
On Tue, 12/05 06:49, Michael S. Tsirkin wrote: > On Wed, Nov 29, 2017 at 05:18:47PM +0800, Fam Zheng wrote: > > On Wed, 11/29 01:02, no-re...@patchew.org wrote: > > > /tmp/cc3Czn0R.s: Fatal error: can't write 3947 bytes to section > > > .debug_str of hw/arm/virt-acpi-build.o because: 'No space

Re: [Qemu-devel] [PATCH v2] linux-user: Use *at functions instead of caching interp_prefix contents

2017-12-04 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Subject: [Qemu-devel] [PATCH v2] linux-user: Use *at functions instead of caching interp_prefix contents Type: series Message-id: 20171205044844.3597-1-richard.hender...@linaro.org === TEST SCRIPT

Re: [Qemu-devel] [for-2.12 0/7] PCI cleanups

2017-12-04 Thread Michael S. Tsirkin
On Wed, Nov 29, 2017 at 05:18:47PM +0800, Fam Zheng wrote: > On Wed, 11/29 01:02, no-re...@patchew.org wrote: > > /tmp/cc3Czn0R.s: Fatal error: can't write 3947 bytes to section .debug_str > > of hw/arm/virt-acpi-build.o because: 'No space left on device' > > Hmm, the host is shared and what I

[Qemu-devel] [PATCH v2] linux-user: Use *at functions instead of caching interp_prefix contents

2017-12-04 Thread Richard Henderson
From: Richard Henderson If the interp_prefix is a complete chroot, it may have a *lot* of files. Setting up the cache for this is quite expensive. Instead, use the *at versions of various syscalls to attempt the operation in the prefix. Signed-off-by: Richard Henderson

Re: [Qemu-devel] [Qemu-arm] [PATCH] arm/translate-a64: mark path as unreachable to eliminate warning

2017-12-04 Thread Philippe Mathieu-Daudé
Hi Peter, On 11/13/2017 08:26 AM, Peter Maydell wrote: > On 8 November 2017 at 12:37, Philippe Mathieu-Daudé wrote: >> On 11/07/2017 05:46 PM, Emilio G. Cota wrote: >>> Fixes the following warning when compiling with gcc 5.4.0 with -O1 >>> optimizations and --enable-debug: >>>

Re: [Qemu-devel] [Qemu-arm] [PATCH 2/2] nvic: Make systick banked

2017-12-04 Thread Philippe Mathieu-Daudé
Hi Peter, On 12/01/2017 03:51 PM, Peter Maydell wrote: > For the v8M security extension, there should be two systick > devices, which use separate banked systick exceptions. The > register interface is banked in the same way as for other > banked registers, including the existence of an NS alias

Re: [Qemu-devel] [PATCH 20/25] spapr: add device tree support for the XIVE interrupt mode

2017-12-04 Thread David Gibson
On Mon, Dec 04, 2017 at 05:19:03PM +0100, Cédric Le Goater wrote: > On 12/04/2017 08:49 AM, David Gibson wrote: > > On Thu, Nov 23, 2017 at 02:29:50PM +0100, Cédric Le Goater wrote: > >> The XIVE interface for the guest is described in the device tree under > >> the "interrupt-controller" node. A

[Qemu-devel] [PATCH v3 7/7] virtio/vhost.c: vhost-pci needs remote gpa

2017-12-04 Thread Wei Wang
The vhost-pci driver uses the remote guest physical address to send/receive packets from the remote guest, so when sending the ving info to the vhost-pci device, send the guest physical adress directly. Signed-off-by: Wei Wang --- hw/virtio/vhost.c | 56

Re: [Qemu-devel] [Qemu-arm] [PATCH 1/2] nvic: Make nvic_sysreg_ns_ops work with any MemoryRegion

2017-12-04 Thread Philippe Mathieu-Daudé
On 12/01/2017 03:51 PM, Peter Maydell wrote: > Generalize nvic_sysreg_ns_ops so that we can pass it an > arbitrary MemoryRegion which it will use as the underlying > register implementation to apply the NS-alias behaviour > to. We'll want this so we can do the same with systick. > >

[Qemu-devel] [PATCH v3 6/7] vhost-pci-slave: handle VHOST_USER_SET_VHOST_PCI

2017-12-04 Thread Wei Wang
This patch implements the slave part handling of the VHOST_USER_SET_VHOST_PCI msg. Receiving a "true" from the master will set the LINK_UP status of the vhost-pci device config status, and a config interrupt will be injected to the guest to notify that the device is ready to use. The driver is

[Qemu-devel] [PATCH v3 2/7] vhost-pci-net: add vhost-pci-net

2017-12-04 Thread Wei Wang
Add the vhost-pci-net device emulation. The device uses bar 2 to expose the remote VM's memory to the guest. The first 4KB of the the bar area stores the metadata which describes the remote memory and vring info. Signed-off-by: Wei Wang --- hw/net/Makefile.objs

[Qemu-devel] [PATCH v3 5/7] vhost-user: VHOST_USER_SET_VHOST_PCI msg

2017-12-04 Thread Wei Wang
Add a new vhost-uer protocol msg, VHOST_USER_SET_VHOST_PCI. This msg is used to signal the vhost-pci device to start/stop working. Signed-off-by: Wei Wang --- hw/net/vhost_net.c| 37 + hw/virtio/vhost-pci-slave.c |

[Qemu-devel] [PATCH v3 4/7] vhost-pci-slave: add vhost-pci slave implementation

2017-12-04 Thread Wei Wang
The vhost-pci slave implementation is added to support the creation of the vhost-pci-net device. It follows the vhost-user protocol to get the master VM's info (e.g. memory regions, vring address). Signed-off-by: Wei Wang --- hw/net/vhost_pci_net.c | 20 ++-

[Qemu-devel] [PATCH v3 3/7] virtio/virtio-pci.c: add vhost-pci-net-pci

2017-12-04 Thread Wei Wang
Add the virtio-pci emulation part of the vhost-pci device. BAR2 is used to expose the remote VM's memory to the guest, and its default size is set to 64GB. Signed-off-by: Wei Wang --- hw/virtio/virtio-pci.c | 55 ++

[Qemu-devel] [PATCH v3 0/7] Vhost-pci for inter-VM communication

2017-12-04 Thread Wei Wang
Vhost-pci is a point-to-point based inter-VM communication solution. This patch series implements the vhost-pci-net device setup and emulation. The device is implemented as a virtio device, and it is set up via the vhost-user protocol to get the neessary info (e.g the memory info of the remote VM,

[Qemu-devel] [PATCH v3 1/7] vhost-user: share the vhost-user protocol related structures

2017-12-04 Thread Wei Wang
Put the vhost-user protocol related data structures to vhost-user.h, so that they can be used in other implementations (e.g. a slave implementation). Signed-off-by: Wei Wang --- hw/virtio/vhost-user.c | 100 +-

Re: [Qemu-devel] [PATCH] docs/devel/migration.txt: keep functions consistent with the code

2017-12-04 Thread Jay Zhou
Hi, Does this document update make sense? Regards, Jay On 2017/11/23 16:47, Jay Zhou wrote: Since the commit 11808bb0c422134bf09119f4aa22c59b0ce84bf3 removed the put_buffer callback and using an iovec based write handler instead, the docs should be sync with the code too. Signed-off-by: Jay

Re: [Qemu-devel] [PATCH v4 31/32] migration, qmp: new command "migrate-pause"

2017-12-04 Thread Peter Xu
On Mon, Dec 04, 2017 at 05:10:29PM +, Dr. David Alan Gilbert wrote: > * Peter Xu (pet...@redhat.com) wrote: > > On Fri, Dec 01, 2017 at 04:53:28PM +, Dr. David Alan Gilbert wrote: > > > * Peter Xu (pet...@redhat.com) wrote: > > > > It is used to manually trigger the postcopy pause state.

Re: [Qemu-devel] [PATCH 21/25] spapr: introduce a helper to map the XIVE memory regions

2017-12-04 Thread David Gibson
On Mon, Dec 04, 2017 at 04:30:36PM +0100, Cédric Le Goater wrote: > On 12/04/2017 08:52 AM, David Gibson wrote: > > On Thu, Nov 23, 2017 at 02:29:51PM +0100, Cédric Le Goater wrote: > >> When the XIVE interrupt mode is activated, the machine needs to expose > >> to the guest the MMIO regions use

Re: [Qemu-devel] [PULL 0/3] ppc-for-2.11 queue 20171204

2017-12-04 Thread David Gibson
; The following changes since commit > >> c11d61271b9e6e7a1f0479ef1ca8fb55fa457a62: > >> > >> Update version for v2.11.0-rc3 release (2017-11-29 17:59:34 +) > >> > >> are available in the Git repository at: > >> > >>

Re: [Qemu-devel] [PATCH for-2.12] hw/ide: Remove duplicated definitions from ahci_internal.h

2017-12-04 Thread John Snow
On 11/30/2017 02:12 PM, Thomas Huth wrote: > The same definitions can also be found in include/hw/ide/ahci.h > so let's remove these #defines from ahci_internal.h. > > Signed-off-by: Thomas Huth > --- > hw/ide/ahci_internal.h | 7 --- > 1 file changed, 7 deletions(-) >

  1   2   3   >