[Qemu-devel] [PATCH v7 1/8] scripts: Allow include "stdint.h" in virtio headers

2015-08-28 Thread Gavin Shan
This allows to include "stdint.h" in virtio header files. Otherwise, scripts/update-linux-headers.sh fails when updating headers from Linux 4.2.rc8 kernel. include/uapi/linux/virtio_ring.h starts to include "stdint.h" from commit d768f32a ("virtio: Fix typecast of pointer in vring_init()"). Signed

[Qemu-devel] [PATCH v7 0/8] sPAPR: Support EEH Error Injection

2015-08-28 Thread Gavin Shan
The patchset depends on below Linux upstream commits: commit ed3e81f ("powerpc/eeh: Move PE state constants around") commit ec33d36 ("powerpc/eeh: Introduce eeh_pe_inject_err()") According to PAPR specification 2.7, there're 3 RTAS calls relevent to error injection: "ibm,open-errinjct", "ibm,

[Qemu-devel] [PATCH v7 3/8] scripts: Submit changes while updating linux headers

2015-08-28 Thread Gavin Shan
This submits changes with formatted commit log while updating Linux headers using scripts/update-linux-headers.sh. Signed-off-by: Gavin Shan --- scripts/update-linux-headers.sh | 24 1 file changed, 24 insertions(+) diff --git a/scripts/update-linux-headers.sh b/scripts

[Qemu-devel] [PATCH v7 2/8] scripts: Include arch/powerpc/include/uapi/asm/eeh.h

2015-08-28 Thread Gavin Shan
This includes linux/arch/powerpc/include/uapi/asm/eeh.h while updating linux header files. The specific header file, introduced by the following Linux upstream commits for EEH on sPAPR platform: ed3e81f ("powerpc/eeh: Move PE state constants around") ec33d36 ("powerpc/eeh: Introduce eeh_pe_inj

Re: [Qemu-devel] [PATCH 3/3] monitor: added generation of documentation for hmp-commands-info.hx

2015-08-28 Thread Pavel Butsykin
On 27.08.2015 20:39, Peter Maydell wrote: On 12 August 2015 at 12:50, Denis V. Lunev wrote: From: Pavel Butsykin It will be easier if you need to add info-commands to edit only hmp-commands-info.hx, before this had to edit monitor.c and hmp-commands.hx Signed-off-by: Pavel Butsykin Signed

[Qemu-devel] [PATCH v7 4/8] Synchronize Linux headers from kernel 4.2.0-rc8

2015-08-28 Thread Gavin Shan
Synchronize the Linux headers from kernel version 4.2.0-rc8 (commit c13dcf9) Signed-off-by: Gavin Shan --- include/standard-headers/linux/pci_regs.h| 381 --- include/standard-headers/linux/virtio_ring.h | 3 +- linux-headers/asm-powerpc/eeh.h | 56 +++

[Qemu-devel] [PATCH v7 5/8] Obsolete PCI_MSIX_FLAGS_BIRMASK

2015-08-28 Thread Gavin Shan
This replaces PCI_MSIX_FLAGS_BIRMASK with PCI_MSIX_TABLE_BIR. Also, 3 more macros regarding MSIx table offset, MSIx PBA BAR index and MSIx PBA offset and this uses them. Besides, PCI_ERR_UNC_TRAIN is replaced with PCI_ERR_UNC_UND. The changes were introduced by below Linux upstream commits: comm

[Qemu-devel] [PATCH v7 6/8] sPAPR: Introduce rtas_ldq()

2015-08-28 Thread Gavin Shan
This introduces rtas_ldq() to load 64-bits parameter from continuous two 4-bytes memory chunk of RTAS parameter buffer, to simplify the code. Signed-off-by: Gavin Shan Reviewed-by: Thomas Huth --- hw/ppc/spapr_pci.c | 20 ++-- include/hw/ppc/spapr.h | 5 + 2 files chang

[Qemu-devel] [PATCH v7 7/8] sPAPR: Support RTAS call ibm, {open, close}-errinjct

2015-08-28 Thread Gavin Shan
This supports RTAS calls "ibm,{open,close}-errinjct" to manupliate the token, which is passed to RTAS call "ibm,errinjct" to indicate the valid context for error injection. Each VM is permitted to have only one token at once and we simply have sequential number for that. The token is resetted in pp

[Qemu-devel] [Bug 1488901] Re: KVM guest crashes when doing a block commit command

2015-08-28 Thread Christian Roessner
Problem is solved in current master branch -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1488901 Title: KVM guest crashes when doing a block commit command Status in QEMU: New Bug description:

[Qemu-devel] [PATCH v7 8/8] sPAPR: Support RTAS call ibm,errinjct

2015-08-28 Thread Gavin Shan
The patch supports RTAS call "ibm,errinjct" to allow injecting EEH errors to VFIO PCI devices. The implementation is similiar to EEH support for VFIO PCI devices: The RTAS request is captured by QEMU and routed to sPAPRPHBClass::eeh_inject_error() where the request is translated to VFIO container I

Re: [Qemu-devel] [PATCH] e500 ATMU register reads broken

2015-08-28 Thread Rudolf Marek
Hi all, > Sorry for the long delay. Please CC qemu-...@nongnu.org on the next submission, so that more PPC people have the chance to review the patch ;). I see, I missed this mailing list - http://wiki.qemu.org/Contribute/SubmitAPatch As it do not not mention it. Thanks, applied to ppc-next

Re: [Qemu-devel] [PATCH COLO-Frame v8 08/34] COLO: Implement colo checkpoint protocol

2015-08-28 Thread zhanghailiang
On 2015/8/27 20:43, Dr. David Alan Gilbert wrote: * zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: Hi Dave, On 2015/8/27 18:40, Dr. David Alan Gilbert wrote: * zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: We need communications protocol of user-defined to control the checkpoin

Re: [Qemu-devel] [PATCH 3/3] monitor: added generation of documentation for hmp-commands-info.hx

