[Qemu-devel] [PATCH] Use macro instead of plain text

2015-12-17 Thread Cao jin
There is TYPE_ICH9_AHCI definition in ahci.h when QOMify it, seems these two places are missed. Signed-off-by: Cao jin --- hw/i386/pc_q35.c | 2 +- qdev-monitor.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index 9a12068..aa34a07 1

[Qemu-devel] [PATCH v2 4/4] tests: Use Python 2.6 "except E as ..." syntax

2015-12-17 Thread Markus Armbruster
PEP 8 calls for it, because it's forward compatible with Python 3. Supported since Python 2.6, which we require (commit fec2103). Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Acked-by: Stefan Hajnoczi --- tests/image-fuzzer/runner.py | 12 ++-- tests/qemu-iotests/qed.py

[Qemu-devel] [PATCH v2 3/4] Revert "tracetool: use Python 2.4-compatible exception handling syntax"

2015-12-17 Thread Markus Armbruster
This reverts commit 662da3854e3f490223373b40afdcfcc339d14aa5. We require Python 2.6 now (commit fec2103). Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Acked-by: Stefan Hajnoczi --- scripts/tracetool.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts

[Qemu-devel] [PATCH v2 2/4] scripts/qmp: Use Python 2.6 "except E as ..." syntax

2015-12-17 Thread Markus Armbruster
PEP 8 calls for it, because it's forward compatible with Python 3. Supported since Python 2.6, which we require (commit fec2103). Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Acked-by: Stefan Hajnoczi --- scripts/qmp/qemu-ga-client | 2 +- scripts/qmp/qmp| 4 ++-- scrip

[Qemu-devel] [PATCH v2 0/4] Use Python 2.6 "except E as ..." syntax

2015-12-17 Thread Markus Armbruster
I can take this through my tree, but of course don't mind if a maintainer prefers to pick up "his" parts. v2: * Commit messages improved [Eric, Peter] Markus Armbruster (4): qapi: Use Python 2.6 "except E as ..." syntax scripts/qmp: Use Python 2.6 "except E as ..." syntax Revert "tracetool:

[Qemu-devel] [PATCH v2 1/4] qapi: Use Python 2.6 "except E as ..." syntax

2015-12-17 Thread Markus Armbruster
PEP 8 calls for it, because it's forward compatible with Python 3. Supported since Python 2.6, which we require (commit fec2103). Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Acked-by: Stefan Hajnoczi --- scripts/qapi.py | 8 1 file changed, 4 insertions(+), 4 deletions(-)

Re: [Qemu-devel] [PULL 43/45] scsi: always call notifier on async cancellation

2015-12-17 Thread Fam Zheng
On Fri, 12/18 07:05, Paolo Bonzini wrote: > > > On 18/12/2015 01:57, Fam Zheng wrote: > > Oh hang on, in scsi_req_dequeue, if req->enqueued is already false, the > > matching scsi_req_unref is never called. > > The matching unref for scsi_req_cancel_async's ref is in > scsi_req_cancel_complete.

Re: [Qemu-devel] [PATCH v2 02/10] pc: remove has_igd_gfx_passthru global

2015-12-17 Thread Gerd Hoffmann
> > +return (qdev_get_machine->igd_gfx_passthru > > && ((dev->class_code >> 0x8) == PCI_CLASS_DISPLAY_VGA)); > > } > > Doesn't compile: > > qemu/hw/xen/xen_pt.h: In function ‘is_igd_vga_passthrough’: > qemu/hw/xen/xen_pt.h:325:29: error: request for member ‘igd_gfx_passthru’ in

[Qemu-devel] [PATCH 0/2] compat: recent vmw_pvscsi back-compat props are 2.5 specific

2015-12-17 Thread Shmulik Ladkani
Introduce HW_COMPAT_2_5 and move the recently added back-compat props of vmw_pvscsi to it, as they were introduced post v2.5. Shmulik Ladkani (2): compat: Introduce HW_COMPAT_2_5 vmw_pvscsi: x-disable-pcie, x-old-pci-configuration back-compat props are 2.5 specific hw/i386/pc_piix.c

[Qemu-devel] [PATCH 1/2] compat: Introduce HW_COMPAT_2_5

2015-12-17 Thread Shmulik Ladkani
Introduce the place-holder for 2.5 back-compat properties, and the accompanying PC_COMPAT_2_5, CCW_COMPAT_2_5, SPAPR_COMPAT_2_5. Signed-off-by: Shmulik Ladkani --- hw/i386/pc_piix.c | 1 + hw/i386/pc_q35.c | 1 + hw/ppc/spapr.c | 9 + hw/s390x/s390-virtio-c

[Qemu-devel] [PATCH 2/2] vmw_pvscsi: x-disable-pcie, x-old-pci-configuration back-compat props are 2.5 specific

2015-12-17 Thread Shmulik Ladkani
pvscsi's x-disable-pcie and x-old-pci-configuration backward compat properties were introduced in 952970b and d5da3ef: vmw_pvscsi: Introduce 'x-old-pci-configuration' backword compatability property vmw_pvscsi: Introduce 'x-disable-pcie' backword compatability property and were placed into H

Re: [Qemu-devel] [PATCH 6/6] q35: skip q35-acpi-dsdt.aml load if not needed

