[Qemu-devel] [PATCH v2] ipmi: add SET_SENSOR_READING command

2017-04-12 Thread Cédric Le Goater
SET_SENSOR_READING is a complex IPMI command (see IPMI spec 35.17) which enables the host software to set the reading value and the event status of sensors supporting it. Below is a proposal for all the operations (reading, assert, deassert, event data) with the following limitations : - No even

[Qemu-devel] [PATCH] pci: Don't call pci_irq_handler() for a negative intx

2017-04-12 Thread Cédric Le Goater
From: Benjamin Herrenschmidt Under some circumstances, pci_intx() can return -1 (when the interrupt pin in the config space is 0 which normally means no interrupt). I have seen cases of pci_set_irq() being called on such devices, in turn causing pci_irq_handler() to be called with "-1" as an arg

Re: [Qemu-devel] [RFC 2/2] spec/vhost-user spec: Add IOMMU support

2017-04-12 Thread Peter Xu
On Tue, Apr 11, 2017 at 05:16:19PM +0200, Maxime Coquelin wrote: > On 04/11/2017 03:20 PM, Peter Xu wrote: > >On Tue, Apr 11, 2017 at 12:10:02PM +0200, Maxime Coquelin wrote: [...] > > > >>+slave is expected to reply with a zero payload, non-zero otherwise. > > > >Is this ack mechanism really nec

Re: [Qemu-devel] [RFC 2/2] spec/vhost-user spec: Add IOMMU support

2017-04-12 Thread Maxime Coquelin
On 04/12/2017 09:17 AM, Peter Xu wrote: On Tue, Apr 11, 2017 at 05:16:19PM +0200, Maxime Coquelin wrote: On 04/11/2017 03:20 PM, Peter Xu wrote: On Tue, Apr 11, 2017 at 12:10:02PM +0200, Maxime Coquelin wrote: [...] +slave is expected to reply with a zero payload, non-zero otherwise.

Re: [Qemu-devel] [RFC 2/2] spec/vhost-user spec: Add IOMMU support

2017-04-12 Thread Peter Xu
On Wed, Apr 12, 2017 at 09:24:47AM +0200, Maxime Coquelin wrote: > > > On 04/12/2017 09:17 AM, Peter Xu wrote: > >On Tue, Apr 11, 2017 at 05:16:19PM +0200, Maxime Coquelin wrote: > >>On 04/11/2017 03:20 PM, Peter Xu wrote: > >>>On Tue, Apr 11, 2017 at 12:10:02PM +0200, Maxime Coquelin wrote: > >