2015-08-28 Thread Peter Maydell
On 28 August 2015 at 08:00, Pavel Butsykin wrote: > > > On 27.08.2015 20:39, Peter Maydell wrote: >> >> On 12 August 2015 at 12:50, Denis V. Lunev wrote: >>> >>> From: Pavel Butsykin >>> >>> It will be easier if you need to add info-commands to edit >>> only hmp-commands-info.hx, before this had

Re: [Qemu-devel] [PULL 18/18] linux-user: remove useless macros GUEST_BASE and RESERVED_VA

2015-08-28 Thread Cornelia Huck
On Mon, 24 Aug 2015 12:37:06 -0700 Richard Henderson wrote: > From: Laurent Vivier > > As we have removed CONFIG_USE_GUEST_BASE, we always use a guest base > and the macros GUEST_BASE and RESERVED_VA become useless: replace > them by their values. > > Reviewed-by: Alexander Graf > Signed-off-

Re: [Qemu-devel] Creating snapshots with specific runtime options

2015-08-28 Thread Alberto Garcia
On Wed 26 Aug 2015 02:57:13 PM CEST, Stefan Hajnoczi wrote: >> In principle extending the QMP command sounds as simple as adding >> 'options': 'BlockdevOptions' to 'blockdev-snapshot-sync', but it's >> surely more complicated than that :) Is the 'BlockdevOptions' API >> even stable? > > Some block

Re: [Qemu-devel] is there a limit on the number of in-flight I/O operations?

2015-08-28 Thread Andrey Korolyov
On Fri, Aug 28, 2015 at 3:31 AM, Josh Durgin wrote: > On 08/27/2015 09:49 AM, Stefan Hajnoczi wrote: >> >> On Mon, Aug 25, 2014 at 03:50:02PM -0600, Chris Friesen wrote: >>> >>> The only limit I see in the whole call chain from >>> virtio_blk_handle_request() on down is the call to >>> bdrv_io_lim

Re: [Qemu-devel] [PULL 18/18] linux-user: remove useless macros GUEST_BASE and RESERVED_VA

2015-08-28 Thread Laurent Vivier
Le 28/08/2015 10:21, Cornelia Huck a écrit : > On Mon, 24 Aug 2015 12:37:06 -0700 > Richard Henderson wrote: > >> From: Laurent Vivier >> >> As we have removed CONFIG_USE_GUEST_BASE, we always use a guest base >> and the macros GUEST_BASE and RESERVED_VA become useless: replace >> them by thei

Re: [Qemu-devel] [PATCH v2] monitor: allow object_del & device_del to accept QOM paths

2015-08-28 Thread Daniel P. Berrange
On Thu, Aug 27, 2015 at 01:26:35PM -0400, Programmingkid wrote: > > On Aug 27, 2015, at 12:13 PM, Daniel P. Berrange wrote: > > > Currently both object_del and device_del require that the > > client provide the object/device short ID. While user > > creatable objects require an ID to be provided

Re: [Qemu-devel] [PATCH 6/9] tcg: synchronize cpu->exit_request and cpu->tcg_exit_req accesses