2015-12-17 Thread Gerd Hoffmann
Hi, > But I would prefer to finally apply the series that deletes > pc-q35-2.3 and older (submitted in August), so we just can delete > this code. ... and just delete the pc-bios/*.aml files too (see patch 4/6 in this series). Makes sense to me. cheers, Gerd

Re: [Qemu-devel] RFC: Operation Blockers in QEMU Block Nodes

2015-12-17 Thread Stefan Hajnoczi
On Wed, Dec 16, 2015 at 01:25:29AM -0500, Jeff Cody wrote: > Background: > > Block jobs, and other QAPI operations, may modify and impact the > BlockDriverState graph in QEMU. In order to support multiple > operations safely, we need a mechanism to block and gate operations, > > We c

Re: [Qemu-devel] [PATCH 0/4] Use Python 2.6 "except E as ..." syntax

2015-12-17 Thread Stefan Hajnoczi
On Thu, Dec 17, 2015 at 11:06:27AM +0100, Markus Armbruster wrote: > I can take this through my tree, but of course don't mind if a > maintainer prefers to pick up "his" parts. > > Markus Armbruster (4): > qapi: Use Python 2.6 "except E as ..." syntax > scripts/qmp: Use Python 2.6 "except E as

Re: [Qemu-devel] [PATCH] iov: avoid memcpy for "simple" iov_from_buf/iov_to_buf

2015-12-17 Thread Stefan Hajnoczi
On Wed, Dec 16, 2015 at 11:57:33AM +0100, Paolo Bonzini wrote: > memcpy can take a large amount of time for small reads and writes. > For virtio it is a common case that the first iovec can satisfy the > whole read or write. In that case, and if bytes is a constant to > avoid excessive growth of c

Re: [Qemu-devel] [PATCH] linux-user/syscall.c: Notice about lock bitmask translation for fcntl

2015-12-17 Thread Chen Gang
I found this issue during my working time, it is about sw_64 (almost the same as alpha) host running i386 wine programs. I also found another issue, but I am not quite sure whether it is worth enough for our upstream: The related fix patch is below, which will let the initialization slower, but f

[Qemu-devel] [PATCH] linux-user/syscall.c: Notice about lock bitmask translation for fcntl

2015-12-17 Thread Chen Gang
For fcntl, it always needs to notice about it, just like do_fcntl() has done, or it will cause issue (e.g. alpha host run i386 guest). Signed-off-by: Chen Gang --- linux-user/syscall.c | 18 -- 1 files changed, 12 insertions(+), 6 deletions(-) diff --git a/linux-user/syscall.

Re: [Qemu-devel] [PULL 08/45] vmw_pvscsi: Introduce 'x-old-pci-configuration' backword compatability property

2015-12-17 Thread Shmulik Ladkani
Hi Eric, On Thu, 17 Dec 2015 11:08:35 -0700 Eric Blake wrote: > On 12/17/2015 10:46 AM, Paolo Bonzini wrote: > > From: Shmulik Ladkani > > If there's a reason to respin: > > long subject line, and contains a typo (should be backward, not > backword). Could shorten by saying 'back-compat' inste

Re: [Qemu-devel] [PATCH v2 for 2.6 0/5] QMP wrappers for VM snapshot operations

2015-12-17 Thread Denis V. Lunev
On 12/11/2015 12:33 PM, Denis V. Lunev wrote: On 12/04/2015 05:44 PM, Denis V. Lunev wrote: EFI based VM with pflash storage for NVRAM could not be snapshoted as libvirt configures storage as 'raw' and writable. OK, this is a libvirt problem. Another problem is that libvirt can not detect this

[Qemu-devel] [PATCH] i386: avoid null pointer dereference

2015-12-17 Thread P J P
Hello, A null pointer dereference issue was reported by Mr Ling Liu, CC'd here. It occurs while doing I/O port write operations via hmp interface. In that, 'current_cpu' remains null as it is not called from cpu_exec loop, which results in the said issue. Below is a proposed (tested)patch

Re: [Qemu-devel] [PULL 43/45] scsi: always call notifier on async cancellation

2015-12-17 Thread Paolo Bonzini
On 18/12/2015 01:57, Fam Zheng wrote: > Oh hang on, in scsi_req_dequeue, if req->enqueued is already false, the > matching scsi_req_unref is never called. The matching unref for scsi_req_cancel_async's ref is in scsi_req_cancel_complete. You're right that there is a leak if we get to the secon

Re: [Qemu-devel] [PATCH v2 0/3] KVM-UNIT-TESTS: Hyper-V SynIC timers test

2015-12-17 Thread Denis V. Lunev
On 12/17/2015 05:55 PM, Paolo Bonzini wrote: On 16/12/2015 19:51, Denis V. Lunev wrote: On 12/08/2015 07:36 PM, Andrey Smetanin wrote: The test checks Hyper-V SynIC timers functionality. The test runs on every vCPU and performs start/stop of periodic/one-shot timers (with period=1ms) and check

[Qemu-devel] [PATCH 1/1] static checker: e1000-82540em got aliased to e1000

2015-12-17 Thread Amit Shah
Commit 8304402033e8dbe8e379017d51ed1dd8344f1dce changed the name of the e1000-82540em device to e1000. This was flagged: Section "e1000-82540em" does not exist in dest Add the mapping to the changed section names dictionary so the checker can proceed. Signed-off-by: Amit Shah --- scripts/v

Re: [Qemu-devel] [ANNOUNCE] QEMU 2.5.0 is now available

2015-12-17 Thread Amit Shah
On (Wed) 16 Dec 2015 [18:15:33], Michael Roth wrote: > Hello, > > On behalf of the QEMU Team, I'd like to announce the availability of > the QEMU 2.5.0 release. This release contains 2000+ commits from 185 > authors. > > You can grab the tarball from our download page here: > > http://wiki.qem

Re: [Qemu-devel] [PATCH] hmp: avoid redundant null termination of buffer

2015-12-17 Thread P J P
Hello Ling, +-- On Fri, 18 Dec 2015, 刘令 wrote --+ | Can you give this a cve id? Yes, I'll request one once it is accepted upstream. -- Prasad J Pandit / Red Hat Product Security Team 47AF CE69 3A90 54AA 9045 1053 DD13 3D32 FE5B 041F

Re: [Qemu-devel] [PATCH v14 Resend 10/13] pci: add pci device pre-post reset callbacks for host bus reset

2015-12-17 Thread Chen Fan
On 12/18/2015 04:31 AM, Alex Williamson wrote: On Thu, 2015-12-17 at 09:41 +0800, Cao jin wrote: From: Chen Fan Particularly, For vfio devices, Once need to recovery devices by bus reset such as AER, we always need to reset the host bus to recovery the devices under the bus, so we need to add

Re: [Qemu-devel] [PATCH v14 Resend 08/13] vfio: add check host bus reset is support or not

2015-12-17 Thread Chen Fan
On 12/18/2015 04:32 AM, Alex Williamson wrote: On Thu, 2015-12-17 at 09:41 +0800, Cao jin wrote: From: Chen Fan when init vfio devices done, we should test all the devices supported aer whether conflict with others. For each one, get the hot reset info for the affected device list. For each

Re: [Qemu-devel] [PATCH] block: fix bdrv_ioctl called from coroutine

2015-12-17 Thread Fam Zheng
On Thu, 12/17 13:51, Paolo Bonzini wrote: > > > On 17/12/2015 13:33, Fam Zheng wrote: > > > In the coroutine case, the yield is hidden in the drivers, and it may or > > > may not happen. For example, qcow2_co_flush_to_os starts with > > > > > > qemu_co_mutex_lock(&s->lock); > > > > > > whi

Re: [Qemu-devel] [PATCH COLO-Frame v12 00/38] COarse-grain LOck-stepping(COLO) Virtual Machines for Non-stop Service (FT)

2015-12-17 Thread Hailiang Zhang
On 2015/12/17 18:52, Dr. David Alan Gilbert wrote: * Hailiang Zhang (zhang.zhanghaili...@huawei.com) wrote: On 2015/12/15 20:14, Dr. David Alan Gilbert wrote: * zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: This is the 12th version of COLO. As usual, this version of COLO is only suppo

[Qemu-devel] [PATCH v2 2/2] iotests: Update comments for bdrv_swap() in 094

2015-12-17 Thread Fam Zheng
Signed-off-by: Fam Zheng --- tests/qemu-iotests/094 | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/qemu-iotests/094 b/tests/qemu-iotests/094 index 27a2be2..57a68f8 100755 --- a/tests/qemu-iotests/094 +++ b/tests/qemu-iotests/094 @@ -1,6 +1,6 @@ #!/bin/bash # -

[Qemu-devel] [PATCH v2 1/2] block: Remove prototype of bdrv_swap from header

2015-12-17 Thread Fam Zheng
The function has gone. Signed-off-by: Fam Zheng --- include/block/block.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/block/block.h b/include/block/block.h index d048bbf..a36975a 100644 --- a/include/block/block.h +++ b/include/block/block.h @@ -197,7 +197,6 @@ int bdrv_create_fil

[Qemu-devel] [PATCH v2 0/2] Clean up the remainders of bdrv_swap

2015-12-17 Thread Fam Zheng
v2: Update comment in patch 2. [Kevin] Fam Zheng (2): block: Remove prototype of bdrv_swap from header iotests: Update comments for bdrv_swap() in 094 include/block/block.h | 1 - tests/qemu-iotests/094 | 8 +--- 2 files changed, 5 insertions(+), 4 deletions(-) -- 2.4.3

Re: [Qemu-devel] [PULL 43/45] scsi: always call notifier on async cancellation

2015-12-17 Thread Fam Zheng
On Thu, 12/17 18:46, Paolo Bonzini wrote: > This was found by code inspection. If the request is cancelled twice, > the notifier is never called on the second cancellation request, > and hence for example a TMF might never finish. > > All the calls in scsi_req_cancel_async are idempotent, so the

Re: [Qemu-devel] [PATCH v2 18/23] vmdk: Clean up "Invalid extent lines" error message

2015-12-17 Thread Fam Zheng
On Thu, 12/17 17:49, Markus Armbruster wrote: > vmdk_parse_extents() reports parse errors like this: > > error_setg(errp, "Invalid extent lines:\n%s", p); > > where p points to the beginning of the malformed line in the image > descriptor. This results in a multi-line error message > >

Re: [Qemu-devel] [PATCH v2 17/23] vmdk: Clean up control flow in vmdk_parse_extents() a bit

2015-12-17 Thread Fam Zheng
On Thu, 12/17 17:49, Markus Armbruster wrote: > Cc: Fam Zheng > Signed-off-by: Markus Armbruster > --- > block/vmdk.c | 28 +++- > 1 file changed, 15 insertions(+), 13 deletions(-) > > diff --git a/block/vmdk.c b/block/vmdk.c > index b4a224e..08fa3f3 100644 > --- a/block

Re: [Qemu-devel] [PATCH 02/10] hw/sd/sd.c: QOMify

2015-12-17 Thread Alistair Francis
On Thu, Dec 17, 2015 at 2:11 PM, Peter Maydell wrote: > On 17 December 2015 at 21:45, Alistair Francis > wrote: >> On Fri, Dec 11, 2015 at 8:37 AM, Peter Maydell >> wrote: >>> Turn the SD card into a QOM device. >>> This conversion only changes the device itself; the various >>> functions which

Re: [Qemu-devel] [PATCH 06/10] sdhci_sysbus: Create SD card device in users, not the device itself

2015-12-17 Thread Alistair Francis
On Fri, Dec 11, 2015 at 8:37 AM, Peter Maydell wrote: > Move the creation of the SD card device from the sdhci_sysbus > device itself into the boards that create these devices. > This allows us to remove the cannot_instantiate_with_device_add > notation because we no longer call drive_get_next in

Re: [Qemu-devel] [PATCH 03/10] hw/sd/sd.c: Convert sd_reset() function into Device reset method

2015-12-17 Thread Alistair Francis
On Fri, Dec 11, 2015 at 8:37 AM, Peter Maydell wrote: > Convert the sd_reset() function into a proper Device reset method. > > Signed-off-by: Peter Maydell Reviewed-by: Alistair Francis Thanks, Alistair > --- > hw/sd/sd.c | 10 +- > 1 file changed, 5 insertions(+), 5 deletions(-) >

Re: [Qemu-devel] [PATCH 00/25] target-sparc improvements

2015-12-17 Thread Richard Henderson
On 12/17/2015 12:54 PM, Richard Henderson wrote: The primary focus of this patch set is to reduce the number of helpers that modify TCG globals, and thus increase the lifetime of those globals within each TB, and thus decrease the number of times that tcg must spill and fill them from backing sto

[Qemu-devel] [PATCH 08/25] target-sparc: Pass TCGMemOp to gen_ld/st_asi

2015-12-17 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target-sparc/translate.c | 32 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/target-sparc/translate.c b/target-sparc/translate.c index caad473..ab37372 100644 --- a/target-sparc/translate.c +++ b/target-sparc/

[Qemu-devel] [PATCH 06/25] target-sparc: Store %asi in TB flags

2015-12-17 Thread Richard Henderson
Knowing the value of %asi at translation time means that we can handle the common settings without a function call. The steady state appears to be %asi == ASI_P, so that sparcv9 code can use offset forms of lda/sta. The %asi register gets pushed and popped on entry to certain functions, but it ra

Re: [Qemu-devel] [PATCH 02/10] hw/sd/sd.c: QOMify

2015-12-17 Thread Peter Maydell
On 17 December 2015 at 21:45, Alistair Francis wrote: > On Fri, Dec 11, 2015 at 8:37 AM, Peter Maydell > wrote: >> Turn the SD card into a QOM device. >> This conversion only changes the device itself; the various >> functions which are effectively methods on the device are not >> touched at thi

Re: [Qemu-devel] [PATCH v2 23/23] s390/sclp: Simplify control flow in sclp_realize()

2015-12-17 Thread Eric Blake
On 12/17/2015 09:50 AM, Markus Armbruster wrote: > Suggested-by: David Hildenbrand > Signed-off-by: Markus Armbruster > Reviewed-by: David Hildenbrand > --- > hw/s390x/sclp.c | 9 +++-- > 1 file changed, 3 insertions(+), 6 deletions(-) > Reviewed-by: Eric Blake -- Eric Blake eblake r

Re: [Qemu-devel] [PATCH v2 22/23] hw/s390x: Rename local variables Error *l_err to just err

2015-12-17 Thread Eric Blake
On 12/17/2015 09:50 AM, Markus Armbruster wrote: > Let's follow established naming practice here as well. > > Cc: David Hildenbrand > Signed-off-by: Markus Armbruster > Acked-by: Cornelia Huck > Reviewed-by: David Hildenbrand > --- > hw/s390x/ipl.c | 12 ++-- > hw/s390x/sclp.c | 14 +

Re: [Qemu-devel] [PATCH v2 21/23] error: Clean up errors with embedded newlines (again)

2015-12-17 Thread Eric Blake
On 12/17/2015 09:50 AM, Markus Armbruster wrote: > The arguments of error_report() should yield a short error string > without newlines. > > A few places try to print additional help after the error message by > embedding newlines in the error string. That's nice, but let's do it > the right way.

Re: [Qemu-devel] [PATCH v2 20/23] vhdx: Fix "log that needs to be replayed" error message

2015-12-17 Thread Eric Blake
On 12/17/2015 09:50 AM, Markus Armbruster wrote: > The arguments of error_setg_errno() should yield a short error string > without newlines. > > Here, we try to append additional help to the error message by > embedding newlines in the error string. That's nice, but it's doesn't > play nicely wit

Re: [Qemu-devel] [PATCH v2 19/23] pci-assign: Clean up "Failed to assign" error messages

2015-12-17 Thread Eric Blake
On 12/17/2015 09:50 AM, Markus Armbruster wrote: > The arguments of error_setg() & friends should yield a short error > string without newlines. > > Two places try to append additional help to the error message by > embedding newlines in the error string. That's nice, but let's do it > the right

Re: [Qemu-devel] [PATCH 02/10] hw/sd/sd.c: QOMify

2015-12-17 Thread Alistair Francis
On Fri, Dec 11, 2015 at 8:37 AM, Peter Maydell wrote: > Turn the SD card into a QOM device. > This conversion only changes the device itself; the various > functions which are effectively methods on the device are not > touched at this point. > > Signed-off-by: Peter Maydell > --- > hw/sd/sd.c

Re: [Qemu-devel] [PATCH v2 18/23] vmdk: Clean up "Invalid extent lines" error message

2015-12-17 Thread Eric Blake
On 12/17/2015 09:49 AM, Markus Armbruster wrote: > vmdk_parse_extents() reports parse errors like this: > > error_setg(errp, "Invalid extent lines:\n%s", p); > > where p points to the beginning of the malformed line in the image > descriptor. This results in a multi-line error message > >

[Qemu-devel] [PATCH 21/25] target-sparc: Remove helper_ldf_asi, helper_stf_asi

2015-12-17 Thread Richard Henderson
We've now implemented all fp asis inline, except for the no-fault memory reads. The latter can be passed directly to helper_ld_asi. Signed-off-by: Richard Henderson --- target-sparc/helper.h | 2 - target-sparc/ldst_helper.c | 148 - target-spa

[Qemu-devel] [PATCH 23/25] target-sparc: Use cpu_fsr in stfsr

2015-12-17 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target-sparc/translate.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/target-sparc/translate.c b/target-sparc/translate.c index 809d4c9..8bdb953 100644 --- a/target-sparc/translate.c +++ b/target-sparc/translate.c @@ -5368,17 +536

Re: [Qemu-devel] [PATCH v2 17/23] vmdk: Clean up control flow in vmdk_parse_extents() a bit

2015-12-17 Thread Eric Blake
On 12/17/2015 09:49 AM, Markus Armbruster wrote: > Cc: Fam Zheng > Signed-off-by: Markus Armbruster > --- > block/vmdk.c | 28 +++- > 1 file changed, 15 insertions(+), 13 deletions(-) Could have mentioned what the change was: factoring out a common next_line() helper to

[Qemu-devel] [PATCH 25/25] target-sparc: Elide duplicate updates to fprs

2015-12-17 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target-sparc/translate.c | 45 +++-- 1 file changed, 27 insertions(+), 18 deletions(-) diff --git a/target-sparc/translate.c b/target-sparc/translate.c index 4b6b12f..0df45af 100644 --- a/target-sparc/translate.c +++ b/

[Qemu-devel] [PATCH 24/25] target-sparc: Use cpu_loop_exit_restore from helper_check_ieee_exceptions

2015-12-17 Thread Richard Henderson
This avoids needing to save state before every FP operation. Signed-off-by: Richard Henderson --- target-sparc/fop_helper.c | 16 target-sparc/translate.c | 6 +- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/target-sparc/fop_helper.c b/target-sparc/fop_h

[Qemu-devel] [PATCH 20/25] target-sparc: Directly implement block and short ldf/stf asis

2015-12-17 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target-sparc/translate.c | 106 +++ 1 file changed, 106 insertions(+) diff --git a/target-sparc/translate.c b/target-sparc/translate.c index d28e5f6..2224ff2 100644 --- a/target-sparc/translate.c +++ b/target-sparc/

Re: [Qemu-devel] [PATCH v2 15/23] qemu-io qemu-nbd: Use error_report() etc. instead of fprintf()

2015-12-17 Thread Eric Blake
On 12/17/2015 01:51 PM, Eric Blake wrote: > On 12/17/2015 09:49 AM, Markus Armbruster wrote: >> Just three instances left. >> >> Signed-off-by: Markus Armbruster >> --- > >> +++ b/qemu-nbd.c >> @@ -257,7 +257,7 @@ static void *nbd_client_thread(void *arg) >> fd = open(device, O_RDWR); >>

[Qemu-devel] [PATCH 19/25] target-sparc: Directly implement easy ldf/stf asis

2015-12-17 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target-sparc/translate.c | 43 +++ 1 file changed, 43 insertions(+) diff --git a/target-sparc/translate.c b/target-sparc/translate.c index a10f588..d28e5f6 100644 --- a/target-sparc/translate.c +++ b/target-sparc/transl

[Qemu-devel] [PATCH 12/25] target-sparc: Add MMU_REAL_IDX

2015-12-17 Thread Richard Henderson
This gives us a trivial way to access physical addresses (aka "real addresses", in sun4v terminology) directly from qemu_ld/st, without having to go through another helper. This also fixes a bug in get_physical_address_code where it inferred NUCLEUS from env->tl instead of from mmu_idx. Signed-of

Re: [Qemu-devel] [PATCH v2 16/23] error: Strip trailing '\n' from error string arguments (again)

2015-12-17 Thread Eric Blake
On 12/17/2015 09:49 AM, Markus Armbruster wrote: > Commit 6daf194d, be62a2eb and 312fd5f got rid of a bunch, but they > keep coming back. Tracked down with the Coccinelle semantic patch > from commit 312fd5f. Don't forget to rerun this to pick up stragglers exposed by 1/23 :) > Signed-off-by: Ma

[Qemu-devel] [PATCH 14/25] target-sparc: Use QT0 to return results from ldda

2015-12-17 Thread Richard Henderson
Also implement a few more twinx asis. Signed-off-by: Richard Henderson --- target-sparc/helper.h | 2 +- target-sparc/ldst_helper.c | 156 - target-sparc/translate.c | 12 +++- 3 files changed, 120 insertions(+), 50 deletions(-) diff --git a

[Qemu-devel] [PATCH 10/25] target-sparc: Add UA2011 defines to asi.h

2015-12-17 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target-sparc/asi.h | 22 ++ 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/target-sparc/asi.h b/target-sparc/asi.h index aace6f3..c9a1849 100644 --- a/target-sparc/asi.h +++ b/target-sparc/asi.h @@ -144,24 +144,36 @@ * ASI

[Qemu-devel] [PATCH 15/25] target-sparc: Introduce gen_check_align

2015-12-17 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target-sparc/translate.c | 48 +--- 1 file changed, 13 insertions(+), 35 deletions(-) diff --git a/target-sparc/translate.c b/target-sparc/translate.c index 18e249b..01559bd 100644 --- a/target-sparc/translate.c +++

[Qemu-devel] [PATCH 02/25] target-sparc: Remove softint as a TCG global

2015-12-17 Thread Richard Henderson
The global is only ever read for one insn; we can just as well use a load from env instead and generate the same code. This also allows us to indicate the the associated helpers do not touch TCG globals. Signed-off-by: Richard Henderson --- target-sparc/helper.h| 6 +++--- target-sparc/tran

[Qemu-devel] [PATCH 17/25] target-sparc: Fix obvious error in ASI_M_BFILL

2015-12-17 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target-sparc/ldst_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-sparc/ldst_helper.c b/target-sparc/ldst_helper.c index 9179eaa..efb0b75 100644 --- a/target-sparc/ldst_helper.c +++ b/target-sparc/ldst_helper.c @@ -987,7 +98

[Qemu-devel] [PATCH 03/25] target-sparc: Store mmu index in TB flags

2015-12-17 Thread Richard Henderson
Doing this instead of saving the raw PS_PRIV and TL. This means that all nucleus mode TBs (TL > 0) can be shared. This fixes a bug in that we didn't include HS_PRIV in the TB flags, and so could produce incorrect TB matches for hypervisor state. The LSU and DMMU states were unused by the transla

[Qemu-devel] [PATCH 01/25] target-sparc: Mark more flags for helpers

2015-12-17 Thread Richard Henderson
Quite a few helpers do not modify tcg globals but did not so indicate. Signed-off-by: Richard Henderson --- target-sparc/helper.h | 48 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/target-sparc/helper.h b/target-sparc/helper.h i

[Qemu-devel] [PATCH 04/25] target-sparc: Create gen_exception

2015-12-17 Thread Richard Henderson
This unifies quite a few duplicate code fragments. Signed-off-by: Richard Henderson --- target-sparc/translate.c | 75 +--- 1 file changed, 20 insertions(+), 55 deletions(-) diff --git a/target-sparc/translate.c b/target-sparc/translate.c index a42496

[Qemu-devel] [PATCH 00/25] target-sparc improvements

2015-12-17 Thread Richard Henderson
The primary focus of this patch set is to reduce the number of helpers that modify TCG globals, and thus increase the lifetime of those globals within each TB, and thus decrease the number of times that tcg must spill and fill them from backing store. This patch set is relative to the "Improve spa

Re: [Qemu-devel] [PATCH v2 15/23] qemu-io qemu-nbd: Use error_report() etc. instead of fprintf()

2015-12-17 Thread Eric Blake
On 12/17/2015 09:49 AM, Markus Armbruster wrote: > Just three instances left. > > Signed-off-by: Markus Armbruster > --- > +++ b/qemu-nbd.c > @@ -257,7 +257,7 @@ static void *nbd_client_thread(void *arg) > fd = open(device, O_RDWR); > if (fd < 0) { > /* Linux-only, we can use

Re: [Qemu-devel] [PATCH v2 14/23] migration: Use error_reportf_err() instead of monitor_printf()

2015-12-17 Thread Eric Blake
On 12/17/2015 09:49 AM, Markus Armbruster wrote: > Using error_reportf_err() instead of monitor_printf() makes no > difference when monitor_printf() is used correctly, i.e. within an HMP > monitor. Elsewhere, monitor_printf() does nothing, while > error_reportf_err() reports to stderr. > > Both c

Re: [Qemu-devel] [PATCH v2 13/23] spapr: Use error_reportf_err()

2015-12-17 Thread Eric Blake
On 12/17/2015 09:49 AM, Markus Armbruster wrote: > Not caught by Coccinelle for the previous patch, because it reports > the error only conditionally. > > Signed-off-by: Markus Armbruster > --- > hw/ppc/spapr.c | 7 --- > 1 file changed, 4 insertions(+), 3 deletions(-) > Reviewed-by: Eric

Re: [Qemu-devel] [PATCH v2 12/23] error: Use error_prepend() where it makes obvious sense

2015-12-17 Thread Eric Blake
On 12/17/2015 09:49 AM, Markus Armbruster wrote: > Done with this Coccinelle semantic patch > > @@ > expression FMT, E1, E2; > expression list ARGS; > @@ > -error_setg(E1, FMT, ARGS, error_get_pretty(E2)); > +error_propagate(E1, E2);/*###*/ > +error_prepend(

Re: [Qemu-devel] [PATCH v2 11/23] error: Use error_reportf_err() where it makes obvious sense

2015-12-17 Thread Eric Blake
On 12/17/2015 09:49 AM, Markus Armbruster wrote: > Done with this Coccinelle semantic patch > > @@ > expression FMT, E; > expression list ARGS; > @@ > -error_report(FMT, ARGS, error_get_pretty(E)); > +error_reportf_err(E, FMT/*@@@*/, ARGS); > ( > -error_

Re: [Qemu-devel] [PATCH v14 Resend 08/13] vfio: add check host bus reset is support or not

2015-12-17 Thread Alex Williamson
On Thu, 2015-12-17 at 09:41 +0800, Cao jin wrote: > From: Chen Fan > > when init vfio devices done, we should test all the devices supported > aer whether conflict with others. For each one, get the hot reset > info for the affected device list.  For each affected device, all > should attach to t

Re: [Qemu-devel] [PATCH v14 Resend 09/13] add check reset mechanism when hotplug vfio device

2015-12-17 Thread Alex Williamson
On Thu, 2015-12-17 at 09:41 +0800, Cao jin wrote: > From: Chen Fan > > Since we support multi-function hotplug. the function 0 indicate > the closure of the slot, so we have the chance to do the check. > > Signed-off-by: Chen Fan > --- >  hw/pci/pci.c | 29 ++

Re: [Qemu-devel] [PATCH v2 10/23] error: Don't decorate original error message when adding to it

2015-12-17 Thread Eric Blake
On 12/17/2015 09:49 AM, Markus Armbruster wrote: > Prepend the additional information, colon, space to the original > message without enclosing it in parenthesis or quotes, like we do > elsewhere. > > Signed-off-by: Markus Armbruster > --- > hw/core/qdev-properties.c | 2 +- > qemu-img.c

Re: [Qemu-devel] [PATCH v14 Resend 10/13] pci: add pci device pre-post reset callbacks for host bus reset

2015-12-17 Thread Alex Williamson
On Thu, 2015-12-17 at 09:41 +0800, Cao jin wrote: > From: Chen Fan > > Particularly, For vfio devices, Once need to recovery devices > by bus reset such as AER, we always need to reset the host bus > to recovery the devices under the bus, so we need to add pci device > callbacks to specify to do

[Qemu-devel] [WIP] RDMA transport for COLO

2015-12-17 Thread Dr. David Alan Gilbert
Hi, I've been playing with getting an RDMA setup for COLO and have something that mostly works, but it is very new and quite hacky; but I thought I'd share my work so far. You can find it at: https://github.com/orbitfp7/qemu/commits/orbit-wp4-colo-dec What I've done is: a) Wire up a partner T

Re: [Qemu-devel] [PATCH v2 09/23] error: New error_prepend(), error_reportf_err()

2015-12-17 Thread Eric Blake
On 12/17/2015 09:49 AM, Markus Armbruster wrote: > Instead of simply propagating an error verbatim, we sometimes want to > add to its message, like this: > > frobnicate(arg, &err); > error_setg(errp, "Can't frobnicate %s: %s", >arg, error_get_pretty(err)); Did you inte

Re: [Qemu-devel] [RFC v6 12/14] softmmu: Simplify helper_*_st_name, wrap RAM code

2015-12-17 Thread Alex Bennée
alvise rigo writes: > On Thu, Dec 17, 2015 at 5:52 PM, Alex Bennée wrote: >> >> Alvise Rigo writes: >> >>> Attempting to simplify the helper_*_st_name, wrap the code relative to a >>> RAM access into an inline function. >> >> This commit breaks a default x86_64-softmmu build: > > I see. Would

Re: [Qemu-devel] [PATCH v2 08/23] test-throttle: Simplify qemu_init_main_loop() error handling

2015-12-17 Thread Eric Blake
On 12/17/2015 09:49 AM, Markus Armbruster wrote: > The code looks like it tries to check for both qemu_init_main_loop() > and qemu_get_aio_context() failure in one conditional. In fact, > qemu_get_aio_context() can fail only after qemu_init_main_loop() > failed. > > Simplify accordingly: check fo

Re: [Qemu-devel] [PATCH v2 07/23] qemu-nbd: Clean up "Failed to load snapshot" error message

2015-12-17 Thread Eric Blake
On 12/17/2015 09:49 AM, Markus Armbruster wrote: > bdrv_snapshot_load_tmp() sets an error and returns -errno on failure. > We report both even though the error message is self-contained. Drop > the redundant strerror(). > > While there: setting errno right before exit() is pointless, so drop > th

Re: [Qemu-devel] [PATCH v2 06/23] block: Clean up "Could not create temporary overlay" error message

2015-12-17 Thread Eric Blake
On 12/17/2015 09:49 AM, Markus Armbruster wrote: > bdrv_create() sets an error and returns -errno on failure. When the > latter is interesting, the error is created with error_setg_errno(). > > bdrv_append_temp_snapshot() uses the error's message to create a new > one with error_setg_errno(). Th

Re: [Qemu-devel] [PATCH v2 04/23] error: Use error_report_err() instead of ad hoc prints

2015-12-17 Thread Eric Blake
On 12/17/2015 09:49 AM, Markus Armbruster wrote: > Signed-off-by: Markus Armbruster > --- > contrib/ivshmem-server/main.c | 4 +--- > qdev-monitor.c| 3 +-- > qemu-nbd.c| 3 +-- > 3 files changed, 3 insertions(+), 7 deletions(-) > > diff --git a/contrib/ivshme

[Qemu-devel] [PATCH v2 13/14] target-sparc: Tidy global register initialization

2015-12-17 Thread Richard Henderson
Create tables for the various global registers that need allocation. Remove one level of indirection from gregnames and fregnames. Signed-off-by: Richard Henderson --- target-sparc/translate.c | 157 +-- 1 file changed, 70 insertions(+), 87 deletions(

[Qemu-devel] [PATCH v2 14/14] target-sparc: Use global registers for the register window

2015-12-17 Thread Richard Henderson
Via indirection off cpu_regwptr. Signed-off-by: Richard Henderson --- target-sparc/translate.c | 49 ++-- 1 file changed, 27 insertions(+), 22 deletions(-) diff --git a/target-sparc/translate.c b/target-sparc/translate.c index c13a9d3..c818a36 100644

[Qemu-devel] [PATCH v2 11/14] tcg: Implement indirect memory registers

2015-12-17 Thread Richard Henderson
That is, global_mem registers whose base is another global_mem register, rather than a fixed register. Signed-off-by: Richard Henderson --- tcg/tcg.c | 95 --- tcg/tcg.h | 2 ++ 2 files changed, 68 insertions(+), 29 deletions(-) diff

Re: [Qemu-devel] [PATCH 1/4] qapi: Use Python 2.6 "except E as ..." syntax

2015-12-17 Thread Peter Maydell
On 17 December 2015 at 10:06, Markus Armbruster wrote: > PEP 8 calls for it, because it's forward compatibile with Python 3. Typo nit: "compatible". thanks -- PMM

[Qemu-devel] [PATCH v2 12/14] tcg: Allocate indirect_base temporaries in a different order

2015-12-17 Thread Richard Henderson
Since we've not got liveness analysis for indirect bases, placing them at the end of the call-saved registers makes it more likely that it'll stay live. Signed-off-by: Richard Henderson --- tcg/tcg.c | 43 --- 1 file changed, 32 insertions(+), 11 deletions

[Qemu-devel] [PATCH v2 10/14] tcg: Introduce temp_load

2015-12-17 Thread Richard Henderson
Unify all of the places that realize a temporary into a register. Signed-off-by: Richard Henderson --- tcg/tcg.c | 116 -- 1 file changed, 52 insertions(+), 64 deletions(-) diff --git a/tcg/tcg.c b/tcg/tcg.c index 6f40bf3..c51e0ec 1006

[Qemu-devel] [PATCH v2 04/14] tcg: More use of TCGReg where appropriate

2015-12-17 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/tcg.c | 26 +++--- tcg/tcg.h | 8 2 files changed, 19 insertions(+), 15 deletions(-) diff --git a/tcg/tcg.c b/tcg/tcg.c index 0a6edfb..06d71d7 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -451,7 +451,7 @@ static inline TCGTemp *

[Qemu-devel] [PATCH v2 08/14] tcg: Change temp_sync argument to TCGTemp

2015-12-17 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/tcg.c | 55 --- 1 file changed, 28 insertions(+), 27 deletions(-) diff --git a/tcg/tcg.c b/tcg/tcg.c index d19bb45..8edf582 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -1726,29 +1726,28 @@ static inline vo

[Qemu-devel] [PATCH v2 07/14] tcg: Change temp_dead argument to TCGTemp

2015-12-17 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/tcg.c | 48 +++- 1 file changed, 23 insertions(+), 25 deletions(-) diff --git a/tcg/tcg.c b/tcg/tcg.c index d91950d..d19bb45 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -1712,20 +1712,16 @@ static TCGReg tcg_reg_a

[Qemu-devel] [PATCH v2 05/14] tcg: Remove tcg_get_arg_str_i32/64

2015-12-17 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/tcg.c | 10 -- tcg/tcg.h | 5 - 2 files changed, 15 deletions(-) diff --git a/tcg/tcg.c b/tcg/tcg.c index 06d71d7..b6cd85c 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -926,16 +926,6 @@ static char *tcg_get_arg_str_idx(TCGContext *s, char *buf,

[Qemu-devel] [PATCH v2 09/14] tcg: Change temp_save argument to TCGTemp

2015-12-17 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/tcg.c | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/tcg/tcg.c b/tcg/tcg.c index 8edf582..6f40bf3 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -1753,10 +1753,9 @@ static void temp_sync(TCGContext *s, TCGTemp *ts, TCGRegS

Re: [Qemu-devel] [PATCH 3/4] Revert "tracetool: use Python 2.4-compatible exception handling syntax"

2015-12-17 Thread Eric Blake
On 12/17/2015 11:37 AM, Markus Armbruster wrote: > Eric Blake writes: > >> On 12/17/2015 03:06 AM, Markus Armbruster wrote: >>> This reverts commit 662da3854e3f490223373b40afdcfcc339d14aa5. >>> >>> Signed-off-by: Markus Armbruster >>> --- >>> scripts/tracetool.py | 4 ++-- >>> 1 file changed, 2

[Qemu-devel] [PATCH v2 06/14] tcg: Change reg_to_temp to TCGTemp pointer

2015-12-17 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/tcg.c | 113 ++ tcg/tcg.h | 6 ++-- 2 files changed, 57 insertions(+), 62 deletions(-) diff --git a/tcg/tcg.c b/tcg/tcg.c index b6cd85c..d91950d 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -903,2

[Qemu-devel] [PATCH v2 02/14] tcg: Change ts->mem_reg to ts->mem_base

2015-12-17 Thread Richard Henderson
Chain the temporaries together via pointers intstead of indices. The mem_reg value is now mem_base->reg. This will be important later. This does require that the frame pointer have a global temporary allocated for it. This is simple bar the existing reserved_regs check. Signed-off-by: Richard H

[Qemu-devel] [PATCH v2 03/14] tcg: Tidy temporary allocation

2015-12-17 Thread Richard Henderson
In particular, make sure the memory is memset before use. Continues the increased use of TCGTemp pointers instead of integer indices where appropriate. Signed-off-by: Richard Henderson --- tcg/tcg.c | 123 -- 1 file changed, 56 insertio

[Qemu-devel] [PATCH v2 00/14] tcg: Improve sparc register windows

2015-12-17 Thread Richard Henderson
This is a two year old patch set that I revived just before the 2.5 cutoff; I decided against re-posting it then, but now that 2.6 development is open, I think it's time to try again. The Idea is to let TCG know that the 24 windowed registers are accessed via a different base register than TCG_ARE

  1   2   3   4   5   6   >