[Qemu-devel] Does qemu guest agent support 'guest-exec'?

2017-08-01 Thread Hu, Robert
Hi, qemu/scripts/qmp/qemu-ga-client seems only support "cat, fsfreeze, fstrim, halt, ifconfig, info, ping, powerdown, reboot, shutdown, suspend". But from qemu/qga/commands.c seems at least Linux guest should already support this. Despite qemu-ga-client, how can I talk to guest-agent in guest t

Re: [Qemu-devel] [PATCH 0/3] Channel Path realted CRW generation

2017-08-01 Thread Cornelia Huck
On Tue, 1 Aug 2017 10:12:31 +0800 Dong Jia Shi wrote: > Since I only want to expose the minimum information that the guest needs > to work without serious problem. I think I can also deffer these stuff > until we have the good chp modelling. Yes, that's probably the best way to proceed.

Re: [Qemu-devel] [PATCH] watchdog: wdt_aspeed: Add support for the reset width register

2017-08-01 Thread Cédric Le Goater
On 08/01/2017 03:04 AM, Andrew Jeffery wrote: > The reset width register controls how the pulse on the SoC's WDTRST{1,2} > pins behaves. A pulse is emitted if the external reset bit is set in > WDT_CTRL. WDT_RESET_WIDTH requires magic bit patterns to configure both > push-pull/open-drain and active

Re: [Qemu-devel] [PATCH 3/3] s390x/css: generate channel path initialized CRW for channel path hotplug

2017-08-01 Thread Cornelia Huck
On Tue, 1 Aug 2017 10:29:10 +0800 Dong Jia Shi wrote: > * Cornelia Huck [2017-07-31 13:13:02 +0200]: > > > On Mon, 31 Jul 2017 11:51:37 +0800 > > Dong Jia Shi wrote: > > > When defining a vfio-ccw device, since the real subchannel implicitly > > > indicates the chps it bound to, we grasp the

Re: [Qemu-devel] [PATCH 3/3] s390x/css: generate channel path initialized CRW for channel path hotplug

2017-08-01 Thread Dong Jia Shi
* Cornelia Huck [2017-08-01 09:24:20 +0200]: > On Tue, 1 Aug 2017 10:29:10 +0800 > Dong Jia Shi wrote: > > > * Cornelia Huck [2017-07-31 13:13:02 +0200]: > > > > > On Mon, 31 Jul 2017 11:51:37 +0800 > > > Dong Jia Shi wrote: > > > > > When defining a vfio-ccw device, since the real subchann

[Qemu-devel] [PATCH v2 1/2] s390x/css: use macro for event-information pending error recover code

2017-08-01 Thread Dong Jia Shi
Let's use a macro for the ERC (error recover code) when generating a Channel Subsystem Event-information pending CRW (channel report word). While we are at it, let's also add all other ERCs. Signed-off-by: Dong Jia Shi --- hw/s390x/css.c| 2 +- include/hw/s390x/ioinst.h | 11 ++

[Qemu-devel] [PATCH v2 0/2] ERC cleanup and CRW bugfix (was: Channel Path realted CRW generation)

2017-08-01 Thread Dong Jia Shi
This series is trying to: 1. clear up ERC related code 2. bugfix for channel path related CRW generation Change log -- v1->v2: Patch #1: Add all ERCs. Commit message update. Patch #2: Rename the new added parameter to more speaking name -- solicited. Dong Jia Shi (2): s390x/css: u

[Qemu-devel] [PATCH v2 2/2] s390x/css: generate solicited crw for rchp completion signaling

2017-08-01 Thread Dong Jia Shi
A successful completion of rchp should signal a solicited channel path initialized CRW (channel report word), while the current implementation always generates an un-solicited one. Let's fix this. Reported-by: Halil Pasic Signed-off-by: Dong Jia Shi --- hw/s390x/css.c | 16 ++---

[Qemu-devel] [PATCH for-2.10 1/2] mmio-execution: warn the potential developer about migration