2015-08-28 Thread Paolo Bonzini
On 28/08/2015 04:19, Emilio G. Cota wrote: > translate-all.c-1478-} else { > translate-all.c:1479:cpu->tcg_exit_req = 1; This one is only run in the CPU thread. > translate-all.c-1643-cpu->interrupt_request |= mask; > translate-all.c:1644:cpu->tcg_exit_req = 1; This one is

[Qemu-devel] [PATCH 1/2] cutils: add the AVX2 optimization

2015-08-28 Thread Liang Li
For platform that supports AVX2 instructions, use the AVX2 instructions instead of SSE2 instructions in buffer_find_nonzero_offset() can help to improve the performance about 30%. Zero page check during live migration can be faster with this optimization. Signed-off-by: Liang Li --- include/qemu

[Qemu-devel] [PATCH 2/2] configure: add --enable-avx2 option

2015-08-28 Thread Liang Li
Add the --enable-avx2 option so as to enable the AVX2 instruction optimization for buffer_find_nonzero_offset(). Signed-off-by: Liang Li --- configure | 16 1 file changed, 16 insertions(+) diff --git a/configure b/configure index 9d24d59..ee84172 100755 --- a/configure +++ b/c

[Qemu-devel] [PATCH 0/2] Optimization with AVX2 instruction

2015-08-28 Thread Liang Li
The buffer_find_nonzero_offset() will be called to check the zero page during live migration, it's a hot function. buffer_find_nonzero_offset() has already been optimized with SSE2 instructions, for platform that supports AVX2, we can optimize this function with AVX2 instructions and achieve about

Re: [Qemu-devel] [PULL 18/18] linux-user: remove useless macros GUEST_BASE and RESERVED_VA

2015-08-28 Thread Cornelia Huck
On Fri, 28 Aug 2015 10:33:25 +0200 Laurent Vivier wrote: > > > Le 28/08/2015 10:21, Cornelia Huck a écrit : > > On Mon, 24 Aug 2015 12:37:06 -0700 > > Richard Henderson wrote: > > > >> From: Laurent Vivier > >> > >> As we have removed CONFIG_USE_GUEST_BASE, we always use a guest base > >> an

Re: [Qemu-devel] [PATCH v2] qdev-monitor.c: Add device id generation

2015-08-28 Thread Daniel P. Berrange
On Thu, Aug 27, 2015 at 07:14:28PM -0400, Programmingkid wrote: > Add device ID generation to each device if an ID isn't given. > > An auto-generated ID will begin with an underscore character. This will > distinguish it from user-made ID's. > > An user-made ID cannot begin with an underscore, s

Re: [Qemu-devel] [PATCH v7 04/11] target-mips: improve exception handling

2015-08-28 Thread Pavel Dovgaluk
> From: Aurelien Jarno [mailto:aurel...@aurel32.net] > On 2015-08-13 14:12, Leon Alrae wrote: > > On 10/07/2015 10:57, Pavel Dovgalyuk wrote: > > > @@ -2364,14 +2363,12 @@ static void gen_st_cond (DisasContext *ctx, > > > uint32_t opc, int rt, > > > #if defined(TARGET_MIPS64) > > > case OPC_

[Qemu-devel] [PATCH] s390: fix softmmu compilation

2015-08-28 Thread Laurent Vivier
guest_base must be used only in linux-user mode. Signed-off-by: Laurent Vivier --- tcg/s390/tcg-target.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tcg/s390/tcg-target.c b/tcg/s390/tcg-target.c index ee2e58d..2122744 100644 --- a/tcg/s390/tcg-target.c +++ b/tcg/s390/tcg-target.c @@ -2

Re: [Qemu-devel] [PATCH] s390: fix softmmu compilation

2015-08-28 Thread Cornelia Huck
On Fri, 28 Aug 2015 11:09:05 +0200 Laurent Vivier wrote: > guest_base must be used only in linux-user mode. > > Signed-off-by: Laurent Vivier > --- > tcg/s390/tcg-target.c | 2 ++ > 1 file changed, 2 insertions(+) > Thanks, that fixed compilation on s390 for me.

Re: [Qemu-devel] [PATCH 2/3] monitor: remove target-specific code from monitor.c

2015-08-28 Thread Pavel Butsykin
On 27.08.2015 20:31, Peter Maydell wrote: On 12 August 2015 at 12:50, Denis V. Lunev wrote: From: Pavel Butsykin Move target-specific code out of /monitor.c to /target-*/monitor.c, this will avoid code cluttering and using random ifdeffery. The solution is quite simple, but solves the issu

Re: [Qemu-devel] [PATCH] q35: Remove old machine versions

2015-08-28 Thread Markus Armbruster
Eduardo Habkost writes: > On Thu, Aug 27, 2015 at 01:50:10PM +0300, Michael S. Tsirkin wrote: >> On Tue, Aug 25, 2015 at 05:21:16PM +0100, Daniel P. Berrange wrote: >> > On Mon, Aug 24, 2015 at 11:54:48AM +0200, Markus Armbruster wrote: >> > > John Snow writes: >> > > >> > > > On 08/19/2015 02:

Re: [Qemu-devel] [PATCH] s390: fix softmmu compilation

2015-08-28 Thread Peter Maydell
On 28 August 2015 at 10:15, Cornelia Huck wrote: > On Fri, 28 Aug 2015 11:09:05 +0200 > Laurent Vivier wrote: > >> guest_base must be used only in linux-user mode. >> >> Signed-off-by: Laurent Vivier >> --- >> tcg/s390/tcg-target.c | 2 ++ >> 1 file changed, 2 insertions(+) >> > > Thanks, that

Re: [Qemu-devel] [PATCH v3] opts: produce valid command line in qemu_opts_print

2015-08-28 Thread Markus Armbruster
"Kővágó Zoltán" writes: > 2015-08-26 15:15 keltezéssel, Markus Armbruster írta: >> Stefan Hajnoczi writes: >> >>> On Tue, Jul 7, 2015 at 3:42 PM, Kővágó, Zoltán >>> wrote: This will let us print options in a format that the user would actually write it on the command line (foo=bar,baz

Re: [Qemu-devel] [PATCH] s390: fix softmmu compilation

2015-08-28 Thread Peter Maydell
On 28 August 2015 at 11:03, Peter Maydell wrote: > On 28 August 2015 at 10:15, Cornelia Huck wrote: >> On Fri, 28 Aug 2015 11:09:05 +0200 >> Laurent Vivier wrote: >> >>> guest_base must be used only in linux-user mode. >>> >>> Signed-off-by: Laurent Vivier >>> --- >>> tcg/s390/tcg-target.c | 2

Re: [Qemu-devel] [PATCH] s390: fix softmmu compilation

2015-08-28 Thread Laurent Vivier
Le 28/08/2015 12:08, Peter Maydell a écrit : > On 28 August 2015 at 11:03, Peter Maydell wrote: >> On 28 August 2015 at 10:15, Cornelia Huck wrote: >>> On Fri, 28 Aug 2015 11:09:05 +0200 >>> Laurent Vivier wrote: >>> guest_base must be used only in linux-user mode. Signed-off-by

Re: [Qemu-devel] [PATCH 2/3] monitor: remove target-specific code from monitor.c

2015-08-28 Thread Peter Maydell
On 28 August 2015 at 10:21, Pavel Butsykin wrote: > Yes, this is a good way if we make the interface: const MonitorDef > *target_monitor_defs(void); > But we can't include the 'monitor/monitor-common.h' to > stubs/target-monitor-defs.c, because > there is a dependency with a target-specific header

[Qemu-devel] [PATCH v2] s390: fix softmmu compilation

2015-08-28 Thread Laurent Vivier
guest_base must be used only in linux-user mode. Signed-off-by: Laurent Vivier --- v2: minor cleanup, drop TCG_GUEST_BASE_REG if CONFIG_SOFTMMU tcg/s390/tcg-target.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tcg/s390/tcg-target.c b/tcg/s390/tcg-target.c index ee2e58

Re: [Qemu-devel] [PATCH v2] s390: fix softmmu compilation

2015-08-28 Thread Cornelia Huck
On Fri, 28 Aug 2015 12:23:41 +0200 Laurent Vivier wrote: > guest_base must be used only in linux-user mode. > > Signed-off-by: Laurent Vivier > --- > v2: minor cleanup, drop TCG_GUEST_BASE_REG if CONFIG_SOFTMMU > tcg/s390/tcg-target.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-)

Re: [Qemu-devel] [PATCH v2 for 2.5 0/3] Move target- and device specific code from monitor

2015-08-28 Thread Markus Armbruster
"Denis V. Lunev" writes: > The monivation of this set is simple. Recently we have proposed patch > to monitor.c with specific x86 APIC HMP commands. The patchset was denied > with the main motivation "No more arch specific code in monitor.c" > This patchset is the first step to move arch specific

Re: [Qemu-devel] [PATCH v8 01/11] net: add a new object netfilter

2015-08-28 Thread Markus Armbruster
Yang Hongyang writes: > On 08/26/2015 10:04 PM, Markus Armbruster wrote: >> Missed a bunch of revisions of this series, please excuse gaps in my >> understanding. > > Thank you for the review. > >> >> Yang Hongyang writes: >> >>> Add the framework for a new netfilter object and a new >>> -netfil

Re: [Qemu-devel] [PATCH v8 03/11] netfilter: add netfilter_{add|del} commands

2015-08-28 Thread Markus Armbruster
Eric Blake writes: > On 08/26/2015 09:17 AM, Markus Armbruster wrote: >> Only reviewing QAPI/QMP and HMP interface parts for now. >> >> I apologize for not having reviewed this series earlier. v8 is awfully >> late for the kind of review comments I have. > > And I've also been behind the curve,

Re: [Qemu-devel] [PATCH v8 10/11] filter/buffer: update command description and help

2015-08-28 Thread Markus Armbruster
Yang Hongyang writes: > On 08/26/2015 11:55 PM, Markus Armbruster wrote: >> Yang Hongyang writes: >> >>> now that we have a buffer netfilter, update the command >>> description and help. >>> >>> Signed-off-by: Yang Hongyang >>> CC: Luiz Capitulino >>> CC: Markus Armbruster >>> --- >>> v8: add

Re: [Qemu-devel] [PATCH] hw/usb/bus.c: print device ID when 'info usb' used

2015-08-28 Thread Gerd Hoffmann
On Mo, 2015-08-24 at 15:13 -0400, Programmingkid wrote: > +monitor_printf(mon, " Device %d.%d, Port %s, Speed %s > Mb/s," > +"Product %s, ID %s\n", > + bus->busnr, dev->addr, port->path, > + usb_speed(d

Re: [Qemu-devel] [Qemu-block] [PATCH v2 09/11] block: Introduce bdrv_aio_poll

2015-08-28 Thread Stefan Hajnoczi
On Wed, Jul 29, 2015 at 12:42:12PM +0800, Fam Zheng wrote: > +bool bdrv_aio_poll(AioContext *ctx, bool blocking) > +{ > +bool ret; > + > +ret = aio_poll(ctx, blocking); > +return ret; > +} This function would fit into bdrv_*() APIs better if the first argument was BlockDriverState *bs

Re: [Qemu-devel] [Qemu-ppc] [PATCH v7 3/8] scripts: Submit changes while updating linux headers

2015-08-28 Thread Laurent Vivier
On 28/08/2015 09:15, Gavin Shan wrote: > This submits changes with formatted commit log while updating Linux > headers using scripts/update-linux-headers.sh. > > Signed-off-by: Gavin Shan > --- > scripts/update-linux-headers.sh | 24 > 1 file changed, 24 insertions(+)

Re: [Qemu-devel] [Qemu-block] [PATCH v2 10/11] block: Replace nested aio_poll with bdrv_aio_poll

2015-08-28 Thread Stefan Hajnoczi
On Wed, Jul 29, 2015 at 12:42:13PM +0800, Fam Zheng wrote: > Just a manual search and replace. No semantic change here. > > Signed-off-by: Fam Zheng > --- > block.c | 2 +- > block/curl.c | 2 +- > block/io.c| 18 +- > block/nfs.c | 2 +- > block/q

Re: [Qemu-devel] [Qemu-block] [PATCH v2 00/11] aio: Introduce handler type to fix nested aio_poll for dataplane

2015-08-28 Thread Stefan Hajnoczi
On Wed, Jul 29, 2015 at 12:42:03PM +0800, Fam Zheng wrote: > v2: Switch to disable/enable model. [Paolo] > > Most existing nested aio_poll()'s in block layer are inconsiderate of > dispatching potential new r/w requests from ioeventfds and nbd exports, which > might result in responsiveness issues

Re: [Qemu-devel] [PATCH] vnc: allow fall back to RAW encoding

2015-08-28 Thread Gerd Hoffmann
On Do, 2015-08-27 at 14:46 +0200, Peter Lieven wrote: > I have observed that depending on the contents and the encoding it happens > that sending data as RAW sometimes would take less space than the encoded > data. > This is especially the case for small updates or areas with high color images. >

Re: [Qemu-devel] [PATCH v2 08/18] nvdimm: init backend memory mapping and config data area

2015-08-28 Thread Stefan Hajnoczi
On Wed, Aug 26, 2015 at 06:40:26PM +0800, Xiao Guangrong wrote: > On 08/26/2015 12:03 AM, Stefan Hajnoczi wrote: > >On Fri, Aug 14, 2015 at 10:52:01PM +0800, Xiao Guangrong wrote: > > > >>+if (fd < 0) { > >>+error_setg(errp, "can not open %s", nvdimm->file); > > > >s/can not/cannot/ > >

Re: [Qemu-devel] [PATCH v2 13/18] nvdimm: build namespace config data

2015-08-28 Thread Stefan Hajnoczi
On Wed, Aug 26, 2015 at 06:42:01PM +0800, Xiao Guangrong wrote: > > > On 08/26/2015 12:16 AM, Stefan Hajnoczi wrote: > >On Fri, Aug 14, 2015 at 10:52:06PM +0800, Xiao Guangrong wrote: > >>+#ifdef NVDIMM_DEBUG > >>+#define nvdebug(fmt, ...) fprintf(stderr, "nvdimm: " fmt, ## __VA_ARGS__) > >>+#els

Re: [Qemu-devel] [PATCH] PPC: E500: Update u-boot to commit 79c884d7e4

2015-08-28 Thread Thomas Huth
On 28/08/15 13:27, Alexander Graf wrote: > The current U-Boot binary in QEMU has a bug where it fails to support > dynamic CCSR addressing. Without this support, u-boot can not boot the > ppce500 machine anymore. This has been fixed upstream in u-boot commit > e834975b. > > Update the u-boot blob

Re: [Qemu-devel] [PATCH v2 14/18] nvdimm: support NFIT_CMD_IMPLEMENTED function

2015-08-28 Thread Stefan Hajnoczi
On Wed, Aug 26, 2015 at 06:46:35PM +0800, Xiao Guangrong wrote: > On 08/26/2015 12:23 AM, Stefan Hajnoczi wrote: > >On Fri, Aug 14, 2015 at 10:52:07PM +0800, Xiao Guangrong wrote: > >> static void dsm_write(void *opaque, hwaddr addr, > >>uint64_t val, unsigned size) > >> {

Re: [Qemu-devel] [Qemu-ppc] [PATCH v7 3/8] scripts: Submit changes while updating linux headers

2015-08-28 Thread Gavin Shan
On Fri, Aug 28, 2015 at 01:50:47PM +0200, Laurent Vivier wrote: >On 28/08/2015 09:15, Gavin Shan wrote: >> This submits changes with formatted commit log while updating Linux >> headers using scripts/update-linux-headers.sh. >> >> Signed-off-by: Gavin Shan >> --- >> scripts/update-linux-headers.

Re: [Qemu-devel] [PATCH] monitor: allow object_del & device_del to accept QOM paths

2015-08-28 Thread Markus Armbruster
Copying Andreas and Paolo for QOM expertise. "Daniel P. Berrange" writes: > Currently both object_del and device_del require that the > client provide the object/device short ID. While user > creatable objects require an ID to be provided at time of > creation, qdev devices may be created withou

Re: [Qemu-devel] [PATCH v2] monitor: allow object_del & device_del to accept QOM paths

2015-08-28 Thread Markus Armbruster
Gah, missed your v2! Sorry for the noise on v1. Still copying Andreas and Paolo for QOM expertise. "Daniel P. Berrange" writes: > Currently both object_del and device_del require that the > client provide the object/device short ID. While user > creatable objects require an ID to be provided a

Re: [Qemu-devel] [PATCH] monitor: allow object_del & device_del to accept QOM paths

2015-08-28 Thread Daniel P. Berrange
On Fri, Aug 28, 2015 at 02:53:41PM +0200, Markus Armbruster wrote: > Copying Andreas and Paolo for QOM expertise. > > "Daniel P. Berrange" writes: > > > Currently both object_del and device_del require that the > > client provide the object/device short ID. While user > > creatable objects requi

Re: [Qemu-devel] [PATCH v5 7/9] crypto: introduce new module for handling TLS sessions

2015-08-28 Thread Daniel P. Berrange
On Thu, Aug 27, 2015 at 08:33:43AM -0600, Eric Blake wrote: > On 08/26/2015 09:05 AM, Daniel P. Berrange wrote: > > Introduce a QCryptoTLSSession object that will encapsulate > > all the code for setting up and using a client/sever TLS > > session. This isolates the code which depends on the gnutls

Re: [Qemu-devel] hd-geo-test creates 4GB files on FSes that don't support sparse images, doesn't delete them on error

2015-08-28 Thread Markus Armbruster
John Snow writes: > On 08/27/2015 11:29 AM, Eric Blake wrote: >> On 08/27/2015 09:17 AM, Peter Maydell wrote: >>> I've noticed recently that tests/hd-geo-test.c creates test disk >>> images which are 4GB in size, which is a problem if the filesystem >>> on the host doesn't support sparse files. I

Re: [Qemu-devel] [PATCH] hw/usb/bus.c: print device ID when 'info usb' used

2015-08-28 Thread Programmingkid
On Aug 28, 2015, at 7:50 AM, Gerd Hoffmann wrote: > On Mo, 2015-08-24 at 15:13 -0400, Programmingkid wrote: >> +monitor_printf(mon, " Device %d.%d, Port %s, Speed %s >> Mb/s," >> +"Product %s, ID %s\n", >> + bus->busnr, dev->a

Re: [Qemu-devel] [PATCH] hw/usb/bus.c: print device ID when 'info usb' used

2015-08-28 Thread Daniel P. Berrange
On Fri, Aug 28, 2015 at 09:08:12AM -0400, Programmingkid wrote: > > On Aug 28, 2015, at 7:50 AM, Gerd Hoffmann wrote: > > > On Mo, 2015-08-24 at 15:13 -0400, Programmingkid wrote: > >> +monitor_printf(mon, " Device %d.%d, Port %s, Speed %s > >> Mb/s," > >> +

Re: [Qemu-devel] [PATCH] hw/usb/bus.c: print device ID when 'info usb' used

2015-08-28 Thread Programmingkid
On Aug 28, 2015, at 9:35 AM, Daniel P. Berrange wrote: > On Fri, Aug 28, 2015 at 09:08:12AM -0400, Programmingkid wrote: >> >> On Aug 28, 2015, at 7:50 AM, Gerd Hoffmann wrote: >> >>> On Mo, 2015-08-24 at 15:13 -0400, Programmingkid wrote: +monitor_printf(mon, " Device %d.%d,

Re: [Qemu-devel] [Qemu-ppc] [PATCH v7 3/8] scripts: Submit changes while updating linux headers

2015-08-28 Thread Gavin Shan
On Fri, Aug 28, 2015 at 10:30:48PM +1000, Gavin Shan wrote: >On Fri, Aug 28, 2015 at 01:50:47PM +0200, Laurent Vivier wrote: >>On 28/08/2015 09:15, Gavin Shan wrote: >>> This submits changes with formatted commit log while updating Linux >>> headers using scripts/update-linux-headers.sh. >>> >>> S

Re: [Qemu-devel] [PATCH] hw/usb/bus.c: print device ID when 'info usb' used

2015-08-28 Thread Daniel P. Berrange
On Fri, Aug 28, 2015 at 09:39:43AM -0400, Programmingkid wrote: > > On Aug 28, 2015, at 9:35 AM, Daniel P. Berrange wrote: > > > On Fri, Aug 28, 2015 at 09:08:12AM -0400, Programmingkid wrote: > >> > >> On Aug 28, 2015, at 7:50 AM, Gerd Hoffmann wrote: > >> > >>> On Mo, 2015-08-24 at 15:13 -040

Re: [Qemu-devel] [PATCH] hw/usb/bus.c: print device ID when 'info usb' used

2015-08-28 Thread Gerd Hoffmann
On Fr, 2015-08-28 at 09:39 -0400, Programmingkid wrote: > On Aug 28, 2015, at 9:35 AM, Daniel P. Berrange wrote: > > > On Fri, Aug 28, 2015 at 09:08:12AM -0400, Programmingkid wrote: > >> > >> On Aug 28, 2015, at 7:50 AM, Gerd Hoffmann wrote: > >> > >>> On Mo, 2015-08-24 at 15:13 -0400, Programm

Re: [Qemu-devel] [PATCH] hw/usb/bus.c: print device ID when 'info usb' used

2015-08-28 Thread Programmingkid
On Aug 28, 2015, at 9:50 AM, Gerd Hoffmann wrote: > On Fr, 2015-08-28 at 09:39 -0400, Programmingkid wrote: >> On Aug 28, 2015, at 9:35 AM, Daniel P. Berrange wrote: >> >>> On Fri, Aug 28, 2015 at 09:08:12AM -0400, Programmingkid wrote: On Aug 28, 2015, at 7:50 AM, Gerd Hoffmann wrote

[Qemu-devel] [PATCH v3 0/2] rtl8139: Fix buffer overflow in standard mode

2015-08-28 Thread Vladislav Yasevich
When rtl8139 card is running in standard mode, it is very easy to overlflow and the receive buffer and get into a siutation where all packets are dropped. Simply reproduction case is to ping the guest from the host with 6500 byte packets. There are actually 2 problems here. 1) When the rtl8129

[Qemu-devel] [PATCH v3 2/2] rtl8139: correctly track full receive buffer in standard mode

2015-08-28 Thread Vladislav Yasevich
In standard operation mode, when the receive ring buffer is full, the buffer actually appears empty to the driver since the RxBufAddr (the location we wirte new data to) and RxBufPtr (the location guest would stat reading from) are the same. As a result, the call to rtl8139_RxBufferEmpty ends up re

[Qemu-devel] [PATCH v3 1/2] rtl8139: Do not consume the packet during overflow in standard mode.

2015-08-28 Thread Vladislav Yasevich
When operation in standard mode, we currently return the size of packet during buffer overflow. This consumes the overflow packet. Return 0 instead so we can re-process the overflow packet when we have room. This fixes issues with lost/dropped fragments of large messages. Signed-off-by: Vladisl

Re: [Qemu-devel] [PATCH v3 2/9] rtl8139: remove muldiv64()

2015-08-28 Thread Stefan Hajnoczi
On Thu, Aug 27, 2015 at 09:33:00PM +0200, Laurent Vivier wrote: > Originally, timers were ticks based, and it made sense to > add ticks to current time to know when to trigger an alarm. > > But since commit: > > 7447545 change all other clock references to use nanosecond resolution > accessors >

Re: [Qemu-devel] [PATCH v3 3/9] pcnet: remove muldiv64()

2015-08-28 Thread Stefan Hajnoczi
On Thu, Aug 27, 2015 at 09:33:01PM +0200, Laurent Vivier wrote: > Originally, timers were ticks based, and it made sense to > add ticks to current time to know when to trigger an alarm. > > But since commit: > > 7447545 change all other clock references to use nanosecond resolution > accessors >

Re: [Qemu-devel] [PATCH v3 9/9] net: remove muldiv64()

2015-08-28 Thread Stefan Hajnoczi
On Thu, Aug 27, 2015 at 09:33:07PM +0200, Laurent Vivier wrote: > muldiv64() is used to convert nanoseconds to microseconds. > > x = muldiv64(qemu_clock_get_ns(..), 100, get_ticks_per_sec()); > > As get_ticks_per_sec() is 10^9, it can be replaced by: > > x = qemu_clock_get_us(..); >

Re: [Qemu-devel] [PATCH 01/10] cpus: protect work list with work_mutex

2015-08-28 Thread Peter Maydell
On 12 August 2015 at 17:40, Paolo Bonzini wrote: > From: KONRAD Frederic > > Protect the list of queued work items with something other than > the BQL, as a preparation for running the work items outside it. > > Signed-off-by: KONRAD Frederic > Signed-off-by: Paolo Bonzini Reviewed-by: Peter M

Re: [Qemu-devel] [PATCH 02/10] cpus: remove tcg_halt_cond global variable.

2015-08-28 Thread Peter Maydell
On 12 August 2015 at 17:40, Paolo Bonzini wrote: > From: KONRAD Frederic > > This removes tcg_halt_cond global variable. > We need one QemuCond per virtual cpu for multithread TCG. > > Signed-off-by: KONRAD Frederic > Message-Id: <1439220437-23957-9-git-send-email-fred.kon...@greensocs.com> > [K

Re: [Qemu-devel] [PATCH 03/10] replace spinlock by QemuMutex.

2015-08-28 Thread Peter Maydell
On 12 August 2015 at 17:40, Paolo Bonzini wrote: > From: KONRAD Frederic > > spinlock is only used in two cases: > * cpu-exec.c: to protect TranslationBlock > * mem_helper.c: for lock helper in target-i386 (which seems broken). > > It's a pthread_mutex_t in user-mode so better using QemuMutex

Re: [Qemu-devel] [PATCH 03/10] replace spinlock by QemuMutex.

2015-08-28 Thread Frederic Konrad
On 28/08/2015 16:49, Peter Maydell wrote: On 12 August 2015 at 17:40, Paolo Bonzini wrote: From: KONRAD Frederic spinlock is only used in two cases: * cpu-exec.c: to protect TranslationBlock * mem_helper.c: for lock helper in target-i386 (which seems broken). It's a pthread_mutex_t in

Re: [Qemu-devel] [PATCH 04/10] exec-all: remove non-TCG stuff from exec-all.h header.

2015-08-28 Thread Peter Maydell
On 12 August 2015 at 17:40, Paolo Bonzini wrote: > The header is included from basically everywhere, thanks to cpu.h. > It should be moved to the (TCG only) files that actually need it. > As a start, remove non-TCG stuff. > > While adding a #ifndef CONFIG_USER_ONLY include section to cpu-exec.c, >

Re: [Qemu-devel] [PATCH 3/3] monitor: added generation of documentation for hmp-commands-info.hx

2015-08-28 Thread Pavel Butsykin
On 28.08.2015 11:19, Peter Maydell wrote: On 28 August 2015 at 08:00, Pavel Butsykin wrote: On 27.08.2015 20:39, Peter Maydell wrote: On 12 August 2015 at 12:50, Denis V. Lunev wrote: From: Pavel Butsykin It will be easier if you need to add info-commands to edit only hmp-commands-info.

Re: [Qemu-devel] [PATCH 05/10] cpu-exec: elide more icount code if CONFIG_USER_ONLY

2015-08-28 Thread Peter Maydell
On 12 August 2015 at 17:40, Paolo Bonzini wrote: > Signed-off-by: Paolo Bonzini > --- > cpu-exec.c | 6 ++ > 1 file changed, 6 insertions(+) > > diff --git a/cpu-exec.c b/cpu-exec.c > index 599e64d..bde5fd1 100644 > --- a/cpu-exec.c > +++ b/cpu-exec.c > @@ -228,6 +228,7 @@ static inline tcg_

Re: [Qemu-devel] Steal time MSR not set properly during live migration?

2015-08-28 Thread Alexandre DERUMIER
Hi, I have add this bug today on 3 debian jessie guests (kernel 3.16), after migration from qemu 2.3 to qemu 2.4. Is it a qemu bug or guest kernel 3.16 ? Regards, Alexandre Derumier - Mail original - De: "Michael Tokarev" À: "qemu-devel" , debian-ad...@lists.debian.org Cc: "Marcelo

Re: [Qemu-devel] [PATCH 06/10] tcg: code_bitmap is not used by user-mode emulation

2015-08-28 Thread Peter Maydell
On 12 August 2015 at 17:40, Paolo Bonzini wrote: > More #ifdefs are not nice, but this clarifies why its usage is not > protected by tb_lock. Does it? I thought the idea of this series was to add locking which we needed for adding multi-threading to softmmu, in which case presumably we need to pr

Re: [Qemu-devel] [PATCH 2/3] monitor: remove target-specific code from monitor.c

2015-08-28 Thread Pavel Butsykin
On 28.08.2015 13:12, Peter Maydell wrote: On 28 August 2015 at 10:21, Pavel Butsykin wrote: Yes, this is a good way if we make the interface: const MonitorDef *target_monitor_defs(void); But we can't include the 'monitor/monitor-common.h' to stubs/target-monitor-defs.c, because there is a dep

Re: [Qemu-devel] [PATCH 07/10] tcg: comment on which functions have to be called with mmap_lock held

2015-08-28 Thread Peter Maydell
On 12 August 2015 at 17:40, Paolo Bonzini wrote: > Signed-off-by: Paolo Bonzini > --- > translate-all.c | 29 ++--- > 1 file changed, 22 insertions(+), 7 deletions(-) Some overall documentation on what the mmap_lock is protecting (and thus when it needs to be taken) woul

Re: [Qemu-devel] [PATCH v2] s390: fix softmmu compilation

2015-08-28 Thread Peter Maydell
On 28 August 2015 at 11:23, Laurent Vivier wrote: > guest_base must be used only in linux-user mode. > > Signed-off-by: Laurent Vivier > --- > v2: minor cleanup, drop TCG_GUEST_BASE_REG if CONFIG_SOFTMMU > tcg/s390/tcg-target.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Thanks;

Re: [Qemu-devel] [PATCH 08/10] tcg: add memory barriers in page_find_alloc accesses

2015-08-28 Thread Peter Maydell
On 12 August 2015 at 17:41, Paolo Bonzini wrote: > page_find is reading the radix tree outside all locks, so it has to > use the RCU primitives. It does not need RCU critical sections > because the PageDescs are never removed, so there is never a need > to wait for the end of code sections that u

Re: [Qemu-devel] [PATCH 09/10] exec: make mmap_lock/mmap_unlock globally available

2015-08-28 Thread Peter Maydell
On 12 August 2015 at 17:41, Paolo Bonzini wrote: > There is some iffy lock hierarchy going on in translate-all.c. To > fix it, we need to take the mmap_lock in cpu-exec.c. Make the > functions globally available. > > Signed-off-by: Paolo Bonzini > --- > bsd-user/qemu.h | 2 -- > includ

Re: [Qemu-devel] [PATCH 0/8] Disas QOMification, round 2

2015-08-28 Thread Andreas Färber
Am 27.08.2015 um 22:20 schrieb Richard Henderson: > On 08/27/2015 03:47 PM, Andreas Färber wrote: >> Am 12.07.2015 um 06:18 schrieb Andreas Färber: >>> Am 12.07.2015 um 03:59 schrieb Peter Crosthwaite: Continue QOMifying target-specific disassembly. Convert all arches except for X86

Re: [Qemu-devel] [PATCH 10/10] cpu-exec: fix lock hierarchy for user-mode emulation

2015-08-28 Thread Peter Maydell
On 12 August 2015 at 17:41, Paolo Bonzini wrote: > tb_lock has to be taken inside the mmap_lock (example: > tb_invalidate_phys_range is called by target_mmap), but > tb_link_page is taking the mmap_lock and it is called > with the tb_lock held. > > To fix this, take the mmap_lock in tb_find_slow,

Re: [Qemu-devel] [PATCH 0/8] Disas QOMification, round 2

2015-08-28 Thread Peter Maydell
On 28 August 2015 at 16:46, Andreas Färber wrote: > Two to go, moxie as the next one untested by Peter. The last email on qemu-devel from the moxie maintainer was in 2013, so I wouldn't hold your breath. -- PMM

Re: [Qemu-devel] [PATCH] hw/usb/bus.c: print device ID when 'info usb' used

2015-08-28 Thread Peter Maydell
On 28 August 2015 at 14:55, Programmingkid wrote: > On Aug 28, 2015, at 9:50 AM, Gerd Hoffmann wrote: >> Even better: Don't print "ID: ..." in the first place in case it is not >> present. > > The ID is printed so if the user needs to remove the device, device_del > can be used. > > If the ID is

Re: [Qemu-devel] [PATCH] hw/usb/bus.c: print device ID when 'info usb' used

2015-08-28 Thread Programmingkid
On Aug 28, 2015, at 12:07 PM, Peter Maydell wrote: > On 28 August 2015 at 14:55, Programmingkid wrote: >> On Aug 28, 2015, at 9:50 AM, Gerd Hoffmann wrote: >>> Even better: Don't print "ID: ..." in the first place in case it is not >>> present. >> >> The ID is printed so if the user needs to re

Re: [Qemu-devel] [PATCH 0/8] Disas QOMification, round 2

2015-08-28 Thread Peter Crosthwaite
On Fri, Aug 28, 2015 at 9:02 AM, Peter Maydell wrote: > On 28 August 2015 at 16:46, Andreas Färber wrote: >> Two to go, moxie as the next one untested by Peter. > > The last email on qemu-devel from the moxie maintainer was > in 2013, so I wouldn't hold your breath. > It is also unfortunately th

Re: [Qemu-devel] [PATCH 0/8] Disas QOMification, round 2

2015-08-28 Thread Peter Maydell
On 28 August 2015 at 17:19, Peter Crosthwaite wrote: > Longer term though, maybe these homogeneous every-arch change patterns > should only need a critical mass of acks from the arch maintainers for > the whole thing to go through. It's unlikely that I botched moxie with > most of the other arches

Re: [Qemu-devel] [PATCH] tcg/aarch64: Fix tcg_out_qemu_{ld, st} for linux-user

2015-08-28 Thread Andreas Färber
Am 27.08.2015 um 22:30 schrieb Richard Henderson: > On 08/27/2015 04:47 PM, Andreas Färber wrote: >> The argument order for the !CONFIG_SOFTMMU case was jumbled up since >> ffc6372851d8631a9f9fa56ec613b3244dc635b9 ("tcg/aarch64: use 32-bit >> offset for 32-bit user-mode emulation"), regressing from

Re: [Qemu-devel] [PATCH v4 2/4] ahci.c: Don't assume AHCIState's parent is AHCIPCIState

2015-08-28 Thread Alistair Francis
On Thu, Aug 27, 2015 at 5:27 PM, Peter Crosthwaite wrote: > On Thu, Aug 27, 2015 at 5:16 PM, Alistair Francis > wrote: >> The AHCIState struct can either have AHCIPCIState or SysbusAHCIState >> as a parent. The ahci_irq_lower() and ahci_irq_raise() functions >> assume that it is always AHCIPCISta

[Qemu-devel] [PATCH v2 05/26] qapi: Reject -p arguments that break qapi-event.py

2015-08-28 Thread Markus Armbruster
qapi-event.py breaks when you ask for a funny prefix like '@'. Protect it. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- scripts/qapi.py | 6 ++ 1 file changed, 6 insertions(+) diff --git a/scripts/qapi.py b/scripts/qapi.py index ba11c54..bc3f4d3 100644 --- a/scripts/qapi.py

[Qemu-devel] [PATCH v2 12/26] tests/qapi-schema: Document alternate's enum lacks visit function

2015-08-28 Thread Markus Armbruster
We generate a declaration, but no definition. The QMP schema has two: Qcow2OverlapChecks and BlockdevRef. Neither visit_type_Qcow2OverlapChecksKind() nor visit_type_BlockdevRefKind() is actually used. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- tests/qapi-schema/qapi-schema-t

[Qemu-devel] [PATCH v2 04/26] qapi-event: Clean up how name of enum QAPIEvent is made

2015-08-28 Thread Markus Armbruster
Use c_name() instead of ad hoc code. Doesn't upcase the -p prefix, which is an improvement in my book. Unbreaks prefix containing '.', but other funny characters remain broken. To be fixed next. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- docs/qapi-code-gen.txt | 8

[Qemu-devel] [PATCH v2 10/26] qapi-visit: Replace list implicit_structs by set

2015-08-28 Thread Markus Armbruster
Use set because that's what it is. While there, rename to implicit_structs_seen. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- scripts/qapi-visit.py | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/scripts/qapi-visit.py b/scripts/qapi-visit.py index b3a

[Qemu-devel] [PATCH v2 01/26] qapi: Clarify docs on including the same file multiple times

2015-08-28 Thread Markus Armbruster
It's idempotent. While there, update examples to current code. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- docs/qapi-code-gen.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/qapi-code-gen.txt b/docs/qapi-code-gen.txt index 61b5be4..e7e7281 1006

[Qemu-devel] [PATCH v2 00/26] qapi: Another round of fixes and cleanups

2015-08-28 Thread Markus Armbruster
v2: * Trivially rebased, R-bys retained * [PATCH 02] Clean up string literal to please pylint * [PATCH 07] Commit message fix [Eric] * [PATCH 20] Doc fix [Eric] * [PATCH 21] Update test cases for the change even though they fail for other reasons [Eric] Previously posted as part of "[PATCH RFC v

[Qemu-devel] [PATCH v2 03/26] qapi: Simplify guardname()

2015-08-28 Thread Markus Armbruster
The guards around built-in declarations lose their _H. It never made much sense anyway. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- scripts/qapi.py | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/scripts/qapi.py b/scripts/qapi.py index e656beb..b

  1   2   >