Re: [Qemu-devel] [PATCH 2/2] target-mips: reimplement SC instruction and use cmpxchg

2016-09-27 Thread Leon Alrae
On Wed, Sep 21, 2016 at 01:16:28PM -0700, Richard Henderson wrote: > On 09/21/2016 01:07 AM, Leon Alrae wrote: > >+tcg_gen_brcond_tl(TCG_COND_EQ, addr, cpu_lladdr, l1); > >+tcg_temp_free(addr); > >+tcg_gen_movi_tl(t0, 0); > >+tcg_gen_br(done); > >+ > >+gen_set_label(l1); > >+

Re: [Qemu-devel] [PATCH v3 07/10] ppc/pnv: add XSCOM infrastructure

2016-09-27 Thread Cédric Le Goater
On 09/27/2016 08:10 AM, Benjamin Herrenschmidt wrote: > On Tue, 2016-09-27 at 07:54 +0200, Cédric Le Goater wrote: >> >>> but I guess if you have the decoding of those "core" registers >>> here as well, then that doesn't make so much sense. > > Those core registers may well change with P9, we hav

Re: [Qemu-devel] [PATCH] tests: Test IPv6 and ppc64 in the PXE tester

2016-09-27 Thread Thomas Huth
On 27.09.2016 06:17, David Gibson wrote: > On Mon, Sep 26, 2016 at 10:17:46PM +0200, Thomas Huth wrote: >> The firmware of the pseries machine, SLOF, is able to load files via >> IPv6 networking, too. So to test both, network bootloading on ppc64 >> and IPv6 (via Slirp) , let's add some PXE tests f

[Qemu-devel] [PATCH] hw/mips_cpc: kick a VP when putting it into Run state

