[Qemu-devel] [PATCH] scripts: Use $(..) instead of deprecated `..`

2016-05-16 Thread Stefan Weil
This fixes these warnings from shellcheck: ^-- SC2006: Use $(..) instead of deprecated `..` Update also a comment using the same pattern. Signed-off-by: Stefan Weil --- scripts/clean-includes | 2 +- scripts/create_config | 6 +++---

[Qemu-devel] [PATCH v2] vl.c: Add '-L help' which lists data dirs.

2016-05-16 Thread Richard W.M. Jones
QEMU compiles a list of data directories from various sources. When consuming a QEMU binary it's useful to be able to get this list of data directories: a primary reason is so you can list what BIOSes or keymaps ship with this version of QEMU. However without reproducing the method that QEMU

[Qemu-devel] [PATCH v6 8/9] target-mips: Add nan2008 flavor of <CEIL|CVT|FLOOR|ROUND|TRUNC>.<L|W>.<S|D>

2016-05-16 Thread Aleksandar Markovic
From: Aleksandar Markovic New set of helpers for handling nan2008-syle versions of instructions .., for Mips R6. All involved instructions have float operand and integer result. Their core functionality is implemented via

[Qemu-devel] [PATCH v6 7/9] target-mips: Add abs2008 flavor of <ABS|NEG>.<S|D>

2016-05-16 Thread Aleksandar Markovic
From: Aleksandar Markovic Updated handling of instructions .. Note that legacy (pre-abs2008) ABS and NEG instructions are arithmetic (and, therefore, any NaN operand causes signaling invalid operation), while abs2008 ones are non-arithmetic, always

Re: [Qemu-devel] [PATCH] cpu-exec: Fix direct jump to TB spanning page

2016-05-16 Thread Sergey Fedorov
On 16/05/16 16:49, Richard Henderson wrote: > On 05/16/2016 06:13 AM, Sergey Fedorov wrote: >> It is not safe to make a direct jump to a TB spanning two pages in >> system emulation because the mapping for the second page can get changed >> but we don't take care of direct jumps in this case. > We

Re: [Qemu-devel] [PATCH] net: vl: Move default_net to vl.c

2016-05-16 Thread Paolo Bonzini
On 12/05/2016 16:17, Eduardo Habkost wrote: > All handling of defaults (default_* variables) is inside vl.c, > move default_net there too, so we can more easily refactor that > code later. > > Signed-off-by: Eduardo Habkost > --- > include/net/net.h | 1 - > net/net.c

[Qemu-devel] [PATCH 02/50] include: move CPU-related definitions out of qemu-common.h

2016-05-16 Thread Paolo Bonzini
Reviewed-by: Alex Bennée Signed-off-by: Paolo Bonzini --- include/qemu-common.h | 24 include/qemu/timer.h | 1 + include/qom/cpu.h | 9 + include/sysemu/cpus.h | 13 + stubs/cpu-get-icount.c |

[Qemu-devel] [PATCH 13/50] target-ppc: do not use target_ulong in cpu-qom.h

2016-05-16 Thread Paolo Bonzini
Bring the PowerPCCPUClass handle_mmu_fault method type into line with the one in CPUClass. Using vaddr also makes the cpu-qom.h file target independent. Signed-off-by: Paolo Bonzini --- target-ppc/cpu-qom.h| 3 +-- target-ppc/mmu-hash32.c | 2 +-

[Qemu-devel] [PATCH 16/50] target-sh4: make cpu-qom.h not target specific

2016-05-16 Thread Paolo Bonzini
Make SuperHCPU an opaque type within cpu-qom.h, and move all definitions of private methods, as well as all type definitions that require knowledge of the layout to cpu.h. This helps making files independent of NEED_CPU_H if they only need to pass around CPU pointers. Signed-off-by: Paolo

[Qemu-devel] [PATCH 01/50] scripts: add script to build QEMU and analyze inclusions

2016-05-16 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- scripts/analyze-inclusions | 102 + 1 file changed, 102 insertions(+) create mode 100644 scripts/analyze-inclusions diff --git a/scripts/analyze-inclusions b/scripts/analyze-inclusions new file

[Qemu-devel] [PATCH 18/50] target-tricore: make cpu-qom.h not target specific

2016-05-16 Thread Paolo Bonzini
Make TriCoreCPU an opaque type within cpu-qom.h, and move all definitions of private methods, as well as all type definitions that require knowledge of the layout to cpu.h. This helps making files independent of NEED_CPU_H if they only need to pass around CPU pointers. Signed-off-by: Paolo

[Qemu-devel] [PATCH 14/50] target-ppc: make cpu-qom.h not target specific

2016-05-16 Thread Paolo Bonzini
Make PowerPCCPU an opaque type within cpu-qom.h, and move all definitions of private methods, as well as all type definitions that require knowledge of the layout to cpu.h. Conversely, move all definitions needed to define a class to cpu-qom.h. This helps making files independent of NEED_CPU_H

[Qemu-devel] [PATCH 34/50] hw: move CPU state serialization to migration/cpu.h

2016-05-16 Thread Paolo Bonzini
Remove usage of NEED_CPU_H from hw/hw.h. Signed-off-by: Paolo Bonzini --- include/hw/hw.h | 49 --- include/migration/cpu.h | 48 ++ target-alpha/machine.c| 1 +

[Qemu-devel] [PATCH 46/50] hw: explicitly include qemu/log.h

