[Qemu-devel] [PATCH for-2.12] hw/rdma: fix clang compilation errors

2018-03-21 Thread Marcel Apfelbaum
Fix some enum castings and extra parentheses. Reported-by: Michael S. Tsirkin Signed-off-by: Marcel Apfelbaum --- hw/rdma/vmw/pvrdma_cmd.c | 5 +++-- hw/rdma/vmw/pvrdma_main.c | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/hw/rdma/vmw/pvrdma_cmd.c b/hw/rdma/vmw/pvrdm

Re: [Qemu-devel] [PATCH 2/3] tests: add oob-test for qapi-schema

2018-03-21 Thread Eric Blake
On 03/21/2018 01:55 AM, Peter Xu wrote: It simply tests the new OOB capability, and make sure the QAPISchema can parse it correctly. We also want negative tests that cover any new error messages in the qapi generator (such as 'allow-oob':'bad' diagnosing a non-bool, or 'allow-oob':false givin

[Qemu-devel] [PATCH] scsi: turn "is this a SCSI device?" into a conditional hint

2018-03-21 Thread Paolo Bonzini
If the user does not have permissions to send ioctls to the device (due to SELinux or cgroups, for example), the output can look like qemu-kvm: -device scsi-block,drive=disk: cannot get SG_IO version number: Operation not permitted. Is this a SCSI device? but this is confusing because the ioct

Re: [Qemu-devel] ihw/rdma: Implementation of Query QP verb

2018-03-21 Thread Marcel Apfelbaum
Hi Yuval, On 20/03/2018 21:00, Yuval Shaia wrote: > Please review implementation of Query QP verb which is needed by some RDMA > applications. > > Patch #1: Implementation in rdma backend layer > Patch #2: Add support to pvrdma device > > v0 -> v1: > * Split to two patches, one for rdma an

Re: [Qemu-devel] [PATCH] scsi: turn "is this a SCSI device?" into a conditional hint

2018-03-21 Thread Laurent Vivier
On 21/03/2018 13:54, Paolo Bonzini wrote: > If the user does not have permissions to send ioctls to the device (due to > SELinux or cgroups, for example), the output can look like > > qemu-kvm: -device scsi-block,drive=disk: cannot get SG_IO version number: > Operation not permitted. Is this a

Re: [Qemu-devel] [PATCH for-2.12] hw/rdma: fix clang compilation errors

2018-03-21 Thread Yuval Shaia
On Wed, Mar 21, 2018 at 02:40:26PM +0200, Marcel Apfelbaum wrote: > Fix some enum castings and extra parentheses. > > Reported-by: Michael S. Tsirkin > Signed-off-by: Marcel Apfelbaum > --- > hw/rdma/vmw/pvrdma_cmd.c | 5 +++-- > hw/rdma/vmw/pvrdma_main.c | 5 +++-- > 2 files changed, 6 insert

Re: [Qemu-devel] [PATCH 3/3] tests: more strict command batching test

2018-03-21 Thread Eric Blake
On 03/21/2018 01:55 AM, Peter Xu wrote: Add "id" fields to the commands, and check that the command returns are in order. Signed-off-by: Peter Xu --- tests/qmp-test.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) +++ b/tests/qmp-test.c @@ -83,6 +83,7 @@ static void test_qm

Re: [Qemu-devel] [PATCH for-2.12 09/12] vhdx: Require power-of-two block size on create

2018-03-21 Thread Jeff Cody
On Tue, Mar 20, 2018 at 06:36:29PM +0100, Kevin Wolf wrote: > Images with a non-power-of-two block size are invalid and cannot be > opened. Reject such block sizes when creating an image. > Good catch. Reviewed-by: Jeff Cody > Signed-off-by: Kevin Wolf > --- > block/vhdx.c | 4 > 1 fil

Re: [Qemu-devel] [PATCH for-2.12 10/12] vhdx: Don't use error_setg_errno() with constant errno

2018-03-21 Thread Jeff Cody
On Tue, Mar 20, 2018 at 06:36:30PM +0100, Kevin Wolf wrote: > error_setg_errno() is meant for cases where we got an errno from the OS > that can add useful extra information to an error message. It's > pointless if we pass a constant errno, these cases should use plain > error_setg(). > > Signed-o

Re: [Qemu-devel] [PATCH for-2.12] qcow2: Reset free_cluster_index when allocating a new refcount block

2018-03-21 Thread Eric Blake
On 03/21/2018 04:28 AM, Alberto Garcia wrote: On Tue 20 Mar 2018 06:54:15 PM CET, Eric Blake wrote: When we try to allocate new clusters we first look for available ones starting from s->free_cluster_index and once we find them we increase their reference counts. Before we get to call update_re

Re: [Qemu-devel] [PATCH v3 1/2] i386/kvm: add support for Hyper-V reenlightenment MSRs

2018-03-21 Thread Roman Kagan
On Tue, Mar 20, 2018 at 03:32:27PM -0300, Eduardo Habkost wrote: > The difference between both approaches is that checking just > has_msr_hv_* would let a non-cooperating guest prevent itself > from being migrated to an older host by writing a non-zero value > to a MSR, even if hyperv support was n

Re: [Qemu-devel] [Qemu-ppc] [PATCH] qemu: include generated files with <> and not ""

2018-03-21 Thread Michael S. Tsirkin
On Wed, Mar 21, 2018 at 08:16:00AM +0100, Thomas Huth wrote: > On 20.03.2018 13:05, Michael S. Tsirkin wrote: > > On Tue, Mar 20, 2018 at 09:58:23AM +0100, Laurent Vivier wrote: > >> Le 20/03/2018 à 02:54, Michael S. Tsirkin a écrit : > >>> QEMU coding style at the moment asks for all non-system >

Re: [Qemu-devel] [RFC v6 15/22] virtio-iommu: Implement fault reporting