2017-08-01 Thread KONRAD Frederic
There are two potential corner cases with mmio-execution: * It adds a mmio-interface device which will be migrated. * It modifies the RAMBlock list during live migration which odd side effects. Signed-off-by: KONRAD Frederic --- include/exec/memory.h | 4 1 file changed, 4 insertions(+

[Qemu-devel] [PATCH for-2.10 2/2] xilinx-spips: add a migration blocker when using mmio_execution

2017-08-01 Thread KONRAD Frederic
This adds a migration blocker when mmio_execution has been used. Signed-off-by: KONRAD Frederic --- hw/ssi/xilinx_spips.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/hw/ssi/xilinx_spips.c b/hw/ssi/xilinx_spips.c index e833028..d46491f 100644 --- a/hw/ssi/xilinx_spips.c +++ b

[Qemu-devel] [PATCH for-2.10 0/2] mmio-execution and migration

2017-08-01 Thread KONRAD Frederic
mmio-execution has incompatibilities with migration so this informs the potential developer that implementing request_ptr will break migration and adds a migration blocker in xilinx-spips when using mmio-execution. This bug affects the user which wants to execute code from SPI (which wasn't possib

Re: [Qemu-devel] [PATCH v2 1/2] build-sys: add --disable-vhost-user

2017-08-01 Thread Cornelia Huck
On Fri, 28 Jul 2017 16:13:08 +0200 Marc-André Lureau wrote: > Learn to compile out vhost-user. Keep it enabled by default on > non-win32, that is assumed to be POSIX. Fail if trying to enable it on > win32. > > When trying to make a vhost-user netdev, it gives the following error: > > -netdev v

Re: [Qemu-devel] [Qemu-arm] [PATCH v2 0/2] Add global device ID in virt machine

2017-08-01 Thread Edgar E. Iglesias
On Tue, Aug 01, 2017 at 05:05:42AM +0300, Michael S. Tsirkin wrote: > On Mon, Jul 31, 2017 at 03:13:09PM +, Diana Madalina Craciun wrote: > > On 07/31/2017 05:06 PM, Michael S. Tsirkin wrote: > > > On Mon, Jul 31, 2017 at 01:22:45PM +, Diana Madalina Craciun wrote: > > If we are to use

Re: [Qemu-devel] [RFC 03/29] io: fix qio_channel_socket_accept err handling

2017-08-01 Thread Daniel P. Berrange
On Tue, Aug 01, 2017 at 10:25:19AM +0800, Peter Xu wrote: > On Mon, Jul 31, 2017 at 05:53:39PM +0100, Dr. David Alan Gilbert wrote: > > * Peter Xu (pet...@redhat.com) wrote: > > > When accept failed, we should setup errp with the reason. More > > > importantly, the caller may assume errp be non-NUL

Re: [Qemu-devel] [PATCH v3 1/2] Add more function keys to QEMU

2017-08-01 Thread Daniel P. Berrange
On Mon, Jul 31, 2017 at 03:44:36PM -0400, John Arbuckle wrote: > There are now keyboards that have 19 function keys. This patch extends QEMU > so these function keys can be used. > > Signed-off-by: John Arbuckle > --- > qapi-schema.json | 16 +++- > ui/input-keymap.c | 12 +

Re: [Qemu-devel] [Qemu-block] [PATCH] block: check BlockDriverState object before dereference

2017-08-01 Thread Paolo Bonzini
On 01/08/2017 02:14, John Snow wrote: > I may need some nudging towards understanding what the right solution > here is, though. Should the blk_aio_flush assume that there always is a > root BDS? should it not assume that? I think blk_aio_flush is not special. If there is no root BDS, either you

Re: [Qemu-devel] [RFC 04/29] bitmap: introduce bitmap_invert()

2017-08-01 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > On Mon, Jul 31, 2017 at 06:11:56PM +0100, Dr. David Alan Gilbert wrote: > > * Peter Xu (pet...@redhat.com) wrote: > > > It is used to invert the whole bitmap. > > > > Would it be easier to change bitmap_complement to use ^ > > in it's macro and slow_bitmap_c

[Qemu-devel] [RFC PATCH] booke206: fix MAS update on tlb miss

2017-08-01 Thread KONRAD Frederic
When a tlb instruction miss happen, rw is set to 0 at the bottom of cpu_ppc_handle_mmu_fault which cause the MAS update function to miss the SAS and TS bit in MAS6, MAS1 in booke206_update_mas_tlb_miss. Just calling booke206_update_mas_tlb_miss with rw = 2 solve the issue. Signed-off-by: KONRAD F

Re: [Qemu-devel] [RFC 10/29] migration: new property "x-postcopy-fast"

2017-08-01 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > On Mon, Jul 31, 2017 at 07:52:24PM +0100, Dr. David Alan Gilbert wrote: > > * Peter Xu (pet...@redhat.com) wrote: > > > This provides a way to start postcopy ASAP when migration starts. To do > > > this, we need both: > > > > > > -global migration.x-postco

Re: [Qemu-devel] [RFC 03/29] io: fix qio_channel_socket_accept err handling

2017-08-01 Thread Dr. David Alan Gilbert
* Daniel P. Berrange (berra...@redhat.com) wrote: > On Tue, Aug 01, 2017 at 10:25:19AM +0800, Peter Xu wrote: > > On Mon, Jul 31, 2017 at 05:53:39PM +0100, Dr. David Alan Gilbert wrote: > > > * Peter Xu (pet...@redhat.com) wrote: > > > > When accept failed, we should setup errp with the reason. Mor

Re: [Qemu-devel] [PATCH for-2.10 2/2] xilinx-spips: add a migration blocker when using mmio_execution

2017-08-01 Thread Peter Maydell
On 1 August 2017 at 09:10, KONRAD Frederic wrote: > This adds a migration blocker when mmio_execution has been used. > > Signed-off-by: KONRAD Frederic > --- > hw/ssi/xilinx_spips.c | 11 +++ > 1 file changed, 11 insertions(+) > > diff --git a/hw/ssi/xilinx_spips.c b/hw/ssi/xilinx_spips.

Re: [Qemu-devel] [PATCH for-2.10 2/2] xilinx-spips: add a migration blocker when using mmio_execution

2017-08-01 Thread KONRAD Frederic
On 08/01/2017 11:00 AM, Peter Maydell wrote: On 1 August 2017 at 09:10, KONRAD Frederic wrote: This adds a migration blocker when mmio_execution has been used. Signed-off-by: KONRAD Frederic --- hw/ssi/xilinx_spips.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/hw/ssi

Re: [Qemu-devel] [Qemu-block] [PATCH v3] qemu-iotests: add a "how to" to ./README

2017-08-01 Thread Stefan Hajnoczi
On Mon, Jul 31, 2017 at 12:28:44PM -0500, Eric Blake wrote: > On 07/31/2017 11:26 AM, Stefan Hajnoczi wrote: > > There is not much getting started documentation for qemu-iotests. This > > patch explains how to create a new test and covers the overall testing > > approach. > > > > Cc: Ishani Chugh

Re: [Qemu-devel] [PATCH v2 1/2] trace: add TRACE__BACKEND_DSTATE()

2017-08-01 Thread Daniel P. Berrange
On Mon, Jul 31, 2017 at 05:35:11PM +0100, Stefan Hajnoczi wrote: > On Mon, Jul 31, 2017 at 04:16:39PM +0100, Daniel P. Berrange wrote: > > On Mon, Jul 31, 2017 at 03:07:17PM +0100, Stefan Hajnoczi wrote: > > > diff --git a/scripts/tracetool/backend/dtrace.py > > > b/scripts/tracetool/backend/dtrac

Re: [Qemu-devel] [PATCH v2 2/2] trace: add trace_event_get_state_backends()

2017-08-01 Thread Daniel P. Berrange
On Mon, Jul 31, 2017 at 03:07:18PM +0100, Stefan Hajnoczi wrote: > Code that checks dstate is unaware of SystemTap and LTTng UST dstate, so > the following trace event will not fire when solely enabled by SystemTap > or LTTng UST: > > if (trace_event_get_state(TRACE_MY_EVENT)) { > str = g_

Re: [Qemu-devel] [PATCH for-2.10 2/2] xilinx-spips: add a migration blocker when using mmio_execution

2017-08-01 Thread Edgar E. Iglesias
On Tue, Aug 01, 2017 at 11:13:56AM +0200, KONRAD Frederic wrote: > > > On 08/01/2017 11:00 AM, Peter Maydell wrote: > >On 1 August 2017 at 09:10, KONRAD Frederic > >wrote: > >>This adds a migration blocker when mmio_execution has been used. > >> > >>Signed-off-by: KONRAD Frederic > >>--- > >>

[Qemu-devel] [RFC v3 1/8] update-linux-headers: import virtio_iommu.h

2017-08-01 Thread Eric Auger
Update the script to update the virtio_iommu.h header. Signed-off-by: Eric Auger --- scripts/update-linux-headers.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/update-linux-headers.sh b/scripts/update-linux-headers.sh index 2f906c4..03f6712 100755 --- a/scripts/update-linux-h

[Qemu-devel] [RFC v3 0/8] VIRTIO-IOMMU device

2017-08-01 Thread Eric Auger
This series implements the virtio-iommu device. This v3 mostly is a rebase on top of v2.10-rc0 that uses IOMMUMmeoryRegion plus some small fixes. This is a proof of concept based on the virtio-iommu specification written by Jean-Philippe Brucker [1]. The device gets instantiated using the "-devi

[Qemu-devel] [RFC v3 3/8] virtio_iommu: add skeleton

2017-08-01 Thread Eric Auger
This patchs adds the skeleton for the virtio-iommu device. Signed-off-by: Eric Auger --- v2 -> v3: - rebase on 2.10-rc0, ie. use IOMMUMemoryRegion and remove iommu_ops. - advertise VIRTIO_IOMMU_F_MAP_UNMAP feature - page_sizes set to TARGET_PAGE_SIZE --- hw/virtio/Makefile.objs |

[Qemu-devel] [RFC v3 2/8] linux-headers: Update for virtio-iommu

2017-08-01 Thread Eric Auger
This is a partial linux header update against Jean-Philippe's branch: git://linux-arm.org/linux-jpb.git virtio-iommu/base (unstable) Signed-off-by: Eric Auger --- include/standard-headers/linux/virtio_ids.h | 1 + include/standard-headers/linux/virtio_iommu.h | 142 ++

[Qemu-devel] [RFC v3 5/8] virtio_iommu: Add the iommu regions

2017-08-01 Thread Eric Auger
This patch initializes the iommu memory regions so that PCIe end point transactions get translated. The translation function is not yet implemented at that stage. Signed-off-by: Eric Auger --- v2 -> v3: - use IOMMUMemoryRegion - iommu mr name built with BDF - rename smmu_get_sid into virtio_iom

[Qemu-devel] [RFC v3 4/8] virtio-iommu: Decode the command payload

2017-08-01 Thread Eric Auger
This patch adds the command payload decoding and introduces the functions that will do the actual command handling. Those functions are not yet implemented. Signed-off-by: Eric Auger --- hw/virtio/trace-events | 7 hw/virtio/virtio-iommu.c | 97 +++

[Qemu-devel] [RFC v3 6/8] virtio-iommu: Implement the translation and commands

2017-08-01 Thread Eric Auger
This patch adds the actual implementation for the translation routine and the virtio-iommu commands. Signed-off-by: Eric Auger --- v2 -> v3: - init the mutex - return VIRTIO_IOMMU_S_INVAL is reserved field is not null on attach/detach commands - on attach, when the device is already attached t

[Qemu-devel] [RFC v3 8/8] hw/arm/virt: Add virtio-iommu the virt board

2017-08-01 Thread Eric Auger
The specific virtio-mmio node is inconditionally added on machine init while the binding between this latter and the PCIe host bridge is done on machine init done notifier, only if -device virtio-iommu-device was added to the qemu command line. Signed-off-by: Eric Auger --- --- hw/arm/virt.c

[Qemu-devel] [RFC v3 7/8] hw/arm/virt: Add 2.10 machine type

2017-08-01 Thread Eric Auger
The new machine type allows virtio-iommu instantiation. Signed-off-by: Eric Auger --- a Veuillez saisir le message de validation pour vos modifications. Les lignes --- hw/arm/virt.c | 24 ++-- include/hw/arm/virt.h | 1 + 2 files changed, 23 insertions(+), 2 deleti

Re: [Qemu-devel] [PATCH for-2.10 2/2] xilinx-spips: add a migration blocker when using mmio_execution

2017-08-01 Thread KONRAD Frederic
On 08/01/2017 11:30 AM, Edgar E. Iglesias wrote: On Tue, Aug 01, 2017 at 11:13:56AM +0200, KONRAD Frederic wrote: On 08/01/2017 11:00 AM, Peter Maydell wrote: On 1 August 2017 at 09:10, KONRAD Frederic wrote: This adds a migration blocker when mmio_execution has been used. Signed-off-by:

Re: [Qemu-devel] About virtio device hotplug in Q35! 【外域邮件.谨慎查阅】

2017-08-01 Thread Bob Chen
2017-08-01 13:46 GMT+08:00 Alex Williamson : > On Tue, 1 Aug 2017 13:04:46 +0800 > Bob Chen wrote: > > > Hi, > > > > This is a sketch of my hardware topology. > > > > CPU0 <- QPI ->CPU1 > >| | > > Root Port(at PCIe.0)Ro

Re: [Qemu-devel] [PATCH v2 0/2] trace: fix trace_event_get_state() for SystemTap and LTTng UST

2017-08-01 Thread Stefan Hajnoczi
On Mon, Jul 31, 2017 at 03:07:16PM +0100, Stefan Hajnoczi wrote: > v2: > * Don't special-case QEMU dstate [Daniel Berrange] > * Use _backends() postfix to clarify function purpose [Lluís] > > Trace events that compute their arguments can affect performance. The > following idom can be used to a

Re: [Qemu-devel] [PATCH for-2.10 2/2] xilinx-spips: add a migration blocker when using mmio_execution

2017-08-01 Thread Peter Maydell
On 1 August 2017 at 10:35, KONRAD Frederic wrote: > > > On 08/01/2017 11:30 AM, Edgar E. Iglesias wrote: >> At this stage, perhaps we should just register the blocker when this dev >> realizes. >> >> If a request_ptr comes in during migration, the VM will fail either way... > Yes but this will br

Re: [Qemu-devel] [RFC 12/29] migration: allow dst vm pause on postcopy

2017-08-01 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > 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

Re: [Qemu-devel] [PATCH v3 0/4] trace-events: print 0x before hex numbers

2017-08-01 Thread Stefan Hajnoczi
On Mon, Jul 31, 2017 at 07:01:31PM +0300, Vladimir Sementsov-Ogievskiy wrote: > Hi all! > > It is hard to read logs, when there are hex and dec numbers in one line, when > hex number doesn't contain any letters and don't have '0x' prefix. > > So, here is a complete solution for the problem: > >

Re: [Qemu-devel] [RFC 13/29] migration: allow src return path to pause

2017-08-01 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > Let the thread pause for network issues. > > Signed-off-by: Peter Xu > --- > migration/migration.c | 35 +-- > migration/migration.h | 1 + > migration/trace-events | 2 ++ > 3 files changed, 36 insertions(+), 2 deletion

Re: [Qemu-devel] [PATCH v2 1/1] monitor: improve tracing in handle_qmp_command

2017-08-01 Thread Stefan Hajnoczi
On Tue, Jul 25, 2017 at 05:39:23PM +0300, Denis V. Lunev wrote: > Calculate req_json only if trace_handle_qmp_command enabled. > > Signed-off-by: Denis V. Lunev > CC: Stefan Hajnoczi > CC: Lluís Vilanova > CC: Dr. David Alan Gilbert > CC: Markus Armbruster > --- > Changes from v1: > - written

Re: [Qemu-devel] [PATCH v6 2/7] qemu.py: fix is_running() return before first launch()

2017-08-01 Thread Stefan Hajnoczi
On Mon, Jul 31, 2017 at 10:51:05AM +0200, Amador Pahim wrote: > is_running() returns None when called before the first time we > call launch(): > > >>> import qemu > >>> vm = qemu.QEMUMachine('qemu-system-x86_64') > >>> vm.is_running() > >>> > > It should retunt False instead. Thi

Re: [Qemu-devel] [PATCH v6 5/7] qemu.py: use os.path.null instead of /dev/null

2017-08-01 Thread Stefan Hajnoczi
On Mon, Jul 31, 2017 at 10:51:08AM +0200, Amador Pahim wrote: > For increased portability, let's use os.path.devnull. > > Signed-off-by: Amador Pahim > --- > scripts/qemu.py | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Stefan Hajnoczi signature.asc Description: PG

Re: [Qemu-devel] [PATCHv2 02/04] colo-compare: Processpactkets in the IOThreadofthe primary

2017-08-01 Thread Paolo Bonzini
On 28/07/2017 02:25, Fam Zheng wrote: > On Thu, 07/27 15:47, Zhang Chen wrote: >> CC. Fam and David. >> >> Any idea about it? > > Is it possible to use g_main_context_{push,pop}_thread_default to "move" > chardev > GSources to IOThread's context, then use g_main_context_query like main thread > a

Re: [Qemu-devel] Improving QMP test coverage

2017-08-01 Thread Stefan Hajnoczi
On Thu, Jul 27, 2017 at 07:16:52PM +0800, Fam Zheng wrote: > On Thu, 07/27 11:09, Daniel P. Berrange wrote: > > On Thu, Jul 27, 2017 at 05:19:57PM +0800, Fam Zheng wrote: > > > On Thu, 07/27 10:14, Markus Armbruster wrote: > > > > This brings some advantages of "verify output with diff" to tests th

Re: [Qemu-devel] [RFC 14/29] migration: allow send_rq to fail

2017-08-01 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > 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 f

Re: [Qemu-devel] [RFC 15/29] migration: allow fault thread to pause

2017-08-01 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > 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 unti

Re: [Qemu-devel] [RFC 16/29] qmp: hmp: add migrate "resume" option

2017-08-01 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > It will be used when we want to resume one paused migration. > > Signed-off-by: Peter Xu Other than Eric's comments: Reviewed-by: Dr. David Alan Gilbert > --- > hmp-commands.hx | 7 --- > hmp.c | 4 +++- > migration/migration

Re: [Qemu-devel] [PATCH v6 2/7] qemu.py: fix is_running() return before first launch()

2017-08-01 Thread Eduardo Habkost
On Tue, Aug 01, 2017 at 11:09:25AM +0100, Stefan Hajnoczi wrote: > On Mon, Jul 31, 2017 at 10:51:05AM +0200, Amador Pahim wrote: > > is_running() returns None when called before the first time we > > call launch(): > > > > >>> import qemu > > >>> vm = qemu.QEMUMachine('qemu-system-x86_64')

[Qemu-devel] Cleaning up handling of CPU exceptions accessing non-existent memory/devices

2017-08-01 Thread Peter Maydell
Hi; I've been looking at our code to handle allowing guest CPUs to generate exceptions when they access non-existent memory or devices (in ARM terms, external aborts; also often called bus errors). At the moment we have a hook for this: do_unassigned_access(). Unfortunately this was designed a lon

Re: [Qemu-devel] [RFC 17/29] migration: rebuild channel on source

2017-08-01 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > This patch detects the "resume" flag of migration command, rebuild the > channels only if the flag is set. > > Signed-off-by: Peter Xu > --- > migration/migration.c | 52 > --- > 1 file changed, 41 insertion

Re: [Qemu-devel] [RFC 16/29] qmp: hmp: add migrate "resume" option

2017-08-01 Thread Daniel P. Berrange
On Fri, Jul 28, 2017 at 04:06:25PM +0800, Peter Xu wrote: > It will be used when we want to resume one paused migration. > > Signed-off-by: Peter Xu > --- > hmp-commands.hx | 7 --- > hmp.c | 4 +++- > migration/migration.c | 2 +- > qapi-schema.json | 5 - > 4

Re: [Qemu-devel] [RFC 19/29] migration: let dst listen on port always

2017-08-01 Thread Daniel P. Berrange
On Fri, Jul 28, 2017 at 04:06:28PM +0800, Peter Xu wrote: > Signed-off-by: Peter Xu > --- > migration/exec.c | 2 +- > migration/fd.c | 2 +- > migration/socket.c | 4 ++-- > 3 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/migration/exec.c b/migration/exec.c > index 08b59

Re: [Qemu-devel] [for-2.11 PATCH 24/26] spapr: allow guest to update the XICS phandle

2017-08-01 Thread Greg Kurz
On Tue, 1 Aug 2017 12:20:56 +1000 Alexey Kardashevskiy wrote: > On 31/07/17 14:58, David Gibson wrote: > > On Fri, Jul 28, 2017 at 08:20:57AM +0200, Thomas Huth wrote: > >> On 28.07.2017 06:02, David Gibson wrote: > >>> On Tue, Jul 25, 2017 at 08:03:06PM +0200, Greg Kurz wrote: > The "

Re: [Qemu-devel] [RFC 18/29] migration: new state "postcopy-recover"

2017-08-01 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > 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 r

[Qemu-devel] [PATCH v9 2/3] migration: introduce qemu_ufd_copy_ioctl helper

2017-08-01 Thread Alexey Perevalov
Just for placing auxilary operations inside helper, auxilary operations like: track received pages, notify about copying operation in futher patches. Reviewed-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Peter Xu Signed-off-by: Alexey Perevalov --- migration/postcopy-ram

[Qemu-devel] [PATCH v9 1/3] migration: postcopy_place_page factoring out

2017-08-01 Thread Alexey Perevalov
Need to mark copied pages as closer as possible to the place where it tracks down. That will be necessary in futher patch. Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Peter Xu Reviewed-by: Juan Quintela Signed-off-by: Alexey Perevalov --- migration/postcopy-ram.c | 13 +++-- migr

[Qemu-devel] [PATCH v9 0/3] Add bitmap for received pages in postcopy migration

2017-08-01 Thread Alexey Perevalov
This is 9th version of [PATCH v1 0/2] Add bitmap for copied pages in postcopy migration cover message from there This is a separate patch set, it derived from https://www.mail-archive.com/qemu-devel@nongnu.org/msg456004.html There are several possible use cases: 1. solve issue with postcopy live

[Qemu-devel] [PATCH v9 3/3] migration: add bitmap for received page

2017-08-01 Thread Alexey Perevalov
This patch adds ability to track down already received pages, it's necessary for calculation vCPU block time in postcopy migration feature, and for recovery after postcopy migration failure. Also it's necessary to solve shared memory issue in postcopy livemigration. Information about received page

Re: [Qemu-devel] [PATCH for 2.10] pc: make 'pc.rom' readonly when machine has PCI enabled

2017-08-01 Thread Dr. David Alan Gilbert
* Igor Mammedov (imamm...@redhat.com) wrote: > looking at bios ROM mapping in QEMU it seems that only isapc > (i.e. not PCI enabled machine) requires ROM being mapped as > RW in other cases BIOS is mapped as RO. Do the same for option > ROM 'pc.rom' when machine has PCI enabled. Does this need to

Re: [Qemu-devel] [PATCH for 2.10] pc: make 'pc.rom' readonly when machine has PCI enabled

2017-08-01 Thread Igor Mammedov
On Tue, 1 Aug 2017 13:07:57 +0100 "Dr. David Alan Gilbert" wrote: > * Igor Mammedov (imamm...@redhat.com) wrote: > > looking at bios ROM mapping in QEMU it seems that only isapc > > (i.e. not PCI enabled machine) requires ROM being mapped as > > RW in other cases BIOS is mapped as RO. Do the same

Re: [Qemu-devel] [PATCH v6 2/7] qemu.py: fix is_running() return before first launch()

2017-08-01 Thread Amador Pahim
On Tue, Aug 1, 2017 at 12:50 PM, Eduardo Habkost wrote: > On Tue, Aug 01, 2017 at 11:09:25AM +0100, Stefan Hajnoczi wrote: >> On Mon, Jul 31, 2017 at 10:51:05AM +0200, Amador Pahim wrote: >> > is_running() returns None when called before the first time we >> > call launch(): >> > >> > >>> impo

Re: [Qemu-devel] [PATCH v3 04/13] block: support BDRV_REQ_ALLOCATE in passthrough drivers

2017-08-01 Thread Anton Nefedov
On 07/31/2017 10:11 PM, Eric Blake wrote: On 07/31/2017 11:21 AM, Anton Nefedov wrote: Support the flag if the underlying BDS supports it Signed-off-by: Anton Nefedov --- block/blkdebug.c | 3 ++- block/raw-format.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) What about

Re: [Qemu-devel] [PATCH v3 09/13] qcow2: move is_zero_sectors() up

2017-08-01 Thread Anton Nefedov
On 07/31/2017 10:13 PM, Eric Blake wrote: On 07/31/2017 11:22 AM, Anton Nefedov wrote: To be used in the following commit without a forward declaration. Signed-off-by: Anton Nefedov --- block/qcow2.c | 39 +++ 1 file changed, 19 insertions(+), 20 deletion

Re: [Qemu-devel] [PATCH v2] iscsi: use scsi_create_task()

2017-08-01 Thread Paolo Bonzini
On 28/07/2017 19:52, Marc-André Lureau wrote: > > Stupid question: what's the benefit? > > scsi_create/scsi_free is a library API. If they have their own > allocator, we better use it, or it may easily break, no? Well, that would be an API breakage, but I see the point. I think I would pr

Re: [Qemu-devel] [PATCH 1/2] hw/scsi/vmw_pvscsi: Remove the dead error handling

2017-08-01 Thread Paolo Bonzini
On 26/07/2017 10:41, Mao Zhongyi wrote: > qemu_bh_new() is a wrapper around aio_bh_new(), which returns > null only when g_new() does. It doesn't. So remove the dead > error handling. > > Cc: Dmitry Fleytman > Cc: Paolo Bonzini > Cc: Markus Armbruster > Signed-off-by: Mao Zhongyi > --- > hw/s

Re: [Qemu-devel] [PATCH 4/6] hw/block: Fix the return type

2017-08-01 Thread Stefan Hajnoczi
On Wed, Jul 26, 2017 at 08:02:53PM +0800, Mao Zhongyi wrote: > When the function no success value to transmit, it usually make the > function return void. It has turned out not to be a success, because > it means that the extra local_err variable and error_propagate() will > be needed. It leads to

Re: [Qemu-devel] [RFC v5 0/8] ARM SMMUv3 Emulation Support

2017-08-01 Thread Auger Eric
Hi Tomasz, On 01/08/2017 13:01, Tomasz Nowicki wrote: > Hi Eric, > > Just letting you know that I am facing another issue with the following > setup: > 1. host (4.12 kernel & 64K page) and VM (4.12 kernel & 64K page) > 2. QEMU + -netdev type=tap,ifname=tap,id=net0 -device > virtio-net-pci,netdev=n

Re: [Qemu-devel] [PATCH 00/13] instrument: Add basic event instrumentation

2017-08-01 Thread Stefan Hajnoczi
On Fri, Jul 28, 2017 at 07:14:33PM +0300, Lluís Vilanova wrote: > Daniel P Berrange writes: > > > On Fri, Jul 28, 2017 at 02:34:30PM +0100, Stefan Hajnoczi wrote: > >> On Thu, Jul 27, 2017 at 04:45:35PM +0100, Daniel P. Berrange wrote: > >> > On Thu, Jul 27, 2017 at 04:33:01PM +0100, Peter Maydell

[Qemu-devel] [PULL 2/9] trace: ensure unique function / variable names per .stp file

2017-08-01 Thread Stefan Hajnoczi
From: "Daniel P. Berrange" The simpletrace compatibility code for systemtap creates a function and some global variables for mapping to event ID numbers. We generate multiple -simpletrace.stp files though, one per target and systemtap considers functions & variables to be globally scoped, not per

[Qemu-devel] [PULL 3/9] trace: add TRACE__BACKEND_DSTATE()

2017-08-01 Thread Stefan Hajnoczi
QEMU keeps track of trace event enabled/disabled state and provides monitor commands to inspect and modify the "dstate". SystemTap and LTTng UST maintain independent enabled/disabled states for each trace event, the other backends rely on QEMU dstate. Introduce a new per-event macro that combines

[Qemu-devel] [PULL 0/9] Tracing patches

2017-08-01 Thread Stefan Hajnoczi
The following changes since commit 5619c179057e24195ff19c8fe6d6a6cbcb16ed28: Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20170731' into staging (2017-07-31 14:45:42 +0100) are available in the git repository at: git://github.com/stefanha/qemu.git tags/tracing-pull-re

[Qemu-devel] [PULL 1/9] trace: ensure .stp files are rebuilt if trace tool source changes

2017-08-01 Thread Stefan Hajnoczi
From: "Daniel P. Berrange" The make rules for generating the .stp files forgot to add a dep on $(tracetool-y) to trigger a rebuild if the trace tool source changes. Signed-off-by: Daniel P. Berrange Message-id: 20170728133631.5449-1-berra...@redhat.com Signed-off-by: Stefan Hajnoczi --- Makef

[Qemu-devel] [PULL 6/9] trace-events: fix code style: %# -> 0x%

2017-08-01 Thread Stefan Hajnoczi
From: Vladimir Sementsov-Ogievskiy In trace format '#' flag of printf is forbidden. Fix it to '0x%'. This patch is created by the following: check that we have a problem > find . -name trace-events | xargs grep '%#' | wc -l 56 check that there are no cases with additional printf flags before '

[Qemu-devel] [PULL 4/9] trace: add trace_event_get_state_backends()

2017-08-01 Thread Stefan Hajnoczi
Code that checks dstate is unaware of SystemTap and LTTng UST dstate, so the following trace event will not fire when solely enabled by SystemTap or LTTng UST: if (trace_event_get_state(TRACE_MY_EVENT)) { str = g_strdup_printf("Expensive string to generate ...",

[Qemu-devel] [PULL 9/9] monitor: Reduce handle_qmp_command() tracing overhead

2017-08-01 Thread Stefan Hajnoczi
From: "Denis V. Lunev" We are malloc'ing a QString and spending CPU cycles on converting a QObject to string, just for the sake of sticking the string in the trace message. Wasted when we aren't tracing. Avoid that. [Commit message and description suggested by Markus Armbruster to provide more

[Qemu-devel] [PULL 7/9] checkpatch: check trace-events code style

2017-08-01 Thread Stefan Hajnoczi
From: Vladimir Sementsov-Ogievskiy According to CODING_STYLE, check that in trace-events: 1. hex numbers are prefixed with '0x' 2. '#' flag of printf is not used 3. The exclusion from 1. are period-separated groups of numbers Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Stefan Hajno

[Qemu-devel] [PULL 5/9] coding_style: add point about 0x in trace-events

2017-08-01 Thread Stefan Hajnoczi
From: Vladimir Sementsov-Ogievskiy Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake Message-id: 20170731160135.12101-2-vsement...@virtuozzo.com Signed-off-by: Stefan Hajnoczi --- CODING_STYLE | 35 +++ 1 file changed, 35 insertions(+) diff -

[Qemu-devel] [PULL 8/9] trace-events: fix code style: print 0x before hex numbers

2017-08-01 Thread Stefan Hajnoczi
From: Vladimir Sementsov-Ogievskiy The only exception are groups of numers separated by symbols '.', ' ', ':', '/', like 'ab.09.7d'. This patch is made by the following: > find . -name trace-events | xargs python script.py where script.py is the following python script: ===

Re: [Qemu-devel] [PATCH v3 2/3] pci: add QEMU-specific PCI capability structure

2017-08-01 Thread Marcel Apfelbaum
On 31/07/2017 22:01, Alexander Bezzubikov wrote: 2017-07-31 21:57 GMT+03:00 Michael S. Tsirkin : On Mon, Jul 31, 2017 at 09:54:55PM +0300, Alexander Bezzubikov wrote: 2017-07-31 17:09 GMT+03:00 Marcel Apfelbaum : On 31/07/2017 17:00, Michael S. Tsirkin wrote: On Sat, Jul 29, 2017 at 02:34:31

Re: [Qemu-devel] [Qemu-block] [PATCH] block: check BlockDriverState object before dereference

2017-08-01 Thread Kevin Wolf
Am 01.08.2017 um 10:35 hat Paolo Bonzini geschrieben: > On 01/08/2017 02:14, John Snow wrote: > > I may need some nudging towards understanding what the right solution > > here is, though. Should the blk_aio_flush assume that there always is a > > root BDS? should it not assume that? > > I think b

Re: [Qemu-devel] [PULL 0/9] Tracing patches

2017-08-01 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Subject: [Qemu-devel] [PULL 0/9] Tracing patches Message-id: 20170801131618.27332-1-stefa...@redhat.com Type: series === TEST SCRIPT BEGIN === #!/bin/bash BASE=base n=1 total=$(git log --oneline $BA

Re: [Qemu-devel] [PATCH 00/13] instrument: Add basic event instrumentation

2017-08-01 Thread Stefan Hajnoczi
On Fri, Jul 28, 2017 at 07:05:43PM +0300, Lluís Vilanova wrote: > Daniel P Berrange writes: > > > On Fri, Jul 28, 2017 at 02:41:19PM +0100, Peter Maydell wrote: > >> On 28 July 2017 at 14:34, Stefan Hajnoczi wrote: > >> > Lluís/Peter: What are the requirements for instrumentation code > >> > inte

[Qemu-devel] [PATCH 2/3] block: skip implicit nodes in snapshots, blockjobs

2017-08-01 Thread Manos Pitsidianakis
Implicit filter nodes added at the top of nodes can interfere with block jobs. This is not a problem when they are added by other jobs since adding another job will issue a QERR_DEVICE_IN_USE, but it can happen in the next commit which introduces an implicitly created throttle filter node below Blo

Re: [Qemu-devel] [RFC v5 0/8] ARM SMMUv3 Emulation Support

2017-08-01 Thread Tomasz Nowicki
Hi Eric, Just letting you know that I am facing another issue with the following setup: 1. host (4.12 kernel & 64K page) and VM (4.12 kernel & 64K page) 2. QEMU + -netdev type=tap,ifname=tap,id=net0 -device virtio-net-pci,netdev=net0,iommu_platform,disable-modern=off,disable-legacy=on 2. On V

[Qemu-devel] [PATCH 1/3] block: add options parameter to bdrv_new_open_driver()

2017-08-01 Thread Manos Pitsidianakis
Allow passing a QDict *options parameter to bdrv_new_open_driver() so that it can be used if a driver needs it upon creation. The previous behaviour (empty bs->options and bs->explicit_options) remains when options is NULL. Signed-off-by: Manos Pitsidianakis --- block.c | 16 ++

[Qemu-devel] [PATCH 0/3] block: remove legacy I/O throttling

2017-08-01 Thread Manos Pitsidianakis
This series depends on my other series 'add throttle block driver filter' currently on v3, which as the name suggests adds a throttle filter driver. Replacing the current I/O interface means the user will use the same options as before and QEMU will create a hidden throttle filter node beneath the

Re: [Qemu-devel] [RFC] block-insert-node and block-job-delete

2017-08-01 Thread Kevin Wolf
Am 31.07.2017 um 19:30 hat Manos Pitsidianakis geschrieben: > On Fri, Jul 28, 2017 at 02:08:43PM +0200, Kevin Wolf wrote: > > Am 27.07.2017 um 12:07 hat Stefan Hajnoczi geschrieben: > > > On Wed, Jul 26, 2017 at 09:23:20PM +0300, Manos Pitsidianakis wrote: > > > > On Wed, Jul 26, 2017 at 04:12:21PM

Re: [Qemu-devel] [PATCH 00/13] instrument: Add basic event instrumentation

2017-08-01 Thread Peter Maydell
On 1 August 2017 at 14:48, Stefan Hajnoczi wrote: > Thanks for sharing the requirements. A stable API is necessary for > providing these features. > > We're essentially talking about libqemu. That means QEMU in library > form with an API for JIT engine, reverse engineering, instrumentation, > et

[Qemu-devel] [PATCH 3/3] block: remove legacy I/O throttling

2017-08-01 Thread Manos Pitsidianakis
This commit removes all I/O throttling from block/block-backend.c. In order to support the existing interface, it is changed to use the block/throttle.c filter driver. The throttle filter node that is created by the legacy interface is stored in a 'throttle_node' field in the BlockBackendPublic of

Re: [Qemu-devel] [RFC] block-insert-node and block-job-delete

2017-08-01 Thread Manos Pitsidianakis
On Tue, Aug 01, 2017 at 03:50:36PM +0200, Kevin Wolf wrote: Am 31.07.2017 um 19:30 hat Manos Pitsidianakis geschrieben: On Fri, Jul 28, 2017 at 02:08:43PM +0200, Kevin Wolf wrote: > Am 27.07.2017 um 12:07 hat Stefan Hajnoczi geschrieben: > > On Wed, Jul 26, 2017 at 09:23:20PM +0300, Manos Pitsid

Re: [Qemu-devel] Cleaning up handling of CPU exceptions accessing non-existent memory/devices

2017-08-01 Thread Richard Henderson
On 08/01/2017 03:50 AM, Peter Maydell wrote: Does this seem like a good plan? Seems reasonable to me. I'll warn you ahead of time that Alpha raises a machine-check exception for all of these, which qemu will dutifully raise. But I never filled in those bits in the rom; the machine-check ent

Re: [Qemu-devel] How to make ELF headers/symbol sections available for multiboot?

2017-08-01 Thread Kevin Wolf
Am 31.07.2017 um 19:21 hat Anatol Pomozov geschrieben: > ELF sections info is needed for an OS to map address space properly. > > I do not know much about production-grade OS but multiboot protocol is > quite popular among newly created and hobby OS. Multiboot provide some > useful information tha

Re: [Qemu-devel] [PATCH v3 07/12] qtest: Add a new helper qmp_cmd() and friends

2017-08-01 Thread Eric Blake
On 08/01/2017 12:48 AM, Markus Armbruster wrote: >> Hmm. What if we assert that qobject_from_jsonf() can never fail halfway >> through? > I don't buy the "primarily for the testsuite argument". It's for > whatever finds it useful. Safer than formatting the JSON text (no JSON > injection accide

[Qemu-devel] [PATCH v4 04/15] block: treat BDRV_REQ_ALLOCATE as serialising

2017-08-01 Thread Anton Nefedov
The idea is that ALLOCATE requests may overlap with other requests. Reuse the existing block layer infrastructure for serialising requests. Use the following approach: - mark ALLOCATE serialising, so subsequent requests to the area wait - ALLOCATE request itself must never wait if another reque

[Qemu-devel] [PATCH v4 09/15] qcow2: truncate preallocated space

2017-08-01 Thread Anton Nefedov
From: "Denis V. Lunev" This could be done after calculation of the end of data and metadata in the qcow2 image. Signed-off-by: Denis V. Lunev Signed-off-by: Anton Nefedov --- block/qcow2.h | 3 +++ block/qcow2-cluster.c | 9 + block/qcow2-refcount.c | 7 +++ block/qcow2.

[Qemu-devel] [PATCH v4 00/15] qcow2: space preallocation and COW improvements

2017-08-01 Thread Anton Nefedov
Changes in v4: - rebased on top of Eric's series [PATCH v2 00/20] add byte-based block_status driver callbacks http://lists.nongnu.org/archive/html/qemu-devel/2017-07/msg04370.html - patch 5 fixed to compile without CONFIG_FALLOCATE and support BDRV_REQ_ALLOCATE with xfsctl enable

[Qemu-devel] [PATCH v4 01/15] mirror: inherit supported write/zero flags

2017-08-01 Thread Anton Nefedov
Signed-off-by: Anton Nefedov --- block/mirror.c | 5 + 1 file changed, 5 insertions(+) diff --git a/block/mirror.c b/block/mirror.c index d46dace..7e539f1 100644 --- a/block/mirror.c +++ b/block/mirror.c @@ -1056,6 +1056,11 @@ static void bdrv_mirror_top_refresh_filename(BlockDriverState *b

  1   2   3   >