[Qemu-devel] [Bug 1681439] Re: qemu-system-x86_64: hw/ide/core.c:685: ide_cancel_dma_sync: Assertion `s->bus->dma->aiocb == NULL' failed.

2017-04-12 Thread Michał Kępień via Qemu-devel
> > ide_cancel_dma_sync() is also invoked from bmdma_cmd_writeb() and this > > is in fact the code path taken when the assertion fails. > > > > Yep, I wonder why your guest is trying to cancel DMA, though? Something > else is probably going wrong first. Beats me. > Can you compile QEMU from a b

Re: [Qemu-devel] [Qemu-ppc] [PATCH 21/21] ppc/pnv: Create a default PCI layout

2017-04-12 Thread Andrea Bolognani
On Tue, 2017-04-11 at 18:50 +0200, Cédric Le Goater wrote: > > These bridges and devices are not added when -nodefaults > > is in use, right? >  > I haven't checked that yet but I will. Thanks. This is very important for libvirt, where we need to have full control of the guest's hardware. --  And

Re: [Qemu-devel] [PATCH v11 1/2] block/vxhs.c: Add support for a new block device type called "vxhs"

2017-04-12 Thread ashish mittal
On Tue, Apr 11, 2017 at 12:47 PM, Jeff Cody wrote: > On Mon, Apr 03, 2017 at 08:48:08PM -0700, Ashish Mittal wrote: >> Source code for the qnio library that this code loads can be downloaded from: >> https://github.com/VeritasHyperScale/libqnio.git >> >> Sample command line using JSON syntax: >> .

[Qemu-devel] [PATCH] spapr-cpu-core: Release ICPState object during CPU unrealization

2017-04-12 Thread Bharata B Rao
Recent commits that re-organized ICPState object missed to destroy the object when CPU is unrealized. Fix this so that CPU unplug doesn't abort QEMU. Signed-off-by: Bharata B Rao --- hw/ppc/spapr_cpu_core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/ppc/spapr_cpu_core.c b/hw/ppc/spap

Re: [Qemu-devel] [RFC/BUG] xen-mapcache: buggy invalidate map cache?

2017-04-12 Thread Herongguang (Stephen)
On 2017/4/12 6:32, Stefano Stabellini wrote: On Tue, 11 Apr 2017, hrg wrote: On Tue, Apr 11, 2017 at 3:50 AM, Stefano Stabellini wrote: On Mon, 10 Apr 2017, Stefano Stabellini wrote: On Mon, 10 Apr 2017, hrg wrote: On Sun, Apr 9, 2017 at 11:55 PM, hrg wrote: On Sun, Apr 9, 2017 at 11:52

Re: [Qemu-devel] [PATCH] spapr-cpu-core: Release ICPState object during CPU unrealization

2017-04-12 Thread Bharata B Rao
This should be considered for ppc-for-2.10 branch of dwg's tree. On Wed, Apr 12, 2017 at 01:45:07PM +0530, Bharata B Rao wrote: > Recent commits that re-organized ICPState object missed to destroy > the object when CPU is unrealized. Fix this so that CPU unplug > doesn't abort QEMU. > > Signed-of

Re: [Qemu-devel] [Xen-devel] [RFC/BUG] xen-mapcache: buggy invalidate map cache?

2017-04-12 Thread Herongguang (Stephen)
On 2017/4/12 14:17, Alexey G wrote: On Tue, 11 Apr 2017 15:32:09 -0700 (PDT) Stefano Stabellini wrote: On Tue, 11 Apr 2017, hrg wrote: On Tue, Apr 11, 2017 at 3:50 AM, Stefano Stabellini wrote: On Mon, 10 Apr 2017, Stefano Stabellini wrote: On Mon, 10 Apr 2017, hrg wrote: On Sun, Apr 9,

Re: [Qemu-devel] [Qemu-block] Making QMP 'block-job-cancel' transactionable

2017-04-12 Thread Fam Zheng
On Tue, 04/11 15:30, Kevin Wolf wrote: > Am 11.04.2017 um 15:14 hat Eric Blake geschrieben: > > On 04/11/2017 07:05 AM, Kevin Wolf wrote: > > > Note that job completion/cancellation aren't synchronous QMP commands. > > > The job works something like this, where '...' means that the VM can run > > >

Re: [Qemu-devel] [PATCH] spapr-cpu-core: Release ICPState object during CPU unrealization

2017-04-12 Thread Cédric Le Goater
On 04/12/2017 10:15 AM, Bharata B Rao wrote: > Recent commits that re-organized ICPState object missed to destroy > the object when CPU is unrealized. Fix this so that CPU unplug > doesn't abort QEMU. Indeed. > Signed-off-by: Bharata B Rao I am wondering if we should not be doing the unparent u

Re: [Qemu-devel] [PATCH] spapr-cpu-core: Release ICPState object during CPU unrealization

2017-04-12 Thread Bharata B Rao
On Wed, Apr 12, 2017 at 10:47:39AM +0200, Cédric Le Goater wrote: > On 04/12/2017 10:15 AM, Bharata B Rao wrote: > > Recent commits that re-organized ICPState object missed to destroy > > the object when CPU is unrealized. Fix this so that CPU unplug > > doesn't abort QEMU. > > Indeed. > > > Sign

Re: [Qemu-devel] [RFC 2/2] spec/vhost-user spec: Add IOMMU support

2017-04-12 Thread Jason Wang
On 2017年04月12日 15:17, Peter Xu wrote: On Tue, Apr 11, 2017 at 05:16:19PM +0200, Maxime Coquelin wrote: On 04/11/2017 03:20 PM, Peter Xu wrote: On Tue, Apr 11, 2017 at 12:10:02PM +0200, Maxime Coquelin wrote: [...] +slave is expected to reply with a zero payload, non-zero otherwise. Is thi

Re: [Qemu-devel] [Qemu-block] Making QMP 'block-job-cancel' transactionable

2017-04-12 Thread Kevin Wolf
Am 12.04.2017 um 10:42 hat Fam Zheng geschrieben: > On Tue, 04/11 15:30, Kevin Wolf wrote: > > Am 11.04.2017 um 15:14 hat Eric Blake geschrieben: > > > On 04/11/2017 07:05 AM, Kevin Wolf wrote: > > > > Note that job completion/cancellation aren't synchronous QMP commands. > > > > The job works some

Re: [Qemu-devel] [RFC 2/2] spec/vhost-user spec: Add IOMMU support

2017-04-12 Thread Jason Wang
On 2017年04月12日 15:24, Maxime Coquelin wrote: On 04/12/2017 09:17 AM, Peter Xu wrote: On Tue, Apr 11, 2017 at 05:16:19PM +0200, Maxime Coquelin wrote: On 04/11/2017 03:20 PM, Peter Xu wrote: On Tue, Apr 11, 2017 at 12:10:02PM +0200, Maxime Coquelin wrote: [...] +slave is expected to r

Re: [Qemu-devel] [Qemu-ppc] [PATCH 21/21] ppc/pnv: Create a default PCI layout

2017-04-12 Thread Cédric Le Goater
On 04/12/2017 10:02 AM, Andrea Bolognani wrote: > On Tue, 2017-04-11 at 18:50 +0200, Cédric Le Goater wrote: >>> These bridges and devices are not added when -nodefaults >>> is in use, right? >> >> I haven't checked that yet but I will. > > Thanks. This is very important for libvirt, where we ne

Re: [Qemu-devel] [PATCH] spapr-cpu-core: Release ICPState object during CPU unrealization

2017-04-12 Thread Cédric Le Goater
On 04/12/2017 10:53 AM, Bharata B Rao wrote: > On Wed, Apr 12, 2017 at 10:47:39AM +0200, Cédric Le Goater wrote: >> On 04/12/2017 10:15 AM, Bharata B Rao wrote: >>> Recent commits that re-organized ICPState object missed to destroy >>> the object when CPU is unrealized. Fix this so that CPU unplug

Re: [Qemu-devel] [PATCH] tests/check-qdict: Fix missing brackets

2017-04-12 Thread Markus Armbruster
"Dr. David Alan Gilbert (git)" writes: > From: "Dr. David Alan Gilbert" > > Gcc 7 (on Fedora 26) spotted odd use of integers instead of a > boolean; it's got a point. > > Signed-off-by: Dr. David Alan Gilbert > --- > tests/check-qdict.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >

Re: [Qemu-devel] [Qemu-block] Making QMP 'block-job-cancel' transactionable

2017-04-12 Thread Fam Zheng
On Wed, 04/12 10:59, Kevin Wolf wrote: > Am 12.04.2017 um 10:42 hat Fam Zheng geschrieben: > > On Tue, 04/11 15:30, Kevin Wolf wrote: > > > Am 11.04.2017 um 15:14 hat Eric Blake geschrieben: > > > > On 04/11/2017 07:05 AM, Kevin Wolf wrote: > > > > > Note that job completion/cancellation aren't syn

[Qemu-devel] migrate -b problems

2017-04-12 Thread Kevin Wolf
Hi all, after getting assertion failure reports for block migration in the last minute, we just hacked around it by commenting out op blocker assertions for the 2.9 release, but now we need to see how to fix things properly. Luckily, get_maintainer.pl doesn't report me, but only you. :-) The main

Re: [Qemu-devel] [RFC 2/2] spec/vhost-user spec: Add IOMMU support

2017-04-12 Thread Peter Xu
On Wed, Apr 12, 2017 at 04:54:25PM +0800, Jason Wang wrote: > > > On 2017年04月12日 15:17, Peter Xu wrote: > >On Tue, Apr 11, 2017 at 05:16:19PM +0200, Maxime Coquelin wrote: > >>On 04/11/2017 03:20 PM, Peter Xu wrote: > >>>On Tue, Apr 11, 2017 at 12:10:02PM +0200, Maxime Coquelin wrote: > >[...] >

Re: [Qemu-devel] Fw: First contribution - Interested in Outreachy

2017-04-12 Thread Alberto Garcia
On Tue 11 Apr 2017 06:44:33 PM CEST, Prerna Garg wrote: > I am having difficulties sending the email through command line. So as > a last resort I am sending the patch as an attachment. Hi! what is the exact problem? Once you commit your patch, can you export it correctly to a file using "git fo

Re: [Qemu-devel] [PATCH v9 01/13] qcow2: Unallocate unmapped zero clusters if no backing file

2017-04-12 Thread Kevin Wolf
Am 11.04.2017 um 03:17 hat Eric Blake geschrieben: > 'qemu-img map' already coalesces information about unallocated > clusters (those with status 0) and pure zero clusters (those > with status BDRV_BLOCK_ZERO and no offset). Furthermore, all > qcow2 images with no backing file already report all u

Re: [Qemu-devel] migrate -b problems

2017-04-12 Thread 858585 jemmy
it this bug? https://bugs.launchpad.net/qemu/+bug/1681688 On Wed, Apr 12, 2017 at 5:18 PM, Kevin Wolf wrote: > Hi all, > > after getting assertion failure reports for block migration in the last > minute, we just hacked around it by commenting out op blocker assertions > for the 2.9 release, but

[Qemu-devel] [PATCH 0/5] mc146818rtc: fix Windows VM clock faster

2017-04-12 Thread guangrong . xiao
From: Xiao Guangrong We noticed that the clock on some windows VMs, e.g, Window7 and window8 is really faster and the issue can be easily reproduced by staring the VM with '-rtc base=localtime,clock=vm,driftfix=slew -no-hpet' and running attached code in the guest The root cause is that the clo

[Qemu-devel] [PATCH 3/5] mc146818rtc: properly count the time for the next interrupt

2017-04-12 Thread guangrong . xiao
From: Tai Yunfang If periodic_timer_update() is called due to RegA reconfiguration, i.e, the period is updated, current time is not the start point for the next periodic timer, instead, which should start from the last interrupt, otherwise, the clock in VM will become slow This patch takes the c

[Qemu-devel] [PATCH 1/5] mc146818rtc: update periodic timer only if it is needed

2017-04-12 Thread guangrong . xiao
From: Xiao Guangrong Currently, the timer is updated whenever RegA or RegB is written even if the periodic timer related configuration is not changed This patch optimizes it slightly to make the update happen only if its period or enable-status is changed, also later patches are depend on this o

[Qemu-devel] [PATCH 4/5] mc146818rtc: move x86 specific code out of periodic_timer_update

2017-04-12 Thread guangrong . xiao
From: Xiao Guangrong Move the x86 specific code in periodic_timer_update() to a common place, the actual logic is not changed Signed-off-by: Xiao Guangrong --- hw/timer/mc146818rtc.c | 112 + 1 file changed, 66 insertions(+), 46 deletions(-) dif

[Qemu-devel] [PATCH 5/5] mc146818rtc: embrace all x86 specific code

2017-04-12 Thread guangrong . xiao
From: Xiao Guangrong This patch introduces proper hooks in the common code then moves x86 specific code into a single '#ifdef TARGET_I386' The real logic is not touched Signed-off-by: Xiao Guangrong --- hw/timer/mc146818rtc.c | 197 ++--- 1 file cha

Re: [Qemu-devel] [PATCH v4] migration/block: use blk_pwrite_zeroes for each zero cluster

2017-04-12 Thread Stefan Hajnoczi
On Wed, Apr 12, 2017 at 09:51:23AM +0800, 858585 jemmy wrote: > On Wed, Apr 12, 2017 at 9:27 AM, 858585 jemmy wrote: > > On Tue, Apr 11, 2017 at 11:59 PM, Stefan Hajnoczi > > wrote: > >> On Tue, Apr 11, 2017 at 08:05:12PM +0800, jemmy858...@gmail.com wrote: > >>> From: Lidong Chen > >>> > >>> B

[Qemu-devel] [PATCH 2/5] mc146818rtc: fix clock lost after scaling coalesced irq

2017-04-12 Thread guangrong . xiao
From: Xiao Guangrong If the period is changed by re-configuring RegA, the coalesced irq will be scaled to reflect the new period, however, it calculates the new interrupt number like this: s->irq_coalesced = (s->irq_coalesced * s->period) / period; There are some clocks will be lost if they

Re: [Qemu-devel] [PATCH 2/2] virtio-rng: stop virtqueue while the CPU is stopped

2017-04-12 Thread Stefan Hajnoczi
On Tue, Apr 11, 2017 at 07:42:02PM +0200, Laurent Vivier wrote: > On 11/04/2017 19:02, Stefan Hajnoczi wrote: > > On Tue, Apr 11, 2017 at 03:17:33PM +0200, Laurent Vivier wrote: > >> diff --git a/hw/virtio/virtio-rng.c b/hw/virtio/virtio-rng.c > >> index 9639f4e..d270d56 100644 > >> --- a/hw/virtio

Re: [Qemu-devel] [PATCH 00/10] TCG optimizations for 2.10

2017-04-12 Thread Alex Bennée
Emilio G. Cota writes: > Hi all, > > This series is aimed at 2.10 or beyond. Its goal is to improve > TCG performance by optimizing: > > 1- Cross-page direct jumps (softmmu only, obviously). Patches 1-4. > 2- Indirect branches (softmmu and user-mode). Patches 5-9. > 3- tb_jmp_cache hashing in us

Re: [Qemu-devel] [PATCH] Changed malloc and free to g_malloc and g_free in util/envlist.c

2017-04-12 Thread Stefan Hajnoczi
Hi Prerna, Saurav Sachidanand recently sent a patch to do the same thing: https://patchwork.ozlabs.org/patch/741100/ Unfortunately it looks like this is duplicated work. Saurav's patch will probably be merged since it's already been through review. The BiteSizedTasks page advises: "Before star

Re: [Qemu-devel] [PATCH] qemu-img: simplify img_convert

2017-04-12 Thread Kevin Wolf
Am 28.02.2017 um 14:35 hat Peter Lieven geschrieben: > img_convert has been around before there was an ImgConvertState or > a block backend, but it has never been modified to directly use > these structs. Change this by parsing parameters directly into > the ImgConvertState and directly use BlockBa

Re: [Qemu-devel] [PATCH] Changed malloc and free to g_malloc and g_free in util/compatfd.c file

2017-04-12 Thread Stefan Hajnoczi
On Tue, Apr 11, 2017 at 08:04:43PM +, Prerna Garg wrote: > From 9e25fdf1ea3e4f52a72bfefc053a701989b7af24 Mon Sep 17 00:00:00 2001 > From: Prerna Garg > Date: Wed, 12 Apr 2017 01:29:40 +0530 Please resend using git-send-email(1) so that email is properly formatted for git-am(1) and other tools

[Qemu-devel] [Bug 1682093] [NEW] aarch64-softmmu "bad ram pointer" crash

2017-04-12 Thread Harry Wagstaff
Public bug reported: I am developing a piece of software called SimBench which is a benchmarking system for full system simulators. I am currently porting this to aarch64, using QEMU as a test platform. I have encountered a 'bad ram pointer' crash. I've attempted to build a minimum test case, but

Re: [Qemu-devel] [PATCH] event: Add signal information to SHUTDOWN

2017-04-12 Thread Markus Armbruster
Eric Blake writes: > qemu_kill_report() is already able to tell whether a shutdown > was triggered by guest action (no output) or by a host signal > (a message about termination is printed via error_report); but > this information is then lost. Libvirt would like to be able > to distinguish betw

Re: [Qemu-devel] [PATCH] event: Add signal information to SHUTDOWN

2017-04-12 Thread Daniel P. Berrange
On Wed, Apr 12, 2017 at 01:02:02PM +0200, Markus Armbruster wrote: > Eric Blake writes: > > > qemu_kill_report() is already able to tell whether a shutdown > > was triggered by guest action (no output) or by a host signal > > (a message about termination is printed via error_report); but > > this

[Qemu-devel] [PATCH] QEMU Guest Agent: Add an interface to determine guest os type

2017-04-12 Thread Huang Yong
vm management tools (e.g.libvirt) may tell if guest os is linux or windows, so they can design a customized application accordingly, we suggest to add an interface (guest-ostype) in QEMU. Signed-off-by: Huang Yong --- qga/commands-posix.c | 10 ++ qga/commands-win32.c | 10 ++ qg

Re: [Qemu-devel] [PATCH] test-keyval: fix leaks

2017-04-12 Thread Markus Armbruster
Marc-André Lureau writes: > Signed-off-by: Marc-André Lureau > --- > tests/test-keyval.c | 4 > 1 file changed, 4 insertions(+) > > diff --git a/tests/test-keyval.c b/tests/test-keyval.c > index ba19560a22..141ee5d0c4 100644 > --- a/tests/test-keyval.c > +++ b/tests/test-keyval.c > @@ -628

Re: [Qemu-devel] [PATCH] QEMU Guest Agent: Add an interface to determine guest os type

2017-04-12 Thread Marc-André Lureau
Hi On Wed, Apr 12, 2017 at 1:12 PM Huang Yong wrote: > vm management tools (e.g.libvirt) may tell if guest os is linux or windows, > so they can design a customized application accordingly, we suggest to add > an interface (guest-ostype) in QEMU. > This proposal is probably redundant with "qemu

Re: [Qemu-devel] [PATCH] QEMU Guest Agent: Add an interface to determine guest os type

2017-04-12 Thread Vinzenz Feenstra
> On Apr 12, 2017, at 1:28 PM, Marc-André Lureau > wrote: > > Hi > > On Wed, Apr 12, 2017 at 1:12 PM Huang Yong > wrote: > vm management tools (e.g.libvirt) may tell if guest os is linux or windows, > so they can design a customized application accordingly, we su

[Qemu-devel] help for code

2017-04-12 Thread ali saeedi
Hi I am new in qemu vm live migration. why we have this condition "current_time >= initial_time + BUFFER_DELAY" in qemu? thanks

[Qemu-devel] [PATCH] colo-compare: Fix old packet check bug.

2017-04-12 Thread Zhang Chen
If colo-compare find one old packet,we can notify colo-frame do checkpoint, no need continue find more old packet here. Signed-off-by: Zhang Chen --- net/colo-compare.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/net/colo-compare.c b/net/colo-compare.c in

Re: [Qemu-devel] [PATCH v11 1/2] block/vxhs.c: Add support for a new block device type called "vxhs"

2017-04-12 Thread Jeff Cody
On Wed, Apr 12, 2017 at 01:10:10AM -0700, ashish mittal wrote: > On Tue, Apr 11, 2017 at 12:47 PM, Jeff Cody wrote: > > On Mon, Apr 03, 2017 at 08:48:08PM -0700, Ashish Mittal wrote: > >> Source code for the qnio library that this code loads can be downloaded > >> from: > >> https://github.com/Ve

Re: [Qemu-devel] [Qemu-block] [RFC] Proposed qcow2 extension: subcluster allocation

2017-04-12 Thread Alberto Garcia
On Tue 11 Apr 2017 04:45:29 PM CEST, Eric Blake wrote: > (We could even get one more bit if we had a subcluster-flag, > because I guess we can always assume subclustered clusters to have > OFLAG_COPIED and be uncompressed. But still, three bits missing.) Why can we always assu

Re: [Qemu-devel] [RFC] Proposed qcow2 extension: subcluster allocation

2017-04-12 Thread Alberto Garcia
On Tue 11 Apr 2017 04:49:21 PM CEST, Kevin Wolf wrote: >> >>> (We could even get one more bit if we had a subcluster-flag, because I >> >>> guess we can always assume subclustered clusters to have OFLAG_COPIED >> >>> and be uncompressed. But still, three bits missing.) >> >> >> >> Why can we alway

Re: [Qemu-devel] [PATCH v4 05/13] qobject: Drop useless QObject casts

2017-04-12 Thread Alberto Garcia
On Tue 11 Apr 2017 08:50:26 PM CEST, Eric Blake wrote: > We have macros in place to make it less verbose to add a subtype > of QObject to both QDict and QList. While we have made cleanups > like this in the past (see commit fcfcd8ffc, for example), having > it be automated by Coccinelle makes it ea

[Qemu-devel] [PATCH v5] migration/block: use blk_pwrite_zeroes for each zero cluster

2017-04-12 Thread jemmy858585
From: Lidong Chen BLOCK_SIZE is (1 << 20), qcow2 cluster size is 65536 by default, this maybe cause the qcow2 file size is bigger after migration. This patch check each cluster, use blk_pwrite_zeroes for each zero cluster. Signed-off-by: Lidong Chen --- migration/block.c | 35 +

Re: [Qemu-devel] [PATCH v4 07/13] block: Use simpler QDict/QList scalar insertion macros

2017-04-12 Thread Alberto Garcia
On Tue 11 Apr 2017 08:50:28 PM CEST, Eric Blake wrote: > We now have macros in place to make it less verbose to add a scalar > to QDict and QList, so use them. > > Patch created mechanically via: > spatch --sp-file scripts/coccinelle/qobject.cocci \ > --macro-file scripts/cocci-macro-file.h -

Re: [Qemu-devel] [PATCH] event: Add signal information to SHUTDOWN

2017-04-12 Thread Eric Blake
On 04/12/2017 06:02 AM, Markus Armbruster wrote: > Eric Blake writes: > >> qemu_kill_report() is already able to tell whether a shutdown >> was triggered by guest action (no output) or by a host signal >> (a message about termination is printed via error_report); but >> this information is then l

Re: [Qemu-devel] [PATCH v4 06/13] qobject: Add helper macros for common scalar insertions

2017-04-12 Thread Eric Blake
On 04/12/2017 01:40 AM, Markus Armbruster wrote: > Eric Blake writes: > >> Rather than making lots of callers wrap a scalar in a QInt, QString, >> or QBool, provide helper macros that do the wrapping automatically. >> >> Update the Coccinelle script to make mass conversions easy, although >> the

Re: [Qemu-devel] [PATCH for-2.9?] block/io: Comment out permission assertions

2017-04-12 Thread Kevin Wolf
Am 11.04.2017 um 17:07 hat Laurent Vivier geschrieben: > On 11/04/2017 16:58, Kevin Wolf wrote: > > Am 11.04.2017 um 16:50 hat Max Reitz geschrieben: > >> In case of block migration, there may be writes to BlockBackends that do > >> not have the write permission taken. Before this issue is fixed (w

Re: [Qemu-devel] [PATCH v4 07/13] block: Use simpler QDict/QList scalar insertion macros

2017-04-12 Thread Eric Blake
On 04/12/2017 01:52 AM, Markus Armbruster wrote: > Eric Blake writes: > >> We now have macros in place to make it less verbose to add a scalar >> to QDict and QList, so use them. >> >> Patch created mechanically via: >> spatch --sp-file scripts/coccinelle/qobject.cocci \ >> --macro-file scr

Re: [Qemu-devel] [PATCH v5] migration/block: use blk_pwrite_zeroes for each zero cluster

2017-04-12 Thread Eric Blake
On 04/12/2017 08:07 AM, jemmy858...@gmail.com wrote: > From: Lidong Chen > > BLOCK_SIZE is (1 << 20), qcow2 cluster size is 65536 by default, > this maybe cause the qcow2 file size is bigger after migration. s/maybe/may/ s/is bigger/to be bigger/ > This patch check each cluster, use blk_pwrite_

Re: [Qemu-devel] [PATCH for-2.9?] block/io: Comment out permission assertions

2017-04-12 Thread Laurent Vivier
On 12/04/2017 15:18, Kevin Wolf wrote: > Am 11.04.2017 um 17:07 hat Laurent Vivier geschrieben: >> On 11/04/2017 16:58, Kevin Wolf wrote: >>> Am 11.04.2017 um 16:50 hat Max Reitz geschrieben: In case of block migration, there may be writes to BlockBackends that do not have the write permi

[Qemu-devel] [Bug 1682128] [NEW] solaris can't power off

2017-04-12 Thread shan0923
Public bug reported: I have created solaris 10 VM on KVM. Everything in VM is running OK, but finally I use shell command ‘poweroff’ or ‘init 5’, the solaris VM system could’t be poweroff but with promoting me the message: perss any key to reboot ….. but on Xen, solaris can be powerofff ** Affec

Re: [Qemu-devel] [PATCH v9 01/13] qcow2: Unallocate unmapped zero clusters if no backing file

2017-04-12 Thread Eric Blake
On 04/12/2017 04:49 AM, Kevin Wolf wrote: > Am 11.04.2017 um 03:17 hat Eric Blake geschrieben: >> 'qemu-img map' already coalesces information about unallocated >> clusters (those with status 0) and pure zero clusters (those >> with status BDRV_BLOCK_ZERO and no offset). Furthermore, all >> qcow2

[Qemu-devel] sleeping in vm live migration code

2017-04-12 Thread ali saeedi
Hi why we have below code in vm live migration? * g_usleep((initial_time + BUFFER_DELAY - current_time)*1000);* thanks a lot

Re: [Qemu-devel] What's the next QEMU version after 2.9 ? (or: when is a good point in time to get rid of old interfaces)

2017-04-12 Thread Marc-André Lureau
Hi On Wed, Mar 8, 2017 at 12:20 PM Gerd Hoffmann wrote: > Hi, > > > libvirt suffered similar lack of clarity around when to bump major > version > > number as opposed to minor version. To address this we recently adopted > the > > rule[1] that major version number changes have no relation to f

Re: [Qemu-devel] [PATCH] event: Add signal information to SHUTDOWN

2017-04-12 Thread Markus Armbruster
Eric Blake writes: > On 04/12/2017 06:02 AM, Markus Armbruster wrote: >> Eric Blake writes: >> >>> qemu_kill_report() is already able to tell whether a shutdown >>> was triggered by guest action (no output) or by a host signal >>> (a message about termination is printed via error_report); but >

[Qemu-devel] [PATCH v2 0/2] migration: fix virtio-rng

2017-04-12 Thread Laurent Vivier
When post-copy migration is enabled, the destination guest can ask for memory from the source when the vmstate is restored. In the case of virtio, a part of the virtqueue is migrated by the vmstate structure (last_avail_idx) another part is migrated inside the RAM (used_idx). On the source side, t

[Qemu-devel] [PATCH v2 1/2] migration: don't close a file descriptor while it can be in use

2017-04-12 Thread Laurent Vivier
If we close the QEMUFile descriptor in process_incoming_migration_co() while it has been stopped by an error, the postcopy_ram_listen_thread() can try to continue to use it. And as the memory has been freed it is working with an invalid pointer and crashes. Fix this by releasing the memory after h

[Qemu-devel] [PATCH v2 2/2] virtio-rng: stop virtqueue while the CPU is stopped

2017-04-12 Thread Laurent Vivier
If we modify the virtio-rng virqueue while the vmstate is already migrated we can have some inconsistencies between the virtqueue state and the memory content. To avoid this, stop the virtqueue while the CPU is stopped. Signed-off-by: Laurent Vivier --- hw/virtio/trace-events | 3 +++

Re: [Qemu-devel] [PATCH] event: Add signal information to SHUTDOWN

2017-04-12 Thread Eric Blake
On 04/12/2017 08:52 AM, Markus Armbruster wrote: >>> In other words, these three signals are polite requests to terminate >>> QEMU. >>> >>> Stefan, are there equivalent requests under Windows? I guess there >>> might be one at least for SIGINT, namely whatever happens when you hit >>> ^C on the co

[Qemu-devel] [PATCH v4 2/6] replication: add shared-disk and shared-disk-id options

2017-04-12 Thread zhanghailiang
We use these two options to identify which disk is shared Signed-off-by: zhanghailiang Signed-off-by: Wen Congyang Signed-off-by: Zhang Chen --- v4: - Add proper comment for primary_disk (Stefan) v2: - Move g_free(s->shared_disk_id) to the common fail process place (Stefan) - Fix comments for t

[Qemu-devel] [PATCH v4 5/6] replication: Implement block replication for shared disk case

2017-04-12 Thread zhanghailiang
Just as the scenario of non-shared disk block replication, we are going to implement block replication from many basic blocks that are already in QEMU. The architecture is: virtio-blk || .-- /

[Qemu-devel] [PATCH v4 6/6] nbd/replication: implement .bdrv_get_info() for nbd and replication driver

2017-04-12 Thread zhanghailiang
Without this callback, there will be an error reports in the primary side: "qemu-system-x86_64: Couldn't determine the cluster size of the target image, which has no backing file: Operation not supported Aborting, since this may create an unusable destination image" For nbd driver, it doesn't have

[Qemu-devel] [PATCH v4 4/6] replication: fix code logic with the new shared_disk option

2017-04-12 Thread zhanghailiang
Some code logic only be needed in non-shared disk, here we adjust these codes to prepare for shared disk scenario. Reviewed-by: Stefan Hajnoczi Signed-off-by: zhanghailiang --- block/replication.c | 73 ++--- 1 file changed, 41 insertions(+), 32 d

[Qemu-devel] [PATCH v4 1/6] docs/block-replication: Add description for shared-disk case

2017-04-12 Thread zhanghailiang
Introuduce the scenario of shared-disk block replication and how to use it. Reviewed-by: Changlong Xie Reviewed-by: Stefan Hajnoczi Signed-off-by: zhanghailiang Signed-off-by: Wen Congyang Signed-off-by: Zhang Chen --- docs/block-replication.txt | 139

[Qemu-devel] [PATCH v4 3/6] replication: Split out backup_do_checkpoint() from secondary_do_checkpoint()

2017-04-12 Thread zhanghailiang
The helper backup_do_checkpoint() will be used for primary related codes. Here we split it out from secondary_do_checkpoint(). Besides, it is unnecessary to call backup_do_checkpoint() in replication starting and normally stop replication path. We only need call it while do real checkpointing. Re

Re: [Qemu-devel] What's the next QEMU version after 2.9 ? (or: when is a good point in time to get rid of old interfaces)

2017-04-12 Thread Gerd Hoffmann
Hi, > What about deprecating GTK 2.0 ? SDL (1.2 or all?) gtk2 + sdl1 makes sense. sdl2 proably has too many users to drop it. Not everybody prefers the gtk ui ... cheers, Gerd

[Qemu-devel] [PATCH v4 0/6] COLO block replication supports shared disk case

2017-04-12 Thread zhanghailiang
COLO block replication doesn't support the shared disk case, Here we try to implement it and this is the 4th version. Please review and any commits are welcomed. Cc: Dr. David Alan Gilbert (git) Cc: eddie.d...@intel.com v4: - Add proper comment for primary_disk in patch 2 (Stefan) - Call bdrv_i

Re: [Qemu-devel] [Qemu-block] [RFC] Proposed qcow2 extension: subcluster allocation

2017-04-12 Thread Max Reitz
On 12.04.2017 14:41, Alberto Garcia wrote: > On Tue 11 Apr 2017 04:45:29 PM CEST, Eric Blake wrote: >> (We could even get one more bit if we had a subcluster-flag, >> because I guess we can always assume subclustered clusters to have >> OFLAG_COPIED and be uncompressed. But still, three

Re: [Qemu-devel] [PATCH v4 2/6] replication: add shared-disk and shared-disk-id options

2017-04-12 Thread Eric Blake
On 04/12/2017 09:05 AM, zhanghailiang wrote: > We use these two options to identify which disk is > shared > > Signed-off-by: zhanghailiang > Signed-off-by: Wen Congyang > Signed-off-by: Zhang Chen > --- > v4: > - Add proper comment for primary_disk (Stefan) > v2: > - Move g_free(s->shared_disk

Re: [Qemu-devel] [PATCH] test-keyval: fix leaks

2017-04-12 Thread Marc-André Lureau
Hi On Wed, Apr 12, 2017 at 3:19 PM Markus Armbruster wrote: > Marc-André Lureau writes: > > > Signed-off-by: Marc-André Lureau > > --- > > tests/test-keyval.c | 4 > > 1 file changed, 4 insertions(+) > > > > diff --git a/tests/test-keyval.c b/tests/test-keyval.c > > index ba19560a22..141

Re: [Qemu-devel] [PATCH] event: Add signal information to SHUTDOWN

2017-04-12 Thread Markus Armbruster
Eric Blake writes: > On 04/12/2017 08:52 AM, Markus Armbruster wrote: In other words, these three signals are polite requests to terminate QEMU. Stefan, are there equivalent requests under Windows? I guess there might be one at least for SIGINT, namely whatever happens w

Re: [Qemu-devel] [PATCH v6] kvm: better MWAIT emulation for guests

2017-04-12 Thread Jim Mattson via Qemu-devel
Actually, we have rejected commit 87c00572ba05aa8c ("kvm: x86: emulate monitor and mwait instructions as nop"), so when we intercept MONITOR/MWAIT, we synthesize #UD. Perhaps it is this difference from vanilla kvm that motivates the following idea... Since we're still not going to report MONITOR s

[Qemu-devel] WinDbg module

2017-04-12 Thread Mihail Abakumov
Hello. We made the debugger module WinDbg (like GDB) for QEMU. This is the replacement of the remote stub in Windows kernel. Used for remote Windows kernel debugging without debugging mode. The latest build and instructions for the launch can be found here: https://github.com/ispras/qemu/rel

Re: [Qemu-devel] [PATCH] event: Add signal information to SHUTDOWN

2017-04-12 Thread Eric Blake
On 04/12/2017 09:33 AM, Markus Armbruster wrote: >>> Additional ways to terminate QEMU: HMP and QMP command "quit", and the >>> various GUI controls such "close SDL window". >> >> Good points. I have no idea what exit path those take (if they >> raise(SIGINT) internally, it's quite easy - but if t

Re: [Qemu-devel] [PATCH v6] kvm: better MWAIT emulation for guests

2017-04-12 Thread Alexander Graf
On 12.04.17 16:34, Jim Mattson wrote: Actually, we have rejected commit 87c00572ba05aa8c ("kvm: x86: emulate monitor and mwait instructions as nop"), so when we intercept MONITOR/MWAIT, we synthesize #UD. Perhaps it is this difference from vanilla kvm that motivates the following idea... So y

Re: [Qemu-devel] [PATCH] test-keyval: fix leaks

2017-04-12 Thread Markus Armbruster
Marc-André Lureau writes: > Hi > > On Wed, Apr 12, 2017 at 3:19 PM Markus Armbruster wrote: > >> Marc-André Lureau writes: >> >> > Signed-off-by: Marc-André Lureau >> > --- >> > tests/test-keyval.c | 4 >> > 1 file changed, 4 insertions(+) >> > >> > diff --git a/tests/test-keyval.c b/tes

Re: [Qemu-devel] [PATCH v2 1/4] Throttle: Create IOThrottle structure

2017-04-12 Thread Alberto Garcia
On Thu 30 Mar 2017 02:10:10 PM CEST, Pradeep Jagadeesh wrote: > +## > +# == QAPI IOThrottle definitions > +## > +# @IOThrottle: > +# > +# A set of parameters describing block > +# "describing block ..." ? There's missing text here. Berto

[Qemu-devel] [Bug 1682093] Re: aarch64-softmmu "bad ram pointer" crash

2017-04-12 Thread Harry Wagstaff
I've done some investigation and it appears that this bug is caused by the following: 1. The flash memory of the virt platform is initialised as a cfi.pflash01. It has a memory region with romd_mode = true and rom_device = true 2. Some code stored in the flash memory is executed. This causes the

Re: [Qemu-devel] vmbus bridge: machine property or device?

2017-04-12 Thread Markus Armbruster
Cc'ing a few more people who might have a reasoned opinion. Roman Kagan writes: > While hammering out the VMBus / storage series, we've been struggling to > figure out the best practices solution to the following problem: > > VMBus is provided by a vmbus bridge; it appears the most natural to ha

Re: [Qemu-devel] [PATCH v6] kvm: better MWAIT emulation for guests

2017-04-12 Thread Jim Mattson via Qemu-devel
On Wed, Apr 12, 2017 at 7:54 AM, Alexander Graf wrote: > > > On 12.04.17 16:34, Jim Mattson wrote: >> >> Actually, we have rejected commit 87c00572ba05aa8c ("kvm: x86: emulate >> monitor and mwait instructions as nop"), so when we intercept >> MONITOR/MWAIT, we synthesize #UD. Perhaps it is this d

Re: [Qemu-devel] WinDbg module

2017-04-12 Thread Marc-André Lureau
Hi On Wed, Apr 12, 2017 at 6:44 PM Mihail Abakumov wrote: > Hello. > > We made the debugger module WinDbg (like GDB) for QEMU. This is the > replacement of the remote stub in Windows kernel. Used for remote > Windows kernel debugging without debugging mode. > > The latest build and instructions

Re: [Qemu-devel] [Bug 1682093] Re: aarch64-softmmu "bad ram pointer" crash

2017-04-12 Thread Peter Maydell
On 12 April 2017 at 16:02, Harry Wagstaff <1682...@bugs.launchpad.net> wrote: > I've done some investigation and it appears that this bug is caused by > the following: > > 1. The flash memory of the virt platform is initialised as a > cfi.pflash01. It has a memory region with romd_mode = true and >

Re: [Qemu-devel] [PATCH v6] kvm: better MWAIT emulation for guests

2017-04-12 Thread Michael S. Tsirkin
On Wed, Apr 12, 2017 at 04:54:10PM +0200, Alexander Graf wrote: > > > On 12.04.17 16:34, Jim Mattson wrote: > > Actually, we have rejected commit 87c00572ba05aa8c ("kvm: x86: emulate > > monitor and mwait instructions as nop"), so when we intercept > > MONITOR/MWAIT, we synthesize #UD. Perhaps it

[Qemu-devel] [PATCH v4 1/4] qemu-img: add support for --object with 'dd' command

2017-04-12 Thread Daniel P. Berrange
The qemu-img dd command added --image-opts support, but missed the corresponding --object support. This prevented passing secrets (eg auth passwords) needed by certain disk images. Reviewed-by: Eric Blake Signed-off-by: Daniel P. Berrange --- qemu-img.c | 18 ++ 1 file changed,

[Qemu-devel] [PATCH v4 2/4] qemu-img: fix --image-opts usage with dd command

2017-04-12 Thread Daniel P. Berrange
The --image-opts flag can only be used to affect the parsing of the source image. The target image has to be specified in the traditional style regardless, since it needs to be passed to the bdrv_create() API which does not support the new style opts. Reviewed-by: Max Reitz Signed-off-by: Daniel

[Qemu-devel] [PATCH v4 0/4 for-2.10] Improve convert and dd commands

2017-04-12 Thread Daniel P. Berrange
Update to v1: https://lists.gnu.org/archive/html/qemu-devel/2017-01/msg05699.html v2: https://lists.gnu.org/archive/html/qemu-devel/2017-02/msg00728.html v3: https://lists.gnu.org/archive/html/qemu-devel/2017-02/msg04391.html This series is in response to Max pointing out that you cannot us

[Qemu-devel] [PATCH v4 3/4] qemu-img: introduce --target-image-opts for 'convert' command

2017-04-12 Thread Daniel P. Berrange
The '--image-opts' flags indicates whether the source filename includes options. The target filename has to remain in the plain filename format though, since it needs to be passed to bdrv_create(). When using --skip-create though, it would be possible to use image-opts syntax. This adds --target-i

[Qemu-devel] [PATCH v4 4/4] qemu-img: copy *key-secret opts when opening newly created files

2017-04-12 Thread Daniel P. Berrange
The qemu-img dd/convert commands will create a image file and then try to open it. Historically it has been possible to open new files without passing any options. With encrypted files though, the *key-secret options are mandatory, so we need to provide those options when opening the newly created

Re: [Qemu-devel] [RFC] Proposed qcow2 extension: subcluster allocation

2017-04-12 Thread Denis V. Lunev
On 04/06/2017 06:01 PM, Alberto Garcia wrote: > Hi all, > > over the past couple of months I discussed with some of you the > possibility to extend the qcow2 format in order to improve its > performance and reduce its memory requirements (particularly with very > large images). > > After some discu

Re: [Qemu-devel] [PATCH 1/4] net: add FTGMAC100 support

2017-04-12 Thread Cédric Le Goater
On 04/10/2017 03:43 PM, Peter Maydell wrote: > On 1 April 2017 at 13:57, Cédric Le Goater wrote: >> The FTGMAC100 device is an Ethernet controller with DMA function that >> can be found on Aspeed SoCs (which include NCSI). >> >> It is fully compliant with IEEE 802.3 specification for 10/100 Mbps >

  1   2   >