2016-09-27 Thread Leon Alrae
While testing mttcg I noticed that VP0 gets stuck in a loop waiting for other VPs to come up (which never actually happens). To fix this kick VPs while they are being powered up by Cluster Power Controller. Signed-off-by: Leon Alrae --- hw/misc/mips_cpc.c |1 + 1 files changed, 1 insertions(

Re: [Qemu-devel] [PATCH 1/3] virtio: add virtio_detach_element()

2016-09-27 Thread Ladi Prosek
On Mon, Sep 19, 2016 at 3:28 PM, Stefan Hajnoczi wrote: > During device reset or similar situations a VirtQueueElement needs to be > freed without pushing it onto the used ring or rewinding the virtqueue. > Extract a new function to do this. > > Later patches add virtio_detach_element() calls to e

Re: [Qemu-devel] [PATCH] m68k: change default system clock for m5208evb

2016-09-27 Thread Thomas Huth
On 27.09.2016 03:29, Greg Ungerer wrote: > The shipping default setting for the Freescale M5208EVB board is to run > the CPU at 166MHz. The current qemu emulation code for this board is > defaulting to 66MHz. This results in time appearing to run way to slowly. > So a "sleep 5" in a standard ColdFi

Re: [Qemu-devel] [Qemu-ppc] [PATCH 2/4] libqos: add PCI management in qtest_vboot()/qtest_shutdown()

2016-09-27 Thread Laurent Vivier
On 27/09/2016 05:48, David Gibson wrote: > On Mon, Sep 26, 2016 at 04:10:47PM +0200, Laurent Vivier wrote: >> Signed-off-by: Laurent Vivier >> --- >> tests/e1000e-test.c | 2 +- >> tests/i440fx-test.c | 2 +- >> tests/ide-test.c| 2 +- >> tests/ivshmem-test.c

Re: [Qemu-devel] [PATCH] 9pfs: fix NULL pointer dereference in v9fs_version

2016-09-27 Thread Greg Kurz
On Mon, 26 Sep 2016 21:38:48 -0700 Li Qiang wrote: > From: Li Qiang > > In 9pfs get version dispatch function, a guest can provide a NULL > version string thus causing an NULL pointer dereference issue. The guest doesn't provide NULL, but an empty string actually. > This patch fix this issue.

Re: [Qemu-devel] [Nbd] [PATCH] proto: add 'shift' extension.

2016-09-27 Thread Alex Bligh
> On 27 Sep 2016, at 00:41, Wouter Verhelst wrote: > > Thoughts? Honestly? This whole thing seems like complication for little gain. One command per 2GB wiped doesn't seem like a bad thing. -- Alex Bligh

Re: [Qemu-devel] [PATCH] 9pfs: make illegal path name detection more robust

2016-09-27 Thread Greg Kurz
On Mon, 26 Sep 2016 21:40:17 -0700 Li Qiang wrote: > From: Li Qiang > > The parameter of name_is_illegal can be NULL, adding detection of > this to avoid NULL pointer dereference issue. > Same as with the other patch: the root cause is in v9fs_iov_vunmarshal(). > Signed-off-by: Li Qiang > -

Re: [Qemu-devel] [Qemu-ppc] [PATCH 4/4] tests: enable ohci/uhci/xhci tests on PPC64

2016-09-27 Thread Laurent Vivier
On 27/09/2016 05:53, David Gibson wrote: > On Mon, Sep 26, 2016 at 04:10:49PM +0200, Laurent Vivier wrote: >> void qusb_pci_init_one(QPCIBus *pcibus, struct qhc *hc, uint32_t devfn, int >> bar) >> { >> hc->dev = qpci_device_find(pcibus, devfn); >> @@ -31,6 +38,13 @@ void uhci_port_test(s

Re: [Qemu-devel] [PATCH 2/3] virtio-blk: add missing virtio_detach_element() call

2016-09-27 Thread Ladi Prosek
On Mon, Sep 19, 2016 at 3:28 PM, Stefan Hajnoczi wrote: > Make sure to unmap the scatter-gather list and decrement vq->inuse > before freeing requests in virtio_blk_reset(). > > Signed-off-by: Stefan Hajnoczi > --- > hw/block/virtio-blk.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/

Re: [Qemu-devel] [PULL 10/23] vl: Switch qemu_uuid to QemuUUID

2016-09-27 Thread Christian Borntraeger
On 09/23/2016 07:10 AM, Fam Zheng wrote: > Update all qemu_uuid users as well, especially get rid of the duplicated > low level g_strdup_printf, sscanf and snprintf calls with QEMU UUID API. > > Since qemu_uuid_parse is quite tangled with qemu_uuid, its switching to > QemuUUID is done here too to

Re: [Qemu-devel] [PATCH 2/3] virtio-blk: add missing virtio_detach_element() call

2016-09-27 Thread Greg Kurz
On Tue, 27 Sep 2016 09:49:17 +0200 Ladi Prosek wrote: > On Mon, Sep 19, 2016 at 3:28 PM, Stefan Hajnoczi wrote: > > Make sure to unmap the scatter-gather list and decrement vq->inuse > > before freeing requests in virtio_blk_reset(). > > > > Signed-off-by: Stefan Hajnoczi > > --- > > hw/block/

Re: [Qemu-devel] [PATCH] m68k: change default system clock for m5208evb

2016-09-27 Thread Laurent Vivier
Le 27/09/2016 à 09:33, Thomas Huth a écrit : > On 27.09.2016 03:29, Greg Ungerer wrote: >> The shipping default setting for the Freescale M5208EVB board is to run >> the CPU at 166MHz. The current qemu emulation code for this board is >> defaulting to 66MHz. This results in time appearing to run

Re: [Qemu-devel] [PULL 10/23] vl: Switch qemu_uuid to QemuUUID

2016-09-27 Thread Fam Zheng
On Tue, 09/27 10:05, Christian Borntraeger wrote: > On 09/23/2016 07:10 AM, Fam Zheng wrote: > > Update all qemu_uuid users as well, especially get rid of the duplicated > > low level g_strdup_printf, sscanf and snprintf calls with QEMU UUID API. > > > > Since qemu_uuid_parse is quite tangled with

Re: [Qemu-devel] [PATCH] 9pfs: fix potential host memory leak in v9fs_read

2016-09-27 Thread Greg Kurz
On Mon, 26 Sep 2016 21:42:26 -0700 Li Qiang wrote: > From: Li Qiang > > In 9pfs read dispatch function, it doesn't free two QEMUIOVector > object thus causing potential memory leak. This patch avoid this. > Good catch for the leak, but I'd prefer another fix. See below. > Signed-off-by: Li Q

Re: [Qemu-devel] [PATCH 2/3] target-arm: add env->tbflags

2016-09-27 Thread Paolo Bonzini
> Doing this for all MSR writes is a bit sad, because a lot of them > don't actually change the TB flags, and quite a few of them which > previously we were able to code to not have to do a helper call > at all (direct writes to fields) now get a pointless helper call. True. On the other hand, MS

Re: [Qemu-devel] [PATCH v2 3/7] block/qapi: Move 'aio' option to file driver

2016-09-27 Thread Kevin Wolf
Am 26.09.2016 um 18:49 hat Max Reitz geschrieben: > On 23.09.2016 16:32, Kevin Wolf wrote: > > The option whether or not to use a native AIO interface really isn't a > > generic option for all drivers, but only applies to the native file > > protocols. This patch moves the option in blockdev-add to

Re: [Qemu-devel] [PATCH v2 0/7] block: Make more blockdev-add options work

2016-09-27 Thread Kevin Wolf
Am 26.09.2016 um 19:10 hat Max Reitz geschrieben: > It's a bit funny now how blockdev_init() and > extract_common_blockdev_options() are actually used by neither > blockdev-add nor -blockdev, but only by drive_new() (which happily > advertises blockdev_init() to be shared with blockev-add, though).

Re: [Qemu-devel] [PATCH v2 0/7] block: Make more blockdev-add options work

2016-09-27 Thread Kevin Wolf
Am 23.09.2016 um 16:32 hat Kevin Wolf geschrieben: > This series moves a few more options from flags to the appropriate place. This > doesn't only result in cleaner code, but also allows using these options in > nested node definitions. > > After this series, bds_tree_init() is only a thin wrapper

[Qemu-devel] [PATCH 1/8] [debug] uas: use 32 streams

2016-09-27 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- hw/usb/dev-uas.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/usb/dev-uas.c b/hw/usb/dev-uas.c index 3a8ff18..2a5fcbc 100644 --- a/hw/usb/dev-uas.c +++ b/hw/usb/dev-uas.c @@ -101,7 +101,7 @@ typedef struct { /*

[Qemu-devel] [PATCH 2/8] xhci: decouple EV_QUEUE from TD_QUEUE

2016-09-27 Thread Gerd Hoffmann
EV_QUEUE must not change because an array of that size is part of live migration data. Hard-code current value there, so we can touch TD_QUEUE without breaking live migration. Signed-off-by: Gerd Hoffmann --- hw/usb/hcd-xhci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/

[Qemu-devel] [PATCH 3/8] xhci: drop unused comp_xfer field

2016-09-27 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- hw/usb/hcd-xhci.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c index 15cac56..089dcbf 100644 --- a/hw/usb/hcd-xhci.c +++ b/hw/usb/hcd-xhci.c @@ -384,7 +384,6 @@ struct XHCIEPContext { XHCIRing ring; unsigned

[Qemu-devel] [PATCH 0/8] xhci: stream transfer fixes, cleanups

2016-09-27 Thread Gerd Hoffmann
Hi, Our xhci emulation has trouble handling devices with many xhci streams, which is fixed by patch #4. Patch #1 can be used to reproduce the bug with the qemu uas emulation. It's there for testing convinience only, I do not intend to merge it. The other patches are cleanups. please review,

[Qemu-devel] [PATCH 6/8] xhci: add & use xhci_kick_epctx()

2016-09-27 Thread Gerd Hoffmann
xhci_kick_epctx is a xhci_kick_ep variant which takes an XHCIEPContext as input instead of slotid and epid. So in case we have a XHCIEPContext at hand at the callsite we can just pass it directly. Signed-off-by: Gerd Hoffmann --- hw/usb/hcd-xhci.c | 43 ++

[Qemu-devel] [PATCH 5/8] xhci: drop XHCITransfer->xhci

2016-09-27 Thread Gerd Hoffmann
Use XHCITransfer->epctx->xhci instead. Signed-off-by: Gerd Hoffmann --- hw/usb/hcd-xhci.c | 22 +- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c index d8e4074..da249f7 100644 --- a/hw/usb/hcd-xhci.c +++ b/hw/usb/hcd-xhci.

[Qemu-devel] [PATCH 7/8] xhci: drop XHCITransfer->{slotid,epid}

2016-09-27 Thread Gerd Hoffmann
We can use XHCITransfer->epctx->{slotid,epid} instead. Signed-off-by: Gerd Hoffmann --- hw/usb/hcd-xhci.c | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c index 4e557c2..108d185 100644 --- a/hw/usb/hcd-xhci.c +++ b/hw/usb/

Re: [Qemu-devel] [PATCH V15 00/12] Introduce COLO-Proxy

2016-09-27 Thread Jason Wang
On 2016年09月27日 10:22, Zhang Chen wrote: COLO-proxy is a part of COLO project. COLO project is composed of COLO-frame, COLO-proxy and block-replication. It is used to compare the network package to help COLO decide whether to do checkpoint. With COLO-proxy's help, COLO greatly improves the perfo

[Qemu-devel] [PATCH 8/8] xhci: make xhci_epid_to_usbep accept XHCIEPContext

2016-09-27 Thread Gerd Hoffmann
All callsites have a XHCIEPContext pointer anyway, so we can just pass it directly instead of fiddeling with slotid and epid. Signed-off-by: Gerd Hoffmann --- hw/usb/hcd-xhci.c | 29 +++-- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/hw/usb/hcd-xhci.c b

[Qemu-devel] [PATCH 4/8] xhci: use linked list for transfers

2016-09-27 Thread Gerd Hoffmann
xhci has a fixed number of 24 (TD_QUEUE) XHCITransfer structs per endpoint, which turns out to be a problem for usb3 devices with 32 (or more) bulk streams. xhci re-checks the trb rings on every finished transfer to make sure it'll pick up any pending work. But that scheme breaks in case the firs

Re: [Qemu-devel] [PATCH] qemu-img: Allow unmap backing image for zeroed clusters

2016-09-27 Thread Kevin Wolf
Am 27.09.2016 um 04:20 hat Fam Zheng geschrieben: > We already specified BDRV_O_UNMAP when opening images in 'qemu-img > commit', but didn't turn on the "unmap" in the active commit job. This > patch fixes that so that zeroed clusters in top image can be discarded > which is desired in the virt-spa

Re: [Qemu-devel] [PATCH] util: secure memfd_create fallback mechanism

2016-09-27 Thread Daniel P. Berrange
On Tue, Sep 27, 2016 at 03:06:21AM +, Rafael David Tinoco wrote: > Commit: 35f9b6ef3acc9d0546c395a566b04e63ca84e302 added a fallback > mechanism for systems not supporting memfd_create syscall (started > being supported since 3.17). This is really dubious code in general and IMHO should just b

Re: [Qemu-devel] [PATCH V15 00/12] Introduce COLO-Proxy

2016-09-27 Thread Zhang Chen
On 09/27/2016 04:38 PM, Jason Wang wrote: On 2016年09月27日 10:22, Zhang Chen wrote: COLO-proxy is a part of COLO project. COLO project is composed of COLO-frame, COLO-proxy and block-replication. It is used to compare the network package to help COLO decide whether to do checkpoint. With COLO-

Re: [Qemu-devel] [PATCH] pci-testdev: enhance to support new testcases

2016-09-27 Thread Peter Xu
On Tue, Sep 27, 2016 at 02:37:44PM +0800, Peter Xu wrote: > On Thu, Sep 22, 2016 at 09:23:05PM +0300, Michael S. Tsirkin wrote: > > On Thu, Sep 22, 2016 at 02:15:08PM +0800, Peter Xu wrote: > > > pci-testdev is used mostly in kvm-unit-test for some eventfd tests. > > > However I see it a good frame

Re: [Qemu-devel] [PATCH 0/2] Xen pvUSB correction

2016-09-27 Thread Gerd Hoffmann
On Mo, 2016-09-26 at 14:43 +0200, Juergen Gross wrote: > Trying to use pvUSB in a Xen guest with a qemu emulated USB controller > will crash qemu as it tries to attach a pvUSB device to the emulated > controller. Hmm. --verbose please. While this clearly doesn't do what you intended I think it s

Re: [Qemu-devel] [PATCH 0/5] target-i386: Eliminate unnecessary has_msr_* global variables

2016-09-27 Thread Paolo Bonzini
- Original Message - > From: "Eduardo Habkost" > To: "Paolo Bonzini" , "Marcelo Tosatti" > > Cc: k...@vger.kernel.org, qemu-devel@nongnu.org > Sent: Tuesday, September 27, 2016 12:24:05 AM > Subject: [PATCH 0/5] target-i386: Eliminate unnecessary has_msr_* global > variables > > Some

Re: [Qemu-devel] [PULL 00/28] Misc patches for 2016-09-26

2016-09-27 Thread Paolo Bonzini
- Original Message - > From: "Peter Xu" > To: "Peter Maydell" , "Paolo Bonzini" > > Cc: "QEMU Developers" > Sent: Tuesday, September 27, 2016 4:12:51 AM > Subject: Re: [Qemu-devel] [PULL 00/28] Misc patches for 2016-09-26 > > On Mon, Sep 26, 2016 at 02:19:08PM -0700, Peter Maydell wr

Re: [Qemu-devel] [PATCH 1/2] xen: add an own bus for xen backend devices

2016-09-27 Thread Gerd Hoffmann
On Mo, 2016-09-26 at 14:43 +0200, Juergen Gross wrote: > Add a bus for Xen backend devices in order to be able to establish a > dedicated device path for pluggable devices. Looks sane to me. Can take this through the usb queue if I get an ack from xen. > +#define TYPE_XENSYSDEV "xensysdev" > +#d

Re: [Qemu-devel] [PATCH] qemu-img: Allow unmap backing image for zeroed clusters

2016-09-27 Thread Fam Zheng
On Tue, 09/27 10:41, Kevin Wolf wrote: > Am 27.09.2016 um 04:20 hat Fam Zheng geschrieben: > > We already specified BDRV_O_UNMAP when opening images in 'qemu-img > > commit', but didn't turn on the "unmap" in the active commit job. This > > patch fixes that so that zeroed clusters in top image can

Re: [Qemu-devel] [PATCH 2/2] xen: add qemu device for each pvusb backend

2016-09-27 Thread Daniel P. Berrange
On Mon, Sep 26, 2016 at 02:43:57PM +0200, Juergen Gross wrote: > In order to be able to specify to which pvusb controller a new pvusb > device should be added we need a qemu device for each pvusb controller > with an associated id. > > Add such a device when a new controller is requested and attac

Re: [Qemu-devel] [PATCH v3 1/3] qemu-nbd: Add --fork option

2016-09-27 Thread Kevin Wolf
Am 25.08.2016 um 18:30 hat Max Reitz geschrieben: > Using the --fork option, one can make qemu-nbd fork the worker process. > The original process will exit on error of the worker or once the worker > enters the main loop. > > Suggested-by: Sascha Silbe > Signed-off-by: Max Reitz > --- > qemu-n

Re: [Qemu-devel] [PATCH 2/2] xen: add qemu device for each pvusb backend

2016-09-27 Thread Gerd Hoffmann
Hi, > struct usbback_info { > struct XenDevice xendev; /* must be first */ > +char id[24]; > +struct USBBACKDevice *dev; > USBBus bus; > void *urb_sring; > void *conn_sring; >

Re: [Qemu-devel] [PATCH v3 07/10] ppc/pnv: add XSCOM infrastructure

2016-09-27 Thread Cédric Le Goater
>> +#include >> + >> +static void xscom_complete(uint64_t hmer_bits) >> +{ >> +CPUState *cs = current_cpu; > > Hmm.. is current_cpu a safe thing to use in the case of KVM or MTTCG? yes, as we are running under cpu_exec when doing this call. >> +PowerPCCPU *cpu = POWERPC_CPU(cs); >> +

[Qemu-devel] [PATCH] xenpv: Fix qemu_uuid compiling error

2016-09-27 Thread Fam Zheng
9c5ce8db2 switched the type of qemu_uuid and this should have followed. Fix it. Signed-off-by: Fam Zheng --- hw/xenpv/xen_domainbuild.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/xenpv/xen_domainbuild.c b/hw/xenpv/xen_domainbuild.c index b439b0e..457a897 100644 --- a/

Re: [Qemu-devel] [PULL 00/28] Misc patches for 2016-09-26

2016-09-27 Thread Peter Xu
On Tue, Sep 27, 2016 at 04:53:57AM -0400, Paolo Bonzini wrote: > > > - Original Message - > > From: "Peter Xu" > > To: "Peter Maydell" , "Paolo Bonzini" > > > > Cc: "QEMU Developers" > > Sent: Tuesday, September 27, 2016 4:12:51 AM > > Subject: Re: [Qemu-devel] [PULL 00/28] Misc patch

Re: [Qemu-devel] Live migration without bdrv_drain_all()

2016-09-27 Thread Stefan Hajnoczi
On Mon, Aug 29, 2016 at 06:56:42PM +, Felipe Franciosi wrote: > Heya! > > > On 29 Aug 2016, at 08:06, Stefan Hajnoczi wrote: > > > > At KVM Forum an interesting idea was proposed to avoid > > bdrv_drain_all() during live migration. Mike Cui and Felipe Franciosi > > mentioned running at queu

Re: [Qemu-devel] [PATCH v3 07/10] ppc/pnv: add XSCOM infrastructure

2016-09-27 Thread Cédric Le Goater
On 09/27/2016 11:10 AM, Cédric Le Goater wrote: >>> +#include >>> + >>> +static void xscom_complete(uint64_t hmer_bits) >>> +{ >>> +CPUState *cs = current_cpu; >> >> Hmm.. is current_cpu a safe thing to use in the case of KVM or MTTCG? > > yes, as we are running under cpu_exec when doing this

Re: [Qemu-devel] [PATCH v2 0/3] pc: compat macroses fixes/cleanups

2016-09-27 Thread Igor Mammedov
On Mon, 19 Sep 2016 10:32:32 +0200 Igor Mammedov wrote: > Changes since v1: > - drop 'pc: fix regression introduced by adding 2.8 machine' >it's not needed > - cleanup old style compat chaining > - add missing HW_COMPAT_2_8 to PC_COMPAT_2_8 machine type Eduardo could you take it through y

[Qemu-devel] [PATCH v2] block: Turn on "unmap" in active commit

2016-09-27 Thread Fam Zheng
We already specified BDRV_O_UNMAP when opening images in 'qemu-img commit', but didn't turn on the "unmap" in the active commit job. This patch fixes that so that zeroed clusters in top image can be discarded which is desired in the virt-sparsify use case, where a temporary overlay is created and f

Re: [Qemu-devel] [PATCH v3 0/3] crypto: add ctr mode support and little inprovement

2016-09-27 Thread Gonglei (Arei)
Hi Daniel, I'll post virtio-crypto v4 based on this patch set. Would you please merge it if it's ok? Thanks. Regards, -Gonglei > -Original Message- > From: Gonglei (Arei) > Sent: Monday, September 26, 2016 5:23 PM > To: qemu-devel@nongnu.org > Cc: berra...@redhat.com; Wubin (H); Gongle

Re: [Qemu-devel] [Qemu-ppc] [PATCH 2/4] libqos: add PCI management in qtest_vboot()/qtest_shutdown()

2016-09-27 Thread David Gibson
On Tue, Sep 27, 2016 at 09:33:58AM +0200, Laurent Vivier wrote: > > > On 27/09/2016 05:48, David Gibson wrote: > > On Mon, Sep 26, 2016 at 04:10:47PM +0200, Laurent Vivier wrote: > >> Signed-off-by: Laurent Vivier > >> --- > >> tests/e1000e-test.c | 2 +- > >> tests/i440fx-test.c

Re: [Qemu-devel] Live migration without bdrv_drain_all()

2016-09-27 Thread Daniel P. Berrange
On Mon, Aug 29, 2016 at 11:06:48AM -0400, Stefan Hajnoczi wrote: > At KVM Forum an interesting idea was proposed to avoid > bdrv_drain_all() during live migration. Mike Cui and Felipe Franciosi > mentioned running at queue depth 1. It needs more thought to make it > workable but I want to capture

[Qemu-devel] [PATCH V9 3/7] coroutine: add a macro for the coroutine stack size

2016-09-27 Thread Peter Lieven
Signed-off-by: Peter Lieven Reviewed-by: Paolo Bonzini Reviewed-by: Richard Henderson --- include/qemu/coroutine_int.h | 2 ++ util/coroutine-sigaltstack.c | 2 +- util/coroutine-ucontext.c| 2 +- util/coroutine-win32.c | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --

Re: [Qemu-devel] Live migration without bdrv_drain_all()

2016-09-27 Thread Dr. David Alan Gilbert
* Stefan Hajnoczi (stefa...@gmail.com) wrote: > On Mon, Aug 29, 2016 at 06:56:42PM +, Felipe Franciosi wrote: > > Heya! > > > > > On 29 Aug 2016, at 08:06, Stefan Hajnoczi wrote: > > > > > > At KVM Forum an interesting idea was proposed to avoid > > > bdrv_drain_all() during live migration.

[Qemu-devel] [PATCH V9 0/7] coroutine: mmap stack memory and stack size

2016-09-27 Thread Peter Lieven
I decided to split this from the rest of the Qemu RSS usage series as it contains the more or less non contentious patches. I omitted the MAP_GROWSDOWN flag in mmap as we are not 100% sure which side effects it has. I kept the guard page which is now nicely makes the stacks visible in smaps. The

[Qemu-devel] [PATCH V9 7/7] coroutine: reduce stack size to 60kB

2016-09-27 Thread Peter Lieven
evaluation with the recently introduced maximum stack usage monitoring revealed that the actual used stack size was never above 4kB so allocating 1MB stack for each coroutine is a lot of wasted memory. So reduce the stack size to 60kB which should still give enough head room. The guard page added i

[Qemu-devel] [PATCH V9 4/7] coroutine-ucontext: use helper for allocating stack memory

2016-09-27 Thread Peter Lieven
Signed-off-by: Peter Lieven --- util/coroutine-ucontext.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/util/coroutine-ucontext.c b/util/coroutine-ucontext.c index 31254ab..6621f3f 100644 --- a/util/coroutine-ucontext.c +++ b/util/coroutine-ucontext.c @@ -34,6 +3

[Qemu-devel] [PATCH V9 5/7] coroutine-sigaltstack: use helper for allocating stack memory

2016-09-27 Thread Peter Lieven
Signed-off-by: Peter Lieven --- util/coroutine-sigaltstack.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/util/coroutine-sigaltstack.c b/util/coroutine-sigaltstack.c index a5bcb7e..f6fc49a 100644 --- a/util/coroutine-sigaltstack.c +++ b/util/coroutine-sigaltstack.c

[Qemu-devel] [PATCH V9 6/7] oslib-posix: add a configure switch to debug stack usage

2016-09-27 Thread Peter Lieven
this adds a knob to track the maximum stack usage of stacks created by qemu_alloc_stack. Signed-off-by: Peter Lieven --- configure | 19 +++ util/oslib-posix.c | 35 +++ 2 files changed, 54 insertions(+) diff --git a/configure b/configure

Re: [Qemu-devel] [PATCH 0/3] virtio: detach VirtQueueElements freed by reset

2016-09-27 Thread Stefan Hajnoczi
On Mon, Sep 19, 2016 at 02:28:02PM +0100, Stefan Hajnoczi wrote: > virtio-blk and virtio-serial need to free VirtQueueElements during device > reset. Simply calling g_free(elem) is not enough because the scatter-gather > list should be unmapped and vq->inuse must be decremented. > > These patches

Re: [Qemu-devel] [PULL 00/28] Misc patches for 2016-09-26

2016-09-27 Thread Paolo Bonzini
> I think we should keep it as it is, because Jason's patchset will only > support intel-iommu, not amd-iommu. For now, it won't have problem > (just like Intel IOMMU one). But after Jason's patch is merged, people > will be able to boot a guest with vhost and amd-iommu (which we > actually do not

Re: [Qemu-devel] [PATCH 1/3] virtio: add virtio_detach_element()

2016-09-27 Thread Stefan Hajnoczi
On Tue, Sep 27, 2016 at 09:32:40AM +0200, Ladi Prosek wrote: > On Mon, Sep 19, 2016 at 3:28 PM, Stefan Hajnoczi wrote: > > During device res> > +/* virtqueue_discard: > > + * @vq: The #VirtQueue > > + * @elem: The #VirtQueueElement > > + * @len: number of bytes written > > + * > > + * Pretend the

[Qemu-devel] [PULL V2 02/27] net: hmp_host_net_remove: Del the -net option of the removed host_net

2016-09-27 Thread Jason Wang
From: Shmulik Ladkani Upon hmp_host_net_remove(), the appropriate -net client is deleted (according to the given vlan_id and device id), as well as the corresponsing hub port. However, the relevant '-net' option that was added by former hmp_host_net_add() call is still present in "net" options g

[Qemu-devel] [PULL V2 00/27] Net patches

2016-09-27 Thread Jason Wang
The following changes since commit 7cfdc02dae0d2ff58c897496cfdbbafc0eda0f3f: Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging (2016-09-26 19:47:00 +0100) are available in the git repository at: https://github.com/jasowang/qemu.git tags/net-pull-request for you to f

[Qemu-devel] [PATCH V9 1/7] oslib-posix: add helpers for stack alloc and free

2016-09-27 Thread Peter Lieven
the allocated stack will be adjusted to the minimum supported stack size by the OS and rounded up to be a multiple of the system pagesize. Additionally an architecture dependent guard page is added to the stack to catch stack overflows. Signed-off-by: Peter Lieven --- include/sysemu/os-posix.h |

[Qemu-devel] [PULL V2 01/27] virtio-net: allow increasing rx queue size

2016-09-27 Thread Jason Wang
From: "Michael S. Tsirkin" This allows increasing the rx queue size up to 1024: unlike with tx, guests don't put in huge S/G lists into RX so the risk of running into the max 1024 limitation due to some off-by-one seems small. It's helpful for users like OVS-DPDK which don't do any buffering on

Re: [Qemu-devel] Live migration without bdrv_drain_all()

2016-09-27 Thread Daniel P. Berrange
On Tue, Sep 27, 2016 at 10:27:12AM +0100, Stefan Hajnoczi wrote: > On Mon, Aug 29, 2016 at 06:56:42PM +, Felipe Franciosi wrote: > > Heya! > > > > > On 29 Aug 2016, at 08:06, Stefan Hajnoczi wrote: > > > > > > At KVM Forum an interesting idea was proposed to avoid > > > bdrv_drain_all() duri

[Qemu-devel] [PATCH V9 2/7] coroutine-sigaltstack: rename coroutine struct appropriately

2016-09-27 Thread Peter Lieven
The name of the sigaltstack coroutine struct was misleading. Signed-off-by: Peter Lieven --- util/coroutine-sigaltstack.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/util/coroutine-sigaltstack.c b/util/coroutine-sigaltstack.c index a7c3366..171cd44 100644

[Qemu-devel] [PULL V2 08/27] colo-compare: introduce packet comparison thread

2016-09-27 Thread Jason Wang
From: Zhang Chen If primary packet is same with secondary packet, we will send primary packet and drop secondary packet, otherwise notify COLO frame to do checkpoint. If primary packet comes but secondary packet does not, after REGULAR_PACKET_CHECK_MS milliseconds we set the primary packet as old

[Qemu-devel] [PULL V2 04/27] colo-compare: introduce colo compare initialization

2016-09-27 Thread Jason Wang
From: Zhang Chen This a COLO net ascii figure: Primary qemu Secondary qemu +--+ ++ | +---

[Qemu-devel] [PULL V2 03/27] qemu-char: Add qemu_chr_add_handlers_full() for GMaincontext

2016-09-27 Thread Jason Wang
From: Zhang Chen Add qemu_chr_add_handlers_full() API, we can use this API pass in a GMainContext,make handler run in the context rather than main_loop. This comments from Daniel P . Berrange. Signed-off-by: Zhang Chen Signed-off-by: Li Zhijian Signed-off-by: Wen Congyang Reviewed-by: Daniel

[Qemu-devel] [PULL V2 05/27] net/colo.c: add colo.c to define and handle packet

2016-09-27 Thread Jason Wang
From: Zhang Chen The net/colo.c is used by colo-compare and filter-rewriter. this can share common data structure like net packet, and other functions. Signed-off-by: Zhang Chen Signed-off-by: Li Zhijian Signed-off-by: Wen Congyang Signed-off-by: Jason Wang --- net/Makefile.objs | 1 + n

Re: [Qemu-devel] [PATCH] pci-testdev: enhance to support new testcases

2016-09-27 Thread Paolo Bonzini
> Take my example: IOMMU unit test would want the guest to send DMA/IRQ > request from the device's perspective. In that case, we would like to > "tell" the pci-testdev about where to write the DMA, and what data to > write specifically, or which IRQ to trigger. That's something we > cannot do rig

[Qemu-devel] [PULL V2 06/27] Jhash: add linux kernel jhashtable in qemu

2016-09-27 Thread Jason Wang
From: Zhang Chen Jhash will be used by colo-compare and filter-rewriter to save and lookup net connection info Signed-off-by: Zhang Chen Signed-off-by: Li Zhijian Signed-off-by: Wen Congyang Signed-off-by: Jason Wang --- include/qemu/jhash.h | 59

Re: [Qemu-devel] [PATCH v2] block: Turn on "unmap" in active commit

2016-09-27 Thread Fam Zheng
On Tue, 09/27 17:33, Fam Zheng wrote: > We already specified BDRV_O_UNMAP when opening images in 'qemu-img > commit', but didn't turn on the "unmap" in the active commit job. This > patch fixes that so that zeroed clusters in top image can be discarded > which is desired in the virt-sparsify use ca

[Qemu-devel] [PULL V2 07/27] colo-compare: track connection and enqueue packet

2016-09-27 Thread Jason Wang
From: Zhang Chen In this patch we use kernel jhash table to track connection, and then enqueue net packet like this: + CompareState ++ | | +---+ +---+ +---+ |conn list +--->conn +->conn | +--

[Qemu-devel] [PULL V2 09/27] colo-compare: add TCP, UDP, ICMP packet comparison

2016-09-27 Thread Jason Wang
From: Zhang Chen We add TCP,UDP,ICMP packet comparison to replace IP packet comparison. This can increase the accuracy of the package comparison. Less checkpoint more efficiency. Signed-off-by: Zhang Chen Signed-off-by: Li Zhijian Signed-off-by: Wen Congyang Signed-off-by: Jason Wang --- ne

[Qemu-devel] [PULL V2 10/27] filter-rewriter: introduce filter-rewriter initialization

2016-09-27 Thread Jason Wang
From: Zhang Chen Filter-rewriter is a part of COLO project. It will rewrite some of secondary packet to make secondary guest's tcp connection established successfully. In this module we will rewrite tcp packet's ack to the secondary from primary,and rewrite tcp packet's seq to the primary from se

[Qemu-devel] [PULL V2 16/27] tap: Allow specifying a bridge

2016-09-27 Thread Jason Wang
From: 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 Reviewed-by

[Qemu-devel] [PULL V2 15/27] e1000: fix buliding complaint

2016-09-27 Thread Jason Wang
From: Gonglei hw/net/e1000e_core.c:56: warning: e1000e_set_interrupt_cause declared inline after being called hw/net/e1000e_core.c:56: warning: previous declaration of e1000e_set_interrupt_cause was here Signed-off-by: Gonglei Reviewed-by: Dmitry Fleytman Signed-off-by: Jason Wang --- hw/n

[Qemu-devel] [PULL V2 12/27] filter-rewriter: rewrite tcp packet to keep secondary connection

2016-09-27 Thread Jason Wang
From: Zhang Chen We will rewrite tcp packet secondary received and sent. When colo guest is a tcp server. Firstly, client start a tcp handshake. the packet's seq=client_seq, ack=0,flag=SYN. COLO primary guest get this pkt and mirror(filter-mirror) to secondary guest, secondary get it use filter-

[Qemu-devel] [PULL V2 11/27] filter-rewriter: track connection and parse packet

2016-09-27 Thread Jason Wang
From: Zhang Chen We use net/colo.h to track connection and parse packet Signed-off-by: Zhang Chen Signed-off-by: Li Zhijian Signed-off-by: Wen Congyang Signed-off-by: Jason Wang --- net/colo.c| 14 ++ net/colo.h| 1 + net/filter-rewriter.c | 50 +

[Qemu-devel] [PULL V2 19/27] e1000e: Flush receive queues on link up

2016-09-27 Thread Jason Wang
From: Dmitry Fleytman Signed-off-by: Dmitry Fleytman Signed-off-by: Jason Wang --- hw/net/e1000e_core.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/net/e1000e_core.c b/hw/net/e1000e_core.c index ea2a484..e8d50f6 100644 --- a/hw/net/e1000e_core.c +++ b/hw/net/e1000e_core.c @@ -180

[Qemu-devel] [PULL V2 17/27] net: limit allocation in nc_sendv_compat

2016-09-27 Thread Jason Wang
From: Peter Lieven we only need to allocate enough memory to hold the packet. This might be less than NET_BUFSIZE. Additionally fail early if the packet is larger than NET_BUFSIZE. Signed-off-by: Peter Lieven Reviewed-by: Stefan Hajnoczi Signed-off-by: Jason Wang --- net/net.c | 8 ++--

[Qemu-devel] [PULL V2 14/27] docs: Add documentation for COLO-proxy

2016-09-27 Thread Jason Wang
From: Zhang Chen Introduce the design of COLO-proxy, and how to use it. Signed-off-by: Zhang Chen Signed-off-by: Jason Wang --- docs/colo-proxy.txt | 188 1 file changed, 188 insertions(+) create mode 100644 docs/colo-proxy.txt diff --git

[Qemu-devel] [PULL V2 13/27] MAINTAINERS: add maintainer for COLO-proxy

2016-09-27 Thread Jason Wang
From: Zhang Chen add Zhang Chen and Li zhijian as co-maintainers of COLO-proxy. Signed-off-by: Zhang Chen Signed-off-by: Li Zhijian Signed-off-by: Wen Congyang Signed-off-by: Jason Wang --- MAINTAINERS | 9 + 1 file changed, 9 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS in

[Qemu-devel] [PULL V2 21/27] e1000e: Fix PBACLR implementation

2016-09-27 Thread Jason Wang
From: Dmitry Fleytman This patch fixes incorrect check for interrypt type being used. PBSCLR register is valid for MSI-X only. See spec. 10.2.3.13 MSI—X PBA Clear Signed-off-by: Dmitry Fleytman Signed-off-by: Jason Wang --- hw/net/e1000e_core.c | 2 +- 1 file changed, 1 insertion(+), 1 dele

[Qemu-devel] [PULL V2 20/27] e1000e: Fix CTRL_EXT.EIAME behavior

2016-09-27 Thread Jason Wang
From: Dmitry Fleytman CTRL_EXT.EIAME bit controls clearing of IAM bits, but current code clears IMS bits instead. See spec. 10.2.2.5 Extended Device Control Register. Signed-off-by: Dmitry Fleytman Signed-off-by: Jason Wang --- hw/net/e1000e_core.c | 4 ++-- hw/net/trace-events | 2 +- 2 fi

[Qemu-devel] [PULL V2 22/27] e1000e: Fix OTHER interrupts processing for MSI-X

2016-09-27 Thread Jason Wang
From: Dmitry Fleytman Interrupt mask for legacy OTHER causes should not apply to MSI-X OTHER cause. Signed-off-by: Dmitry Fleytman Signed-off-by: Jason Wang --- hw/net/e1000e_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/net/e1000e_core.c b/hw/net/e1000e_core.c

[Qemu-devel] [PULL V2 18/27] e1000e: Flush all receive queues on receive enable

2016-09-27 Thread Jason Wang
From: Dmitry Fleytman Before this patch first netdev queue only was flushed. Signed-off-by: Dmitry Fleytman Signed-off-by: Jason Wang --- hw/net/e1000e.c | 2 +- hw/net/e1000e_core.c | 2 +- hw/net/e1000e_core.h | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/hw/n

[Qemu-devel] [PULL V2 26/27] mcf_fec: fix error in qemu_send_packet argument

2016-09-27 Thread Jason Wang
From: Paolo Bonzini This uses the wrong frame size for packets composed of multiple descriptors. Signed-off-by: Paolo Bonzini Signed-off-by: Jason Wang --- hw/net/mcf_fec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/net/mcf_fec.c b/hw/net/mcf_fec.c index d31fea1..d

Re: [Qemu-devel] [PATCH] proto: add 'shift' extension.

2016-09-27 Thread Paolo Bonzini
> We could go in a different direction and export flag > 'has_zero_init' which will report that the storage is > initialized with all zeroes at the moment. In this > case mirroring code will not fall into this > branch. Why don't you add the zero_init flag to QEMU's NBD driver instead? Thanks, P

[Qemu-devel] [PULL V2 24/27] e1000e: Fix EIAC register implementation

2016-09-27 Thread Jason Wang
From: Dmitry Fleytman This patch fixes 2 issues: 1. Bits set in EIAC register should be cleared from IMS when EIAM is not used. 2. Only bit that corresonds to the interrupt being raised should be cleared. See spec. 10.2.4.7 Interrupt Auto Clear Signed-off-by: Dmitry Fleytman Signed-off-

[Qemu-devel] [PULL V2 23/27] e1000e: Fix spurious RX TCP ACK interrupts

2016-09-27 Thread Jason Wang
From: Dmitry Fleytman Do not raise ACK interrupts when RFCTL.ACKDIS bit is set (see spec. 10.2.5.16). Signed-off-by: Dmitry Fleytman Signed-off-by: Jason Wang --- hw/net/e1000e_core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/net/e1000e_core.c b/hw/net/e1000e_co

Re: [Qemu-devel] [PATCH RFC] tests: Run qtest cases in parallel

2016-09-27 Thread Daniel P. Berrange
On Fri, Sep 23, 2016 at 03:58:07PM +0800, Fam Zheng wrote: > On Wed, 09/21 14:24, John Snow wrote: > > > > > > On 08/12/2016 05:19 AM, Fam Zheng wrote: > > > Previously all test cases in a category, such as check-qtest-y, are > > > executed in a single long gtester command. This patch separates e

[Qemu-devel] [PULL V2 25/27] net: mcf: limit buffer descriptor count

2016-09-27 Thread Jason Wang
From: Prasad J Pandit ColdFire Fast Ethernet Controller uses buffer descriptors to manage data flow to/fro receive & transmit queues. While transmitting packets, it could continue to read buffer descriptors if a buffer descriptor has length of zero and has crafted values in bd.flags. Set upper li

Re: [Qemu-devel] [PATCH v3 07/10] ppc/pnv: add XSCOM infrastructure

2016-09-27 Thread Benjamin Herrenschmidt
On Tue, 2016-09-27 at 11:30 +0200, Cédric Le Goater wrote: > On 09/27/2016 11:10 AM, Cédric Le Goater wrote: > > > > > > > > > > > > > +#include > > > > + > > > > +static void xscom_complete(uint64_t hmer_bits) > > > > +{ > > > > +CPUState *cs = current_cpu; > > > > > > Hmm.. is current_cp

Re: [Qemu-devel] [Qemu-stable] [ANNOUNCE] QEMU 2.6.1 Stable released

2016-09-27 Thread Peter Lieven
Am 16.09.2016 um 15:56 schrieb Peter Lieven: Am 13.09.2016 um 20:04 schrieb Michael Roth: Quoting Peter Lieven (2016-09-13 10:52:04) Am 13.09.2016 um 17:42 schrieb Stefan Hajnoczi: On Thu, Sep 08, 2016 at 03:58:26PM -0500, Michael Roth wrote: Quoting Stefan Hajnoczi (2016-09-05 12:54:35) On

Re: [Qemu-devel] [PATCH RFC] tests: Run qtest cases in parallel

2016-09-27 Thread Daniel P. Berrange
On Fri, Sep 23, 2016 at 05:59:05PM +0800, Fam Zheng wrote: > On Fri, 09/23 09:39, Gonglei (Arei) wrote: > > > > Hi Fam, > > > > > > > -Original Message- > > > From: Qemu-devel > > > [mailto:qemu-devel-bounces+arei.gonglei=huawei@nongnu.org] On > > > Behalf Of Fam Zheng > > > Sent: Fr

  1   2   3   4   5   >