[Qemu-devel] [PATCH 2/2] sPAPR: Enable EEH on VFIO PCI device only

2015-09-18 Thread Gavin Shan
This checks if the PCI device retrieved from the PCI device address is VFIO PCI device when enabling EEH functionality. If it's not VFIO PCI device, the EEH functonality isn't enabled. Signed-off-by: Gavin Shan --- hw/ppc/spapr_pci_vfio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) di

[Qemu-devel] [PATCH 1/2] sPAPR: Revert don't enable EEH on emulated PCI devices

2015-09-18 Thread Gavin Shan
This reverts commit 7cb18007 ("sPAPR: Don't enable EEH on emulated PCI devices") as rtas_ibm_set_eeh_option() isn't the right place to check if there has the corresponding PCI device for the input address, which can be PE address, not PCI device address. Signed-off-by: Gavin Shan --- hw/ppc/spap

Re: [Qemu-devel] [Question] QEMU 2.3 Assertion with `existing->mr->subpage || existing->mr == &io_mem_unassigned' failed

2015-09-18 Thread Gonglei
On 2015/9/16 0:49, Paolo Bonzini wrote: > > > Sorry, I haven't looked at it yet. I'll have to study the code. In the > meanwhile, perhaps you can print "section" and "existing" please from gdb? > > Paolo > Hi, Paolo We reproduced the issue today, and get below information by gdb (we hardco

Re: [Qemu-devel] [PATCH 1/2] sPAPR: Revert don't enable EEH on emulated PCI devices

2015-09-18 Thread David Gibson
On Fri, Sep 18, 2015 at 05:30:43PM +1000, Gavin Shan wrote: > This reverts commit 7cb18007 ("sPAPR: Don't enable EEH on emulated > PCI devices") as rtas_ibm_set_eeh_option() isn't the right place > to check if there has the corresponding PCI device for the input > address, which can be PE address,

Re: [Qemu-devel] [PATCH 2/2] sPAPR: Enable EEH on VFIO PCI device only

2015-09-18 Thread David Gibson
On Fri, Sep 18, 2015 at 05:30:44PM +1000, Gavin Shan wrote: > This checks if the PCI device retrieved from the PCI device address > is VFIO PCI device when enabling EEH functionality. If it's not > VFIO PCI device, the EEH functonality isn't enabled. > > Signed-off-by: Gavin Shan Applied to spap

[Qemu-devel] [PATCH 1/3] virtio: introduce virtqueue_unmap_sg()

2015-09-18 Thread Jason Wang
Factor out sg unmapping logic. This will be reused by the patch that can discard descriptor. Cc: Michael S. Tsirkin Signed-off-by: Jason Wang --- hw/virtio/virtio.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c index

[Qemu-devel] [PATCH 2/3] virtio: introduce virtqueue_discard()

2015-09-18 Thread Jason Wang
This patch introduces virtqueue_discard() to discard a descriptor and unmap the sgs. This will be used by the patch that will discard descriptor when packet is truncated. Cc: Michael S. Tsirkin Signed-off-by: Jason Wang --- hw/virtio/virtio.c | 7 +++ include/hw/virtio/virtio.h | 2

[Qemu-devel] [PATCH 3/3] virtio-net: correctly drop truncated packets

2015-09-18 Thread Jason Wang
When packet is truncated during receiving, we drop the packets but neither discard the descriptor nor add and signal used descriptor. This will lead several issues: - sg mappings are leaked - rx will be stalled if a lots of packets were truncated In order to be consistent with vhost, fix by disca

Re: [Qemu-devel] MIPS qemu build failure

2015-09-18 Thread Daniel P. Berrange
On Thu, Sep 17, 2015 at 07:38:53PM +0100, Peter Maydell wrote: > On 17 September 2015 at 19:21, Steve Ellcey wrote: > > > > Following up to my own email. Apparently the reason I get this error is > > that I am building with "--disable-tools --disable-system". I don't need > > the tools and I don

[Qemu-devel] [v4][PATCH 2/2] libxl: introduce gfx_passthru_kind

2015-09-18 Thread Tiejun Chen
Although we already have 'gfx_passthru' in b_info, this doesn't suffice after we want to handle IGD specifically. Now we define a new field of type, gfx_passthru_kind, to indicate we're trying to pass IGD. Actually this means we can benefit this to support other specific devices just by extending g

[Qemu-devel] [v4][PATCH 0/2] libxl: try to support IGD passthrough for qemu upstream

2015-09-18 Thread Tiejun Chen
Ian, As we discussed previously, http://patchwork.ozlabs.org/patch/457055/ now it's time to push this into on xen/tools side since all qemu stuffs have been merged. https://lists.gnu.org/archive/html/qemu-devel/2015-09/msg02094.html v4: Ian, Actually we had v3.5 online previously, which was

[Qemu-devel] [v4][PATCH 1/2] libxl: introduce libxl__is_igd_vga_passthru

2015-09-18 Thread Tiejun Chen
While working with qemu, IGD is a specific device in the case of pass through so we need to identify that to handle more later. Here we define a table to record all IGD types currently we can support. Also we need to introduce two helper functions to get vendor and device ids to lookup that table.

Re: [Qemu-devel] [PATCH RFC v4 27/29] qapi: Change Netdev into a flat union

2015-09-18 Thread Wen Congyang
On 09/18/2015 02:56 PM, Markus Armbruster wrote: > Wen Congyang writes: > >> On 09/18/2015 04:11 AM, Eric Blake wrote: >>> On 09/17/2015 08:34 AM, Eric Blake wrote: >>> > > I apply Markus's v8 patch and this series, make check will fail: > TEST: tests/virtio-net-test... (pid=23648) >>

Re: [Qemu-devel] MIPS qemu build failure

2015-09-18 Thread Leon Alrae
On 18/09/2015 09:24, Daniel P. Berrange wrote: > On Thu, Sep 17, 2015 at 07:38:53PM +0100, Peter Maydell wrote: >> On 17 September 2015 at 19:21, Steve Ellcey wrote: >>> >>> Following up to my own email. Apparently the reason I get this error is >>> that I am building with "--disable-tools --disa

[Qemu-devel] QEMU fw_cfg DMA interface

2015-09-18 Thread Marc Marí
Implementation of the FW CFG DMA interface. When running a Linux guest on top of QEMU, using the -kernel options, this is the timing improvement for x86: QEMU commit 16a1b6e and SeaBIOS commit e4d2b8c QEMU startup time: .080 BIOS startup time: .060 Kernel setup time: .586 Total time: .726 QEMU w

[Qemu-devel] [PATCH v3 1/5] fw_cfg: document fw_cfg_modify_iXX() update functions

2015-09-18 Thread Marc Marí
From: "Gabriel L. Somlo" Document the behavior of fw_cfg_modify_iXX() for leak-less updating of integer-type blobs. Currently only fw_cfg_modify_i16() is coded, but 32- and 64-bit versions may be added later if necessary.. Signed-off-by: Gabriel Somlo Signed-off-by: Gerd Hoffmann Reviewed-by:

[Qemu-devel] [PATCH v3 4/5] Enable fw_cfg DMA interface for ARM

2015-09-18 Thread Marc Marí
Enable the fw_cfg DMA interface for the ARM virt machine. Based on Gerd Hoffman's initial implementation. Signed-off-by: Marc Marí --- hw/arm/virt.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 3568107..47f4ad3 100644 --- a/hw/

[Qemu-devel] [PATCH v3 0/5] fw_cfg DMA interface

2015-09-18 Thread Marc Marí
Implement host-side of the FW CFG DMA interface both for x86 and ARM. Based on Gerd Hoffman's initial implementation. Gabriel L. Somlo (1): fw_cfg: document fw_cfg_modify_iXX() update functions Marc Marí (4): fw_cfg DMA interface documentation Implement fw_cfg DMA interface Enable fw_cfg

[Qemu-devel] [PATCH v3 2/5] fw_cfg DMA interface documentation

2015-09-18 Thread Marc Marí
Add fw_cfg DMA interface specification in the documentation. Based on Gerd Hoffman's initial implementation. Signed-off-by: Marc Marí --- docs/specs/fw_cfg.txt | 65 +++ 1 file changed, 61 insertions(+), 4 deletions(-) diff --git a/docs/specs/fw_

[Qemu-devel] [PATCH v3 3/5] Implement fw_cfg DMA interface

2015-09-18 Thread Marc Marí
Based on the specifications on docs/specs/fw_cfg.txt This interface is an addon. The old interface can still be used as usual. Based on Gerd Hoffman's initial implementation. Signed-off-by: Marc Marí --- hw/arm/virt.c | 2 +- hw/nvram/fw_cfg.c | 228 ++

Re: [Qemu-devel] internal snapshots with sheepdog

2015-09-18 Thread Kevin Wolf
Am 11.09.2015 um 17:49 hat Vasiliy Tolstov geschrieben: > Hi! qcow2 have abilit to store vm state inside qcow2 file in space > that not allocated to guest, but if i want to store vm state inside > sheepdog storage with raw image what is the preferred place to store > memory data? > I simply can cre

Re: [Qemu-devel] [PATCH RFC v4 27/29] qapi: Change Netdev into a flat union

2015-09-18 Thread Yang Hongyang
On 09/18/2015 04:11 AM, Eric Blake wrote: On 09/17/2015 08:34 AM, Eric Blake wrote: I apply Markus's v8 patch and this series, make check will fail: TEST: tests/virtio-net-test... (pid=23648) /x86_64/virtio/net/pci/basic: qemu-system-x86_64: -netdev

[Qemu-devel] [PATCH v3 5/5] Enable fw_cfg DMA interface for x86

2015-09-18 Thread Marc Marí
Enable the fw_cfg DMA interface for all the x86 platforms. Based on Gerd Hoffman's initial implementation. Signed-off-by: Marc Marí --- hw/i386/pc.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 56aecce..6e02061 100644 --- a/hw

Re: [Qemu-devel] internal snapshots with sheepdog

2015-09-18 Thread Vasiliy Tolstov
2015-09-18 12:02 GMT+03:00 Kevin Wolf : > Doesn't sheepdog already support storing snapshots in the same image? > I thought it would just work; at least, there's some code there for it. Yes, qemu and sheepdog have ability to create internal snapshot, i miss that, but when i'm try in libvirt creat

Re: [Qemu-devel] MIPS qemu build failure

2015-09-18 Thread Daniel P. Berrange
On Fri, Sep 18, 2015 at 09:53:31AM +0100, Leon Alrae wrote: > On 18/09/2015 09:24, Daniel P. Berrange wrote: > > On Thu, Sep 17, 2015 at 07:38:53PM +0100, Peter Maydell wrote: > >> On 17 September 2015 at 19:21, Steve Ellcey wrote: > >>> > >>> Following up to my own email. Apparently the reason I

Re: [Qemu-devel] [PATCH v4] ppc/spapr: Implement H_RANDOM hypercall in QEMU

2015-09-18 Thread Greg Kurz
On Thu, 17 Sep 2015 10:49:41 +0200 Thomas Huth wrote: > The PAPR interface defines a hypercall to pass high-quality > hardware generated random numbers to guests. Recent kernels can > already provide this hypercall to the guest if the right hardware > random number generator is available. But in

Re: [Qemu-devel] [PATCH] vmxnet3: Add support for VMXNET3_CMD_GET_ADAPTIVE_RING_INFO command

2015-09-18 Thread Dmitry Fleytman
ACK. > On Sep 18, 2015, at 08:55 AM, Shmulik Ladkani > wrote: > > Some drivers (e.g. vmware-tools) issue the VMXNET3_CMD_GET_ADAPTIVE_RING_INFO > command. > > Currently, due to lack of support, a bogus value (-1) is returned. > > Support this command, returning the "adaptive-ring disabled" fl

Re: [Qemu-devel] internal snapshots with sheepdog

2015-09-18 Thread Kevin Wolf
Am 18.09.2015 um 11:03 hat Vasiliy Tolstov geschrieben: > 2015-09-18 12:02 GMT+03:00 Kevin Wolf : > > Doesn't sheepdog already support storing snapshots in the same image? > > I thought it would just work; at least, there's some code there for it. > > Yes, qemu and sheepdog have ability to create

[Qemu-devel] [PATCH] Makefile: fix build when VPATH is outside GIT tree

2015-09-18 Thread Daniel P. Berrange
Steve Ellcey / Leon Alrae reported that QEMU fails to build when the VPATH directory is outside of the GIT tree, and the system emulators & tools build is disabled. eg cd .. mkdir build cd build ../qemu/configure --disable-system --disable-tools make (...) make[1]: *** No rule

[Qemu-devel] [Bug 1497204] [NEW] qemu-system-s390x: no SMP support without KVM

2015-09-18 Thread Marcin Kościelnicki
Public bug reported: It seems SMP support is not implemented for s390x target, at least when not running under KVM. There is also no error message when starting qemu, it just fails when the kernel tries to bring up the CPUs: $ qemu-system-s390x -nographic -smp 8 -kernel s390x/kernel.debian [

[Qemu-devel] [PATCH v4 1/4] Add new block driver interface to add/delete a BDS's child

2015-09-18 Thread Wen Congyang
In some cases, we want to take a quorum child offline, and take another child online. Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei --- block.c | 50 +++ include/block/block.h | 5 + includ

[Qemu-devel] [PATCH v4 4/4] hmp: add monitor command to add/remove a child

2015-09-18 Thread Wen Congyang
Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei Cc: Luiz Capitulino --- hmp-commands.hx | 28 hmp.c | 20 hmp.h | 2 ++ 3 files changed, 50 insertions(+) diff --git a/hmp-commands.hx b/hmp-c

[Qemu-devel] [PATCH v4 0/4] qapi: child add/delete support

2015-09-18 Thread Wen Congyang
If quorum's child is broken, we can use mirror job to replace it. But sometimes, the user only need to remove the broken child, and add it later when the problem is fixed. It is based on the following patch: http://lists.nongnu.org/archive/html/qemu-devel/2015-09/msg04579.html ChangLog: v4: 1. dr

[Qemu-devel] [PATCH v4 2/4] quorum: implement bdrv_add_child() and bdrv_del_child()

2015-09-18 Thread Wen Congyang
Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei --- block.c | 6 ++--- block/quorum.c| 72 +-- include/block/block.h | 3 +++ 3 files changed, 76 insertions(+), 5 deletions(-) diff --git a/b

[Qemu-devel] [PATCH v4 3/4] qmp: add monitor command to add/remove a child

2015-09-18 Thread Wen Congyang
Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei --- blockdev.c | 48 ++ qapi/block-core.json | 34 + qmp-commands.hx | 54 ++

Re: [Qemu-devel] [PATCH v2 04/22] target-*: Introduce and use cpu_breakpoint_test

2015-09-18 Thread Peter Maydell
On 18 September 2015 at 05:55, Richard Henderson wrote: > Reduce the boilerplate required for each target. At the same time, > move the test for breakpoint after calling tcg_gen_insn_start. > > Signed-off-by: Richard Henderson > --- > include/qom/cpu.h | 16 +++ > target

Re: [Qemu-devel] [PATCH v4 1/4] block: rename BlockdevSnapshot to BlockdevSnapshotSync

2015-09-18 Thread Max Reitz
On 14.09.2015 18:01, Alberto Garcia wrote: > We will introduce the 'blockdev-snapshot' command that will require > its own struct for the parameters, so we need to rename this one in > order to avoid name clashes. > > Signed-off-by: Alberto Garcia > Reviewed-by: Eric Blake > --- > blockdev.c

Re: [Qemu-devel] [sheepdog] internal snapshots with sheepdog

2015-09-18 Thread Hitoshi Mitake
On Fri, Sep 18, 2015 at 6:49 PM, Kevin Wolf wrote: > Am 18.09.2015 um 11:03 hat Vasiliy Tolstov geschrieben: >> 2015-09-18 12:02 GMT+03:00 Kevin Wolf : >> > Doesn't sheepdog already support storing snapshots in the same image? >> > I thought it would just work; at least, there's some code there fo

[Qemu-devel] [PATCH] spice: surface switch fast path requires same format too.

2015-09-18 Thread Gerd Hoffmann
Commit "555e72f spice: rework mirror allocation, add no-resize fast path" adds a fast path for surface switches which does't go through the full primary surface destroy and re-recreation in case the new surface is identical to the old one (page-flip). It checks the size only though, but the format

Re: [Qemu-devel] [PATCH v4 3/4] block: add a 'blockdev-snapshot' QMP command

2015-09-18 Thread Max Reitz
On 14.09.2015 18:01, Alberto Garcia wrote: > One of the limitations of the 'blockdev-snapshot-sync' command is that > it does not allow passing BlockdevOptions to the newly created > snapshots, so they are always opened using the default values. > > Extending the command to allow passing options i

Re: [Qemu-devel] [PATCH v3 0/5] add ACPI node for fw_cfg on pc and arm

2015-09-18 Thread Gerd Hoffmann
On Do, 2015-09-17 at 17:01 -0400, Gabriel L. Somlo wrote: > > What I'm still missing is the motivation for the change. > > > > Went through old threads, still can't find it. > > I've been working on a sysfs driver to allow viewing fw_cfg file > metadata (size, name, etc) and content (e.g. 'raw')

Re: [Qemu-devel] [PATCH v4 4/4] block: add tests for the 'blockdev-snapshot' command

2015-09-18 Thread Max Reitz
On 14.09.2015 18:01, Alberto Garcia wrote: > Signed-off-by: Alberto Garcia > --- > tests/qemu-iotests/085 | 102 > ++--- > tests/qemu-iotests/085.out | 34 ++- > 2 files changed, 128 insertions(+), 8 deletions(-) Looks good, but the outpu

Re: [Qemu-devel] [PATCH v3 5/5] Enable fw_cfg DMA interface for x86

2015-09-18 Thread Gerd Hoffmann
Hi, > -fw_cfg = fw_cfg_init_io(BIOS_CFG_IOPORT); > +fw_cfg = fw_cfg_init_io_dma(BIOS_CFG_IOPORT, BIOS_CFG_IOPORT + 4, as); > +as = g_malloc(sizeof(*as)); > +address_space_init(as, ram_below_4g, "pc.as"); > +fw_cfg = bochs_bios_init(as); I think we can use address_space_memo

[Qemu-devel] [PATCH v2 1/4] utils: rename strtosz to use qemu prefix

2015-09-18 Thread marcandre . lureau
From: Marc-André Lureau Not only it makes sense, but it gets rid of checkpatch warning: WARNING: consider using qemu_strtosz in preference to strtosz Also remove the tabs to please checkpatch. Signed-off-by: Marc-André Lureau Reviewed-by: Eric Blake --- include/qemu-common.h | 27 +++

[Qemu-devel] [PATCH v2 3/4] checkpatch: recommend strtok_r

2015-09-18 Thread marcandre . lureau
From: Marc-André Lureau If anything, it should recommend strtok_r! (strtok_r() is reentrant-safe and thread-safe) Signed-off-by: Paolo Bonzini [Better matching and error message - Marc-André] Signed-off-by: Marc-André Lureau --- scripts/checkpatch.pl | 8 ++-- 1 file changed, 6 insertion

[Qemu-devel] [PATCH v2 2/4] tests: add some qemu_strtosz() tests

2015-09-18 Thread marcandre . lureau
From: Marc-André Lureau While reading the function I decided to write some tests. Signed-off-by: Marc-André Lureau Reviewed-by: Eric Blake --- tests/test-cutils.c | 91 + 1 file changed, 91 insertions(+) diff --git a/tests/test-cutils.c b/t

[Qemu-devel] [PATCH v2 4/4] Replace strotok() by strtok_r()

2015-09-18 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- block/archipelago.c | 10 +- block/sheepdog.c| 5 +++-- qom/cpu.c | 12 ++-- target-i386/cpu.c | 6 +++--- target-sparc/cpu.c | 10 +- vl.c| 6 +++--- 6 files changed, 25 ins

Re: [Qemu-devel] [PATCH v6 04/14] backup: Extract dirty bitmap handling as a separate function

2015-09-18 Thread Max Reitz
On 15.09.2015 08:11, Fam Zheng wrote: > This will be reused by the coming new transactional completion code. > > Signed-off-by: Fam Zheng > Reviewed-by: John Snow > --- > block/backup.c | 27 +-- > 1 file changed, 17 insertions(+), 10 deletions(-) Reviewed-by: Max Reitz

Re: [Qemu-devel] [PATCH 00/16] block: Get rid of bdrv_swap()

2015-09-18 Thread Alberto Garcia
On Thu 17 Sep 2015 03:48:04 PM CEST, Kevin Wolf wrote: > bdrv_swap() has always been an ugly hack that we would rather have > avoided. When it was introduced, we simply didn't have the > infrastructure to update pointers instead of transplanting the > contents of BDS object, so we grudgingly add

Re: [Qemu-devel] [PATCH v5 09/14] block: Add block job transactions

2015-09-18 Thread Max Reitz
On 11.09.2015 20:52, Max Reitz wrote: > On 07.09.2015 09:34, Fam Zheng wrote: >> Sometimes block jobs must execute as a transaction group. Finishing >> jobs wait until all other jobs are ready to complete successfully. >> Failure or cancellation of one job cancels the other jobs in the group. >> >

Re: [Qemu-devel] [PATCH v5 09/14] block: Add block job transactions

2015-09-18 Thread Max Reitz
On 18.09.2015 13:09, Max Reitz wrote: > On 11.09.2015 20:52, Max Reitz wrote: >> On 07.09.2015 09:34, Fam Zheng wrote: >>> Sometimes block jobs must execute as a transaction group. Finishing >>> jobs wait until all other jobs are ready to complete successfully. >>> Failure or cancellation of one j

Re: [Qemu-devel] [PATCH v6 09/14] block: Add block job transactions

2015-09-18 Thread Max Reitz
On 15.09.2015 08:11, Fam Zheng wrote: > Sometimes block jobs must execute as a transaction group. Finishing > jobs wait until all other jobs are ready to complete successfully. > Failure or cancellation of one job cancels the other jobs in the group. > > Signed-off-by: Stefan Hajnoczi > [Rewrite

Re: [Qemu-devel] [PATCH v6 10/14] blockdev: make BlockJobTxn available to qmp 'transaction'

2015-09-18 Thread Max Reitz
On 15.09.2015 08:11, Fam Zheng wrote: > From: Stefan Hajnoczi > > Provide a BlockJobTxn to actions executed in a qmp 'transaction' > command. This allows actions to make their block jobs either complete > as a group or fail/cancel together. > > The next patch adds the first user. > > Signed-of

[Qemu-devel] [PULL 00/10] target-mips queue

2015-09-18 Thread Leon Alrae
+0100) are available in the git repository at: git://github.com/lalrae/qemu.git tags/mips-20150918 for you to fetch changes up to 9c708c7f9fbb813a3fac02f2728e51e62f2f5ffc: target-mips: improve exception handling (2015-09-18 12:07:24 +0100

[Qemu-devel] [PULL 03/10] target-mips: Fix RDHWR on CP0.Count

2015-09-18 Thread Leon Alrae
From: Alex Smith For RDHWR on the CP0.Count register, env->CP0_Count was being returned. This value is a delta against the QEMU_CLOCK_VIRTUAL clock, not the correct current value of CP0.Count. Use cpu_mips_get_count() instead. Signed-off-by: Alex Smith Cc: Aurelien Jarno Cc: Leon Alrae Review

[Qemu-devel] [PULL 07/10] target-mips: fix corner case in TLBWR causing QEMU to hang

2015-09-18 Thread Leon Alrae
cpu_mips_get_random() function is used to generate a random index from CP0.Wired to TLBSize-1 range. Current implementation avoids generating the same as before value, hence the while loop. If the guest sets CP0.Wired to TLBSize-1 (which actually does not sound to be very practical) QEMU will get s

[Qemu-devel] [PULL 08/10] target-mips: add missing restriction in DAUI instruction

2015-09-18 Thread Leon Alrae
rs cannot be the zero register, Reserved Instruction exception must be signalled for this case. Signed-off-by: Leon Alrae Reviewed-by: Aurelien Jarno --- target-mips/translate.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/target-mips/translate.c b/target-mips/translat

[Qemu-devel] [PULL 10/10] target-mips: improve exception handling

2015-09-18 Thread Leon Alrae
From: Pavel Dovgaluk This patch improves exception handling in MIPS. Instructions generate several types of exceptions. When exception is generated, it breaks the execution of the current translation block. Implementation of the exceptions handling does not correctly restore icount for the instru

[Qemu-devel] [PULL 09/10] target-mips: correct MTC0 instruction on MIPS64

2015-09-18 Thread Leon Alrae
MTC0 on a 64-bit processor should move entire 64-bit GPR content to CP0 register. Signed-off-by: Leon Alrae Reviewed-by: Aurelien Jarno --- target-mips/translate.c | 18 +++--- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/target-mips/translate.c b/target-mips/trans

[Qemu-devel] [PULL 05/10] target-mips: get rid of MIPS_DEBUG_SIGN_EXTENSIONS

2015-09-18 Thread Leon Alrae
From: Aurelien Jarno MIPS_DEBUG_SIGN_EXTENSIONS was used sometimes ago to verify that 32-bit instructions correctly sign extend their results. It's now not need anymore, remove it. Cc: Leon Alrae Signed-off-by: Aurelien Jarno Reviewed-by: Leon Alrae Signed-off-by: Leon Alrae --- target-mips

Re: [Qemu-devel] [PATCH] Makefile: fix build when VPATH is outside GIT tree

2015-09-18 Thread Paolo Bonzini
On 18/09/2015 12:01, Daniel P. Berrange wrote: > Steve Ellcey / Leon Alrae reported that QEMU fails to build when > the VPATH directory is outside of the GIT tree, and the system > emulators & tools build is disabled. eg > >cd .. >mkdir build >cd build >../qemu/configure --disabl

Re: [Qemu-devel] [PATCH v6 11/14] block/backup: support block job transactions

2015-09-18 Thread Max Reitz
On 15.09.2015 08:11, Fam Zheng wrote: > From: Stefan Hajnoczi > > Join the transaction when the 'transactional-cancel' QMP argument is > true. > > This ensures that the sync bitmap is not thrown away if another block > job in the transaction is cancelled or fails. This is critical so > incremen

[Qemu-devel] [PULL 02/10] target-mips: remove wrong checks for recip.fmt and rsqrt.fmt

2015-09-18 Thread Leon Alrae
From: Petar Jovanovic Instructions recip.{s|d} and rsqrt.{s|d} do not require 64-bit FPU neither they require any particular mode for its FPU. This patch removes the checks that may break a program that uses these instructions. Signed-off-by: Petar Jovanovic Reviewed-by: Leon Alrae Signed-off-

[Qemu-devel] [PULL 01/10] target-mips: Use tcg_gen_extrh_i64_i32

2015-09-18 Thread Leon Alrae
From: Richard Henderson We can tidy gen_load_fpr32h, as well as introduce a helper to cleanup the MACC instructions. Signed-off-by: Richard Henderson Reviewed-by: Leon Alrae Signed-off-by: Leon Alrae --- target-mips/translate.c | 48 ++-- 1 file ch

[Qemu-devel] [PULL 06/10] pic32: use LCG algorithm for generated random index of TLBWR instruction

2015-09-18 Thread Leon Alrae
From: Serge Vakulenko The LFSR algorithm, used for generating random TLB indexes for TLBWR instruction, was inclined to produce a degenerate sequence in some cases. For example, for 16-entry TLB size and Wired=1, it gives: 15, 6, 7, 2, 7, 2, 7, 2, 7, 2, 7, 2, 7, 2, 7, 2, 7, 2, 7, 2, 7, 2, 7, 2, 7

[Qemu-devel] [PULL 04/10] target-mips: get rid of MIPS_DEBUG

2015-09-18 Thread Leon Alrae
From: Aurelien Jarno MIPS_DEBUG is a define used to dump the instruction disassembling. It has to be defined at compile time. In practice I believe it's more efficient to just look at the instruction disassembly and op dump using -d in_asm,op. This patch therefore removes the corresponding code,

Re: [Qemu-devel] [PATCH v6 14/14] tests: add BlockJobTxn unit test

2015-09-18 Thread Max Reitz
On 15.09.2015 08:11, Fam Zheng wrote: > From: Stefan Hajnoczi > > The BlockJobTxn unit test verifies that both single jobs and pairs of > jobs behave as a transaction group. Either all jobs complete > successfully or the group is cancelled. > > Signed-off-by: Stefan Hajnoczi > Signed-off-by: F

Re: [Qemu-devel] [PATCH 13/16] block: Implement bdrv_append() without bdrv_swap()

2015-09-18 Thread Alberto Garcia
On Thu 17 Sep 2015 03:48:17 PM CEST, Kevin Wolf wrote: > +static void swap_feature_fields(BlockDriverState *bs_top, > +BlockDriverState *bs_new) > +{ > +BlockDriverState tmp; > + > +bdrv_move_feature_fields(&tmp, bs_top); > +bdrv_move_feature_fields(bs_t

[Qemu-devel] [PATCH 1/7] libqtest: Clean up unused QTestState member sigact_old

2015-09-18 Thread Markus Armbruster
Unused since commit d766825. Signed-off-by: Markus Armbruster --- tests/libqtest.c | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/libqtest.c b/tests/libqtest.c index e5188e0..8dede56 100644 --- a/tests/libqtest.c +++ b/tests/libqtest.c @@ -46,7 +46,6 @@ struct QTestState bool irq_

[Qemu-devel] [PATCH 2/7] libqtest: New hmp() & friends

2015-09-18 Thread Markus Armbruster
New convenience function hmp() to facilitate use of human-monitor-command in tests. Use it to simplify its existing uses. To blend into existing libqtest code, also add qtest_hmpv() and qtest_hmp(). That, and the egregiously verbose GTK-Doc comment format make this patch look bigger than it is.

[Qemu-devel] [PATCH 7/7] tests: Simplify how qom-test is run

2015-09-18 Thread Markus Armbruster
Add it to check-qtest-generic-y instead of check-qtest-$(target)-y for every target. Signed-off-by: Markus Armbruster --- tests/Makefile | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tests/Makefile b/tests/Makefile index 4559045..28c5f93 100644 --- a/tests/Makefile +++

[Qemu-devel] [PATCH 5/7] qdev: Protect device-list-properties against broken devices

2015-09-18 Thread Markus Armbruster
Several devices don't survive object_unref(object_new(T)): they crash or hang during cleanup, or they leave dangling pointers behind. This breaks at least device-list-properties, because qmp_device_list_properties() needs to create a device to find its properties. Broken in commit f4eb32b "qmp: s

[Qemu-devel] [PATCH 4/7] qmp: Fix device-list-properties not to crash for abstract device

2015-09-18 Thread Markus Armbruster
Broken in commit f4eb32b "qmp: show QOM properties in device-list-properties", v2.1. Cc: qemu-sta...@nongnu.org Signed-off-by: Markus Armbruster --- qmp.c | 6 ++ tests/device-introspect-test.c | 11 --- 2 files changed, 10 insertions(+), 7 deletions(-) dif

[Qemu-devel] [PATCH 6/7] Revert "qdev: Use qdev_get_device_class() for -device , help"

2015-09-18 Thread Markus Armbruster
This reverts commit 31bed5509dfcbdfc293154ce81086a4dbd7a80b6. The reverted commit changed qdev_device_help() to reject abstract devices and devices that have cannot_instantiate_with_device_add_yet set, to fix crash bugs like -device x86_64-cpu,help. Rejecting abstract devices makes sense: they're

[Qemu-devel] [PATCH 0/7] Fix device introspection regressions

2015-09-18 Thread Markus Armbruster
QMP command device-list-properties regressed in 2.1: it can crash or leave dangling pointers behind. -device FOO,help regressed in 2.2: it no longer works for non-pluggable devices. I tried to fix that some time ago[*], but my fix failed review. This is my second, more comprehensive try. PATCH

[Qemu-devel] [PATCH 3/7] device-introspect-test: New, covering device introspection

2015-09-18 Thread Markus Armbruster
The test doesn't check the output makes any sense, only that QEMU survives. Useful since we've had an astounding number of crash bugs around there. In fact, we have a bunch of them right now: several devices crash or hang, and all CPUs leave a dangling pointer behind. Blacklist them in the test.

Re: [Qemu-devel] Someone kill the in-tree build, please (was: MIPS qemu build failure)

2015-09-18 Thread Peter Maydell
On 18 September 2015 at 13:06, Markus Armbruster wrote: > "Daniel P. Berrange" writes: >> You have your build directory *outside* the QEMU source tree, >> eg $GIT/../build, whereas I had been testing with $GIT/build >> and an non-VPATH build. > Dropping the in-tree build entirely would save us f

Re: [Qemu-devel] Someone kill the in-tree build, please (was: MIPS qemu build failure)

2015-09-18 Thread Daniel P. Berrange
On Fri, Sep 18, 2015 at 02:06:39PM +0200, Markus Armbruster wrote: > "Daniel P. Berrange" writes: > > > On Fri, Sep 18, 2015 at 09:53:31AM +0100, Leon Alrae wrote: > >> On 18/09/2015 09:24, Daniel P. Berrange wrote: > >> > On Thu, Sep 17, 2015 at 07:38:53PM +0100, Peter Maydell wrote: > >> >> On

Re: [Qemu-devel] [PATCH 13/16] block: Implement bdrv_append() without bdrv_swap()

2015-09-18 Thread Kevin Wolf
Am 18.09.2015 um 13:45 hat Alberto Garcia geschrieben: > On Thu 17 Sep 2015 03:48:17 PM CEST, Kevin Wolf wrote: > > > +static void swap_feature_fields(BlockDriverState *bs_top, > > +BlockDriverState *bs_new) > > +{ > > +BlockDriverState tmp; > > + > > +bdrv_

Re: [Qemu-devel] [PATCH 1/7] qapi: support implicit structs in OptsVisitor

2015-09-18 Thread Eric Blake
On 09/17/2015 02:30 PM, Eric Blake wrote: > On 09/07/2015 06:08 AM, Kővágó, Zoltán wrote: >> They are required for flat unions (you still have to allocate the >> structs). >> >> Signed-off-by: Kővágó, Zoltán >> --- >> qapi/opts-visitor.c | 15 +++ >> 1 file changed, 15 insertions(+) >

Re: [Qemu-devel] [PATCH RFC v4 27/29] qapi: Change Netdev into a flat union

2015-09-18 Thread Eric Blake
On 09/18/2015 03:03 AM, Yang Hongyang wrote: >> Fix is simple: add this patch to your build: >> >> https://lists.gnu.org/archive/html/qemu-devel/2015-09/msg01650.html >> >> I've rebased my git repo accordingly for now, and will post v5 later on >> (I'm still working on other improvements, and may

Re: [Qemu-devel] [PATCH RFC v4 27/29] qapi: Change Netdev into a flat union

2015-09-18 Thread Eric Blake
On 09/17/2015 06:52 PM, Wen Congyang wrote: >> > > OK, I will try it. What is difference between start_struct() and > start_implicit_struct()? If you have the following QDict: { "a":1, "b":2", "c:3" } start_struct() corresponds to the {, and end_struct() corresponds to the }. If the correspon

Re: [Qemu-devel] [PATCH RFC v4 27/29] qapi: Change Netdev into a flat union

2015-09-18 Thread Eric Blake
On 09/18/2015 12:56 AM, Markus Armbruster wrote: >> OK, I will try it. What is difference between start_struct() and >> start_implicit_struct()? > > I hope to be able to answer this question next week, after taking a dive > in the (almost entirely undocumented) visitors code. It's not quite undo

Re: [Qemu-devel] [PATCH 5/7] qdev: Protect device-list-properties against broken devices

2015-09-18 Thread Christian Borntraeger
Am 18.09.2015 um 14:00 schrieb Markus Armbruster: > Several devices don't survive object_unref(object_new(T)): they crash > or hang during cleanup, or they leave dangling pointers behind. > > This breaks at least device-list-properties, because > qmp_device_list_properties() needs to create a devi

Re: [Qemu-devel] [PATCH v2 03/22] target-*: Increment num_insns immediately after tcg_gen_insn_start

2015-09-18 Thread Peter Maydell
On 18 September 2015 at 05:55, Richard Henderson wrote: > This does tidy the icount test common to all targets. > > Signed-off-by: Richard Henderson > --- > target-alpha/translate.c | 4 ++-- > target-arm/translate-a64.c| 6 +++--- > target-arm/translate.c| 7 --- > target-c

[Qemu-devel] [Bug 1469342] Re: qemu-i386 pentium3 incorrect instruction set

2015-09-18 Thread PeteVine
Still there in the latest master. To clarify, running the binary with the -cpu athlon switch (same instruction set as P3) also exhibits the problem whereas a real athlon SIGILL's correctly. ** Description changed: Running a binary containing a movsd instruction (SSE2) in 32-bit - qemu-i386 -cp

Re: [Qemu-devel] [PATCH v2 04/22] target-*: Introduce and use cpu_breakpoint_test

2015-09-18 Thread Sergey Fedorov
On 18.09.2015 13:32, Peter Maydell wrote: >> +/* Return true if PC matches an installed breakpoint. */ >> > +static inline bool cpu_breakpoint_test(CPUState *cpu, vaddr pc, int mask) >> > +{ >> > +CPUBreakpoint *bp; >> > + >> > +if (unlikely(!QTAILQ_EMPTY(&cpu->breakpoints))) { >> > +

[Qemu-devel] Someone kill the in-tree build, please (was: MIPS qemu build failure)

2015-09-18 Thread Markus Armbruster
"Daniel P. Berrange" writes: > On Fri, Sep 18, 2015 at 09:53:31AM +0100, Leon Alrae wrote: >> On 18/09/2015 09:24, Daniel P. Berrange wrote: >> > On Thu, Sep 17, 2015 at 07:38:53PM +0100, Peter Maydell wrote: >> >> On 17 September 2015 at 19:21, Steve Ellcey wrote: >> >>> >> >>> Following up to

Re: [Qemu-devel] [PATCH v2 1/2] util - add automated ID generation utility

2015-09-18 Thread Markus Armbruster
Jeff Cody writes: > Multiple sub-systems in QEMU may find it useful to generate IDs > for objects that a user may reference via QMP or HMP. This patch > presents a standardized way to do it, so that automatic ID generation > follows the same rules. > > This patch enforces the following rules whe

Re: [Qemu-devel] [PATCH v2 2/2] block: auto-generated node-names

2015-09-18 Thread Markus Armbruster
Jeff Cody writes: > If a node-name is not specified, automatically generate the node-name. > > Generated node-names will use the "block" sub-system identifier. > > Reviewed-by: Eric Blake > Reviewed-by: John Snow > Signed-off-by: Jeff Cody > --- > block.c | 25 - > 1 f

Re: [Qemu-devel] QEMU+Aarch64: in_asm log skips instructions of loop-programs

2015-09-18 Thread Sergey Smolov
Hi Christopher, 18.09.2015 02:02, Christopher Covington пишет: Hi Sergey, On 09/04/2015 12:38 PM, Sergey Smolov wrote: 03.09.2015 19:35, Peter Maydell пишет: On 3 September 2015 at 15:31, Sergey Smolov wrote: Do you think it is possible to implement another QEMU logger which will make a rec

Re: [Qemu-devel] [PATCH v2 0/2] Auto-generated IDs

2015-09-18 Thread Markus Armbruster
Jeff Cody writes: > Changes from RFC v1: > > Patch 1: Several typos / grammatical errors (thanks Eric, John) > Make id_subsys_str[] const pointer to const strings (thanks Eric) > Moved id_subsys_str[] out from id_generate() (thanks John) > Assert on nul

Re: [Qemu-devel] [PATCH v2 20/22] tcg: Save insn data and use it in cpu_restore_state_from_tb

2015-09-18 Thread Peter Maydell
On 18 September 2015 at 05:55, Richard Henderson wrote: > We can now restore state without retranslation. > > Signed-off-by: Richard Henderson > --- > +/* Encode the data collected about the instructions while compiling TB. > + Place the data at BLOCK, and return the number of bytes consumed. >

[Qemu-devel] [Bug 1469342] Re: qemu-i386 pentium3/athlon incorrect instruction set

2015-09-18 Thread Paolo Bonzini
QEMU doesn't try to mimic the exact set of instructions for a processor, unfortunately. Virtualization solutions like KVM also do not allow you to do that, so the case for this feature is relatively minor. However, patches are welcome. ** Changed in: qemu Status: New => Won't Fix -- You

[Qemu-devel] [PATCH v5 0/4] Add 'blockdev-snapshot' command

2015-09-18 Thread Alberto Garcia
This fixes the problem detect by Fam: the previous series was deleting the 'backing' option for 'blockdev-add' even if it contained a non-empty string. The code is also rebased on top of the current master. In particular the test output had to be adapted because of fe646693. Again, this depends o

[Qemu-devel] [PATCH v5 1/4] block: rename BlockdevSnapshot to BlockdevSnapshotSync

2015-09-18 Thread Alberto Garcia
We will introduce the 'blockdev-snapshot' command that will require its own struct for the parameters, so we need to rename this one in order to avoid name clashes. Signed-off-by: Alberto Garcia Reviewed-by: Eric Blake Reviewed-by: Max Reitz --- blockdev.c | 2 +- qapi-schema.json

[Qemu-devel] [PATCH v5 2/4] block: support passing 'backing': '' to 'blockdev-add'

2015-09-18 Thread Alberto Garcia
Passing an empty string allows opening an image but not its backing file. This was already described in the API documentation, only the implementation was missing. This is useful for creating snapshots using images opened with blockdev-add, since they are not supposed to have a backing image befor

[Qemu-devel] [PATCH v5 4/4] block: add tests for the 'blockdev-snapshot' command

2015-09-18 Thread Alberto Garcia
Signed-off-by: Alberto Garcia --- tests/qemu-iotests/085 | 102 ++--- tests/qemu-iotests/085.out | 34 ++- 2 files changed, 128 insertions(+), 8 deletions(-) diff --git a/tests/qemu-iotests/085 b/tests/qemu-iotests/085 index 56cd6f8..532eb

[Qemu-devel] [PATCH v5 3/4] block: add a 'blockdev-snapshot' QMP command

2015-09-18 Thread Alberto Garcia
One of the limitations of the 'blockdev-snapshot-sync' command is that it does not allow passing BlockdevOptions to the newly created snapshots, so they are always opened using the default values. Extending the command to allow passing options is not a practical solution because there is overlap b

[Qemu-devel] [PULL 1/8] error: only prepend timestamp on stderr

2015-09-18 Thread Markus Armbruster
From: Stefan Hajnoczi The -msg timestamp=on option prepends a timestamp to error messages. This is useful on stderr where it allows users to identify when an error was raised. Timestamps do not make sense on the monitor since error_report() is called in response to a synchronous monitor command

  1   2   3   4   >