2016-05-16 Thread Paolo Bonzini
Move the inclusion out of hw/hw.h, most files do not need it. Signed-off-by: Paolo Bonzini --- hw/arm/ast2400.c | 1 + hw/arm/nseries.c | 1 + hw/arm/palmetto-bmc.c | 1 + hw/arm/pxa2xx_gpio.c | 1 + hw/arm/stellaris.c

[Qemu-devel] [PATCH 3/5] cpu-exec: Rename cpu_resume_from_signal() to cpu_loop_exit_noexc()

2016-05-16 Thread Peter Maydell
The function cpu_resume_from_signal() is now always called with a NULL puc argument, and is rather misnamed since it is never called from a signal handler. It is essentially forcing an exit to the top level cpu loop but without raising any exception, so rename it to cpu_loop_exit_noexc() and drop

[Qemu-devel] [PATCH 49/50] hw: remove pio_addr_t

2016-05-16 Thread Paolo Bonzini
pio_addr_t is almost unused, because these days I/O ports are simply accessed through the address space. cpu_{in,out}[bwl] themselves are almost unused; monitor.c and xen-hvm.c could use address_space_read/write directly, since they have an integer size at hand. This leaves qtest as the only

Re: [Qemu-devel] [PATCH 01/50] scripts: add script to build QEMU and analyze inclusions

