Re: [Qemu-devel] [PATCH] scsi: pvscsi: limit process IO loop to maximum page count

2016-09-13 Thread P J P
+-- On Wed, 7 Sep 2016, P J P wrote --+ | From: Prasad J Pandit | | Vmware Paravirtual SCSI emulator while processing IO requests | could run into an infinite loop if 'pvscsi_ring_pop_req_descr' | always returned positive value. Limit IO loop to the maximum | page count. | | Reported-by: Li Qian

Re: [Qemu-devel] [PATCH v3] scsi: pvscsi: avoid infinite loop while building SG list

2016-09-13 Thread P J P
+-- On Tue, 6 Sep 2016, P J P wrote --+ | From: Prasad J Pandit | | In PVSCSI paravirtual SCSI bus, pvscsi_convert_sglist can take a very | long time or go into an infinite loop due to two different bugs: | | 1) the request descriptor data length is defined to be 64 bit. While | building SG list

Re: [Qemu-devel] [PATCH] vmsvga: correct bitmap and pixmap size checks

2016-09-13 Thread P J P
+-- On Thu, 8 Sep 2016, P J P wrote --+ | From: Prasad J Pandit | | When processing svga command DEFINE_CURSOR in vmsvga_fifo_run, | the computed BITMAP and PIXMAP size are checked against the | 'cursor.mask[]' and 'cursor.image[]' array sizes in bytes. | Correct these checks to avoid OOB memory

[Qemu-devel] [PULL 2/4] ui/curses.c: Clean up nextchr logic

2016-09-13 Thread Gerd Hoffmann
From: Peter Maydell Coverity identifies that at the top of the while(1) loop in curses_refresh() the variable nextchr is always ERR, and so the else case of the first if() is dead code. Remove this dead code, and narrow the scope of the nextchr variable to the place where it's used. (This confus

[Qemu-devel] [PULL 1/4] ui/curses.c: Ensure we don't read off the end of curses2qemu array

2016-09-13 Thread Gerd Hoffmann
From: Peter Maydell Coverity spots that there is no bounds check before we access the curses2qemu[] array. Add one, bringing this code path into line with the one that looks up entries in curses2keysym[]. In theory getch() shouldn't return out of range keycodes, but it's better not to assume th

[Qemu-devel] [PULL 3/4] qemu-options.hx: correct spice options streaming-video default document value to 'off'

2016-09-13 Thread Gerd Hoffmann
From: Li Zhijian since f1d3e58, the code had changed the default value to 'off', so this patch make document and code are consistent. Signed-off-by: Li Zhijian Message-id: 1470024419-10886-1-git-send-email-lizhij...@cn.fujitsu.com Signed-off-by: Gerd Hoffmann --- qemu-options.hx | 2 +- 1 fil

[Qemu-devel] [PULL 0/4] ui: misc small fixes for vnc, spice and curses.

2016-09-13 Thread Gerd Hoffmann
ository at: git://git.kraxel.org/qemu tags/pull-ui-20160913-1 for you to fetch changes up to 3e10c3ecfcaf604d8b400d6e463e1a186ce97d9b: vnc: fix qemu crash because of SIGSEGV (2016-09-13 08:01:39 +0200) ui: misc small fixes for vnc,

Re: [Qemu-devel] [PATCH] virtio-bus: Plug devices after features are negotiated

2016-09-13 Thread Maxime Coquelin
On 09/12/2016 09:58 PM, Michael S. Tsirkin wrote: On Mon, Sep 12, 2016 at 08:22:50PM +0200, Maxime Coquelin wrote: On 09/12/2016 10:51 AM, Cornelia Huck wrote: On Sat, 10 Sep 2016 10:23:37 +0200 Maxime Coquelin wrote: Currently, devices are plugged before features are negotiated. If the

[Qemu-devel] [PULL 4/4] vnc: fix qemu crash because of SIGSEGV

2016-09-13 Thread Gerd Hoffmann
From: Gonglei The backtrace is: 0x7f0b75cdf880 in pixman_image_get_stride () from /lib64/libpixman-1.so.0 0x7f0b77bcb3cf in vnc_server_fb_stride (vd=0x7f0b7a1a2bb0) at ui/vnc.c:680 vnc_dpy_copy (dcl=0x7f0b7a1a2c00, src_x=224, src_y=263, dst_x=319, dst_y=363, w=1, h=1) at ui/vnc.c:915 0x

[Qemu-devel] [PATCH qemu v2] tap: Allow specifying a bridge

2016-09-13 Thread Alexey Kardashevskiy
The tap backend is already using qemu-bridge-helper to attach tap interface to a bridge but (unlike the bridge backend) it always uses the default bridge name - br0. This adds a "br" property support to the tap backend. Signed-off-by: Alexey Kardashevskiy -- Changes: v2: * documented a new membe

Re: [Qemu-devel] [PATCH] usb:xhci:fix memory leak in usb_xhci_exit

2016-09-13 Thread Gerd Hoffmann
On Di, 2016-09-13 at 05:22 +, 李强 wrote: > If the xhci uses msix, it doesn't free the corresponding > > memory, thus leading a memory leak issue. This patch avoid this. Patch looks good but is corrupted: Applying: usb:xhci:fix memory leak in usb_xhci_exit fatal: corrupt patch at line 19 Plea

Re: [Qemu-devel] [PATCH 1/3] vfio/pci: conversion to realize

2016-09-13 Thread Auger Eric
Hi Markus, On 13/09/2016 08:25, Markus Armbruster wrote: > Alex Williamson writes: > >> On Mon, 12 Sep 2016 16:00:18 +0200 >> Auger Eric wrote: >> >>> Hi Markus, >>> >>> On 12/09/2016 14:45, Markus Armbruster wrote: Eric Auger writes: > This patch converts VFIO PCI to realize

Re: [Qemu-devel] [PATCH] vmsvga: correct bitmap and pixmap size checks