2018-03-21 Thread Jean-Philippe Brucker
Hi Eric, On 12/02/18 18:58, Eric Auger wrote: [...] > +for (;;) { > +elem = virtqueue_pop(vq, sizeof(VirtQueueElement)); > + > +if (!elem) { > +virtio_error(vdev, > + "no buffer available in event queue to report > event"); > +re

Re: [Qemu-devel] [PATCH for-2.12 11/12] vhdx: Check for 4 GB maximum log size on creation

2018-03-21 Thread Jeff Cody
On Tue, Mar 20, 2018 at 06:36:31PM +0100, Kevin Wolf wrote: > It's unclear what the real maximum is, but we use an uint32_t to store > the log size in vhdx_co_create(), so we should check that the given > value fits in 32 bits. > It's a uint32 in the on-disk header per spec, so I agree the implie

Re: [Qemu-devel] Bug AioContext polling is not implemented on Windows with qemu-system-ppc.exe

2018-03-21 Thread Howard Spoelstra
> Can you get a backtrace on the Windows system? Perhaps by putting a > breakpoint in aio_context_set_poll_params. > > Paolo I built qemu-master RC0 with --enable-debug. This is what a bt provides: (gdb) attach 9692 Attaching to program `c:\qemu-master\qemu-system-ppc.exe', process 9692 [New Thr

Re: [Qemu-devel] make vm-test [was: [PATCH] maintainers: Add myself as a OpenBSD maintainer]

2018-03-21 Thread Eric Blake
On 03/21/2018 03:11 AM, Fam Zheng wrote: Thanks for this; today was my first day trying the various vm-build- targets. Question: is this expected behavior? $ make vm-build-ubuntu.i386 VM-IMAGE ubuntu.i386 ... Image resized. debconf: unable to initialize frontend: Dialog debconf: (TERM is n

Re: [Qemu-devel] [Qemu-ppc] [PATCH] qemu: include generated files with <> and not ""

2018-03-21 Thread Stefan Weil
Am 21.03.2018 um 14:08 schrieb Michael S. Tsirkin: > It still leaves us with a host of problems e.g. the problem of stale > headers in the source directory. There have already been suggestions in the past to forbid in-tree builds. Would it help if configure would refuse to run from the root source

Re: [Qemu-devel] [PATCH for-2.12] qcow2: Reset free_cluster_index when allocating a new refcount block

2018-03-21 Thread Alberto Garcia
On Wed 21 Mar 2018 02:08:23 PM CET, Eric Blake wrote: >> - This scenario is harder to reach: in order to fill a 1-cluster >> refcount table the size of the image needs to be larger than >> (cluster_size³ / refcount_bits) bytes, that's 16TB with the default >> parameters. So although it can

Re: [Qemu-devel] [PATCH v3 2/2] i386/kvm: lower requirements for Hyper-V frequency MSRs exposure

2018-03-21 Thread Vitaly Kuznetsov
Roman Kagan writes: > On Tue, Mar 20, 2018 at 06:35:00PM +0100, Vitaly Kuznetsov wrote: >> Requiring tsc_is_stable_and_known() is too restrictive: even without INVTCS >> nested Hyper-V-on-KVM enables TSC pages for its guests e.g. when >> Reenlightenment MSRs are present. Presence of frequency MSR

Re: [Qemu-devel] [PATCH] dump: display cause of write failure

2018-03-21 Thread Daniel Henrique Barboza
Laurent, There is already a v3 version of Yasmin's patch that was approved and it is supposedly waiting to be merged: http://lists.gnu.org/archive/html/qemu-devel/2018-02/msg03035.html In a quick look at this patch looks like they do the same thing. Daniel On 03/21/2018 09:08 AM, Laurent Vi

Re: [Qemu-devel] [PATCH v4 for 2.12 0/3] fix bitmaps migration through shared storage

2018-03-21 Thread Max Reitz
On 2018-03-20 18:05, Vladimir Sementsov-Ogievskiy wrote: > Hi all. > > This fixes bitmaps migration through shared storage. Look at 02 for > details. > > The bug introduced in 2.10 with the whole qcow2 bitmaps feature, so > qemu-stable in CC. However I doubt that someone really suffered from this

Re: [Qemu-devel] [PATCH] dump: display cause of write failure

2018-03-21 Thread Laurent Vivier
On 21/03/2018 14:16, Daniel Henrique Barboza wrote: > Laurent, > > There is already a v3 version of Yasmin's patch that was approved and > it is supposedly waiting to be merged: > > http://lists.gnu.org/archive/html/qemu-devel/2018-02/msg03035.html Ok, sorry, I've missed it because the subject l

Re: [Qemu-devel] [PATCH for-2.12] hw/rdma: fix clang compilation errors

2018-03-21 Thread Eric Blake
On 03/21/2018 07:40 AM, Marcel Apfelbaum wrote: Fix some enum castings and extra parentheses. Reported-by: Michael S. Tsirkin Signed-off-by: Marcel Apfelbaum --- hw/rdma/vmw/pvrdma_cmd.c | 5 +++-- hw/rdma/vmw/pvrdma_main.c | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff

Re: [Qemu-devel] Bug AioContext polling is not implemented on Windows with qemu-system-ppc.exe

2018-03-21 Thread Paolo Bonzini
On 21/03/2018 14:13, Howard Spoelstra wrote: >> Can you get a backtrace on the Windows system? Perhaps by putting a >> breakpoint in aio_context_set_poll_params. >> >> Paolo > > I built qemu-master RC0 with --enable-debug. This is what a bt provides: I am not sure what is happening here, but it

Re: [Qemu-devel] [Qemu-ppc] [PATCH] qemu: include generated files with <> and not ""

2018-03-21 Thread Michael S. Tsirkin
On Wed, Mar 21, 2018 at 02:15:20PM +0100, Stefan Weil wrote: > Am 21.03.2018 um 14:08 schrieb Michael S. Tsirkin: > > It still leaves us with a host of problems e.g. the problem of stale > > headers in the source directory. > > There have already been suggestions in the past to forbid in-tree > bu

Re: [Qemu-devel] [PATCH for-2.12] hw/rdma: fix clang compilation errors

2018-03-21 Thread Marcel Apfelbaum
On 21/03/2018 15:20, Eric Blake wrote: > On 03/21/2018 07:40 AM, Marcel Apfelbaum wrote: >> Fix some enum castings and extra parentheses. >> >> Reported-by: Michael S. Tsirkin >> Signed-off-by: Marcel Apfelbaum >> --- >>   hw/rdma/vmw/pvrdma_cmd.c  | 5 +++-- >>   hw/rdma/vmw/pvrdma_main.c | 5 +++

Re: [Qemu-devel] [PATCH] dump: display cause of write failure

2018-03-21 Thread Daniel Henrique Barboza
On 03/21/2018 10:22 AM, Laurent Vivier wrote: On 21/03/2018 14:16, Daniel Henrique Barboza wrote: Laurent, There is already a v3 version of Yasmin's patch that was approved and it is supposedly waiting to be merged: http://lists.gnu.org/archive/html/qemu-devel/2018-02/msg03035.html Ok, sorr

Re: [Qemu-devel] Bug AioContext polling is not implemented on Windows with qemu-system-ppc.exe

2018-03-21 Thread Howard Spoelstra
>> I built qemu-master RC0 with --enable-debug. This is what a bt provides: > > I am not sure what is happening here, but it is obviously not too > helpful. :( Perhaps "gdb --args qemu-system-ppc.exe ..." is better? > > Thanks, > > Paolo Obviously not, but this doesn't make things better... ;-)

Re: [Qemu-devel] [PATCH v3 0/1] dump.c: allow fd_write_vmcore to return errno on failure

2018-03-21 Thread Daniel Henrique Barboza
Ping On 02/12/2018 12:25 PM, Daniel Henrique Barboza wrote: v3: - added set_errg_errno() to all callers of fd_write_vmcore - changed patch subject to reflect what it is addressing now - link to previous version: http://lists.gnu.org/archive/html/qemu-devel/2018-02/msg02787.html Yasmin Beatriz

Re: [Qemu-devel] [Qemu-ppc] [PATCH] qemu: include generated files with <> and not ""

2018-03-21 Thread Daniel P . Berrangé
On Wed, Mar 21, 2018 at 03:08:36PM +0200, Michael S. Tsirkin wrote: > On Wed, Mar 21, 2018 at 08:16:00AM +0100, Thomas Huth wrote: > > On 20.03.2018 13:05, Michael S. Tsirkin wrote: > > > On Tue, Mar 20, 2018 at 09:58:23AM +0100, Laurent Vivier wrote: > > >> Le 20/03/2018 à 02:54, Michael S. Tsirki

Re: [Qemu-devel] [PATCH] qcow2: Reset free_cluster_index when allocating a new refcount block

2018-03-21 Thread Eric Blake
On 03/21/2018 08:30 AM, Eric Blake wrote: On 03/20/2018 08:55 AM, Alberto Garcia wrote: This can be reproduced easily:   qemu-img create -f qcow2 -o cluster_size=512 hd.qcow2 1M   qemu-io -c 'write 0 124k' hd.qcow2 This reproduction fails if you use non-default refcount_order... +

Re: [Qemu-devel] [PATCH] qcow2: Reset free_cluster_index when allocating a new refcount block

2018-03-21 Thread Eric Blake
On 03/20/2018 08:55 AM, Alberto Garcia wrote: When we try to allocate new clusters we first look for available ones starting from s->free_cluster_index and once we find them we increase their reference counts. Before we get to call update_refcount() to do this last step s->free_cluster_index is a

[Qemu-devel] [PATCH for-2.12 v2] qcow2: Reset free_cluster_index when allocating a new refcount block

2018-03-21 Thread Alberto Garcia
When we try to allocate new clusters we first look for available ones starting from s->free_cluster_index and once we find them we increase their reference counts. Before we get to call update_refcount() to do this last step s->free_cluster_index is already pointing to the next cluster after the on

[Qemu-devel] [PATCH 2/3] qobject: assume base of a qobject is at offset 0

2018-03-21 Thread Marc-André Lureau
Simplify casting to QObject by not requiring the definition of the type and assuming base QObject is at offset 0. Add a static check for this. Use the QEMU_GENERIC macro for keeping type safety check and error when given an unknown type. Signed-off-by: Marc-André Lureau --- include/qapi/qmp/qob

[Qemu-devel] [PATCH 1/3] compiler: extend QEMU_GENERIC to handle more arguments

2018-03-21 Thread Marc-André Lureau
The following patch is going to use more than 10 arguments to QEMU_GENERIC. Signed-off-by: Marc-André Lureau --- include/qemu/compiler.h | 23 +++ 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/include/qemu/compiler.h b/include/qemu/compiler.h index 9f762695d1

[Qemu-devel] [PATCH 0/3] RFC: simplify qobject refcount

2018-03-21 Thread Marc-André Lureau
Hi, This series aims to get rid of the distinction between QObject, that must use qobject_incref/qobject_decref and its various derived types that have to use QINCREF/QDECREF. Instead, replace it with qobject_ref/qobject_unref for all types. Marc-André Lureau (3): compiler: extend QEMU_GENERIC

Re: [Qemu-devel] [Qemu-ppc] [PATCH] qemu: include generated files with <> and not ""

2018-03-21 Thread Michael S. Tsirkin
On Wed, Mar 21, 2018 at 01:29:53PM +, Daniel P. Berrangé wrote: > On Wed, Mar 21, 2018 at 03:08:36PM +0200, Michael S. Tsirkin wrote: > > On Wed, Mar 21, 2018 at 08:16:00AM +0100, Thomas Huth wrote: > > > On 20.03.2018 13:05, Michael S. Tsirkin wrote: > > > > On Tue, Mar 20, 2018 at 09:58:23AM

Re: [Qemu-devel] [Libguestfs] [PATCH] tests: regressions: make test-big-heap use a temporary empty file

2018-03-21 Thread Eric Blake
[adding qemu lists] On 03/21/2018 07:51 AM, Richard W.M. Jones wrote: On Wed, Mar 21, 2018 at 01:44:17PM +0100, Pino Toscano wrote: Newer versions of qemu use file locking for the images by default, and apparently that does not work with /dev/null. Since this test just calls qemu-img to get th

Re: [Qemu-devel] [PATCH] postcopy: Stub postcopy_request_shared_page

2018-03-21 Thread no-reply
Hi, This series failed docker-mingw@fedora build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. Type: series Message-id: 20180320153941.50954-1-dgilb...@redhat.com Subject: [Qemu-devel] [PATCH] postcopy: Stub po

Re: [Qemu-devel] [Libguestfs] [PATCH] tests: regressions: make test-big-heap use a temporary empty file

2018-03-21 Thread Pino Toscano
On Wednesday, 21 March 2018 14:45:38 CET Eric Blake wrote: > [adding qemu lists] > > On 03/21/2018 07:51 AM, Richard W.M. Jones wrote: > > On Wed, Mar 21, 2018 at 01:44:17PM +0100, Pino Toscano wrote: > >> Newer versions of qemu use file locking for the images by default, and > >> apparently that

[Qemu-devel] [PATCH 1/5] ui: add ctrl modifier support to kbd_put_qcode_console()

2018-03-21 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- include/ui/console.h | 2 +- ui/console.c | 15 +-- ui/gtk.c | 4 ++-- ui/sdl2-input.c | 2 +- 4 files changed, 17 insertions(+), 6 deletions(-) diff --git a/include/ui/console.h b/include/ui/console.h index 6d2c052068..37a

[Qemu-devel] [PATCH 5/5] sdl2: drop dead code

2018-03-21 Thread Gerd Hoffmann
Leftover from sdl1 -> sdl2 port. Signed-off-by: Gerd Hoffmann --- ui/sdl2-input.c | 8 1 file changed, 8 deletions(-) diff --git a/ui/sdl2-input.c b/ui/sdl2-input.c index d46411c474..1378b63dd9 100644 --- a/ui/sdl2-input.c +++ b/ui/sdl2-input.c @@ -62,14 +62,6 @@ void sdl2_process_key(

[Qemu-devel] [PATCH 4/5] sdl2: drop QEMU_KEY_BACKSPACE special case

2018-03-21 Thread Gerd Hoffmann
Not needed, kbd_put_qcode_console() will handle that for us. Signed-off-by: Gerd Hoffmann --- ui/sdl2-input.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/ui/sdl2-input.c b/ui/sdl2-input.c index 62c2b58ef0..d46411c474 100644 --- a/ui/sdl2-input.c +++ b/ui/sdl2-input.c @@ -97,9 +97,6 @@

[Qemu-devel] [PATCH 3/5] sdl2: enable ctrl modifier keys for text consoles

2018-03-21 Thread Gerd Hoffmann
Unbreaks ctrl-pageup/pagedown scrollback. Signed-off-by: Gerd Hoffmann --- ui/sdl2-input.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ui/sdl2-input.c b/ui/sdl2-input.c index 8d0d9ba17c..62c2b58ef0 100644 --- a/ui/sdl2-input.c +++ b/ui/sdl2-input.c @@ -90,6 +90,8 @@ vo

[Qemu-devel] [PATCH 0/5] sdl2 text console fixes and cleanups.

2018-03-21 Thread Gerd Hoffmann
Gerd Hoffmann (5): ui: add ctrl modifier support to kbd_put_qcode_console() sdl2: track kbd modifier state unconditionally sdl2: enable ctrl modifier keys for text consoles sdl2: drop QEMU_KEY_BACKSPACE special case sdl2: drop dead code include/ui/console.h | 2 +- ui/console.c

[Qemu-devel] [PATCH 2/5] sdl2: track kbd modifier state unconditionally

2018-03-21 Thread Gerd Hoffmann
For both grapical and text consoles. Signed-off-by: Gerd Hoffmann --- ui/sdl2-input.c | 39 +-- 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/ui/sdl2-input.c b/ui/sdl2-input.c index 35d35c14c4..8d0d9ba17c 100644 --- a/ui/sdl2-input.c +++ b/ui

Re: [Qemu-devel] [PATCH for-2.12 v2] qcow2: Reset free_cluster_index when allocating a new refcount block

2018-03-21 Thread Kevin Wolf
Am 21.03.2018 um 14:38 hat Alberto Garcia geschrieben: > This can be reproduced easily: > > qemu-img create -f qcow2 -o cluster_size=512 hd.qcow2 1M > qemu-io -c 'write 0 124k' hd.qcow2 > > After this the image has 132608 bytes (256 clusters), and the refcount > block is full. If we wri

Re: [Qemu-devel] [PATCH v3 for-2.12? 0/1] dump.c: allow fd_write_vmcore to return errno on failure

2018-03-21 Thread Eric Blake
On 03/21/2018 08:29 AM, Daniel Henrique Barboza wrote: Ping On 02/12/2018 12:25 PM, Daniel Henrique Barboza wrote: v3: - added set_errg_errno() to all callers of fd_write_vmcore - changed patch subject to reflect what it is addressing now - link to previous version: http://lists.gnu.org/archive

Re: [Qemu-devel] [PATCH v3 10/24] RISC-V: Hold rcu_read_lock when accessing memory

2018-03-21 Thread Paolo Bonzini
On 19/03/2018 22:07, Michael Clark wrote: > > > On Mon, Mar 19, 2018 at 2:41 AM, Paolo Bonzini > wrote: > > On 16/03/2018 20:41, Michael Clark wrote: > > From reading other code that accesses memory regions directly, > > it appears that the rcu_read_lock

Re: [Qemu-devel] [PATCH 2/3] qobject: assume base of a qobject is at offset 0

2018-03-21 Thread Eric Blake
On 03/21/2018 08:40 AM, Marc-André Lureau wrote: Simplify casting to QObject by not requiring the definition of the type and assuming base QObject is at offset 0. Add a static check for this. Use the QEMU_GENERIC macro for keeping type safety check and error when given an unknown type. Signed-o

Re: [Qemu-devel] [PATCH 2/3] qobject: assume base of a qobject is at offset 0

2018-03-21 Thread Paolo Bonzini
On 21/03/2018 14:40, Marc-André Lureau wrote: > +/* A typecast, checking for the type of arguments */ > +/* QObject is at offset 0, for all QObject-derived types */ > +#define QOBJECT(x) QEMU_GENERIC(x, \ > +(QNull *, (QObject *) x), \ > +(const QNull *, (cons

[Qemu-devel] [PATCH V2 for-2.12] hw/rdma: fix clang compilation errors

2018-03-21 Thread Marcel Apfelbaum
Fix some enum castings and extra parentheses. Reported-by: Michael S. Tsirkin Signed-off-by: Marcel Apfelbaum --- V1 -> V2: - Addressed Yuval's and Eric's comments: - Removed some parentheses - Replaced PVRDMA_PORT_DOWN with IBV_PORT_DOWN - Removed unneeded cast hw/rdma/vmw/pvrdma_c

Re: [Qemu-devel] [PATCH 2/3] qobject: assume base of a qobject is at offset 0

2018-03-21 Thread Paolo Bonzini
On 21/03/2018 15:01, Eric Blake wrote: >> > > Interesting.  If we do this, we should also simplify qobject_to() from > its current: > > #define qobject_to(type, obj) ({ \ >     QObject *_tmp = qobject_check_type(obj, glue(QTYPE_CAST_TO_, type)); \ >     _tmp ? container_of(_tmp, type, base) : (ty

Re: [Qemu-devel] Monitor and serial output window broken with SDL2

2018-03-21 Thread Gerd Hoffmann
On Tue, Mar 20, 2018 at 11:43:08PM +0100, BALATON Zoltan wrote: > Hello, > > With SDL2 the monitor and serial output windows behave differently than they > used to with SDL1.2 in that they are opening in separate windows. This is an > unexpected change we've discussed before but other than this th

Re: [Qemu-devel] make vm-test [was: [PATCH] maintainers: Add myself as a OpenBSD maintainer]

2018-03-21 Thread Fam Zheng
On Wed, 03/21 08:14, Eric Blake wrote: > On 03/21/2018 03:11 AM, Fam Zheng wrote: > > > Thanks for this; today was my first day trying the various vm-build- > > > targets. > > > > > > Question: is this expected behavior? > > > > > > $ make vm-build-ubuntu.i386 > > > VM-IMAGE ubuntu.i386 > >

Re: [Qemu-devel] [PATCH 2/3] qobject: assume base of a qobject is at offset 0

2018-03-21 Thread Marc-André Lureau
Hi On Wed, Mar 21, 2018 at 3:01 PM, Paolo Bonzini wrote: > On 21/03/2018 14:40, Marc-André Lureau wrote: >> +/* A typecast, checking for the type of arguments */ >> +/* QObject is at offset 0, for all QObject-derived types */ >> +#define QOBJECT(x) QEMU_GENERIC(x, \ >> +(QNull *,

Re: [Qemu-devel] [PATCH 0/3] RFC: simplify qobject refcount

2018-03-21 Thread Eric Blake
On 03/21/2018 08:40 AM, Marc-André Lureau wrote: Hi, This series aims to get rid of the distinction between QObject, that must use qobject_incref/qobject_decref and its various derived types that have to use QINCREF/QDECREF. Instead, replace it with qobject_ref/qobject_unref for all types. I _

Re: [Qemu-devel] [PATCH for-2.12 v2] qcow2: Reset free_cluster_index when allocating a new refcount block

2018-03-21 Thread Alberto Garcia
On Wed 21 Mar 2018 02:52:38 PM CET, Kevin Wolf wrote: >> qemu-img create -f qcow2 -o cluster_size=512 hd.qcow2 1M >> qemu-io -c 'write 0 124k' hd.qcow2 >> qemu-io -c 'write 124k 512' hd.qcow2 > > So if I understand correctly, this is what we get: > > 0x2: free > 0x20200: refcoun

Re: [Qemu-devel] [PATCH 0/3] RFC: simplify qobject refcount

2018-03-21 Thread Marc-André Lureau
Hi On Wed, Mar 21, 2018 at 3:09 PM, Eric Blake wrote: > On 03/21/2018 08:40 AM, Marc-André Lureau wrote: >> >> Hi, >> >> This series aims to get rid of the distinction between QObject, that >> must use qobject_incref/qobject_decref and its various derived types >> that have to use QINCREF/QDECREF

Re: [Qemu-devel] [PATCH v3 for-2.12? 0/1] dump.c: allow fd_write_vmcore to return errno on failure

2018-03-21 Thread Marc-André Lureau
Hi On Wed, Mar 21, 2018 at 2:56 PM, Eric Blake wrote: > On 03/21/2018 08:29 AM, Daniel Henrique Barboza wrote: >> >> Ping >> >> On 02/12/2018 12:25 PM, Daniel Henrique Barboza wrote: >>> >>> v3: >>> - added set_errg_errno() to all callers of fd_write_vmcore >>> - changed patch subject to reflect

Re: [Qemu-devel] [PATCH 2/3] qobject: assume base of a qobject is at offset 0

2018-03-21 Thread Eric Blake
On 03/21/2018 09:08 AM, Marc-André Lureau wrote: Hi On Wed, Mar 21, 2018 at 3:01 PM, Paolo Bonzini wrote: On 21/03/2018 14:40, Marc-André Lureau wrote: +/* A typecast, checking for the type of arguments */ +/* QObject is at offset 0, for all QObject-derived types */ +#define QOBJECT(x) QEMU_G

Re: [Qemu-devel] [PATCH 2/3] qobject: assume base of a qobject is at offset 0

2018-03-21 Thread Marc-André Lureau
Hi On Wed, Mar 21, 2018 at 3:19 PM, Eric Blake wrote: > On 03/21/2018 09:08 AM, Marc-André Lureau wrote: >> >> Hi >> >> On Wed, Mar 21, 2018 at 3:01 PM, Paolo Bonzini >> wrote: >>> >>> On 21/03/2018 14:40, Marc-André Lureau wrote: +/* A typecast, checking for the type of arguments */ >

Re: [Qemu-devel] [PATCH 3/3] qobject: replace qobject_incref/QINCREF qobject_decref/QDECREF

2018-03-21 Thread Eric Blake
On 03/21/2018 08:40 AM, Marc-André Lureau wrote: Now that we can safely call QOBJECT() on QObject * and children types, we can have a single macro to ref/unref the object. Change the incref/decref prefix name for the more common ref/unref. I know you did this by sed (for the most part); but it

Re: [Qemu-devel] [PATCH v5 0/6] Add a valid_cpu_types property

2018-03-21 Thread Igor Mammedov
On Wed, 14 Mar 2018 00:13:40 +0100 Philippe Mathieu-Daudé wrote: > On 02/02/2018 01:42 AM, Alistair Francis wrote: > > > > There are numorous QEMU machines that only have a single or a handful of > > valid CPU options. To simplyfy the management of specificying which CPU > > is/isn't valid let's

[Qemu-devel] [PULL 0/2] Dump patches

2018-03-21 Thread Marc-André Lureau
The following changes since commit f1a63fcfcd92c88be8942b5ae71aef9749a4f135: Update version for v2.12.0-rc0 release (2018-03-20 19:04:22 +) are available in the Git repository at: https://github.com/elmarco/qemu.git tags/dump-pull-request for you to fetch changes up to 4b17bc933fc26f7a4

[Qemu-devel] [PULL 2/2] dump-guest-memory: more descriptive lookup_type failure

2018-03-21 Thread Marc-André Lureau
From: Andrew Jones We've seen a few reports of (gdb) source /usr/share/qemu-kvm/dump-guest-memory.py Traceback (most recent call last): File "/usr/share/qemu-kvm/dump-guest-memory.py", line 19, in UINTPTR_T = gdb.lookup_type("uintptr_t") gdb.error: No type named uintptr_t. This occu

[Qemu-devel] [PULL 1/2] dump.c: allow fd_write_vmcore to return errno on failure

2018-03-21 Thread Marc-André Lureau
From: Yasmin Beatriz fd_write_vmcore can fail to execute for a lot of reasons that can be retrieved by errno, but it only returns -1. This makes difficult for the caller to know what happened and only a generic error message is propagated back to the user. This is an example using dump-guest-memo

[Qemu-devel] [PULL 1/5] multiboot: Reject kernels exceeding the address space

2018-03-21 Thread Kevin Wolf
The code path where mh_load_end_addr is non-zero in the Multiboot header checks that mh_load_end_addr >= mh_load_addr and so mb_load_size is checked. However, mb_load_size is not checked when calculated from the file size, when mh_load_end_addr is 0. If the kernel binary size is larger than can f

[Qemu-devel] [PULL 2/5] multiboot: Check validity of mh_header_addr

2018-03-21 Thread Kevin Wolf
I couldn't find a case where this prevents something bad from happening that isn't already caught by other checks, but let's err on the safe side and check that mh_header_addr is as expected. Signed-off-by: Kevin Wolf Reviewed-by: Jack Schwartz --- hw/i386/multiboot.c | 4 1 file changed,

[Qemu-devel] [PULL 5/5] tests/multiboot: Add .gitignore

2018-03-21 Thread Kevin Wolf
Signed-off-by: Kevin Wolf Reviewed-by: Jack Schwartz Reviewed-by: Eric Blake --- tests/multiboot/.gitignore | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 tests/multiboot/.gitignore diff --git a/tests/multiboot/.gitignore b/tests/multiboot/.gitignore new file mode 100644 index 00

[Qemu-devel] [PULL 0/5] Multiboot patches

2018-03-21 Thread Kevin Wolf
The following changes since commit f1a63fcfcd92c88be8942b5ae71aef9749a4f135: Update version for v2.12.0-rc0 release (2018-03-20 19:04:22 +) are available in the git repository at: git://repo.or.cz/qemu/kevin.git tags/for-upstream for you to fetch changes up to e2679395d598bd40770c22a793

[Qemu-devel] [PULL 3/5] tests/multiboot: Test exit code for every qemu run

2018-03-21 Thread Kevin Wolf
Testing the exit code only once after a whole group of tests has completed is not enough, it catches errors only in the very last qemu invocation. We need to have the check after each qemu run. The logging and diff with the reference output is still done once per group to keep things more managabl

[Qemu-devel] [PULL 4/5] tests/multiboot: Add tests for the a.out kludge

2018-03-21 Thread Kevin Wolf
Signed-off-by: Kevin Wolf Reviewed-by: Jack Schwartz --- tests/multiboot/Makefile| 22 +-- tests/multiboot/aout_kludge.S | 138 tests/multiboot/aout_kludge.out | 42 tests/multiboot/run_test.sh | 10 ++- 4 files changed,

Re: [Qemu-devel] [PATCH] migration: fix pfd leak

2018-03-21 Thread Philippe Mathieu-Daudé
On 03/21/2018 12:36 PM, Marc-André Lureau wrote: > Fix leak spotted by ASAN: > > Direct leak of 16 byte(s) in 1 object(s) allocated from: > #0 0x7fe1abb80a38 in __interceptor_calloc (/lib64/libasan.so.4+0xdea38) > #1 0x7fe1aaf1bf75 in g_malloc0 ../glib/gmem.c:124 > #2 0x7fe1aaf1c249 in

Re: [Qemu-devel] [PATCH 2/3] qobject: assume base of a qobject is at offset 0

2018-03-21 Thread Paolo Bonzini
On 21/03/2018 15:21, Marc-André Lureau wrote: >>> Yeah, I tried a few of those approaches. Here the problem is that >>> QObject doesn't have base field. So you get a compile time error with >>> a QObject * as argument. >> >> So the compiler requires &(x)->base to resolve even when it is not on the

[Qemu-devel] [PATCH v2] qemu: replace "" with <> in headers

2018-03-21 Thread Michael S. Tsirkin
Our current scheme is to use #include "" for internal headers, and #include <> for external ones. Unfortunately this is not based on compiler support: from C point of view, the "" form merely looks up headers in the current directory and then falls back on <> directories. Thus, for example, a s

Re: [Qemu-devel] [PATCH 3/3] qobject: replace qobject_incref/QINCREF qobject_decref/QDECREF

2018-03-21 Thread Marc-André Lureau
On Wed, Mar 21, 2018 at 3:28 PM, Eric Blake wrote: > On 03/21/2018 08:40 AM, Marc-André Lureau wrote: >> >> Now that we can safely call QOBJECT() on QObject * and children types, >> we can have a single macro to ref/unref the object. >> >> Change the incref/decref prefix name for the more common r

Re: [Qemu-devel] Google Summer of Code 2018 - add Windows NT 4.0 PowerPC support

2018-03-21 Thread Programmingkid
> On Mar 20, 2018, at 9:46 AM, Stefan Hajnoczi wrote: > > On Sun, Mar 18, 2018 at 04:02:10PM -0400, Programmingkid wrote: >> Is there still time to add another idea to the Google Summer of Code 2018 >> list? I just came across an interesting idea to add support for Windows NT >> 4.0 PowerPC to

Re: [Qemu-devel] [PATCH 1/4] nbd/server: refactor nbd_negotiate_meta_query for several namespaces

2018-03-21 Thread Eric Blake
[adding NBD list] On 03/21/2018 07:19 AM, Vladimir Sementsov-Ogievskiy wrote: Signed-off-by: Vladimir Sementsov-Ogievskiy --- nbd/server.c | 60 +++- 1 file changed, 43 insertions(+), 17 deletions(-) +struct { +const char *ns; +

Re: [Qemu-devel] [PATCH V2 for-2.12] hw/rdma: fix clang compilation errors

2018-03-21 Thread Yuval Shaia
On Wed, Mar 21, 2018 at 04:03:16PM +0200, Marcel Apfelbaum wrote: > Fix some enum castings and extra parentheses. > > Reported-by: Michael S. Tsirkin > Signed-off-by: Marcel Apfelbaum > --- > > V1 -> V2: > - Addressed Yuval's and Eric's comments: >- Removed some parentheses >- Replaced

Re: [Qemu-devel] [PATCH v2] qemu: replace "" with <> in headers

2018-03-21 Thread Paolo Bonzini
On 21/03/2018 15:46, Michael S. Tsirkin wrote: > +if (m@^\s*#include\s+"qemu/@o) { > +s@^(\s*#include\s+)"qemu/([^"]+)"(.*)$@$1$3@o) { > +} else { > +s@^(\s*#include\s+)"([^"]+)"(.*)$@$1$3@o) { > +} Can you explain the changes in the source tree layout? Also, s{}{} and m{} are a bit more

Re: [Qemu-devel] [PATCH 2/4] nbd/server: add nbd_meta_single_query helper

2018-03-21 Thread Eric Blake
On 03/21/2018 07:19 AM, Vladimir Sementsov-Ogievskiy wrote: The helper will be reused for bitmaps namespace. Signed-off-by: Vladimir Sementsov-Ogievskiy --- nbd/server.c | 41 - 1 file changed, 28 insertions(+), 13 deletions(-) +/* Read len bytes a

Re: [Qemu-devel] [PATCH for-2.12 v2] qcow2: Reset free_cluster_index when allocating a new refcount block

2018-03-21 Thread Kevin Wolf
Am 21.03.2018 um 15:10 hat Alberto Garcia geschrieben: > On Wed 21 Mar 2018 02:52:38 PM CET, Kevin Wolf wrote: > > >> qemu-img create -f qcow2 -o cluster_size=512 hd.qcow2 1M > >> qemu-io -c 'write 0 124k' hd.qcow2 > >> qemu-io -c 'write 124k 512' hd.qcow2 > > > > So if I understand

Re: [Qemu-devel] Moving seabios-hppa git submodule to use a qemu.org mirror

2018-03-21 Thread Jeff Cody
On Tue, Mar 20, 2018 at 06:54:10PM +0100, Paolo Bonzini wrote: > On 19/03/2018 20:06, Jeff Cody wrote: > > On Mon, Mar 19, 2018 at 01:19:36PM +, Peter Maydell wrote: > >> On 21 February 2018 at 05:27, Jeff Cody wrote: > >>> On Tue, Feb 20, 2018 at 06:43:22PM +, Peter Maydell wrote: >

[Qemu-devel] [PATCH] rdma: fix up include directives

2018-03-21 Thread Michael S. Tsirkin
Our rule right now is to use <> for external headers only. RDMA code violates that, fix it up. Signed-off-by: Michael S. Tsirkin --- hw/rdma/rdma_backend.h| 2 +- hw/rdma/rdma_backend_defs.h | 2 +- hw/rdma/rdma_rm.h | 2 +- hw/rdma/rdma_utils.h | 6 +++--- hw/

Re: [Qemu-devel] [PATCH v2] qemu: replace "" with <> in headers

2018-03-21 Thread Michael S. Tsirkin
On Wed, Mar 21, 2018 at 04:04:29PM +0100, Paolo Bonzini wrote: > On 21/03/2018 15:46, Michael S. Tsirkin wrote: > > +if (m@^\s*#include\s+"qemu/@o) { > > +s@^(\s*#include\s+)"qemu/([^"]+)"(.*)$@$1$3@o) { > > +} else { > > +s@^(\s*#include\s+)"([^"]+)"(.*)$@$1$3@o) { > > +} > > Can you expl

Re: [Qemu-devel] [Qemu-arm] [PATCH v3 01/22] target/arm: A53: Initialize PMCEID[01]

2018-03-21 Thread Aaron Lindsay
On Mar 20 02:03, Philippe Mathieu-Daudé wrote: > On 03/19/2018 09:35 PM, Aaron Lindsay wrote: > > On Mar 18 23:35, Philippe Mathieu-Daudé wrote: > >> Hi Aaron, > >> > >> On 03/16/2018 09:30 PM, Aaron Lindsay wrote: > >>> A53 advertises ARM_FEATURE_PMU, but wasn't initializing pmceid[01]. > >>> pmce

Re: [Qemu-devel] [PATCH v2] qemu: replace "" with <> in headers

2018-03-21 Thread Daniel P . Berrangé
On Wed, Mar 21, 2018 at 04:46:32PM +0200, Michael S. Tsirkin wrote: > Our current scheme is to use > #include "" > for internal headers, and > #include <> > for external ones. > > Unfortunately this is not based on compiler support: from C point of > view, the "" form merely looks up headers in

Re: [Qemu-devel] Moving seabios-hppa git submodule to use a qemu.org mirror

2018-03-21 Thread Paolo Bonzini
On 21/03/2018 16:09, Jeff Cody wrote: > On Tue, Mar 20, 2018 at 06:54:10PM +0100, Paolo Bonzini wrote: >> On 19/03/2018 20:06, Jeff Cody wrote: >>> On Mon, Mar 19, 2018 at 01:19:36PM +, Peter Maydell wrote: On 21 February 2018 at 05:27, Jeff Cody wrote: > On Tue, Feb 20, 2018 at 06:43

[Qemu-devel] [PATCH for-2.12 1/2] rdma: fix up include directives

2018-03-21 Thread Michael S. Tsirkin
Our rule right now is to use <> for external headers only. RDMA code violates that, fix it up. Signed-off-by: Michael S. Tsirkin --- hw/rdma/rdma_backend.h| 2 +- hw/rdma/rdma_backend_defs.h | 2 +- hw/rdma/rdma_rm.h | 2 +- hw/rdma/rdma_utils.h | 6 +++--- hw/

Re: [Qemu-devel] [PATCH v2] qemu: replace "" with <> in headers

2018-03-21 Thread Paolo Bonzini
On 21/03/2018 16:11, Michael S. Tsirkin wrote: >> Can you explain the changes in the source tree layout? > include/qemu -> include/qemu/common > include/* -> include/qemu/* Ok, then perhaps "util" instead of common would match the source layout more. Paolo > Thus one uses any qemu headers with >

[Qemu-devel] [PATCH for-2.12 2/2] make: switch from -I to -iquote

2018-03-21 Thread Michael S. Tsirkin
Our rule right now is to use <> for external headers, "" for internal ones. The idea was to avoid conflicts between e.g. a system file named and an internal one by the same name. Unfortunately we use -I compiler flag so it does not help: a system file doing #include will still pick up ours first

Re: [Qemu-devel] Bug AioContext polling is not implemented on Windows with qemu-system-ppc.exe

2018-03-21 Thread Paolo Bonzini
On 21/03/2018 14:29, Howard Spoelstra wrote: > Obviously not, but this doesn't make things better... ;-) > > C:\qemu-debugging>gdb --args c:\qemu-master\qemu-system-ppc.exe -L > c:\qemu-master\pc-bios -boot d -m 256 -M mac99 -prom-env > "boot-args=-v" -prom-env "auto-boot?=true" -prom-env "vga-ndr

Re: [Qemu-devel] [PATCH 2/3] qobject: assume base of a qobject is at offset 0

2018-03-21 Thread Eric Blake
On 03/21/2018 09:49 AM, Paolo Bonzini wrote: On 21/03/2018 15:21, Marc-André Lureau wrote: Yeah, I tried a few of those approaches. Here the problem is that QObject doesn't have base field. So you get a compile time error with a QObject * as argument. So the compiler requires &(x)->base to res

Re: [Qemu-devel] [PATCH qemu v7 2/4] vfio/pci: Relax DMA map errors for MMIO regions

2018-03-21 Thread Alex Williamson
On Mon, 19 Mar 2018 21:49:58 +0100 Auger Eric wrote: > Hi Alexey, > > On 09/02/18 08:55, Alexey Kardashevskiy wrote: > > At the moment if vfio_memory_listener is registered in the system memory > > address space, it maps/unmaps every RAM memory region for DMA. > > It expects system page size ali

[Qemu-devel] [PATCH] block: drop moderated sheepdog mailing list from MAINTAINERS file

2018-03-21 Thread Daniel P . Berrangé
The sheepdog mailing list is setup to stop and queue messages from non-subscribers, pending moderator approval. Unfortunately it seems that the moderation queue is not actively dealt with. Even when messages are approved, the sender is never added to the whitelist, so every future mail the same sen

Re: [Qemu-devel] [PATCH v3 2/2] i386/kvm: lower requirements for Hyper-V frequency MSRs exposure

2018-03-21 Thread Paolo Bonzini
On 20/03/2018 18:35, Vitaly Kuznetsov wrote: > +if (has_msr_hv_frequencies && env->tsc_khz) { > env->features[FEAT_HYPERV_EAX] |= HV_ACCESS_FREQUENCY_MSRS; > env->features[FEAT_HYPERV_EDX] |= HV_FREQUENCY_MSRS_AVAILABLE; > } Since you have added cpu->hype

Re: [Qemu-devel] [PATCH for-2.12 v2] qcow2: Reset free_cluster_index when allocating a new refcount block

2018-03-21 Thread Alberto Garcia
On Wed 21 Mar 2018 04:07:28 PM CET, Kevin Wolf wrote: > I just remembered that when I looked at an image recently, I noticed > that the refcount block wasn't in the first cluster and I disliked it, > though mostly because it felt untidy rather than being a problem. I don't think you can fix that i

Re: [Qemu-devel] Moving seabios-hppa git submodule to use a qemu.org mirror

2018-03-21 Thread Jeff Cody
On Wed, Mar 21, 2018 at 04:21:43PM +0100, Paolo Bonzini wrote: > On 21/03/2018 16:09, Jeff Cody wrote: > > On Tue, Mar 20, 2018 at 06:54:10PM +0100, Paolo Bonzini wrote: > >> On 19/03/2018 20:06, Jeff Cody wrote: > >>> On Mon, Mar 19, 2018 at 01:19:36PM +, Peter Maydell wrote: > On 21 Febr

Re: [Qemu-devel] [PATCH 2/3] qobject: assume base of a qobject is at offset 0

2018-03-21 Thread Paolo Bonzini
On 21/03/2018 16:29, Eric Blake wrote: > > Not necessarily - can we use multiple layers of macros?  (Untested) > > #define QOBJECT_0(x) x > #define QOBJECT_1(x) ({ \ >     QEMU_BUILD_BUG_ON(offsetof(typeof(*x), base)); \ >     &(x)->base; }) > #define QOBJECT(x) QOBJECT_ ## QEMU_GENERIC(x, \ >   

<    1   2   3   4   >