2016-05-16 Thread Eric Blake
On 05/16/2016 10:25 AM, Paolo Bonzini wrote: > > > On 16/05/2016 18:20, Eric Blake wrote: >>> +QEMU_CFLAGS=$(sed -n s/^QEMU_CFLAGS=//p config-host.mak) >>> +QEMU_INCLUDES=$(sed -n s/^QEMU_INCLUDES=//p config-host.mak | \ >>> +sed 's/$(SRC_PATH)/../g' ) >> >> Could avoid a 'sed | sed' by

[Qemu-devel] [PATCH 45/50] mips: move CP0 functions out of cpu.h

2016-05-16 Thread Paolo Bonzini
These are here for historical reasons: they are needed from both gdbstub.c and op_helper.c, and the latter was compiled with fixed AREG0. It is not needed anymore, so uninline them. Signed-off-by: Paolo Bonzini --- target-mips/cpu.h| 113

Re: [Qemu-devel] [PATCH 07/10] blockdev-backup: added support for data compression

2016-05-16 Thread Eric Blake
On 05/14/2016 06:45 AM, Denis V. Lunev wrote: > From: Pavel Butsykin > > The idea is simple - backup is "written-once" data. It is written block > by block and it is large enough. It would be nice to save storage > space and compress it. > > +++ b/qapi/block-core.json

Re: [Qemu-devel] [PATCH 00/52] 680x0 instructions emulation

2016-05-16 Thread Laurent Vivier
Le 12/05/2016 à 23:23, Alexander Graf a écrit : > > >> Am 12.05.2016 um 23:17 schrieb John Paul Adrian Glaubitz >> : >> >> Hi! >> >> Now that qemu 2.6.0 has been released, what about making Laurent >> the maintainer for the orphaned M68K target so that the 680x0

[Qemu-devel] [PATCH 37/50] qemu-common: stop including qemu/bswap.h from qemu-common.h

2016-05-16 Thread Paolo Bonzini
Move it to the actual users. There are still a few includes of qemu/bswap.h in headers; removing them is left for future work. Signed-off-by: Paolo Bonzini --- audio/mixeng.c | 1 + block/bochs.c | 1 + block/cloop.c | 1 + block/parallels.c

[Qemu-devel] [PATCH 24/50] alpha: include cpu-qom.h in files that require AlphaCPU

2016-05-16 Thread Paolo Bonzini
This will keep things working when cpu.h will not be included indirectly almost everywhere (either directly or through qemu-common.h). Signed-off-by: Paolo Bonzini --- hw/alpha/alpha_sys.h | 1 + hw/alpha/pci.c | 1 - 2 files changed, 1 insertion(+), 1 deletion(-)

Re: [Qemu-devel] [PATCH 1/6] qemu-io: enable tracing in qemu-io

2016-05-16 Thread Eric Blake
On 05/14/2016 06:01 AM, Denis V. Lunev wrote: > It would be convinient to enable tracepoints in qemu-io binary. This would s/convinient/convenient/ > allow to perform investigations without additional code recompilations. > > The command line will be exactly the same as in qemu-system. Reads

Re: [Qemu-devel] [PATCH 01/50] scripts: add script to build QEMU and analyze inclusions

2016-05-16 Thread Eric Blake
On 05/16/2016 09:35 AM, Paolo Bonzini wrote: > Signed-off-by: Paolo Bonzini > --- > scripts/analyze-inclusions | 102 > + > 1 file changed, 102 insertions(+) > create mode 100644 scripts/analyze-inclusions > > +# > +# 2)

[Qemu-devel] [PATCH 1/5] translate-all.c: Don't pass puc, locked to tb_invalidate_phys_page()

2016-05-16 Thread Peter Maydell
The user-mode-only function tb_invalidate_phys_page() is only called from two places: * page_unprotect(), which passes in a non-zero pc, a puc pointer and the value 'true' for the locked argument * page_set_flags(), which passes in a zero pc, a NULL puc pointer and a 'false' locked

Re: [Qemu-devel] [PATCH 3/6] qcow2: simplify logic in qcow2_co_write_zeroes

2016-05-16 Thread Eric Blake
On 05/14/2016 06:01 AM, Denis V. Lunev wrote: > Unaligned request could occupy only one cluster. This is true since the s/request could/requests will/ > previous commit. Simplify the code taking this considiration into s/considiration/consideration/ > account. > > There are no other changes

[Qemu-devel] [PATCH v3] vl.c: Add '-L help' which lists data dirs.

2016-05-16 Thread Richard W.M. Jones
QEMU compiles a list of data directories from various sources. When consuming a QEMU binary it's useful to be able to get this list of data directories: a primary reason is so you can list what BIOSes or keymaps ship with this version of QEMU. However without reproducing the method that QEMU

[Qemu-devel] [PATCH v3] vl.c: Add '-L help' which lists data dirs.

2016-05-16 Thread Richard W.M. Jones
v2 -> v3: - Use constants true/false for list_data_dirs variable. Rich.

[Qemu-devel] [PATCH 41/50] s390x: move stuff out of cpu.h

2016-05-16 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- hw/s390x/css.c | 4 +- hw/s390x/s390-skeys.c | 1 + hw/s390x/s390-virtio-ccw.c | 4 +- hw/s390x/virtio-ccw.c | 5 +- hw/s390x/virtio-ccw.h

[Qemu-devel] [PATCH 29/50] explicitly include hw/qdev-core.h

2016-05-16 Thread Paolo Bonzini
exec/cpu-all.h includes qom/cpu.h, which includes hw/qdev-core.h. Explicit inclusion will keep things working when cpu.h will not be included indirectly almost everywhere (either directly or through qemu-common.h). Signed-off-by: Paolo Bonzini --- bootdevice.c | 1 + 1 file

[Qemu-devel] [PATCH 44/50] arm: move arm_log_exception into .c file

2016-05-16 Thread Paolo Bonzini
Avoid need for qemu/log.h inclusion, and make the function static too. Reviewed-by: Alex Bennée Signed-off-by: Paolo Bonzini --- target-arm/helper.c| 15 +++ target-arm/internals.h | 15 --- 2 files changed, 15

[Qemu-devel] [PATCH 20/50] target-xtensa: make cpu-qom.h not target specific

2016-05-16 Thread Paolo Bonzini
Make XtensaCPU an opaque type within cpu-qom.h, and move all definitions of private methods, as well as all type definitions that require knowledge of the layout to cpu.h. Conversely, move all definitions needed to define a class to cpu-qom.h. This helps making files independent of NEED_CPU_H if

Re: [Qemu-devel] [PATCH 01/50] scripts: add script to build QEMU and analyze inclusions

2016-05-16 Thread Paolo Bonzini
On 16/05/2016 18:20, Eric Blake wrote: >> +QEMU_CFLAGS=$(sed -n s/^QEMU_CFLAGS=//p config-host.mak) >> +QEMU_INCLUDES=$(sed -n s/^QEMU_INCLUDES=//p config-host.mak | \ >> +sed 's/$(SRC_PATH)/../g' ) > > Could avoid a 'sed | sed' by doing: > > QEMU_INCLUDES=$(sed -n '/^QEMU_INCLUDES=/

Re: [Qemu-devel] [PATCH 4/6] qcow2: add tracepoints for qcow2_co_write_zeroes

2016-05-16 Thread Eric Blake
On 05/14/2016 06:01 AM, Denis V. Lunev wrote: > Signed-off-by: Denis V. Lunev > CC: Kevin Wolf > --- > block/qcow2.c | 5 + > trace-events | 2 ++ > 2 files changed, 7 insertions(+) > > diff --git a/block/qcow2.c b/block/qcow2.c > index 9a54bbd..97bf870

[Qemu-devel] [PATCH v2 0/3] Fix recent qemu-iotests issues

2016-05-16 Thread Eric Blake
I introduced a couple of bugs in my recent qemu-io enhancements; time to fix them back up now that the broken patches are already part of mainline. in v2: - patch 1: retitle, fix id typo, also plug a coverity leak [mreitz] - patch 3: drop dead comment [mreitz] 001/3:[down] 'qemu-io: Fix recent

Re: [Qemu-devel] [PATCH CFT v3 00/50] NEED_CPU_H / cpu.h / hw/hw.h cleanups

2016-05-16 Thread Peter Maydell
On 16 May 2016 at 17:53, Peter Maydell wrote: > ppc64 (this is the ppc64be host in the GCC compile farm if > you have an account there): > > /home/pm215/qemu/hw/intc/xics_kvm.c: In function ‘icp_get_kvm_state’: > /home/pm215/qemu/hw/intc/xics_kvm.c:54:12: error: variable

[Qemu-devel] [PATCH 17/50] target-sparc: make cpu-qom.h not target specific

2016-05-16 Thread Paolo Bonzini
Make SPARCCPU an opaque type within cpu-qom.h, and move all definitions of private methods, as well as all type definitions that require knowledge of the layout to cpu.h. This helps making files independent of NEED_CPU_H if they only need to pass around CPU pointers. Signed-off-by: Paolo Bonzini

Re: [Qemu-devel] [PATCH 00/52] 680x0 instructions emulation

2016-05-16 Thread Laurent Vivier
Le 12/05/2016 à 23:17, John Paul Adrian Glaubitz a écrit : > Hi! > > Now that qemu 2.6.0 has been released, what about making Laurent the > maintainer for the orphaned M68K target so that the 680x0 emulation > support can be merged? > > What do the qemu maintainers think? Is there anything

[Qemu-devel] [PATCH 22/50] m68k: include cpu-qom.h in files that require M68KCPU

2016-05-16 Thread Paolo Bonzini
This will keep things working when cpu.h will not be included indirectly almost everywhere (either directly or through qemu-common.h). Signed-off-by: Paolo Bonzini --- include/hw/m68k/mcf.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/hw/m68k/mcf.h

[Qemu-devel] [PATCH 31/50] apic: move target-dependent definitions to cpu.h

2016-05-16 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- hw/intc/ioapic.c | 1 + include/hw/i386/apic.h | 5 - target-i386/cpu.h | 7 +++ 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/hw/intc/ioapic.c b/hw/intc/ioapic.c index 378e663..4f42b91 100644 ---

[Qemu-devel] [PATCH 39/50] gdbstub: remove unnecessary includes from gdbstub-xml.c

2016-05-16 Thread Paolo Bonzini
gdbstub-xml.c defines a bunch of arrays of strings; there is no need to include anything. Keep osdep.h for consistency, but remove the rest. Signed-off-by: Paolo Bonzini --- scripts/feature_to_c.sh | 2 -- 1 file changed, 2 deletions(-) diff --git

[Qemu-devel] [PATCH 27/50] arm: remove useless cpu.h inclusion

2016-05-16 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- include/hw/arm/digic.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/hw/arm/digic.h b/include/hw/arm/digic.h index a739d6a..aaefe0b 100644 --- a/include/hw/arm/digic.h +++ b/include/hw/arm/digic.h @@ -18,8 +18,6 @@ #ifndef

[Qemu-devel] [PATCH 50/50] hw: clean up hw/hw.h includes

2016-05-16 Thread Paolo Bonzini
Include qom/object.h and exec/memory.h instead of exec/ioport.h; exec/ioport.h was almost everywhere required only for those two includes, not for the content of the header itself. Remove block/aio.h, everybody is already including it through another path. With this change, include/hw/hw.h is

[Qemu-devel] [PATCH 2/5] user-exec: Push resume-from-signal code out to handle_cpu_signal()

2016-05-16 Thread Peter Maydell
Since the only caller of page_unprotect() which might cause it to need to call cpu_resume_from_signal() is handle_cpu_signal() in the user-mode code, push the longjump handling out to that function. Since this is the only caller of cpu_resume_from_signal() which passes a non-NULL puc argument,

Re: [Qemu-devel] [PATCH 01/10] block/io: add bdrv_co_write_compressed

2016-05-16 Thread Eric Blake
On 05/14/2016 06:45 AM, Denis V. Lunev wrote: > From: Pavel Butsykin > > This patch just adds the interface to the bdrv_co_write_compressed, which > is currently not used but will be useful for safe implementation of the > bdrv_co_write_compressed callback in format

Re: [Qemu-devel] [PATCH 1/5] translate-all.c: Don't pass puc, locked to tb_invalidate_phys_page()

2016-05-16 Thread Peter Maydell
On 16 May 2016 at 18:13, Sergey Fedorov wrote: > On 16/05/16 19:09, Peter Maydell wrote: >> @@ -1996,7 +1997,10 @@ int page_unprotect(target_ulong address, uintptr_t >> pc, void *puc) >> >> /* and since the content will be modified, we must invalidate >>

[Qemu-devel] [PATCH 38/50] qemu-common: stop including qemu/host-utils.h from qemu-common.h

2016-05-16 Thread Paolo Bonzini
Move it to the actual users. There are some inclusions of qemu/host-utils.h in headers, but they are all necessary. Signed-off-by: Paolo Bonzini --- audio/noaudio.c | 1 + audio/spiceaudio.c | 1 + audio/wavaudio.c

[Qemu-devel] [PATCH 5/5] target-i386: Move user-mode exception actions out of user-exec.c

2016-05-16 Thread Peter Maydell
The exception_action() function in user-exec.c is just a call to cpu_loop_exit() for every target CPU except i386. Since this function is only called if the target's handle_mmu_fault() hook has indicated an MMU fault, and that hook is only called from the handle_cpu_signal() code path, we can

[Qemu-devel] [PATCH 0/5] user-exec: cpu_resume_from_signal() cleanups

2016-05-16 Thread Peter Maydell
I was trying to reason about user-mode's handling of signal masks, and I found our current code a bit confusing, so I cleaned it up. At the moment for user-only mode cpu_resume_from_signal() takes a usercontext pointer; if this is non-NULL then it has some awkward OS and CPU specific code to set

[Qemu-devel] [PATCH 48/50] cpu: move exec-all.h inclusion out of cpu.h

2016-05-16 Thread Paolo Bonzini
exec-all.h contains TCG-specific definitions. It is not needed outside TCG-specific files such as translate.c, exec.c or *helper.c. One generic function had snuck into include/exec/exec-all.h; move it to include/qom/cpu.h. Signed-off-by: Paolo Bonzini --- bsd-user/main.c

[Qemu-devel] [PATCH 35/50] hw: cannot include hw/hw.h from user emulation

2016-05-16 Thread Paolo Bonzini
All qdev definitions are available from other headers, user-mode emulation does not need hw/hw.h. By considering system emulation only, it is simpler to disentangle hw/hw.h from NEED_CPU_H. Signed-off-by: Paolo Bonzini --- exec.c | 21

Re: [Qemu-devel] [PATCH 4/6] qcow2: add tracepoints for qcow2_co_write_zeroes

2016-05-16 Thread Denis V. Lunev
On 05/16/2016 07:32 PM, Eric Blake wrote: On 05/14/2016 06:01 AM, Denis V. Lunev wrote: Signed-off-by: Denis V. Lunev CC: Kevin Wolf --- block/qcow2.c | 5 + trace-events | 2 ++ 2 files changed, 7 insertions(+) diff --git a/block/qcow2.c

Re: [Qemu-devel] [PATCH CFT v3 00/50] NEED_CPU_H / cpu.h / hw/hw.h cleanups

2016-05-16 Thread Peter Maydell
On 16 May 2016 at 16:35, Paolo Bonzini wrote: > This series removes usage of NEED_CPU_H from several central > include files in QEMU, most notably hw/hw.h and qemu-common.h. > Definitions conditional on NEED_CPU_H remain only in disas/disas.h, > exec/gdbstub.h,

[Qemu-devel] [PATCH 43/50] qemu-common: push cpu.h inclusion out of qemu-common.h

2016-05-16 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- arch_init.c | 2 ++ cpus.c | 3 ++- exec.c | 2 +- gdbstub.c| 2 +- hw/arm/nseries.c

Re: [Qemu-devel] [PATCH v2] pci: fix pci_requester_id()

2016-05-16 Thread Alex Williamson
On Mon, 16 May 2016 17:58:18 +0800 Peter Xu wrote: > On Mon, May 16, 2016 at 12:21:54PM +0300, Michael S. Tsirkin wrote: > [...] > > > "Legacy PCI bus, override requester ID with the bridge's BDF > > > upstream. The root complex of legacy PCI system can only get > > >

[Qemu-devel] [PATCH 47/50] exec: extract exec/tb-context.h

2016-05-16 Thread Paolo Bonzini
TCG backends do not need most of exec-all.h; extract what they actually need to a separate file or move it directly to tcg.h. The next patch will stop including exec-all.h from everywhere. Signed-off-by: Paolo Bonzini --- include/exec/exec-all.h | 47

[Qemu-devel] [PATCH 32/50] include: poison symbols in osdep.h

2016-05-16 Thread Paolo Bonzini
Ensure that all target-independent files ignore poisoned symbols, and fix the fallout. Signed-off-by: Paolo Bonzini --- hw/core/Makefile.objs | 2 +- include/exec/cpu-common.h | 4 include/exec/helper-head.h | 23 +-- include/qemu/osdep.h

Re: [Qemu-devel] [PATCH v2] vl.c: Add '-L help' which lists data dirs.

2016-05-16 Thread Eric Blake
On 05/16/2016 07:37 AM, Richard W.M. Jones wrote: > QEMU compiles a list of data directories from various sources. When > consuming a QEMU binary it's useful to be able to get this list of > data directories: a primary reason is so you can list what BIOSes or > keymaps ship with this version of

[Qemu-devel] [PATCH v2 3/3] qemu-iotests: Fix regression in 136 on aio_read invalid

2016-05-16 Thread Eric Blake
Commit 093ea232 removed the ability for aio_read and aio_write to artificially inflate the invalid statistics counters for block devices, since it no longer flags unaligned offset or length. Add 'aio_read -i' and 'aio_write -i' to restore the ability, and update test 136 to use it. Reported-by:

[Qemu-devel] [PATCH v2 1/3] qemu-io: Fix recent UI updates

2016-05-16 Thread Eric Blake
Commit 770e0e0e [*] tried to add 'writev -f', but didn't tweak the getopt() call to actually let it work. Likewise, commit c2e001c missed implementing 'aio_write -u -z'. The latter commit also introduced a leak of ctx. [*] does it sound "ech0e" in here? :) Signed-off-by: Eric Blake

[Qemu-devel] [PATCH v2 2/3] qemu-iotests: Simplify 109 with unaligned qemu-img compare

2016-05-16 Thread Eric Blake
For some time now, qemu-img compare has been able to compare unaligned images. So we no longer need test 109's hack of resizing to sector boundaries before invoking compare. Signed-off-by: Eric Blake Reviewed-by: Max Reitz --- Note that qemu-img compare

Re: [Qemu-devel] [PATCH 06/10] drive-backup: added support for data compression

2016-05-16 Thread Eric Blake
On 05/14/2016 06:45 AM, Denis V. Lunev wrote: > From: Pavel Butsykin > > The idea is simple - backup is "written-once" data. It is written block > by block and it is large enough. It would be nice to save storage > space and compress it. > > The patch adds a flag to the

Re: [Qemu-devel] [PATCH 1/5] translate-all.c: Don't pass puc, locked to tb_invalidate_phys_page()

2016-05-16 Thread Sergey Fedorov
On 16/05/16 19:09, Peter Maydell wrote: > The user-mode-only function tb_invalidate_phys_page() is only > called from two places: > * page_unprotect(), which passes in a non-zero pc, a puc pointer >and the value 'true' for the locked argument > * page_set_flags(), which passes in a zero pc,

[Qemu-devel] [PATCH 33/50] hw: do not use VMSTATE_*TL

2016-05-16 Thread Paolo Bonzini
Reserve this to CPU state serialization. Luckily, they were only used by sPAPR devices and these are ppc64 only. So there is no change to migration format. Signed-off-by: Paolo Bonzini --- hw/net/spapr_llan.c| 8 hw/ppc/spapr_vio.c | 2 +-

[Qemu-devel] [PATCH 36/50] cpu: move endian-dependent load/store functions to cpu-all.h

2016-05-16 Thread Paolo Bonzini
Disentangle cpu-common.h and memory.h from NEED_CPU_H. Prototypes are not defined for !NEED_CPU_H, so remove them from poison.h too. Only macros need poisoning. Signed-off-by: Paolo Bonzini --- include/exec/cpu-all.h| 25 +

[Qemu-devel] [PATCH 23/50] sh4: include cpu-qom.h in files that require SuperHCPU

2016-05-16 Thread Paolo Bonzini
This will keep things working when cpu.h will not be included indirectly almost everywhere (either directly or through qemu-common.h). Signed-off-by: Paolo Bonzini --- include/hw/sh4/sh.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/hw/sh4/sh.h

[Qemu-devel] [PATCH 40/50] dma: do not depend on kvm_enabled()

2016-05-16 Thread Paolo Bonzini
Memory barriers are needed also by Xen and, when the ioeventfd bugs are fixed, by TCG as well. sysemu/kvm.h is not anymore needed in sysemu/dma.h, move it to the actual users. Signed-off-by: Paolo Bonzini --- hw/intc/arm_gicv2m.c | 1 + hw/misc/pci-testdev.c | 1 +

[Qemu-devel] [PATCH 21/50] arm: include cpu-qom.h in files that require ARMCPU

2016-05-16 Thread Paolo Bonzini
This will keep things working when cpu.h will not be included indirectly almost everywhere (either directly or through qemu-common.h). Signed-off-by: Paolo Bonzini --- hw/arm/stm32f205_soc.c | 1 - hw/arm/strongarm.h | 1 + include/hw/arm/arm.h| 2 +-

Re: [Qemu-devel] [PATCH 2/6] block: split write_zeroes always

2016-05-16 Thread Eric Blake
On 05/14/2016 06:01 AM, Denis V. Lunev wrote: > We should split requests even if they are less than write_zeroes_alignment. > For example we can have the following request: > offset 62k > size 4k > write_zeroes_alignment 64k > Original code will send 1 request covering 2 qcow2 clusters.

[Qemu-devel] [PATCH 4/5] user-exec: Don't reextract sigmask from usercontext pointer

2016-05-16 Thread Peter Maydell
Extracting the old signal mask from the usercontext pointer passed to a signal handler is a pain because it is OS and CPU dependent. Since we've already done it once and passed it to handle_cpu_signal(), there's no need to do it again in cpu_exit_tb_from_sighandler(). This then means we don't need

Re: [Qemu-devel] [PATCH 05/10] block: remove BlockDriver.bdrv_write_compressed

2016-05-16 Thread Eric Blake
On 05/14/2016 06:45 AM, Denis V. Lunev wrote: > From: Pavel Butsykin > > There are no block drivers left that implement the old > .bdrv_write_compressed interface, so it can be removed now. > > Signed-off-by: Pavel Butsykin > Signed-off-by:

Re: [Qemu-devel] [PATCH v2] pci: fix pci_requester_id()

2016-05-16 Thread Michael S. Tsirkin
On Mon, May 16, 2016 at 09:44:28AM -0600, Alex Williamson wrote: > On Mon, 16 May 2016 17:58:18 +0800 > Peter Xu wrote: > > > On Mon, May 16, 2016 at 12:21:54PM +0300, Michael S. Tsirkin wrote: > > [...] > > > > "Legacy PCI bus, override requester ID with the bridge's BDF > >

Re: [Qemu-devel] [PATCH 1/5] translate-all.c: Don't pass puc, locked to tb_invalidate_phys_page()

2016-05-16 Thread Sergey Fedorov
On 16/05/16 20:15, Peter Maydell wrote: > On 16 May 2016 at 18:13, Sergey Fedorov wrote: >> On 16/05/16 19:09, Peter Maydell wrote: >>> @@ -1996,7 +1997,10 @@ int page_unprotect(target_ulong address, uintptr_t >>> pc, void *puc) >>> >>> /* and since the content

[Qemu-devel] [PATCH v2] vl.c: Add '-L help' which lists data dirs.

2016-05-16 Thread Richard W.M. Jones
v1 -> v2: Avoid mentioning -L ? in the manual, commit messages etc. Because I'm using the is_help_option function, -L ? is still accepted. Rich.

Re: [Qemu-devel] [PATCH 1/6] qemu-io: enable tracing in qemu-io

2016-05-16 Thread Denis V. Lunev
On 05/16/2016 04:09 PM, Paolo Bonzini wrote: On 14/05/2016 14:01, Denis V. Lunev wrote: It would be convinient to enable tracepoints in qemu-io binary. This would allow to perform investigations without additional code recompilations. The command line will be exactly the same as in

Re: [Qemu-devel] [PATCH V2 2/4] pci: reserve 64 bit MMIO range for PCI hotplug

2016-05-16 Thread Igor Mammedov
On Mon, 16 May 2016 13:14:51 +0300 Marcel Apfelbaum wrote: > On 05/16/2016 11:24 AM, Igor Mammedov wrote: > > On Sun, 15 May 2016 22:23:32 +0300 > > Marcel Apfelbaum wrote: > > > >> Using the firmware assigned MMIO ranges for 64-bit PCI window > >> leads

[Qemu-devel] [PATCH v6 3/9] softfloat: For Mips only, correct default NaN values

2016-05-16 Thread Aleksandar Markovic
From: Aleksandar Markovic Only for Mips platform, and only for cases when snan_bit_is_one is 0, correct default NaN values (in their 16-, 32-, and 64-bit flavors). For more info, see [1], page 84, Table 6.3 "Value Supplied When a New Quiet NaN Is Created", and

[Qemu-devel] [PATCH 07/50] target-cris: make cpu-qom.h not target specific

2016-05-16 Thread Paolo Bonzini
Make CRISCPU an opaque type within cpu-qom.h, and move all definitions of private methods, as well as all type definitions that require knowledge of the layout to cpu.h. This helps making files independent of NEED_CPU_H if they only need to pass around CPU pointers. Signed-off-by: Paolo Bonzini

[Qemu-devel] [PATCH 25/50] mips: use MIPSCPU instead of CPUMIPSState

2016-05-16 Thread Paolo Bonzini
This changes a cpu.h dependency into a cpu-qom.h dependency. Signed-off-by: Paolo Bonzini --- hw/mips/cps.c | 7 --- hw/mips/cputimer.c| 4 +++- hw/mips/mips_fulong2e.c | 4 ++-- hw/mips/mips_int.c| 3 ++- hw/mips/mips_jazz.c | 4 ++--

[Qemu-devel] [PATCH v6 2/9] softfloat: Clean code format in fpu/softfloat-specialize.h

2016-05-16 Thread Aleksandar Markovic
From: Aleksandar Markovic fpu/softfloat-specialize.h is the most critical file in SoftFloat library, since it handles numerous differences between platforms in relation to floating point arithmetics. This patch makes the code in this file more consistent

[Qemu-devel] [PATCH 30/50] explicitly include linux/kvm.h

2016-05-16 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- hw/i386/kvm/i8254.c | 1 + hw/i386/kvm/pci-assign.c | 1 + hw/vfio/common.c | 3 +++ 3 files changed, 5 insertions(+) diff --git a/hw/i386/kvm/i8254.c b/hw/i386/kvm/i8254.c index a4462e5..734992e 100644 --- a/hw/i386/kvm/i8254.c

[Qemu-devel] [PATCH 05/50] target-alpha: make cpu-qom.h not target specific

2016-05-16 Thread Paolo Bonzini
Make AlphaCPU an opaque type within cpu-qom.h, and move all definitions of private methods, as well as all type definitions that require knowledge of the layout to cpu.h. This helps making files independent of NEED_CPU_H if they only need to pass around CPU pointers. Signed-off-by: Paolo Bonzini

[Qemu-devel] [PATCH 11/50] target-microblaze: make cpu-qom.h not target specific

2016-05-16 Thread Paolo Bonzini
Make MicroBlazeCPU an opaque type within cpu-qom.h, and move all definitions of private methods, as well as all type definitions that require knowledge of the layout to cpu.h. This helps making files independent of NEED_CPU_H if they only need to pass around CPU pointers. Signed-off-by: Paolo

Re: [Qemu-devel] [PATCH] vl.c: Add -L ? (or -L help) which lists data dirs.

2016-05-16 Thread Peter Maydell
On 16 May 2016 at 14:11, Richard W.M. Jones wrote: > QEMU compiles a list of data directories from various sources. When > consuming a QEMU binary it's useful to be able to get this list of > data directories: a primary reason is so you can list what BIOSes or > keymaps ship

[Qemu-devel] [PATCH v6 5/9] linux-user: Update preprocessor constants for Mips-specific e_flags bits

2016-05-16 Thread Aleksandar Markovic
From: Aleksandar Markovic Missing values EF_MIPS_FP64 and EF_MIPS_NAN2008 added, and the format of the surrounding code segment adjusted. Signed-off-by: Thomas Schwinge Signed-off-by: Maciej W. Rozycki

Re: [Qemu-devel] [PATCH 0/6] Use _fatal in some initialization code

2016-05-16 Thread Paolo Bonzini
On 12/05/2016 19:04, Eduardo Habkost wrote: >>> This changes some initialization code in vl.c, qemu-img, qemu-io, >>> > > and qemu-nbd to use _fatal instead of manual error >>> > > checking/reporting. >>> > > >>> > > The series is based on my machine branch, available at: >>> > >

[Qemu-devel] [PATCH v6 1/9] softfloat: Implement run-time-configurable meaning of signaling NaN bit

2016-05-16 Thread Aleksandar Markovic
From: Aleksandar Markovic This patch modifies SoftFloat library so that it can be configured in run-time in relation to the meaning of signaling NaN bit, while, at the same time, strictly preserving its behavior on all existing platforms. Background: In

Re: [Qemu-devel] [PATCH] target-i386: key sfence availability on CPUID_SSE, not CPUID_SSE2

2016-05-16 Thread Richard Henderson
On 05/16/2016 02:12 AM, Paolo Bonzini wrote: sfence was introduced before lfence and mfence. This fixes Linux 2.4's measurement of checksumming speeds for the pIII_sse algorithm: md: linear personality registered as nr 1 md: raid0 personality registered as nr 2 md: raid1 personality registered

[Qemu-devel] [PATCH 06/50] target-arm: make cpu-qom.h not target specific

2016-05-16 Thread Paolo Bonzini
Make ARMCPU an opaque type within cpu-qom.h, and move all definitions of private methods, as well as all type definitions that require knowledge of the layout to cpu.h. This helps making files independent of NEED_CPU_H if they only need to pass around CPU pointers. Reviewed-by: Alex Bennée

[Qemu-devel] [PATCH 26/50] ppc: use PowerPCCPU instead of CPUPPCState

2016-05-16 Thread Paolo Bonzini
This changes a cpu.h dependency for hw/ppc/ppc.h into a cpu-qom.h dependency. For it to compile we also need to clean up a few unused definitions. Signed-off-by: Paolo Bonzini --- hw/ppc/ppc.c| 20 +- include/hw/ppc/ppc.h| 24 +++-

Re: [Qemu-devel] [PATCH] cpu-exec: Fix direct jump to TB spanning page

2016-05-16 Thread Richard Henderson
On 05/16/2016 06:13 AM, Sergey Fedorov wrote: > It is not safe to make a direct jump to a TB spanning two pages in > system emulation because the mapping for the second page can get changed > but we don't take care of direct jumps in this case. We don't? I'm pretty sure that we do... r~

Re: [Qemu-devel] "tcg: Clean up direct block chaining safety checks" breaks target-xtensa mmu test

2016-05-16 Thread Sergey Fedorov
On 15/05/16 23:54, Sergey Fedorov wrote: > On 15/05/16 22:56, Sergey Fedorov wrote: >> On 15/05/16 22:53, Max Filippov wrote: >>> On Sun, May 15, 2016 at 10:38:46PM +0300, Sergey Fedorov wrote: On 15/05/16 21:58, Max Filippov wrote: > I've noticed that the commit 5b053a4a28278 (tcg: Clean

[Qemu-devel] [PATCH 15/50] target-s390x: make cpu-qom.h not target specific

2016-05-16 Thread Paolo Bonzini
Make S390XCPU an opaque type within cpu-qom.h, and move all definitions of private methods, as well as all type definitions that require knowledge of the layout to cpu.h. This helps making files independent of NEED_CPU_H if they only need to pass around CPU pointers. Signed-off-by: Paolo Bonzini

[Qemu-devel] [PATCH 10/50] target-m68k: make cpu-qom.h not target specific

2016-05-16 Thread Paolo Bonzini
Make M68KCPU an opaque type within cpu-qom.h, and move all definitions of private methods, as well as all type definitions that require knowledge of the layout to cpu.h. This helps making files independent of NEED_CPU_H if they only need to pass around CPU pointers. Signed-off-by: Paolo Bonzini

[Qemu-devel] Question about vNVDIMM file format

2016-05-16 Thread Richard W.M. Jones
I'm playing with ext4 and DAX. I'm using: -object memory-backend-file,id=mem1,share,mem-path=/var/tmp/pmem,size=4G \ -device nvdimm,memdev=mem1,id=nv1 where /var/tmp/pmem is a 4 GB ext4 filesystem image (no partition table). I can mount this in the guest using: mount -o dax /dev/pmem0

[Qemu-devel] [PATCH 09/50] target-lm32: make cpu-qom.h not target specific

2016-05-16 Thread Paolo Bonzini
Make LM32CPU an opaque type within cpu-qom.h, and move all definitions of private methods, as well as all type definitions that require knowledge of the layout to cpu.h. This helps making files independent of NEED_CPU_H if they only need to pass around CPU pointers. Signed-off-by: Paolo Bonzini

[Qemu-devel] [PATCH v6 0/9] IEEE 754-2008 support for Mips

2016-05-16 Thread Aleksandar Markovic
From: Aleksandar Markovic v6 - code for hanlding MSA FCLASS instructions slightly simplified. - handling of .. corrected for nan2008 case. - R/W bitmask for FCR31 introduced, and related functionalities

[Qemu-devel] [PATCH v6 6/9] target-mips: Activate IEEE 754-2008 signaling NaN bit meaning

2016-05-16 Thread Aleksandar Markovic
From: Aleksandar Markovic Functions mips_cpu_reset() and msa_reset() are updated so that flag snan_bit_is_one is properly set for any Mips FPU/MSA configuration. For main FPUs, CPUs with FCR31's FCR31_NAN2008 bit set will invoke set_snan_bit_is_one(0). For MSA, as

[Qemu-devel] [PATCH v6 4/9] softfloat: For Mips only, correct order in pickNaNMulAdd()

2016-05-16 Thread Aleksandar Markovic
From: Aleksandar Markovic Only for Mips platform, and only for cases when snan_bit_is_one is 0, correct the order of argument comparisons in pickNaNMulAdd(). For more info, see [1], page 53, section "3.5.3 NaN Propagation". [1] "MIPS Architecture for Programmers

[Qemu-devel] [PATCH 03/50] log: do not use CONFIG_USER_ONLY

2016-05-16 Thread Paolo Bonzini
This decouples logging further from config-target.h Reviewed-by: Alex Bennée Signed-off-by: Paolo Bonzini --- bsd-user/main.c| 1 + include/qemu/log.h | 17 ++--- linux-user/main.c | 1 + util/log.c | 12 ++-- 4

  1   2   3   >