2016-09-13 Thread Gerd Hoffmann
On Do, 2016-09-08 at 18:15 +0530, P J P wrote: > From: Prasad J Pandit > > When processing svga command DEFINE_CURSOR in vmsvga_fifo_run, > the computed BITMAP and PIXMAP size are checked against the > 'cursor.mask[]' and 'cursor.image[]' array sizes in bytes. > Correct these checks to avoid OOB

Re: [Qemu-devel] [PATCH v6 01/18] build-sys: define QEMU_VERSION_{MAJOR, MINOR, MICRO}

2016-09-13 Thread Markus Armbruster
Eric Blake writes: > On 09/12/2016 04:18 AM, Marc-André Lureau wrote: >> There are better chances to find what went wrong at build time than a >> later assert in qmp_query_version >> >> Signed-off-by: Marc-André Lureau >> --- >> qmp.c | 16 +++- >> scripts/create_co

Re: [Qemu-devel] [PATCH v6 18/18] Replace qmp-commands.hx by docs/qmp-commands.txt

2016-09-13 Thread Markus Armbruster
Eric Blake writes: > On 09/12/2016 04:19 AM, Marc-André Lureau wrote: >> The only remaining function of qmp-commands.hx is to let us generate >> qmp-commands.txt from it. Replace qmp-commands.hx by qmp-commands.txt. >> >> We intend to move the documentation into the QAPI schema and generate >>

Re: [Qemu-devel] [v4 4/6] hw/iommu: AMD IOMMU interrupt remapping

2016-09-13 Thread Peter Xu
On Mon, Sep 12, 2016 at 03:45:48PM +0300, David Kiarie wrote: > > When we say cache here, we are mostly talking about GSI routes in > > kernel, right? Since we still don't have other kind of interrupt > > caches AFAIK. If so, GSI routes should already been setup even if the > > interrupts are not t

Re: [Qemu-devel] [PATCH v6 18/18] Replace qmp-commands.hx by docs/qmp-commands.txt

2016-09-13 Thread Markus Armbruster
Marc-André Lureau writes: > Hi > > On Tue, Sep 13, 2016 at 1:54 AM Peter Maydell > wrote: > >> On 12 September 2016 at 10:19, Marc-André Lureau >> wrote: >> > The only remaining function of qmp-commands.hx is to let us generate >> > qmp-commands.txt from it. Replace qmp-commands.hx by qmp-comm

Re: [Qemu-devel] [PATCH] virtio-bus: Plug devices after features are negotiated

2016-09-13 Thread Marcel Apfelbaum
On 09/10/2016 11:23 AM, Maxime Coquelin wrote: Currently, devices are plugged before features are negotiated. If the backend doesn't support VIRTIO_F_VERSION_1, the transport need to rewind some settings. This is the case for CCW, for which a post_plugged callback had been introduced, where max_

Re: [Qemu-devel] seccomp missing calls in 2.7.0?

