Re: [Qemu-devel] [PATCH 36/51] ram: Move QEMUFile into RAMState

2017-03-31 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > We receive the file from save_live operations and we don't use it > until 3 or 4 levels of calls down. > > Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert > --- > migration/ram.c | 84 > +-

Re: [Qemu-devel] [PATCH 49/51] ram: rename last_ram_offset() last_ram_pages()

2017-03-31 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > We always use it as pages anyways. > > Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert > --- > exec.c | 6 +++--- > include/exec/ram_addr.h | 2 +- > migration/ram.c | 11 +-- > 3 files changed,

Re: [Qemu-devel] [PATCH 50/51] ram: Use RAMBitmap type for coherence

2017-03-31 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert > --- > migration/ram.c | 10 +- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/migration/ram.c b/migration/ram.c > index 1be9a6b..4d62788 100644 > --- a

[Qemu-devel] [PATCH] disas/cris.c: Avoid unintentional sign extension

2017-03-31 Thread Peter Maydell
Commit 001ebaca7b11 fixed some unintended sign extension issues spotted by Coverity (CID 1005402, 1005403), but didn't catch all of them. Fix the rest, so we behave consistently whether 'long' is 32 bit or 64 bit. Signed-off-by: Peter Maydell --- disas/cris.c | 4 ++-- 1 file changed, 2 insertio

[Qemu-devel] [PATCH v4] ipmi: Fix macro issues

2017-03-31 Thread minyard
From: Corey Minyard Macro parameters should almost always have () around them when used. llvm reported an error on this. Remove redundant parenthesis and put parenthesis around the entire macros with assignments in case they are used in an expression. The macros were doing ((v) & 1) for a binar

Re: [Qemu-devel] [PATCH v2 00/51] Creating RAMState for migration

2017-03-31 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > Hi Some high level points: > Continuation of previous series, all review comments addressed. New things: > - Consolidate all function comments in the same style (yes, docs) > - Be much more careful with maintaining comments correct > - Move all postc

Re: [Qemu-devel] [PATCH 01/51] ram: Update all functions comments