2016-09-13 Thread Eduardo Otubo
On Wed, Sep 7, 2016 at 9:55 PM, Brian Rak wrote: > --- src_clean/qemu-seccomp.c2016-09-02 11:34:22.0 -0400 > +++ src/qemu-seccomp.c2016-09-06 11:28:23.189162653 -0400 > @@ -65,6 +65,7 @@ > { SCMP_SYS(prctl), 245 }, > { SCMP_SYS(signalfd), 245 }, > { SCMP_SYS(getrlimi

[Qemu-devel] [PULL 2/3] virtio-gpu-pci: tag as not hotpluggable

2016-09-13 Thread Gerd Hoffmann
We can't hotplug display adapters in qemu, tag virtio-gpu-pci accordingly (virtio-vga already has this). Signed-off-by: Gerd Hoffmann Acked-by: Michael S. Tsirkin Message-id: 1473319037-27645-1-git-send-email-kra...@redhat.com --- hw/display/virtio-gpu-pci.c | 1 + 1 file changed, 1 insertion(+

[Qemu-devel] [PULL 1/3] vmsvga: correct bitmap and pixmap size checks

2016-09-13 Thread Gerd Hoffmann
From: Prasad J Pandit When processing svga command DEFINE_CURSOR in vmsvga_fifo_run, the computed BITMAP and PIXMAP size are checked against the 'cursor.mask[]' and 'cursor.image[]' array sizes in bytes. Correct these checks to avoid OOB memory access. Reported-by: Qinghao Tang Reported-by: Li

[Qemu-devel] [PULL 3/3] virtio-vga: adapt to page-per-vq=off

2016-09-13 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann Message-id: 1473319012-27560-1-git-send-email-kra...@redhat.com --- hw/display/virtio-vga.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/hw/display/virtio-vga.c b/hw/display/virtio-vga.c index 5b510a1..f77b401 100644 --- a/hw/display/virtio-vga.c +

[Qemu-devel] [PULL 0/3] virtio-gpu and vmsvga fixes.

2016-09-13 Thread Gerd Hoffmann
ository at: git://git.kraxel.org/qemu tags/pull-vga-20160913-1 for you to fetch changes up to c2843e93907a4084e91573994486e810cec248a0: virtio-vga: adapt to page-per-vq=off (2016-09-13 09:28:10 +0200) virtio-gpu and vm

Re: [Qemu-devel] [PATCH v2 3/5] pci: Convert msix_init() to Error and fix callers to check it

2016-09-13 Thread Markus Armbruster
Cao jin writes: > On 09/12/2016 09:47 PM, Markus Armbruster wrote: >> Cao jin writes: [...] >>> diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c >>> index 188f954..4280c5d 100644 >>> --- a/hw/usb/hcd-xhci.c >>> +++ b/hw/usb/hcd-xhci.c >>> @@ -3594,25 +3594,6 @@ static void usb_xhci_realize(str

Re: [Qemu-devel] [PATCH] scsi: pvscsi: limit process IO loop to maximum page count

2016-09-13 Thread Dmitry Fleytman
Hello Prasad, Please see my questions inline. > On 13 Sep 2016, at 10:00 AM, P J P wrote: > > +-- On Wed, 7 Sep 2016, P J P wrote --+ > | From: Prasad J Pandit > | > | Vmware Paravirtual SCSI emulator while processing IO requests > | could run into an infinite loop if 'pvscsi_ring_pop_req_des

[Qemu-devel] [PATCH v7 2/3] libqos: define SPAPR libqos functions

2016-09-13 Thread Laurent Vivier
Define spapr_alloc_init()/spapr_alloc_init_flags()/spapr_alloc_uninit() to allocate and use SPAPR guest memory Define qtest_spapr_vboot()/qtest_spapr_boot()/qtest_spapr_shutdown() to start SPAPR guest with QOSState initialized for it (memory management) Move qtest_irq_intercept_in() from ge

[Qemu-devel] [PATCH v7 3/3] tests: add RTAS command in the protocol

2016-09-13 Thread Laurent Vivier
Add a first test to validate the protocol: - rtas/get-time-of-day compares the time from the guest with the time from the host. Signed-off-by: Laurent Vivier --- v7: - don't allocate twice the memory for the RTAS call - add "-machine pseries" in rtas-test v6: - rebase v5: - use qtest_spapr_b

[Qemu-devel] [PATCH v7 0/3] tests: add RTAS protocol

2016-09-13 Thread Laurent Vivier
This series allows to call RTAS commands from the qtest framework, and defines a first test to call RTAS command "get-time-of-day" to validate the protocol and test RTAS. RTAS command parameters are passed to the guest via the guest memory, so we also need to implement the guest memory management

[Qemu-devel] [PATCH v7 1/3] qtest: replace strtoXX() by qemu_strtoXX()

2016-09-13 Thread Laurent Vivier
Check the result of qemu_strtoXX() and assert if the string cannot be converted. Signed-off-by: Laurent Vivier Reviewed-by: David Gibson Reviewed-by: Greg Kurz --- v6: - rebase and add Greg's Rb v5: - update log message about result checking - add David's Rb v4: - add this patch in the series

Re: [Qemu-devel] [PATCH] iothread: Stop threads before main() quits

2016-09-13 Thread Stefan Hajnoczi
On Thu, Sep 08, 2016 at 05:28:51PM +0800, Fam Zheng wrote: > Right after main_loop ends, we release various things but keep iothread > alive. The latter is not prepared to the sudden change of resources. > > Specifically, after bdrv_close_all(), virtio-scsi dataplane get a > surprise at the empty

Re: [Qemu-devel] [PATCH] migrate: Fix bounds check for migration parameters in migration.c

2016-09-13 Thread Amit Shah
On (Sat) 10 Sep 2016 [00:44:02], Ashijeet Acharya wrote: > This patch fixes the out-of-bounds check migration parameters in > qmp_migrate_set_parameters() for cpu-throttle-initial and > cpu-throttle-increment by adding a return statement for both. > Due to the missing return statements, parmaters w

Re: [Qemu-devel] [PATCH] iothread: Stop threads before main() quits

2016-09-13 Thread Stefan Hajnoczi
On Thu, Sep 08, 2016 at 05:28:51PM +0800, Fam Zheng wrote: > Right after main_loop ends, we release various things but keep iothread > alive. The latter is not prepared to the sudden change of resources. > > Specifically, after bdrv_close_all(), virtio-scsi dataplane get a > surprise at the empty

Re: [Qemu-devel] [PULL 00/17] Block patches

2016-09-13 Thread Stefan Hajnoczi
On Tue, Sep 13, 2016 at 2:11 AM, Fam Zheng wrote: > On Mon, 09/12 16:56, Peter Maydell wrote: >> On 12 September 2016 at 16:12, Peter Maydell >> wrote: >> > On 12 September 2016 at 15:08, Stefan Hajnoczi wrote: >> >> The following changes since commit >> >> c2a57aae9a1c3dd7de77daf5478df10379ae

Re: [Qemu-devel] [PATCH v2] qom: Implement qom-get HMP command

2016-09-13 Thread Markus Armbruster
"Dr. David Alan Gilbert (git)" writes: > From: "Dr. David Alan Gilbert" > > This started off as Andreas Färber's implementation from > March 2015, but after feedback from Paolo morphed into > using the json output which handles structs reasonably. > > Use with qom-list to find the members of an

Re: [Qemu-devel] [PATCH v4] migrate: Fix bounds check for migration parameters in migration.c

2016-09-13 Thread Amit Shah
On (Sat) 10 Sep 2016 [02:43:17], Ashijeet Acharya wrote: > This patch fixes the out-of-bounds check of migration parameters in > qmp_migrate_set_parameters() for cpu-throttle-initial and > cpu-throttle-increment by adding a return statement for both as they > were broken since their introduction in

Re: [Qemu-devel] [PATCH v2] 9pfs: add support for IO limits to 9p-local driver

2016-09-13 Thread Greg Kurz
On Mon, 12 Sep 2016 16:08:43 + Pradeep Jagadeesh wrote: > Replies inline Greg. > > Thanks & Regards, > Pradeep > Hi Pradeep, > -Original Message- > From: Greg Kurz [mailto:gr...@kaod.org] > Sent: Monday, September 12, 2016 4:19 PM > To: Pradeep Jagadeesh > Cc: Pradeep Jagadeesh;

Re: [Qemu-devel] [PULL 00/17] Block patches

2016-09-13 Thread Stefan Hajnoczi
On Mon, Sep 12, 2016 at 4:56 PM, Peter Maydell wrote: > On 12 September 2016 at 16:12, Peter Maydell wrote: >> On 12 September 2016 at 15:08, Stefan Hajnoczi wrote: >>> The following changes since commit c2a57aae9a1c3dd7de77daf5478df10379aeeebf: >>> >>> Merge remote-tracking branch 'remotes/fa

Re: [Qemu-devel] [PATCH v3] scsi: pvscsi: avoid infinite loop while building SG list

2016-09-13 Thread Dmitry Fleytman
Hello Prasad, See my comments inline. > On 13 Sep 2016, at 10:01 AM, P J P wrote: > > +-- On Tue, 6 Sep 2016, P J P wrote --+ > | From: Prasad J Pandit > | > | In PVSCSI paravirtual SCSI bus, pvscsi_convert_sglist can take a very > | long time or go into an infinite loop due to two different

Re: [Qemu-devel] [PATCH v2 00/15] virtio-crypto: introduce framework and device emulation

2016-09-13 Thread Daniel P. Berrange
On Tue, Sep 13, 2016 at 11:52:06AM +0800, Gonglei wrote: > Changes since v1: > - rmmove mixed endian-ness handler for virtio-crypto device, just >use little-endian. [mst] > - add sg list support according virtio-crypto spec v10 (will be posted soon). > - fix a memory leak in session handler.

Re: [Qemu-devel] [PATCH] iothread: Stop threads before main() quits

2016-09-13 Thread Fam Zheng
On Tue, 09/13 09:39, Stefan Hajnoczi wrote: > On Thu, Sep 08, 2016 at 05:28:51PM +0800, Fam Zheng wrote: > > Right after main_loop ends, we release various things but keep iothread > > alive. The latter is not prepared to the sudden change of resources. > > > > Specifically, after bdrv_close_all()

Re: [Qemu-devel] [PATCH] virtio-bus: Plug devices after features are negotiated

2016-09-13 Thread Cornelia Huck
On Tue, 13 Sep 2016 09:08:04 +0200 Maxime Coquelin wrote: > On 09/12/2016 09:58 PM, Michael S. Tsirkin wrote: > > On Mon, Sep 12, 2016 at 08:22:50PM +0200, Maxime Coquelin wrote: > >> > >> > >> On 09/12/2016 10:51 AM, Cornelia Huck wrote: > >>> On Sat, 10 Sep 2016 10:23:37 +0200 > >>> Maxime Coqu

Re: [Qemu-devel] [PATCH v11 5/6] qapi: add a QmpInputVisitor that does string conversion

2016-09-13 Thread Markus Armbruster
"Daniel P. Berrange" writes: > Currently the QmpInputVisitor assumes that all scalar > values are directly represented as their final types. > ie it assumes an 'int' is using QInt, and a 'bool' is > using QBool. > > This adds an alternative constructor for QmpInputVisitor > that will set it up su

[Qemu-devel] [PATCH v2] migration: Fix seg with missing port

2016-09-13 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The command : migrate tcp:localhost: currently segs; fix it so it now says: error parsing address 'localhost:' and the same for -incoming. Signed-off-by: Dr. David Alan Gilbert -- v2 More Error * boilerplate --- migration/socket.c | 16

Re: [Qemu-devel] [PATCH v2 01/15] crypto: introduce cryptodev backend and crypto legacy hardware

2016-09-13 Thread Daniel P. Berrange
On Tue, Sep 13, 2016 at 11:52:07AM +0800, Gonglei wrote: > cryptodev backend is used to realize the active work for > virtual crypto device. CryptoLegacyHW device is a cryptographic > hardware device seen by the virtual machine. > The relationship between cryptodev backend and legacy hadware > as f

[Qemu-devel] [PATCH] qcow2: avoid memcpy(dst, NULL, len)

2016-09-13 Thread Stefan Hajnoczi
Section "7.1.4 Use of library functions" in the C99 standard says: If an argument to a function has an invalid value (such as [...] a null pointer [...]) [...] the behavior is undefined. Additionally the "searching and sorting" functions are specified as requiring valid pointer values as desc

Re: [Qemu-devel] [PATCH v2] 9pfs: add support for IO limits to 9p-local driver

2016-09-13 Thread Pradeep Jagadeesh
Hi Greg, Replies inline Cheers, Pradeep -Original Message- From: Greg Kurz [mailto:gr...@kaod.org] Sent: Tuesday, September 13, 2016 10:52 AM To: Pradeep Jagadeesh Cc: Pradeep Jagadeesh; Aneesh Kumar K.V; Alberto Garcia; qemu-devel@nongnu.org; Claudio Fontana; Eric Blake Subject: Re: [

Re: [Qemu-devel] [PATCH v2 02/15] crypto: introduce crypto queue handler

2016-09-13 Thread Daniel P. Berrange
On Tue, Sep 13, 2016 at 11:52:08AM +0800, Gonglei wrote: > crypto queue is a gallery used for executing crypto > operation, which supports both synchronization and > asynchronization. The thoughts stolen from net/queue.c > > Signed-off-by: Gonglei > --- > crypto/Makefile.objs | 1 + >

Re: [Qemu-devel] [PATCH v2 03/15] crypto: add cryptoLegacyHW stuff

2016-09-13 Thread Daniel P. Berrange
On Tue, Sep 13, 2016 at 11:52:09AM +0800, Gonglei wrote: > In previous patch, we define CryptoLegacyHWOptions in > qapi-schema.json. we introduce the new/delete funciton > about crypto legacy hardware device. Isn't virtio-crypto / cryptodev an entirely new specification ? I'm surprised to be seein

Re: [Qemu-devel] [PATCH v2 05/15] crypto: add cryptodev-linux as a cryptodev backend

2016-09-13 Thread Daniel P. Berrange
On Tue, Sep 13, 2016 at 11:52:11AM +0800, Gonglei wrote: > Cryptodev-linux is a device that allows access to Linux > kernel cryptographic drivers; thus allowing of userspace > applications to take advantage of hardware accelerators. > Cryptodev-linux is implemented as a standalone module > that req

Re: [Qemu-devel] [PATCH] qcow2: avoid memcpy(dst, NULL, len)

2016-09-13 Thread Kevin Wolf
Am 13.09.2016 um 11:15 hat Stefan Hajnoczi geschrieben: > Section "7.1.4 Use of library functions" in the C99 standard says: > > If an argument to a function has an invalid value (such as [...] > a null pointer [...]) [...] the behavior is undefined. > > Additionally the "searching and sortin

Re: [Qemu-devel] [PATCH v11 5/6] qapi: add a QmpInputVisitor that does string conversion

2016-09-13 Thread Daniel P. Berrange
On Tue, Sep 13, 2016 at 11:05:08AM +0200, Markus Armbruster wrote: > "Daniel P. Berrange" writes: > > > Currently the QmpInputVisitor assumes that all scalar > > values are directly represented as their final types. > > ie it assumes an 'int' is using QInt, and a 'bool' is > > using QBool. > > >

Re: [Qemu-devel] [PATCH v2] migration: Fix seg with missing port

2016-09-13 Thread Daniel P. Berrange
On Tue, Sep 13, 2016 at 10:08:41AM +0100, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > The command : >migrate tcp:localhost: > >currently segs; fix it so it now says: > >error parsing address 'localhost:' > > and the same for -incoming. > > Signed-off-b

Re: [Qemu-devel] [PATCH] virtio-bus: Plug devices after features are negotiated

2016-09-13 Thread Maxime Coquelin
On 09/13/2016 10:59 AM, Cornelia Huck wrote: On Tue, 13 Sep 2016 09:08:04 +0200 Maxime Coquelin wrote: On 09/12/2016 09:58 PM, Michael S. Tsirkin wrote: On Mon, Sep 12, 2016 at 08:22:50PM +0200, Maxime Coquelin wrote: On 09/12/2016 10:51 AM, Cornelia Huck wrote: On Sat, 10 Sep 2016 10:2

Re: [Qemu-devel] [PATCH v2 00/15] virtio-crypto: introduce framework and device emulation

2016-09-13 Thread Gonglei (Arei)
Hi Daniel, Thanks for your comments fristly, please see my embedded reply. Regards, -Gonglei > -Original Message- > From: Daniel P. Berrange [mailto:berra...@redhat.com] > Sent: Tuesday, September 13, 2016 4:58 PM > To: Gonglei (Arei) > Cc: qemu-devel@nongnu.org; virtio-...@lists.oasis-

Re: [Qemu-devel] [PATCH v2 00/15] virtio-crypto: introduce framework and device emulation

2016-09-13 Thread Daniel P. Berrange
On Tue, Sep 13, 2016 at 09:45:05AM +, Gonglei (Arei) wrote: > Hi Daniel, > > Thanks for your comments fristly, please see my embedded reply. > > Regards, > -Gonglei > > > > -Original Message- > > From: Daniel P. Berrange [mailto:berra...@redhat.com] > > Sent: Tuesday, September 13,

[Qemu-devel] [PATCH] x86/lapic: Load LAPIC state at post_load

2016-09-13 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Load the LAPIC state during post_load (rather than when the CPU starts). This allows an interrupt to be delivered from the ioapic to the lapic prior to cpu loading, in particular the RTC that starts ticking as soon as we load it's state. Partially fixes a case whe

Re: [Qemu-devel] [Qemu-block] [PATCH] qcow2: avoid memcpy(dst, NULL, len)

2016-09-13 Thread Stefan Hajnoczi
On Tue, Sep 13, 2016 at 10:30 AM, Kevin Wolf wrote: > Am 13.09.2016 um 11:15 hat Stefan Hajnoczi geschrieben: >> Section "7.1.4 Use of library functions" in the C99 standard says: >> >> If an argument to a function has an invalid value (such as [...] >> a null pointer [...]) [...] the behavior

Re: [Qemu-devel] [PATCH v2 01/15] crypto: introduce cryptodev backend and crypto legacy hardware

2016-09-13 Thread Daniel P. Berrange
On Tue, Sep 13, 2016 at 09:55:27AM +, Gonglei (Arei) wrote: > > > > > From: Daniel P. Berrange [mailto:berra...@redhat.com] > > Sent: Tuesday, September 13, 2016 5:14 PM > > Subject: Re: [PATCH v2 01/15] crypto: introduce cryptodev backend and crypto > > legacy hardware > > > > On Tue, Sep 13

Re: [Qemu-devel] [PATCH v2 01/15] crypto: introduce cryptodev backend and crypto legacy hardware

2016-09-13 Thread Gonglei (Arei)
> > From: Daniel P. Berrange [mailto:berra...@redhat.com] > Sent: Tuesday, September 13, 2016 5:14 PM > Subject: Re: [PATCH v2 01/15] crypto: introduce cryptodev backend and crypto > legacy hardware > > On Tue, Sep 13, 2016 at 11:52:07AM +0800, Gonglei wrote: > > cryptodev backend is used to real

Re: [Qemu-devel] [PATCH v2 02/15] crypto: introduce crypto queue handler

2016-09-13 Thread Gonglei (Arei)
Hi, All comments are accepted :) Regards, -Gonglei > -Original Message- > From: Daniel P. Berrange [mailto:berra...@redhat.com] > Sent: Tuesday, September 13, 2016 5:21 PM > To: Gonglei (Arei) > Cc: qemu-devel@nongnu.org; virtio-...@lists.oasis-open.org; Huangpeng > (Peter); Luonengjun

[Qemu-devel] [PULL v2 00/19] Block patches

2016-09-13 Thread Stefan Hajnoczi
The following changes since commit 7263da78045dc91cc207f350911efe4259e99b3c: Merge remote-tracking branch 'remotes/mcayland/tags/qemu-openbios-signed' into staging (2016-09-12 15:09:47 +0100) are available in the git repository at: git://github.com/stefanha/qemu.git tags/block-pull-request

[Qemu-devel] [PULL v2 02/19] linux-aio: consume events in userspace instead of calling io_getevents

2016-09-13 Thread Stefan Hajnoczi
From: Roman Pen AIO context in userspace is represented as a simple ring buffer, which can be consumed directly without entering the kernel, which obviously can bring some performance gain. QEMU does not use timeout value for waiting for events completions, so we can consume all events from user

[Qemu-devel] [PATCH resend] vhost_net: don't enable vring if backend lack this feature

2016-09-13 Thread Chen Hanxiao
From: Chen Hanxiao If backend(such as dpdk) lack this feature, don't assume it and mark it in vring_enable. Or we may fail in vhost_net_start, then we can't use vhost net. This will bring compat issue with old version backend. Signed-off-by: Chen Hanxiao --- hw/net/vhost_net.c | 12 +--

[Qemu-devel] [PULL v2 01/19] qcow2: avoid memcpy(dst, NULL, len)

2016-09-13 Thread Stefan Hajnoczi
Section "7.1.4 Use of library functions" in the C99 standard says: If an argument to a function has an invalid value (such as [...] a null pointer [...]) [...] the behavior is undefined. Additionally the "searching and sorting" functions are specified as requiring valid pointer values as desc

[Qemu-devel] [PULL v2 14/19] replication: Implement new driver for block replication

2016-09-13 Thread Stefan Hajnoczi
From: Wen Congyang Signed-off-by: Wen Congyang Signed-off-by: Changlong Xie Signed-off-by: Wang WeiWei Signed-off-by: zhanghailiang Signed-off-by: Gonglei Message-id: 1469602913-20979-10-git-send-email-xiecl.f...@cn.fujitsu.com Signed-off-by: Stefan Hajnoczi --- block/Makefile.objs | 1 +

[Qemu-devel] [PULL v2 09/19] block: Link backup into block core

2016-09-13 Thread Stefan Hajnoczi
From: Wen Congyang Some programs that add a dependency on it will use the block layer directly. Signed-off-by: Wen Congyang Signed-off-by: Changlong Xie Signed-off-by: Wang WeiWei Signed-off-by: zhanghailiang Signed-off-by: Gonglei Reviewed-by: Stefan Hajnoczi Reviewed-by: Jeff Cody Messa

[Qemu-devel] [PULL v2 07/19] Backup: clear all bitmap when doing block checkpoint

2016-09-13 Thread Stefan Hajnoczi
From: Wen Congyang Signed-off-by: Wen Congyang Signed-off-by: Changlong Xie Signed-off-by: Wang WeiWei Signed-off-by: zhanghailiang Signed-off-by: Gonglei Reviewed-by: Stefan Hajnoczi Message-id: 1469602913-20979-3-git-send-email-xiecl.f...@cn.fujitsu.com Signed-off-by: Stefan Hajnoczi ---

[Qemu-devel] [PULL v2 03/19] linux-aio: split processing events function

2016-09-13 Thread Stefan Hajnoczi
From: Roman Pen Prepare processing events function to be called from ioq_submit(), thus split function on two parts: the first harvests completed IO requests, the second submits pending requests. Signed-off-by: Roman Pen Message-id: 1468931263-32667-3-git-send-email-roman.peny...@profitbricks.c

[Qemu-devel] [PULL v2 08/19] Backup: export interfaces for extra serialization

2016-09-13 Thread Stefan Hajnoczi
From: Changlong Xie Normal backup(sync='none') workflow: step 1. NBD peformance I/O write from client to server qcow2_co_writev bdrv_co_writev ... bdrv_aligned_pwritev notifier_with_return_list_notify -> backup_do_cow bdrv_driver_pwritev // write new contents

[Qemu-devel] [PULL v2 10/19] docs: block replication's description

2016-09-13 Thread Stefan Hajnoczi
From: Wen Congyang Signed-off-by: Wen Congyang Signed-off-by: Changlong Xie Signed-off-by: Wang WeiWei Signed-off-by: zhanghailiang Signed-off-by: Gonglei Reviewed-by: Stefan Hajnoczi Message-id: 1469602913-20979-6-git-send-email-xiecl.f...@cn.fujitsu.com Signed-off-by: Stefan Hajnoczi ---

[Qemu-devel] [PULL v2 19/19] iothread: Stop threads before main() quits

2016-09-13 Thread Stefan Hajnoczi
From: Fam Zheng Right after main_loop ends, we release various things but keep iothread alive. The latter is not prepared to the sudden change of resources. Specifically, after bdrv_close_all(), virtio-scsi dataplane get a surprise at the empty BlockBackend: (gdb) bt at /usr/src/debug/qemu-

[Qemu-devel] [PULL v2 04/19] linux-aio: process completions from ioq_submit()

2016-09-13 Thread Stefan Hajnoczi
From: Roman Pen In order to reduce completion latency it makes sense to harvest completed requests ASAP. Very fast backend device can complete requests just after submission, so it is worth trying to check ring buffer in order to peek completed requests directly after io_submit() has been called

[Qemu-devel] [PULL v2 17/19] MAINTAINERS: add maintainer for replication

2016-09-13 Thread Stefan Hajnoczi
From: Changlong Xie As per Stefan's suggestion, add Wen and I as co-maintainers of replication. Cc: Stefan Hajnoczi Signed-off-by: Wen Congyang Signed-off-by: Changlong Xie Message-id: 1469602913-20979-13-git-send-email-xiecl.f...@cn.fujitsu.com Signed-off-by: Stefan Hajnoczi --- MAINTAINER

[Qemu-devel] [PULL v2 15/19] tests: add unit test case for replication

2016-09-13 Thread Stefan Hajnoczi
From: Changlong Xie [Rename get_error test cases to get_error_all to avoid tripping up scripts that grep for "error:" in test output. It also reflects the actual replication API function name better. -Stefan] Signed-off-by: Wen Congyang Signed-off-by: Changlong Xie Signed-off-by: Wang WeiWei

[Qemu-devel] [PULL v2 12/19] configure: support replication

2016-09-13 Thread Stefan Hajnoczi
From: Changlong Xie configure --(enable/disable)-replication to switch replication support on/off, and it is on by default. We later introduce replation support. Signed-off-by: Wen Congyang Signed-off-by: Changlong Xie Signed-off-by: Wang WeiWei Message-id: 1469602913-20979-8-git-send-email-x

[Qemu-devel] [PULL v2 05/19] virtio-blk: rename virtio_device_info to virtio_blk_info

2016-09-13 Thread Stefan Hajnoczi
From: Changlong Xie The old one is confusing with @virtio_device_info in virtio.c, so make it more appropriate. Signed-off-by: Changlong Xie Message-id: 1470214147-32560-1-git-send-email-xiecl.f...@cn.fujitsu.com Signed-off-by: Stefan Hajnoczi --- hw/block/virtio-blk.c | 4 ++-- 1 file change

[Qemu-devel] [PULL v2 16/19] support replication driver in blockdev-add

2016-09-13 Thread Stefan Hajnoczi
From: Wen Congyang Signed-off-by: Wen Congyang Signed-off-by: Changlong Xie Signed-off-by: Wang WeiWei Signed-off-by: zhanghailiang Signed-off-by: Gonglei Reviewed-by: Eric Blake Message-id: 1469602913-20979-12-git-send-email-xiecl.f...@cn.fujitsu.com Signed-off-by: Stefan Hajnoczi --- qa

Re: [Qemu-devel] [PATCH v2 01/15] crypto: introduce cryptodev backend and crypto legacy hardware

2016-09-13 Thread Gonglei (Arei)
> -Original Message- > From: Daniel P. Berrange [mailto:berra...@redhat.com] > Sent: Tuesday, September 13, 2016 5:59 PM > Subject: Re: [PATCH v2 01/15] crypto: introduce cryptodev backend and crypto > legacy hardware > > On Tue, Sep 13, 2016 at 09:55:27AM +, Gonglei (Arei) wrote: > >

Re: [Qemu-devel] [PATCH v2 03/15] crypto: add cryptoLegacyHW stuff

2016-09-13 Thread Gonglei (Arei)
> -Original Message- > From: Daniel P. Berrange [mailto:berra...@redhat.com] > Sent: Tuesday, September 13, 2016 6:09 PM > To: Gonglei (Arei) > Subject: Re: [PATCH v2 03/15] crypto: add cryptoLegacyHW stuff > > On Tue, Sep 13, 2016 at 10:05:01AM +, Gonglei (Arei) wrote: > > > > > > >

[Qemu-devel] [PULL v2 06/19] block: unblock backup operations in backing file

2016-09-13 Thread Stefan Hajnoczi
From: Wen Congyang Signed-off-by: Wen Congyang Signed-off-by: Changlong Xie Signed-off-by: Wang WeiWei Reviewed-by: Stefan Hajnoczi Kashyap Chamarthy Message-id: 1469602913-20979-2-git-send-email-xiecl.f...@cn.fujitsu.com Signed-off-by: Stefan Hajnoczi --- block.c | 17 + 1

[Qemu-devel] [PULL v2 18/19] tests: fix qvirtqueue_kick

2016-09-13 Thread Stefan Hajnoczi
From: Laurent Vivier vq->avail.idx and vq->avail->ring[] are a 16bit values, so read and write them with readw()/writew() instead of readl()/writel(). To read/write a 16bit value with a 32bit accessor works fine on little-endian CPU but not on big endian CPU. [An equivalent patch for the writew

Re: [Qemu-devel] [PATCH v11 5/6] qapi: add a QmpInputVisitor that does string conversion

2016-09-13 Thread Daniel P. Berrange
On Mon, Sep 12, 2016 at 01:39:50PM -0500, Eric Blake wrote: > On 09/05/2016 10:16 AM, Daniel P. Berrange wrote: > > Currently the QmpInputVisitor assumes that all scalar > > values are directly represented as their final types. > > ie it assumes an 'int' is using QInt, and a 'bool' is > > using QBo

[Qemu-devel] [PULL v2 11/19] mirror: auto complete active commit

2016-09-13 Thread Stefan Hajnoczi
From: Wen Congyang Auto complete mirror job in background to prevent from blocking synchronously Signed-off-by: Wen Congyang Signed-off-by: Changlong Xie Signed-off-by: Wang WeiWei Message-id: 1469602913-20979-7-git-send-email-xiecl.f...@cn.fujitsu.com Signed-off-by: Stefan Hajnoczi --- blo

Re: [Qemu-devel] [PATCH v2 00/15] virtio-crypto: introduce framework and device emulation

2016-09-13 Thread Gonglei (Arei)
> -Original Message- > From: Daniel P. Berrange [mailto:berra...@redhat.com] > Sent: Tuesday, September 13, 2016 5:54 PM > To: Gonglei (Arei) > Cc: qemu-devel@nongnu.org; virtio-...@lists.oasis-open.org; Huangpeng > (Peter); Luonengjun; m...@redhat.com; stefa...@redhat.com; > pbonz...@red

Re: [Qemu-devel] [PATCH v11 3/6] qapi: rename QmpInputVisitor to QObjectInputVisitor

2016-09-13 Thread Daniel P. Berrange
On Mon, Sep 12, 2016 at 06:19:08PM +0200, Markus Armbruster wrote: > "Daniel P. Berrange" writes: > > > The QmpInputVisitor has no direct dependancy on QMP. It is > > valid to use it anywhere that one has a QObject. Rename it > > to better reflect its functionality as a generic QObject > > to QAP

[Qemu-devel] [PULL v2 13/19] replication: Introduce new APIs to do replication operation

2016-09-13 Thread Stefan Hajnoczi
From: Changlong Xie This commit introduces six replication interfaces(for block, network etc). Firstly we can use replication_(new/remove) to create/destroy replication instances, then in migration we can use replication_(start/stop/do_checkpoint /get_error)_all to handle all replication operatio

Re: [Qemu-devel] [PATCH v11 6/6] qom: support arbitrary non-scalar properties with -object

2016-09-13 Thread Daniel P. Berrange
On Mon, Sep 12, 2016 at 01:20:25PM -0500, Eric Blake wrote: > On 09/05/2016 10:16 AM, Daniel P. Berrange wrote: > > The current -object command line syntax only allows for > > creation of objects with scalar properties, or a list > > with a fixed scalar element type. Objects which have > > properti

Re: [Qemu-devel] [PATCH v2 03/15] crypto: add cryptoLegacyHW stuff

2016-09-13 Thread Gonglei (Arei)
> -Original Message- > From: Daniel P. Berrange [mailto:berra...@redhat.com] > Sent: Tuesday, September 13, 2016 5:23 PM > To: Gonglei (Arei) > Cc: qemu-devel@nongnu.org; virtio-...@lists.oasis-open.org; Huangpeng > (Peter); Luonengjun; m...@redhat.com; stefa...@redhat.com; > pbonz...@red

Re: [Qemu-devel] [PATCH v2 03/15] crypto: add cryptoLegacyHW stuff

2016-09-13 Thread Daniel P. Berrange
On Tue, Sep 13, 2016 at 10:05:01AM +, Gonglei (Arei) wrote: > > > > -Original Message- > > From: Daniel P. Berrange [mailto:berra...@redhat.com] > > Sent: Tuesday, September 13, 2016 5:23 PM > > To: Gonglei (Arei) > > Cc: qemu-devel@nongnu.org; virtio-...@lists.oasis-open.org; Huangpe

Re: [Qemu-devel] [PATCH v11 4/6] qapi: rename QmpOutputVisitor to QObjectOutputVisitor

2016-09-13 Thread Daniel P. Berrange
On Mon, Sep 12, 2016 at 06:20:36PM +0200, Markus Armbruster wrote: > "Daniel P. Berrange" writes: > > > The QmpOutputVisitor has no direct dependancy on QMP. It is > > valid to use it anywhere that one wants a QObject. Rename it > > to better reflect its functionality as a generic QAPI > > to QOb

Re: [Qemu-devel] [PULL v3 00/18] tcg queued patches

2016-09-13 Thread Peter Maydell
On 13 September 2016 at 00:39, Richard Henderson wrote: > Mostly the same as v2, except rebased and the tcg/mips patch > adjusted for the mips32r6 discussion with Leon. > > > r~ > > > The following changes since commit c2a57aae9a1c3dd7de77daf5478df10379aeeebf: > > Merge remote-tracking branch 'r

[Qemu-devel] [Bug 1622582] Re: Can't install Windows 7 with q35 (SATA)

2016-09-13 Thread Dennis
Hi John, thx for your quick reply and the explanation for -hda and ide-drive. I'm using Windows 7 Professional x64 German edition. The md5 sum is: 705b6aaa5cf406428c2ab5e4d76c0cc4 If you need anything else, please let me know. -- You received this bug notification because you are a member of qe

Re: [Qemu-devel] [PATCH v2 2/7] crypto: make PBKDF iterations configurable for LUKS format

2016-09-13 Thread Daniel P. Berrange
On Mon, Sep 12, 2016 at 10:38:25AM -0500, Eric Blake wrote: > On 09/12/2016 09:13 AM, Daniel P. Berrange wrote: > > As protection against bruteforcing passphrases, the PBKDF > > algorithm is tuned by counting the number of iterations > > needed to produce 1 second of running time. If the machine >

Re: [Qemu-devel] [PATCH] scsi: pvscsi: limit process IO loop to maximum page count

2016-09-13 Thread P J P
Hello Dmitry, +-- On Tue, 13 Sep 2016, Dmitry Fleytman wrote --+ | > On 13 Sep 2016, at 10:00 AM, P J P wrote: | > | > +-- On Wed, 7 Sep 2016, P J P wrote --+ | > | From: Prasad J Pandit | > | | > | Vmware Paravirtual SCSI emulator while processing IO requests | > | could run into an infinit

Re: [Qemu-devel] [PATCH v2 01/15] crypto: introduce cryptodev backend and crypto legacy hardware

2016-09-13 Thread Paolo Bonzini
On 13/09/2016 11:13, Daniel P. Berrange wrote: > > + * Permission is hereby granted, free of charge, to any person obtaining a > > copy > > + * of this software and associated documentation files (the "Software"), > > to deal > > + * in the Software without restriction, including without limita

Re: [Qemu-devel] [PATCH v2 02/15] crypto: introduce crypto queue handler

2016-09-13 Thread Paolo Bonzini
On 13/09/2016 11:20, Daniel P. Berrange wrote: >> > +typedef struct CryptoPacket CryptoPacket; >> > +typedef struct CryptoQueue CryptoQueue; >> > +typedef struct CryptoPacketBuf CryptoPacketBuf; >> > + >> > +typedef void (CryptoPacketSent) (CryptoClientState *, int); > As previously, I'd expect n

Re: [Qemu-devel] [PATCH v2 00/15] virtio-crypto: introduce framework and device emulation

2016-09-13 Thread Paolo Bonzini
On 13/09/2016 11:54, Daniel P. Berrange wrote: > > OK, I agree with you :) But if we support multiple backends, can > > we keep cryptodev-linux module as one option? > > I'm personally against any support for out of tree kernel modules > in QEMU, regardless of whether QEMU also implements altern

Re: [Qemu-devel] [PATCH v2 01/15] crypto: introduce cryptodev backend and crypto legacy hardware

2016-09-13 Thread Daniel P. Berrange
On Tue, Sep 13, 2016 at 12:50:53PM +0200, Paolo Bonzini wrote: > > > On 13/09/2016 11:13, Daniel P. Berrange wrote: > > > + * Permission is hereby granted, free of charge, to any person obtaining > > > a copy > > > + * of this software and associated documentation files (the "Software"), > > >

Re: [Qemu-devel] [PATCH v2 00/15] virtio-crypto: introduce framework and device emulation

2016-09-13 Thread Daniel P. Berrange
On Tue, Sep 13, 2016 at 12:58:59PM +0200, Paolo Bonzini wrote: > > > On 13/09/2016 11:54, Daniel P. Berrange wrote: > > > OK, I agree with you :) But if we support multiple backends, can > > > we keep cryptodev-linux module as one option? > > > > I'm personally against any support for out of tre

Re: [Qemu-devel] [PATCH v3 14/34] tcg: Add atomic128 helpers

2016-09-13 Thread Alex Bennée
Richard Henderson writes: > Force the use of cmpxchg16b on x86_64. > > Wikipedia suggests that only very old AMD64 (circa 2004) did not have > this instruction. Further, it's required by Windows 8 so no new cpus > will ever omit it. > > If we truely care about these, then we could check this at

  1   2   3   4   5   >