2017-03-31 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > Hi, Juan, > > Got several nitpicks below... (along with some questions) > > On Thu, Mar 23, 2017 at 09:44:54PM +0100, Juan Quintela wrote: > > [...] > > @@ -1157,11 +1186,12 @@ static bool get_queued_page(MigrationState *ms, > > PageSearchStatus *pss, >

[Qemu-devel] [ANNOUNCE] QEMU 2.8.1 Stable released

2017-03-31 Thread Michael Roth
Hi everyone, I am pleased to announce that the QEMU v2.8.1 stable release is now available: http://wiki.qemu.org/download/qemu-2.8.1.tar.xz http://wiki.qemu.org/download/qemu-2.8.1.tar.xz.sig v2.8.1 is now tagged in the official qemu.git repository, and the stable-2.8 branch has been updated

[Qemu-devel] [PATCH 6/7] tpm-passthrough: move reusable code to utils

2017-03-31 Thread Amarnath Valluri
Signed-off-by: Amarnath Valluri --- hw/tpm/tpm_passthrough.c | 77 hw/tpm/tpm_util.c| 60 + hw/tpm/tpm_util.h| 8 + 3 files changed, 73 insertions(+), 72 deletions(-) diff --git a/hw/tpm/tpm

[Qemu-devel] [PATCH 4/7] tpm-backend: Call interface methods only if backend implements them

2017-03-31 Thread Amarnath Valluri
This allows backend implementations left optional interface methods. Signed-off-by: Amarnath Valluri --- backends/tpm.c | 22 ++ hw/tpm/tpm_passthrough.c | 16 2 files changed, 14 insertions(+), 24 deletions(-) diff --git a/backends/tpm.c b/backend

Re: [Qemu-devel] [PATCH] block/parallels.c: avoid integer overflow in allocate_clusters()

2017-03-31 Thread Max Reitz
On 31.03.2017 16:54, Denis V. Lunev wrote: > On 03/31/2017 04:47 PM, Max Reitz wrote: >> On 31.03.2017 15:13, Peter Maydell wrote: >>> Coverity (CID 1307776) points out that in the multiply: >>> space = to_allocate * s->tracks; >>> we are trying to calculate a 64 bit result but the types >>> of t

[Qemu-devel] [PATCH 5/7] tmp backend: Add new api to read backend tpm options

2017-03-31 Thread Amarnath Valluri
TPM configuration options are backend implementation details and shall not be part of base TPMBackend object, and these shall not be accessed directly outside of the class, hence added a new tpm backend api, tpm_backend_get_tpm_options() to read the backend configured options. Added new method, ge

[Qemu-devel] [PATCH 1/7] tpm-backend: Remove unneeded member variable from backend class

2017-03-31 Thread Amarnath Valluri
TPMDriverOps inside TPMBackend is not required, as it is supposed to be a class member. The only possible reason for keeping in TPMBackend was, to get the backend type in tpm.c where dedicated backend api, tpm_backend_get_type() is present. Signed-off-by: Amarnath Valluri --- hw/tpm/tpm_passthro

Re: [Qemu-devel] [PATCH 11/51] ram: Move dup_pages into RAMState

2017-03-31 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > Peter Xu wrote: > > On Thu, Mar 23, 2017 at 09:45:04PM +0100, Juan Quintela wrote: > >> Once there rename it to its actual meaning, zero_pages. > >> > >> Signed-off-by: Juan Quintela > >> Reviewed-by: Dr. David Alan Gilbert > > > > Reviewed-by: Pet

[Qemu-devel] [PATCH 0/7] Provide support for the software TPM emulator

2017-03-31 Thread Amarnath Valluri
Briefly, Theses set of patches introduces: - new TPM backend driver to support software TPM emulators(swtpm(1)). - and few supported fixes/enhancements/cleanup to existing tpm backend code. The similar idea was initiated earliar(2) by Stefan Berger(CCed) with slightly different approach, using C

[Qemu-devel] [PATCH 3/7] tpm-backend: Initialize and free data members in it's own methods

2017-03-31 Thread Amarnath Valluri
Initialize and free TPMBackend data members in it's own instance_init() and instance_finalize methods. Took the opportunity to fix object cleanup in tpm_backend_destroy() method Signed-off-by: Amarnath Valluri --- backends/tpm.c | 14 +- hw/tpm/tpm_passthrough.c | 8 +

[Qemu-devel] [PATCH 7/7] tpm: New backend driver to support TPM emulator

2017-03-31 Thread Amarnath Valluri
This change introduces a new TPM backend driver that can communicates with swtpm(software TPM emulator) using unix domain socket interface. Swtpm uses two unix sockets, one for plain TPM commands and responses, and one for out-of-band control messages. The swtpm and associated tools can be found

[Qemu-devel] [PATCH 7/7] Added support for TPM emulator

2017-03-31 Thread Amarnath Valluri
This change introduces a new TPM backend driver that can communicates with swtpm(software TPM emulator) using unix domain socket interface. Swtpm uses two unix sockets, one for plain TPM commands and responses, and one for out-of-band control messages. The swtpm and associated tools can be found

[Qemu-devel] [PATCH 2/7] tpm-backend: Move thread handling inside TPMBackend

2017-03-31 Thread Amarnath Valluri
Move thread handling inside TPMBackend, this way backend implementations need not to maintain their own thread life cycle, instead they needs to implement 'handle_request()' class method that always been called from a thread. This change also demands to move TPMBackendClass definition to tpm_backe

Re: [Qemu-devel] [PATCH for-2.9? v4] ipmi: Fix macro issues

2017-03-31 Thread Eric Blake
On 03/31/2017 09:33 AM, miny...@acm.org wrote: > From: Corey Minyard > > Macro parameters should almost always have () around them when used. > llvm reported an error on this. > > Remove redundant parenthesis and put parenthesis around the entire > macros with assignments in case they are used i

Re: [Qemu-devel] [PATCH for-2.9? v4] ipmi: Fix macro issues

2017-03-31 Thread Corey Minyard
On 03/31/2017 10:04 AM, Eric Blake wrote: On 03/31/2017 09:33 AM, miny...@acm.org wrote: From: Corey Minyard Macro parameters should almost always have () around them when used. llvm reported an error on this. Remove redundant parenthesis and put parenthesis around the entire macros with assi

Re: [Qemu-devel] [PATCH 30/51] ram: Move src_page_req* to RAMState

2017-03-31 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > On Thu, Mar 23, 2017 at 09:45:23PM +0100, Juan Quintela wrote: > > This are the last postcopy fields still at MigrationState. Once there > > s/This/These/ > > > Move MigrationSrcPageRequest to ram.c and remove MigrationState > > parameters where appropiate

[Qemu-devel] [PATCH for-2.9] rbd: Fix regression in legacy key/values containing escaped :

2017-03-31 Thread Eric Blake
Commit c7cacb3 accidentally broke legacy key-value parsing through pseudo-filename parsing of -drive file=rbd://..., for any key that contains an escaped ':'. Such a key is surprisingly common, thanks to mon_host specifying a 'host:port' string. The break happens because passing things from QDict

[Qemu-devel] MTD timeout on bootup

2017-03-31 Thread James Hanley
When trying to bootup a pristine zync image from the zc702 tarball, it would always fail with the MTD detection of the serial flash device type command over the SPI. I believe this section of code may have the logic flipped. Once I changed it to the following, I was able to detect the flash type

Re: [Qemu-devel] [PATCH] block/parallels.c: avoid integer overflow in allocate_clusters()

2017-03-31 Thread Denis V. Lunev
On 03/31/2017 05:56 PM, Max Reitz wrote: > On 31.03.2017 16:54, Denis V. Lunev wrote: >> On 03/31/2017 04:47 PM, Max Reitz wrote: >>> On 31.03.2017 15:13, Peter Maydell wrote: Coverity (CID 1307776) points out that in the multiply: space = to_allocate * s->tracks; we are trying to

Re: [Qemu-devel] [PATCH RFC] hw/pvrdma: Proposal of a new pvrdma device

2017-03-31 Thread Marcel Apfelbaum
On 03/30/2017 11:28 PM, Doug Ledford wrote: On 3/30/17 9:13 AM, Leon Romanovsky wrote: On Thu, Mar 30, 2017 at 02:12:21PM +0300, Marcel Apfelbaum wrote: From: Yuval Shaia Hi, General description === This is a very early RFC of a new RoCE emulated device that enables gues

Re: [Qemu-devel] [PATCH RFC] hw/pvrdma: Proposal of a new pvrdma device

2017-03-31 Thread Marcel Apfelbaum
On 03/31/2017 02:38 AM, Adit Ranadive wrote: On Thu Mar 30 2017 13:28:21 GMT-0700 (PDT), Doug Ledford wrote: On 3/30/17 9:13 AM, Leon Romanovsky wrote: On Thu, Mar 30, 2017 at 02:12:21PM +0300, Marcel Apfelbaum wrote: From: Yuval Shaia Hi, General description === This is

Re: [Qemu-devel] [PATCH 01/51] ram: Update all functions comments

2017-03-31 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > Added doc comments for existing functions comment and rewrite them in > a common style. > > Signed-off-by: Juan Quintela > --- > migration/ram.c | 348 > > 1 file changed, 227 insertions(+),

Re: [Qemu-devel] [PATCH] disas/cris.c: Avoid unintentional sign extension

2017-03-31 Thread Edgar E. Iglesias
On Fri, Mar 31, 2017 at 03:31:11PM +0100, Peter Maydell wrote: > Commit 001ebaca7b11 fixed some unintended sign extension issues > spotted by Coverity (CID 1005402, 1005403), but didn't catch > all of them. Fix the rest, so we behave consistently whether > 'long' is 32 bit or 64 bit. Thanks! Revie

[Qemu-devel] nbd: Possible regression in 2.9 RCs

2017-03-31 Thread Ciprian Barbu
Hello, Similar to the other thread about possible regression with rbd, there might be a regression with nbd. This time we are launching an instance from an image (not volume) and try to live migrate it: nova live-migration The nova-compute service complains with: 2017-03-31 15:32:56.179 7806

Re: [Qemu-devel] [PATCH for-2.10 0/5] x86/vIOMMU: move init back to machine init phase

2017-03-31 Thread Michael S. Tsirkin
On Fri, Mar 31, 2017 at 03:36:28PM +0800, Peter Xu wrote: > At the very beginning, the x86 vIOMMUs are created via "-M iommu=on". > We moved one step further a year ago to have the vIOMMUs just like a > general device, so that we can init them with far more specific > parameters with "-device" inte

Re: [Qemu-devel] [PATCH] block/parallels.c: avoid integer overflow in allocate_clusters()

2017-03-31 Thread Stefan Hajnoczi
On Fri, Mar 31, 2017 at 10:40:33AM -0300, Eduardo Habkost wrote: > On Fri, Mar 31, 2017 at 10:27:44AM -0300, Philippe Mathieu-Daudé wrote: > > Hi, > > > > Eduardo you seem skilled regarding Coccinelle scripts, is it possible to > > write one to find those overflows? > > Probably not. AFAIK, Cocci

Re: [Qemu-devel] [PATCH] block/parallels.c: avoid integer overflow in allocate_clusters()

2017-03-31 Thread Stefan Hajnoczi
On Fri, Mar 31, 2017 at 03:47:39PM +0200, Max Reitz wrote: > On 31.03.2017 15:13, Peter Maydell wrote: > > Coverity (CID 1307776) points out that in the multiply: > > space = to_allocate * s->tracks; > > we are trying to calculate a 64 bit result but the types > > of to_allocate and s->tracks mea

Re: [Qemu-devel] [PATCH kernel v8 3/4] mm: add inerface to offer info about unused pages

2017-03-31 Thread Michael S. Tsirkin
On Fri, Mar 31, 2017 at 05:53:00PM +0800, Wei Wang wrote: > On 03/30/2017 01:48 AM, Michael S. Tsirkin wrote: > > On Fri, Mar 17, 2017 at 02:55:33PM +0800, Wei Wang wrote: > > > On 03/17/2017 05:28 AM, Andrew Morton wrote: > > > > On Thu, 16 Mar 2017 15:08:46 +0800 Wei Wang > > > > wrote: > > > >

Re: [Qemu-devel] [PATCH for-2.9] rbd: Fix regression in legacy key/values containing escaped :

2017-03-31 Thread Jeff Cody
On Fri, Mar 31, 2017 at 10:27:30AM -0500, Eric Blake wrote: > Commit c7cacb3 accidentally broke legacy key-value parsing through > pseudo-filename parsing of -drive file=rbd://..., for any key that > contains an escaped ':'. Such a key is surprisingly common, thanks > to mon_host specifying a 'hos

Re: [Qemu-devel] [PATCH 5/5] cpu: throttle: fix throttle time slice

2017-03-31 Thread Paolo Bonzini
On 27/03/2017 09:21, Peter Xu wrote: > @@ -641,8 +640,7 @@ static void cpu_throttle_thread(CPUState *cpu, > run_on_cpu_data opaque) > } > > pct = (double)cpu_throttle_get_percentage()/100; > -throttle_ratio = pct / (1 - pct); > -sleeptime_ns = (long)(throttle_ratio * CPU_THRO

Re: [Qemu-devel] [PATCH] block/parallels.c: avoid integer overflow in allocate_clusters()

2017-03-31 Thread Max Reitz
On 31.03.2017 18:20, Stefan Hajnoczi wrote: > On Fri, Mar 31, 2017 at 03:47:39PM +0200, Max Reitz wrote: >> On 31.03.2017 15:13, Peter Maydell wrote: >>> Coverity (CID 1307776) points out that in the multiply: >>> space = to_allocate * s->tracks; >>> we are trying to calculate a 64 bit result but

[Qemu-devel] [PATCH] char: kick main loop after adding a watch

2017-03-31 Thread Stefan Hajnoczi
The ISA serial port device's output can hang when the pipe on stdout becomes full. This is a race condition where the vcpu thread executing serial emulation code adds a watch on stdout while the main loop thread is blocked in ppoll(2). If no timer or other event wakes up the main loop, there will

Re: [Qemu-devel] [for-2.10 PATCH] fsdev: move stub to libqemustub.a

2017-03-31 Thread Greg Kurz
On Fri, 31 Mar 2017 16:06:35 +0200 Paolo Bonzini wrote: > On 31/03/2017 15:52, Greg Kurz wrote: > > The qemu_fsdev_add() stub is used by targets that don't build VirtFS, like > > CRIS for example. This can be handled by libqemustub.a. > > It can, the question is do we want them to. :) > > The

[Qemu-devel] [PATCH v1 3/3] applesmc: implement error status port

2017-03-31 Thread Gabriel L. Somlo
As of release 10.12.4, OS X (Sierra) refuses to boot unless the AppleSMC supports an additional I/O port, expected to provide an error status code. Update the [cmd|data]_write() and data_read() methods to implement the required state machine, and add an err_read() method to provide the error statu

[Qemu-devel] [PATCH v1 0/3] Update AppleSMC for OS X Sierra 10.12.4 guests

2017-03-31 Thread Gabriel L. Somlo
As of 10.12.4 (currently the latest Sierra update), OS X refuses to boot unless the AppleSMC supports a third I/O port, which provides the current error status when read. This series consists of three patches: - 1/3: indentation/whitespace cleanup for applesmc.c to the point

[Qemu-devel] [PATCH v1 2/3] applesmc: consolidate port i/o into single contiguous region

2017-03-31 Thread Gabriel L. Somlo
Newer AppleSMC revisions support an error status (read) port in addition to the data and command ports currently supported. Register the full 32-bit region at once, and handle individual ports at various offsets within the region from the top-level applesmc_io_[write|read]() methods (ctual support

[Qemu-devel] [PATCH v1 1/3] applesmc: cosmetic whitespace and indentation cleanup

2017-03-31 Thread Gabriel L. Somlo
Signed-off-by: Gabriel Somlo --- hw/misc/applesmc.c | 100 +++-- 1 file changed, 51 insertions(+), 49 deletions(-) diff --git a/hw/misc/applesmc.c b/hw/misc/applesmc.c index 77fab5b..986f2ac 100644 --- a/hw/misc/applesmc.c +++ b/hw/misc/applesmc.c

Re: [Qemu-devel] [PATCH 30/51] ram: Move src_page_req* to RAMState

2017-03-31 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > This are the last postcopy fields still at MigrationState. Once there > Move MigrationSrcPageRequest to ram.c and remove MigrationState > parameters where appropiate. > > Signed-off-by: Juan Quintela > --- > include/migration/migration.h | 17 +

Re: [Qemu-devel] [PATCH] char: kick main loop after adding a watch

2017-03-31 Thread Paolo Bonzini
On 31/03/2017 18:43, Stefan Hajnoczi wrote: > The ISA serial port device's output can hang when the pipe on stdout > becomes full. This is a race condition where the vcpu thread executing > serial emulation code adds a watch on stdout while the main loop thread > is blocked in ppoll(2). If no t

[Qemu-devel] [PULL 0/1] VFIO fixes 2017-03-31

2017-03-31 Thread Alex Williamson
The following changes since commit 37c4a85cd256a51c5f58ee7e531f25f0e89b2c87: Merge remote-tracking branch 'remotes/dgilbert/tags/pull-hmp-20170331' into staging (2017-03-31 12:43:27 +0100) are available in the git repository at: git://github.com/awilliam/qemu-vfio.git tags/vf

[Qemu-devel] [PULL 1/1] Revert "vfio/pci-quirks.c: Disable stolen memory for igd VFIO"

2017-03-31 Thread Alex Williamson
From: Xiong Zhang This reverts commit c2b2e158cc7b1cb431bd6039824ec13c3184a775. The original patch intend to prevent linux i915 driver from using stolen meory. But this patch breaks windows IGD driver loading on Gen9+, as IGD HW will use stolen memory on Gen9+, once windows IGD driver see zero s

Re: [Qemu-devel] [PATCH] Revert "vfio/pci-quirks.c: Disable stolen memory for igd VFIO"

2017-03-31 Thread Igor Mammedov
On Thu, 30 Mar 2017 20:55:11 -0600 Alex Williamson wrote: > On Fri, 31 Mar 2017 02:27:11 + > "Zhang, Xiong Y" wrote: > > > > On Thu, 30 Mar 2017 18:27:21 +0800 > > > Xiong Zhang wrote: > > > > > > > This reverts commit c2b2e158cc7b1cb431bd6039824ec13c3184a775. > > > > > > > > The origin

[Qemu-devel] [PATCH for-2.9] block/parallels: Avoid overflows

2017-03-31 Thread Max Reitz
Change the types of variables in allocate_clusters() to int64_t so we do not have to worry about potential overflows. Add an assertion that our accesses to s->bat[] do not result in a buffer overflow and that the implicit conversion performed when invoking bat_entry_off() does not result in an int

Re: [Qemu-devel] Problems with native Mingw-w64 build

2017-03-31 Thread Mark Cave-Ayland
On 28/03/17 16:16, Thomas Huth wrote: > On 28.03.2017 09:25, Mark Cave-Ayland wrote: > [...] >> I ended up starting again from scratch last night and trying the build >> with MSYS2 instead. MSYS2 has really improved since I last looked at it >> a couple of years back, and I was able to get a worki

Re: [Qemu-devel] [PATCH] char: kick main loop after adding a watch

2017-03-31 Thread Richard W.M. Jones
On Fri, Mar 31, 2017 at 05:43:22PM +0100, Stefan Hajnoczi wrote: > The ISA serial port device's output can hang when the pipe on stdout > becomes full. This is a race condition where the vcpu thread executing > serial emulation code adds a watch on stdout while the main loop thread > is blocked in

Re: [Qemu-devel] [PATCH] block/parallels.c: avoid integer overflow in allocate_clusters()

2017-03-31 Thread Eduardo Habkost
On Fri, Mar 31, 2017 at 05:18:39PM +0100, Stefan Hajnoczi wrote: > On Fri, Mar 31, 2017 at 10:40:33AM -0300, Eduardo Habkost wrote: > > On Fri, Mar 31, 2017 at 10:27:44AM -0300, Philippe Mathieu-Daudé wrote: > > > Hi, > > > > > > Eduardo you seem skilled regarding Coccinelle scripts, is it possibl

Re: [Qemu-devel] [PATCH 48/51] ram: Use ramblock and page offset instead of absolute offset

2017-03-31 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > This removes the needto pass also the absolute offset. Reviewed-by: Dr. David Alan Gilbert > Signed-off-by: Juan Quintela > --- > migration/ram.c| 56 > ++ > migration/trace-events | 2 +- >

Re: [Qemu-devel] [PATCH] Revert "vfio/pci-quirks.c: Disable stolen memory for igd VFIO"

2017-03-31 Thread Alex Williamson
On Fri, 31 Mar 2017 19:03:49 +0200 Igor Mammedov wrote: > On Thu, 30 Mar 2017 20:55:11 -0600 > Alex Williamson wrote: > > > On Fri, 31 Mar 2017 02:27:11 + > > "Zhang, Xiong Y" wrote: > > > > > > On Thu, 30 Mar 2017 18:27:21 +0800 > > > > Xiong Zhang wrote: > > > > > > > > > This r

Re: [Qemu-devel] [PATCH] char: kick main loop after adding a watch

2017-03-31 Thread Richard W.M. Jones
On Fri, Mar 31, 2017 at 06:53:56PM +0200, Paolo Bonzini wrote: > glib is expecting QEMU to use g_main_context_acquire around accesses to > GMainContext. However QEMU is not doing that, instead it is taking its > own mutex. So we should add g_main_context_acquire and > g_main_context_release in

Re: [Qemu-devel] nbd: Possible regression in 2.9 RCs

2017-03-31 Thread Ciprian Barbu
I suspect the culprit here is [1]. I've started a git bisect between this commit and v2.8.0 and during this time I found similar erros "/root/qemu/nbd/server.c:nbd_receive_request():L706: read failed" I suspect this fix tried to solve a bunch of these read fails, but broke write requests. [1]

Re: [Qemu-devel] [PATCH] char: kick main loop after adding a watch

2017-03-31 Thread Paolo Bonzini
On 31/03/2017 19:31, Richard W.M. Jones wrote: > On Fri, Mar 31, 2017 at 06:53:56PM +0200, Paolo Bonzini wrote: >> glib is expecting QEMU to use g_main_context_acquire around accesses to >> GMainContext. However QEMU is not doing that, instead it is taking its >> own mutex. So we should add g

Re: [Qemu-devel] nbd: Possible regression in 2.9 RCs

2017-03-31 Thread Ciprian Barbu
Sorry, I think this one is more likely the cause, it's about migration: https://github.com/qemu/qemu/commit/6f5ef23a3ff09919b73eef8196969685cb2383ee From: Ciprian Barbu Sent: Friday, March 31, 2017 8:33 PM To: Ciprian Barbu ; qemu-devel@nongnu.org; Eric Blake ; Alexandru Avadanii Cc: Jeff Cody

Re: [Qemu-devel] [PATCH] char: kick main loop after adding a watch

2017-03-31 Thread Richard W.M. Jones
On Fri, Mar 31, 2017 at 07:31:57PM +0200, Paolo Bonzini wrote: > > > On 31/03/2017 19:31, Richard W.M. Jones wrote: > > On Fri, Mar 31, 2017 at 06:53:56PM +0200, Paolo Bonzini wrote: > >> glib is expecting QEMU to use g_main_context_acquire around accesses to > >> GMainContext. However QEMU is

Re: [Qemu-devel] [PULL 0/1] VFIO fixes 2017-03-31

2017-03-31 Thread Peter Maydell
On 31 March 2017 at 18:01, Alex Williamson wrote: > The following changes since commit 37c4a85cd256a51c5f58ee7e531f25f0e89b2c87: > > Merge remote-tracking branch 'remotes/dgilbert/tags/pull-hmp-20170331' into > staging (2017-03-31 12:43:27 +0100) > > are availa

Re: [Qemu-devel] nbd: Possible regression in 2.9 RCs

2017-03-31 Thread Max Reitz
On 31.03.2017 18:03, Ciprian Barbu wrote: > Hello, > > Similar to the other thread about possible regression with rbd, there might > be a regression with nbd. > This time we are launching an instance from an image (not volume) and try to > live migrate it: > > nova live-migration > > The nova

Re: [Qemu-devel] [PATCH qemu] pci: Only unmap bus_master_enabled_region if was added previously

2017-03-31 Thread John Snow
On 03/31/2017 12:47 AM, Alexey Kardashevskiy wrote: > Normally pci_init_bus_master() would be called either via > bus->machine_done.notify or directly from do_pci_register_device(). > > However if a device's realize() failed, pci_init_bus_master() is not > called, and do_pci_unregister_device()

Re: [Qemu-devel] [PATCH for-2.9] rbd: Fix regression in legacy key/values containing escaped :

2017-03-31 Thread Max Reitz
On 31.03.2017 17:27, Eric Blake wrote: > Commit c7cacb3 accidentally broke legacy key-value parsing through > pseudo-filename parsing of -drive file=rbd://..., for any key that > contains an escaped ':'. Such a key is surprisingly common, thanks > to mon_host specifying a 'host:port' string. The

Re: [Qemu-devel] [PATCH for-2.9? v4] ipmi: Fix macro issues

2017-03-31 Thread Ed Maste
On 31 March 2017 at 11:04, Eric Blake wrote: > > Might also be worth adding that an audit of the code finds no semantic > change, that this is just cleaning up the compiler warning. We should include core detail of your detailed analysis in such a statement I think, because I it's more than just

Re: [Qemu-devel] nbd: Possible regression in 2.9 RCs

2017-03-31 Thread Ciprian Barbu
Hi, Thank you for getting back! I'm trying to follow you, but I don't understand all the details. I would like to ask this question though: What is the difference between v2.8.0 and this commit? With v2.8.0 the same qemu command worked, but I admit it doesn't request sharing. We also use libv

Re: [Qemu-devel] [RFC] Split migration bitmaps by ramblock

2017-03-31 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > "Dr. David Alan Gilbert" wrote: > > * Juan Quintela (quint...@redhat.com) wrote: > >> Note that there are two reason for this, ARM and PPC do things like > >> guests with 4kb pages on hosts with 16/64kb hosts, and then we have > >> HugePages. Note al

Re: [Qemu-devel] [PATCH for-2.9] rbd: Fix regression in legacy key/values containing escaped :

2017-03-31 Thread Jeff Cody
On Fri, Mar 31, 2017 at 10:27:30AM -0500, Eric Blake wrote: > Commit c7cacb3 accidentally broke legacy key-value parsing through > pseudo-filename parsing of -drive file=rbd://..., for any key that > contains an escaped ':'. Such a key is surprisingly common, thanks > to mon_host specifying a 'hos

Re: [Qemu-devel] nbd: Possible regression in 2.9 RCs

2017-03-31 Thread Max Reitz
On 31.03.2017 19:49, Ciprian Barbu wrote: > Hi, > > Thank you for getting back! > > I'm trying to follow you, but I don't understand all the details. I would > like to ask this question though: > > What is the difference between v2.8.0 and this commit? With v2.8.0 the same > qemu command worke

Re: [Qemu-devel] [PATCH for-2.9] rbd: Fix regression in legacy key/values containing escaped :

2017-03-31 Thread Alexandru Avadanii
Tested-by: Alexandru Avadanii Thank you very much for the quick fix! > -Original Message- > From: Eric Blake [mailto:ebl...@redhat.com] > Sent: Friday, March 31, 2017 6:28 PM > To: qemu-devel@nongnu.org > Cc: qemu-bl...@nongnu.org; jc...@redhat.com; arm...@redhat.com; > Alexandru Avadani

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

2017-03-31 Thread ashish mittal
On Mon, Mar 27, 2017 at 6:04 PM, ashish mittal wrote: > On Mon, Mar 27, 2017 at 10:27 AM, Stefan Hajnoczi wrote: >> On Sun, Mar 26, 2017 at 07:50:35PM -0700, Ashish Mittal wrote: >> >> Have you tested live migration? >> >> If live migration is not supported then a migration blocker should be >> a

Re: [Qemu-devel] [PATCH for-2.9] block/parallels: Avoid overflows

2017-03-31 Thread Eric Blake
On 03/31/2017 12:05 PM, Max Reitz wrote: > Change the types of variables in allocate_clusters() to int64_t so we do > not have to worry about potential overflows. > > Add an assertion that our accesses to s->bat[] do not result in a buffer > overflow and that the implicit conversion performed when

Re: [Qemu-devel] Problems with native Mingw-w64 build

2017-03-31 Thread Stefan Weil
Am 31.03.2017 um 19:08 schrieb Mark Cave-Ayland: On 28/03/17 16:16, Thomas Huth wrote: We've already got a page with instructions for building with MingW: http://wiki.qemu-project.org/Hosts/W32 So that might be a good place to add your experience with MSYS, I guess? Done. See http://wiki.qe

Re: [Qemu-devel] [PATCH 1/5] migration: set current_active_state once

2017-03-31 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > We set it right above this one. No need to set it twice. Ah good spot, yes set in the declaration of current_active_state. > CC: Juan Quintela > CC: "Dr. David Alan Gilbert" > Signed-off-by: Peter Xu > --- > migration/migration.c | 1 - > 1 file changed

[Qemu-devel] [PATCH for-2.9 v8 0/3] Fix wipe of unaligned qcow2 image [was add blkdebug tests]

2017-03-31 Thread Eric Blake
Available as a tag at: git fetch git://repo.or.cz/qemu/ericb.git nbd-blkdebug-v8 (which is somewhat of a misnomer for this current version of the series, but historically correct) v6 was: https://lists.gnu.org/archive/html/qemu-devel/2017-03/msg01562.html v7 was: https://lists.gnu.org/archive/htm

[Qemu-devel] [PATCH v8 3/3] iotests: Improve image-clear tests on non-aligned image

2017-03-31 Thread Eric Blake
Tweak 097 and 176 to operate on an image that is not cluster-aligned, to give further coverage of clearing out an entire image, including the recent fix to eliminate the difference between fast path (97) and slow (176) for qcow2. Also tested on qcow (97 only, since qcow lacks snapshots). Signed-o

[Qemu-devel] [PATCH v8 2/3] qcow2: Discard unaligned tail when wiping image

2017-03-31 Thread Eric Blake
There is a subtle difference between the fast (qcow2v3 with no extra data) and slow path (qcow2v2 format [aka 0.10], or when a snapshot is present) of qcow2_make_empty(). The slow path fails to discard the final (partial) cluster of an unaligned image. The problem stems from the fact that qcow2_d

[Qemu-devel] [PATCH v8 1/3] iotests: fix 097 when run with qcow

2017-03-31 Thread Eric Blake
From: "Daniel P. Berrange" The previous commit: commit a3e1505daec31ef56f0489f8c8fff1b8e4ca92bd Author: Eric Blake Date: Mon Dec 5 09:49:34 2016 -0600 qcow2: Don't strand clusters near 2G intervals during commit extended the 097 test case so that it did two passes, once with an in

Re: [Qemu-devel] [Qemu-block] [PATCH for-2.9 1/2] qapi/curl: Extend and fix blockdev-add schema

2017-03-31 Thread Jeff Cody
On Fri, Mar 31, 2017 at 02:04:30PM +0200, Max Reitz wrote: > The curl block driver accepts more options than just "filename"; also, > the URL is actually expected to be passed through the "url" option > instead of "filename". > > Signed-off-by: Max Reitz Reviewed-by: Jeff Cody > --- > qapi/bl

Re: [Qemu-devel] [Qemu-block] [PATCH for-2.9 2/2] block/curl: Check protocol prefix

2017-03-31 Thread Jeff Cody
On Fri, Mar 31, 2017 at 02:04:31PM +0200, Max Reitz wrote: > If the user has explicitly specified a block driver and thus a protocol, > we have to make sure the URL's protocol prefix matches. Otherwise the > latter will silently override the former which might catch some users by > surprise. > > S

Re: [Qemu-devel] [Qemu-block] [PATCH for-2.9 0/2] curl: Extend and fix blockdev-add schema

2017-03-31 Thread Jeff Cody
On Fri, Mar 31, 2017 at 02:04:29PM +0200, Max Reitz wrote: > Yes, it's yet another episode in our popular > get-blockdev-add-ready-for-2.9 drama! > > Right now, the schema for the curl block driver is seriously lacking. > This series improves things at least a bit. > > To improve things seriously

Re: [Qemu-devel] [PATCH 3/5] hmp: info migrate_capability format tunes

2017-03-31 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > Dump the info in a single line is hard to read. Do it one per line. > Also, the first "capabilities:" didn't help much. Let's remove it. > > CC: "Dr. David Alan Gilbert" > Signed-off-by: Peter Xu agreed, although you may find it breaks some peoples script

Re: [Qemu-devel] [PATCH 2/5] migration: rename max_size to threshold_size

2017-03-31 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > In migration codes (especially in migration_thread()), max_size is used > in many place for the threshold value that we will start to do the final > flush and jump to the next stage to dump the whole rest things to > destination. However its name is confusing

Re: [Qemu-devel] [PATCH 4/5] hmp: info migrate_parameters format tunes

2017-03-31 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > Do the same (one per line) to the parameter list. > > CC: "Dr. David Alan Gilbert" > Signed-off-by: Peter Xu Reviewed-by: Dr. David Alan Gilbert > --- > hmp.c | 22 ++ > 1 file changed, 10 insertions(+), 12 deletions(-) > > diff --

Re: [Qemu-devel] nbd: Possible regression in 2.9 RCs

2017-03-31 Thread Alexandru Avadanii
Hi, > -Original Message- > From: Max Reitz [mailto:mre...@redhat.com] > Sent: Friday, March 31, 2017 8:57 PM > To: Ciprian Barbu; qemu-devel@nongnu.org; Eric Blake; Alexandru Avadanii > Cc: Jeff Cody; Markus Armbruster; svc-armband; Kevin Wolf > Subject: Re: [Qemu-devel] nbd: Possible regr

Re: [Qemu-devel] [PATCH 5/5] cpu: throttle: fix throttle time slice

2017-03-31 Thread Dr. David Alan Gilbert
Ignoring the details below for a minute, this patch belongs in a separate series; all the rest of the patches in this set are nice simple ones. * Paolo Bonzini (pbonz...@redhat.com) wrote: > > > On 27/03/2017 09:21, Peter Xu wrote: > > @@ -641,8 +640,7 @@ static void cpu_throttle_thread(CPUState

Re: [Qemu-devel] [PATCH for-2.9 2/2] block/curl: Check protocol prefix

2017-03-31 Thread Eric Blake
On 03/31/2017 07:04 AM, Max Reitz wrote: > If the user has explicitly specified a block driver and thus a protocol, > we have to make sure the URL's protocol prefix matches. Otherwise the > latter will silently override the former which might catch some users by > surprise. > > Signed-off-by: Max

[Qemu-devel] [PATCH for-2.10 0/2] etsec: (TYPE_)ETSEC_COMMON macro cleanup

2017-03-31 Thread Eduardo Habkost
When working on other things, I got confused by the etsec code, that didn't use the TYPE_ETSEC_COMMON macro in its type declaration, and had no subclasses despite being named ETSEC_COMMON. This is a very simple cleanup to remove the _COMMON suffix from the macros, and to use the TYPE_ETSEC macro w

[Qemu-devel] [PATCH for-2.10 2/2] etsec: Use TYPE_ETSEC macro when registering/creating device

2017-03-31 Thread Eduardo Habkost
Instead of hardcoding the class name, use the TYPE_ETSEC macro when registering the class and creating devices. Signed-off-by: Eduardo Habkost --- hw/net/fsl_etsec/etsec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/net/fsl_etsec/etsec.c b/hw/net/fsl_etsec/etsec.c

Re: [Qemu-devel] [PATCH for-2.9 1/2] qapi/curl: Extend and fix blockdev-add schema

2017-03-31 Thread Eric Blake
On 03/31/2017 07:04 AM, Max Reitz wrote: > The curl block driver accepts more options than just "filename"; also, > the URL is actually expected to be passed through the "url" option > instead of "filename". > > Signed-off-by: Max Reitz > --- > qapi/block-core.json | 103 > +

Re: [Qemu-devel] [Qemu-block] [PATCH for-2.9 1/2] qapi/curl: Extend and fix blockdev-add schema

2017-03-31 Thread Jeff Cody
On Fri, Mar 31, 2017 at 02:04:30PM +0200, Max Reitz wrote: > The curl block driver accepts more options than just "filename"; also, > the URL is actually expected to be passed through the "url" option > instead of "filename". > > Signed-off-by: Max Reitz > --- > qapi/block-core.json | 103 > +++

[Qemu-devel] [PATCH for-2.10 1/2] etsec: Rename (TYPE_)ETSEC_COMMON to (TYPE_)ETSEC

2017-03-31 Thread Eduardo Habkost
Types named *_COMMON are normally used when there's a common parent class for multiple classes. We have only one eTSEC type, so rename the TYPE_ETSEC_COMMON and ETSEC_COMMON macros to TYPE_ETSEC and TYPE_ETSEC_COMMON. Signed-off-by: Eduardo Habkost --- hw/net/fsl_etsec/etsec.h | 6 +++--- hw/net

Re: [Qemu-devel] [PATCH for-2.9 2/2] block/curl: Check protocol prefix

2017-03-31 Thread Eric Blake
On 03/31/2017 07:04 AM, Max Reitz wrote: > If the user has explicitly specified a block driver and thus a protocol, > we have to make sure the URL's protocol prefix matches. Otherwise the > latter will silently override the former which might catch some users by > surprise. > > Signed-off-by: Max

Re: [Qemu-devel] [PATCH 5/5] cpu: throttle: fix throttle time slice

2017-03-31 Thread Paolo Bonzini
> > So I'm inclined _not_ to take your patch. One possibility could be to > > do the following: > > > > - for throttling between 0% and 80%, use the current algorithm. At 66%, > > the CPU will work for 10 ms and sleep for 40 ms. > > > > - for throttling above 80% adapt your algorithm to have

Re: [Qemu-devel] [PATCH v3 00/11] MTTCG fix-ups for 2.9

2017-03-31 Thread Alex Bennée
Paolo Bonzini writes: > On 31/03/2017 13:21, Alex Bennée wrote: >> Anyway I think I'm getting closer to narrowing it down. On record I see >> replay_current_step jump backwards with this: >> >> /* A common event print, called when reading or saving an event */ >> static void print_event(uint8_t

Re: [Qemu-devel] [PATCH qemu] pci: Only unmap bus_master_enabled_region if was added previously

2017-03-31 Thread Paolo Bonzini
> On 03/31/2017 12:47 AM, Alexey Kardashevskiy wrote: > > Normally pci_init_bus_master() would be called either via > > bus->machine_done.notify or directly from do_pci_register_device(). > > > > However if a device's realize() failed, pci_init_bus_master() is not > > called, and do_pci_unregister

Re: [Qemu-devel] [PATCH for-2.9] block/parallels: Avoid overflows

2017-03-31 Thread Philippe Mathieu-Daudé
On 03/31/2017 02:05 PM, Max Reitz wrote: Change the types of variables in allocate_clusters() to int64_t so we do not have to worry about potential overflows. Add an assertion that our accesses to s->bat[] do not result in a buffer overflow and that the implicit conversion performed when invokin

Re: [Qemu-devel] [PATCH for-2.9 v8 0/3] Fix wipe of unaligned qcow2 image [was add blkdebug tests]

2017-03-31 Thread Max Reitz
On 31.03.2017 20:53, Eric Blake wrote: > Available as a tag at: > git fetch git://repo.or.cz/qemu/ericb.git nbd-blkdebug-v8 > > (which is somewhat of a misnomer for this current version of the > series, but historically correct) > > v6 was: > https://lists.gnu.org/archive/html/qemu-devel/2017-03/

Re: [Qemu-devel] [PATCH for-2.9 2/2] block/curl: Check protocol prefix

2017-03-31 Thread Max Reitz
On 31.03.2017 21:30, Eric Blake wrote: > On 03/31/2017 07:04 AM, Max Reitz wrote: >> If the user has explicitly specified a block driver and thus a protocol, >> we have to make sure the URL's protocol prefix matches. Otherwise the >> latter will silently override the former which might catch some u

[Qemu-devel] [PATCH] main-loop: Acquire main_context lock around os_host_main_loop_wait.

2017-03-31 Thread Richard W.M. Jones
When running virt-rescue the serial console hangs from time to time. Virt-rescue runs an ordinary Linux kernel "appliance", but there is only a single idle process running inside, so the qemu main loop is largely idle. With virt-rescue >= 1.37 you may be able to observe the hang by doing: $ vir

Re: [Qemu-devel] [PATCH] block/parallels.c: avoid integer overflow in allocate_clusters()

2017-03-31 Thread Denis V. Lunev
On 03/31/2017 04:47 PM, Max Reitz wrote: > On 31.03.2017 15:13, Peter Maydell wrote: >> Coverity (CID 1307776) points out that in the multiply: >> space = to_allocate * s->tracks; >> we are trying to calculate a 64 bit result but the types >> of to_allocate and s->tracks mean that we actually cal

<    1   2   3   >