Re: [Qemu-devel] [PATCH v2] linux-user: Simplify timerid checks on g_posix_timers range

2014-08-22 Thread Laurent Vivier
> Le 22 août 2014 à 14:29, Alexander Graf a écrit : > > > > > On 22.08.14 14:25, Peter Maydell wrote: > > On 22 August 2014 13:12, Alexander Graf wrote: > >> In Linux, the timer id is a "key" into a hash table that the kernel > >> searches to find its timer. In QEMU it's an offset into an array.

Re: [Qemu-devel] [PATCH v2] linux-user: Simplify timerid checks on g_posix_timers range

2014-08-22 Thread Peter Maydell
On 22 August 2014 14:00, Laurent Vivier wrote: >> Le 22 août 2014 à 14:29, Alexander Graf a écrit : >> On 22.08.14 14:25, Peter Maydell wrote: >> > It's a number between 0 and 32. That doesn't imply that it has >> > to be an unsigned variable, and we already have it in a >> > signed variable arg1

Re: [Qemu-devel] [PATCH v12 0/6] qcow2, raw: add preallocation=full and preallocation=falloc

2014-08-22 Thread Kevin Wolf
Am 22.08.2014 um 14:25 hat Richard W.M. Jones geschrieben: > > On Mon, Jul 28, 2014 at 04:48:46PM +0800, Hu Tao wrote: > > ping... > > > > All the 6 patches have reviewed-by now. > > > > On Fri, Jul 11, 2014 at 02:09:57PM +0800, Hu Tao wrote: > > > This series adds two preallocation mode to qcow

Re: [Qemu-devel] [PATCH v3] trace: [qmp] Add QAPI/QMP commands to query and control event tracing state

2014-08-22 Thread Stefan Hajnoczi
On Thu, Aug 21, 2014 at 07:52:37PM +0200, Lluís Vilanova wrote: > Also removes old "trace-event", "trace-file" and "info trace-events" HMP > commands. Is this commit description correct? I think we don't want to remove HMP commands. It is "legacy" but users may still rely on HMP. It's certainly

Re: [Qemu-devel] adding a parameter in qemu tap option

2014-08-22 Thread Stefan Hajnoczi
On Fri, Aug 22, 2014 at 10:27:35AM +0200, William Dauchy wrote: > Hi, > > I'm trying to understand how to add a parameter in tap option. > > I currently have a working config for a vm; i.e several interfaces using > multiqueues. > I had a try with: > > --- a/qapi-schema.json > +++ b/qapi-schema.

[Qemu-devel] [PULL v3 00/22] Linux-user updates

2014-08-22 Thread riku . voipio
From: Riku Voipio A usual set of improvements and bugfixes. New patches coming in and I didn't have time to fix and test properly _handle_at calls so dropping them too from the round. v1 -> v2: dropped "make binfmt flag O require P" has been dropped. v2 -> v3: dropped "support {name_to,open_by}_

[Qemu-devel] [PULL v3 03/22] linux-user: Fix syscall instruction usermode emulation on X86_64

2014-08-22 Thread riku . voipio
From: Jincheng Miao Currently syscall instruction is buggy on user mode X86_64, the EIP is updated after do_syscall(), that is too late for clone(). Because clone() will create a thread at the env->EIP (the address of syscall insn), and then child thread enters do_syscall() again, that is not exp

[Qemu-devel] [PULL v3 07/22] linux-user: support ioprio_{get, set} syscalls

2014-08-22 Thread riku . voipio
From: Paul Burton Add support for the ioprio_get & ioprio_set syscalls, allowing their use by target programs. Signed-off-by: Paul Burton Signed-off-by: Riku Voipio --- linux-user/syscall.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/linux-user/syscall.c b/linux-us

[Qemu-devel] [PULL v3 01/22] linux-user: /proc/self/maps content

2014-08-22 Thread riku . voipio
From: Mikhail Ilyin Build /proc/self/maps doing a match against guest memory translation table. Output only that map records which are valid for guest memory layout. Signed-off-by: Mikhail Ilyin Signed-off-by: Riku Voipio --- include/exec/cpu-all.h | 2 ++ linux-user/syscall.c | 25 +++

[Qemu-devel] [PULL v3 05/22] linux-user: fix readlink handling with magic exe symlink

2014-08-22 Thread riku . voipio
From: Mike Frysinger The current code always returns the length of the path when it should be returning the number of bytes it wrote to the output string. Further, readlink is not supposed to append a NUL byte, but the current snprintf logic will always do just that. Even further, if you pass i

[Qemu-devel] [PULL v3 08/22] linux-user: add setns and unshare

2014-08-22 Thread riku . voipio
From: Riku Voipio Add support for the setns and unshare syscalls, trivially passed through to the host. Based on patches by Paul Burton, added configure check. Signed-off-by: Paul Burton Signed-off-by: Riku Voipio --- configure | 20 linux-user/strace.list |

[Qemu-devel] [PULL v3 02/22] linux-user: redirect openat calls

2014-08-22 Thread riku . voipio
From: Riku Voipio While Mikhail fixed /proc/self/maps, it was noticed openat calls are not redirected currently. Some archs don't have open at all, so openat needs to be redirected. Fix this by consolidating open/openat code to do_openat - open is implemented using openat(AT_FDCWD, ... ), which

[Qemu-devel] [PULL v3 18/22] linux-user: Minimum Sig Handler Stack Size for PPC64 ELF V2

2014-08-22 Thread riku . voipio
From: Tom Musta The ELF V2 ABI for PPC64 defines MINSIGSTKSZ as 4096 bytes whereas it was 2048 previously. Signed-off-by: Tom Musta Signed-off-by: Riku Voipio --- linux-user/aarch64/syscall.h| 1 + linux-user/alpha/syscall.h | 1 + linux-user/arm/syscall.h| 2 ++ linux-use

[Qemu-devel] [PULL v3 06/22] linux-user: support timerfd_{create, gettime, settime} syscalls

2014-08-22 Thread riku . voipio
From: Riku Voipio Adds support for the timerfd_create, timerfd_gettime & timerfd_settime syscalls, allowing use of timerfds by target programs. v2: By Riku - added configure check for timerfd and ifdefs for benefit of old distributions like RHEL5. Signed-off-by: Paul Burton Signed-off-by: Riku

[Qemu-devel] [PULL v3 09/22] linux-user: PPC64 semid_ds Doesnt Include _unused1 and _unused2

2014-08-22 Thread riku . voipio
From: Tom Musta The 64 bit PowerPC platforms eliminate the _unused1 and _unused2 elements of the semid_ds structure from . So eliminate these from the target_semid_ds structure. Signed-off-by: Tom Musta Signed-off-by: Riku Voipio --- linux-user/syscall.c | 4 1 file changed, 4 insertion

[Qemu-devel] [PULL v3 10/22] linux-user: Dereference Pointer Argument to ipc/semctl Sys Call

2014-08-22 Thread riku . voipio
From: Tom Musta When the ipc system call is used to wrap a semctl system call, the ptr argument to ipc needs to be dereferenced prior to passing it to the semctl handler. This is because the fourth argument to semctl is a union and not a pointer to a union. Signed-off-by: Tom Musta Signed-off-

[Qemu-devel] [PULL v3 16/22] linux-user: Detect fault in sched_rr_get_interval

2014-08-22 Thread riku . voipio
From: Tom Musta Properly detect a fault when attempting to store into an invalid struct timespec pointer. Signed-off-by: Tom Musta Reviewed-by: Peter Maydell Signed-off-by: Riku Voipio --- linux-user/syscall.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux-user/sys

[Qemu-devel] [PULL v3 04/22] linux-user: Fix conversion of sigevent argument to timer_create

2014-08-22 Thread riku . voipio
From: Peter Maydell There were a number of bugs in the conversion of the sigevent argument to timer_create from target to host format: * signal number not converted from target to host * thread ID not copied across * sigev_value not copied across * we never unlocked the struct when we were do

[Qemu-devel] [PULL v3 19/22] linux-user: clock_nanosleep errno Handling on PPC

2014-08-22 Thread riku . voipio
From: Tom Musta The clock_nanosleep syscall is unusual in that it returns positive numbers in error handling situations, versus returning -1 and setting errno, or returning a negative errno value. On POWER, the kernel will set the SO bit of CR0 to indicate failure in a syscall. QEMU has generic

[Qemu-devel] [PULL v3 21/22] linux-user: writev Partial Writes

2014-08-22 Thread riku . voipio
From: Tom Musta Although not technically not required by POSIX, the writev system call will typically write out its buffers individually. That is, if the first buffer is written successfully, but the second buffer pointer is invalid, then the first chuck will be written and its size is returned.

[Qemu-devel] [PULL v3 13/22] linux-user: Conditionally Pass Attribute Pointer to mq_open()

2014-08-22 Thread riku . voipio
From: Tom Musta The mq_open system call takes an optional struct mq_attr pointer argument in the fourth position. This pointer is used when O_CREAT is specified in the flags (second) argument. It may be NULL, in which case the queue is created with implementation defined attributes. Change the

[Qemu-devel] [PULL v3 12/22] linux-user: Make ipc syscall's third argument an abi_long

2014-08-22 Thread riku . voipio
From: Tom Musta For those target ABIs that use the ipc system call (e.g. POWER), the third argument is used in the shmat path as a pointer. It therefore must be declared as an abi_long (versus int) so that the address bits are not lost in truncation. In fact, all arguments to do_ipc should be d

[Qemu-devel] [PULL v3 20/22] linux-user: Support target-to-host translation of mlockall argument

2014-08-22 Thread riku . voipio
From: Tom Musta The argument to the mlockall system call is not necessarily the same on all platforms and thus may require translation prior to passing to the host. For example, PowerPC 64 bit platforms define values for MCL_CURRENT (0x2000) and MCL_FUTURE (0x4000) which are different from Intel

[Qemu-devel] [PULL v3 15/22] linux-user: Handle NULL sched_param argument to sched_*

2014-08-22 Thread riku . voipio
From: Tom Musta The sched_getparam, sched_setparam and sched_setscheduler system calls take a pointer argument to a sched_param structure. When this pointer is null, errno should be set to EINVAL. Signed-off-by: Tom Musta Signed-off-by: Riku Voipio --- linux-user/syscall.c | 10 ++ 1

Re: [Qemu-devel] [PATCH v2] linux-user: Simplify timerid checks on g_posix_timers range

2014-08-22 Thread Peter Maydell
On 22 August 2014 14:27, Andreas Färber wrote: > Am 22.08.2014 14:09, schrieb Laurent Vivier: >> as in the kernel timer_t is an "int" (as said PMM), you should cast to >> "int" to remove garbage on 64bit hosts and check sign ... > > So maybe that's the bug Alex was trying to fix downstream with th

[Qemu-devel] [PULL v3 11/22] linux-user: Properly Handle semun Structure In Cross-Endian Situations

2014-08-22 Thread riku . voipio
From: Tom Musta The semun union used in the semctl system call contains both an int (val) and pointers. In cross-endian situations on 64 bit targets, the value passed to semctl is an 8 byte (abi_long) value and thus does not have the 4-byte val field in the correct location. In order to rectify

[Qemu-devel] [PULL v3 22/22] linux-user: check return value of malloc()

2014-08-22 Thread riku . voipio
From: zhanghailiang Signed-off-by: zhanghailiang Acked-by: Riku Voipio Signed-off-by: Riku Voipio --- linux-user/syscall.c | 4 1 file changed, 4 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index ebdc70e..7ff7c21 100644 --- a/linux-user/syscall.c +++ b/linux-u

[Qemu-devel] [PULL v3 14/22] linux-user: Detect Negative Message Sizes in msgsnd System Call

2014-08-22 Thread riku . voipio
From: Tom Musta The msgsnd system call takes an argument that describes the message size (msgsz) and is of type size_t. The system call should set errno to EINVAL in the event that a negative message size is passed. Signed-off-by: Tom Musta Reviewed-by: Peter Maydell Signed-off-by: Riku Voipi

[Qemu-devel] [PULL v3 17/22] linux-user: Move get_ppc64_abi

2014-08-22 Thread riku . voipio
From: Tom Musta The get_ppc64_abi is used to determine the ELF ABI (i.e. V1 or V2). This routine is currently implemented in the linux-user/elfload.c file but is useful in other scenarios. Move the routine to a more generally available location (linux-user/ppc/target_cpu.h). Signed-off-by: Tom

Re: [Qemu-devel] [PATCH 1/4] block: Correct bs->growable

2014-08-22 Thread Max Reitz
On 21.08.2014 10:19, Kevin Wolf wrote: Am 20.08.2014 um 21:13 hat Max Reitz geschrieben: On 20.08.2014 13:40, Kevin Wolf wrote: Am 12.07.2014 um 00:23 hat Max Reitz geschrieben: Currently, the field "growable" in a BDS is set iff the BDS is opened in protocol mode (with O_BDRV_PROTOCOL). Howev

Re: [Qemu-devel] adding a parameter in qemu tap option

2014-08-22 Thread William Dauchy
Hi Stefan, Thanks for you answer. On Aug22 14:22, Stefan Hajnoczi wrote: > I don't see any obvious reason from the small diff you have posted. Are > you sure this is the only change you've made and the environment is > unchanged? absolutely. I suspect a bug related to options coming from the co

Re: [Qemu-devel] [PATCH v12 0/6] qcow2, raw: add preallocation=full and preallocation=falloc

2014-08-22 Thread Richard W.M. Jones
On Fri, Aug 22, 2014 at 03:13:31PM +0200, Kevin Wolf wrote: > Am 22.08.2014 um 14:25 hat Richard W.M. Jones geschrieben: > > > > On Mon, Jul 28, 2014 at 04:48:46PM +0800, Hu Tao wrote: > > > ping... > > > > > > All the 6 patches have reviewed-by now. > > > > > > On Fri, Jul 11, 2014 at 02:09:57P

Re: [Qemu-devel] [PATCH v2] linux-user: Simplify timerid checks on g_posix_timers range

2014-08-22 Thread Andreas Färber
Am 22.08.2014 15:34, schrieb Peter Maydell: > On 22 August 2014 14:27, Andreas Färber wrote: >> Am 22.08.2014 14:09, schrieb Laurent Vivier: >>> as in the kernel timer_t is an "int" (as said PMM), you should cast to >>> "int" to remove garbage on 64bit hosts and check sign ... >> >> So maybe that'

Re: [Qemu-devel] [PATCH v2] linux-user: Simplify timerid checks on g_posix_timers range

2014-08-22 Thread Andreas Färber
Hi, Am 22.08.2014 14:09, schrieb Laurent Vivier: > as in the kernel timer_t is an "int" (as said PMM), you should cast to > "int" to remove garbage on 64bit hosts and check sign ... So maybe that's the bug Alex was trying to fix downstream with the use of unsigned types? If as you say the upper 3

Re: [Qemu-devel] [PATCH v2 0/7] build-sys: Fix iscsi module loading failure

2014-08-22 Thread Paolo Bonzini
Il 22/08/2014 15:35, Stefan Hajnoczi ha scritto: > The advantage is that the QEMU binary stays smaller. And (depending on > whether you consider this a feature or not) it discourages people from > building out-of-tree modules. I agree, though I'm not sure which platforms support --just-symbols.

[Qemu-devel] [PATCH] target-arm: Fix regression that disabled VFP for ARMv5 CPUs

2014-08-22 Thread Peter Maydell
Commit 2c7ffc414 added support for honouring the CPACR coprocessor access control register bits which may disable access to VFP and Neon instructions. However it failed to account for the fact that the CPACR is only present starting from the ARMv6 architecture version, so it accidentally disabled V

Re: [Qemu-devel] [V9fs-developer] QEMU dies on any attempt to load a Linux kernel module when using a 9P rootfs

2014-08-22 Thread Dominique Martinet
Hi, Christopher Covington wrote on Thu, Aug 21, 2014 at 03:50:58PM -0400: > With my 3.15.0+ kernel, qemu-system-x86_64 substituted for qemu-kvm, and the > path changed from your arguments I get: > > 9pnet_virtio: no channels available > VFS: Cannot open root device "root" or unknown-block(0,0): e

[Qemu-devel] [PATCH 1/4] target-openrisc: Add IDE support to default machine

2014-08-22 Thread Valentin Manea
Add MMIO ide device support to the default openrisc machine. Base address and IRQ line are the same as the or1ksim. Signed-off-by: Valentin Manea --- default-configs/or32-softmmu.mak | 3 +++ hw/openrisc/openrisc_sim.c | 32 2 files changed, 35 insertions

[Qemu-devel] [PATCH 4/4] target-openrisc: Add LPC32XX touchscreen device

2014-08-22 Thread Valentin Manea
The LPC32XX is a simple MMIO touch screen device with a Linux device driver. The device is suitable for small machines which require mouse input but have no suitable bus(SPI, I2C). Add the LPC32XX device to the default OpenRisc machine. Signed-off-by: Valentin Manea --- default-configs/or32-sof

Re: [Qemu-devel] [V9fs-developer] QEMU dies on any attempt to load a Linux kernel module when using a 9P rootfs

2014-08-22 Thread Dominique Martinet
Hi, Christopher Covington wrote on Fri, Aug 22, 2014 at 08:37:52AM -0400: > Thanks for the pointer to this patch. I think I started this kernel half way > through the 3.16 merge window. The last non-cherry-picked patch I have is: > > commit 6d87c225f5d82d29243dc124f1ffcbb0e14ec358 > > So I do ha

[Qemu-devel] [PATCH 2/4] target-openrisc: Add OpenCores FB device support

2014-08-22 Thread Valentin Manea
Add support for the OpenCores Framebuffer device and enable it by default in the OpenRISC machine. The OpenCores display device is a simple open source framebuffer device created http://opencores.org/project,vgafb Signed-off-by: Valentin Manea --- default-configs/or32-softmmu.mak | 1 + hw/op

[Qemu-devel] [PATCH 3/4] target-openrisc: Add OpenCores keyboard device support

2014-08-22 Thread Valentin Manea
Add support for the OpenCores keyboard device to the default OpenRisc machine. The OpenCores keyboard device is a simple open source keyboard device created by the OpenCores project(http://opencores.org/). By default it just forwards Linux like keycodes. Signed-off-by: Valentin Manea --- hw/ope

Re: [Qemu-devel] [PATCH v2] linux-user: Simplify timerid checks on g_posix_timers range

2014-08-22 Thread Peter Maydell
On 22 August 2014 14:41, Andreas Färber wrote: > You snipped the part of my message where I was clearly *not* advocating > to apply Alex' type change but suggested to annotate arg uses with the > actual type, so that intermediate casts can be inserted. If we were to > agree on some system, that co

[Qemu-devel] [Bug 1359930] Re: [ARMv5] Integrator/CP regression when reading FPSID register

2014-08-22 Thread Peter Maydell
Patch which implements my suggestion of comment #4 and seems to fix this regression: http://patchwork.ozlabs.org/patch/382215/ -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1359930 Title: [ARMv5]

Re: [Qemu-devel] [PATCH v11 03/14] qcow2: Optimize bdrv_make_empty()

2014-08-22 Thread Max Reitz
On 21.08.2014 16:31, Kevin Wolf wrote: Am 20.08.2014 um 20:17 hat Max Reitz geschrieben: bdrv_make_empty() is currently only called if the current image represents an external snapshot that has been committed to its base image; it is therefore unlikely to have internal snapshots. In this case, b

[Qemu-devel] [PATCH 0/4] target-openrisc: Some openrisc improvements

2014-08-22 Thread Valentin Manea
Hi, I would like to share this series of patches to improve the openrisc machine. Mostly my goal is to have the same features as the web based machine and be able to boot qemu with exactly the same images. Some feedback would be appreciated. Regards, Valentin

Re: [Qemu-devel] [PATCH qom v4 0/2] Arrayify QOM properties.

2014-08-22 Thread Andreas Färber
Am 20.08.2014 08:55, schrieb Peter Crosthwaite: > Resending with addition of this cover letter (for those who rely > on patches tool for series review). > > Changed since v3: > Added cover letter. > > Regards, > Peter > > > > Peter Crosthwaite (2): > qom: object_property_add: Add automatic a

Re: [Qemu-devel] [ARM - FCVT inst] : Difference in calculated value

2014-08-22 Thread Peter Maydell
On 19 August 2014 13:39, Gaurav Sharma wrote: > I am running a simple bare metal program with only the above specified > instruction > > [Instrn] > fcvt h16 s25 > > [register values] > SIMD register [25] = 0x9EA82A22AB98FBA8L > FPCR = 0x40ae2f54 [with according mask removing the UFE and other > un

Re: [Qemu-devel] [PATCH v3] trace: [qmp] Add QAPI/QMP commands to query and control event tracing state

2014-08-22 Thread Markus Armbruster
Lluís Vilanova writes: > Also removes old "trace-event", "trace-file" and "info trace-events" HMP > commands. I can't see any HMP commands removal in your patch. You > Signed-off-by: Lluís Vilanova > --- > monitor.c | 24 +++- > qapi-schema.json|3 ++ > qapi/

Re: [Qemu-devel] [PATCH v12 0/6] qcow2, raw: add preallocation=full and preallocation=falloc

2014-08-22 Thread Daniel P. Berrange
On Fri, Aug 22, 2014 at 03:13:31PM +0200, Kevin Wolf wrote: > Am 22.08.2014 um 14:25 hat Richard W.M. Jones geschrieben: > > > > On Mon, Jul 28, 2014 at 04:48:46PM +0800, Hu Tao wrote: > > > ping... > > > > > > All the 6 patches have reviewed-by now. > > > > > > On Fri, Jul 11, 2014 at 02:09:57P

[Qemu-devel] [PATCH] target-arm: Correct Cortex-A57 ISAR5 and AA64ISAR0 ID register values

2014-08-22 Thread Peter Maydell
We implement the crypto extensions but were incorrectly reporting ID register values for the Cortex-A57 which did not advertise crypto. Use the correct values as described in the TRM. With this fix Linux correctly detects presence of the crypto features and advertises them in /proc/cpuinfo. Report

[Qemu-devel] [PULL 00/29] Block patches

2014-08-22 Thread Kevin Wolf
The following changes since commit 302fa283789a2f9b1199c327047cfad2258a23a2: Revert "memory: Use canonical path component as the name" (2014-08-19 20:05:46 +0100) are available in the git repository at: git://repo.or.cz/qemu/kevin.git tags/for-upstream for you to fetch changes up to bd39e6

[Qemu-devel] [PULL 05/29] runner: Add an argument for test duration

2014-08-22 Thread Kevin Wolf
From: Maria Kustova After the specified duration the runner stops executing new tests, but it doesn't interrupt running ones. Reviewed-by: Fam Zheng Signed-off-by: Maria Kustova Reviewed-by: Stefan Hajnoczi Signed-off-by: Kevin Wolf --- tests/image-fuzzer/runner.py | 21 +---

[Qemu-devel] [PULL 10/29] iotests: Add test for qcow2's cache options

2014-08-22 Thread Kevin Wolf
From: Max Reitz Add a test which tests various combinations of qcow2's cache options (some of which are valid, some of which are not). Signed-off-by: Max Reitz Signed-off-by: Kevin Wolf --- tests/qemu-iotests/103 | 99 ++ tests/qemu-iotests/103.

[Qemu-devel] [PULL 01/29] block: Use g_new() & friends where that makes obvious sense

2014-08-22 Thread Kevin Wolf
From: Markus Armbruster g_new(T, n) is neater than g_malloc(sizeof(T) * n). It's also safer, for two reasons. One, it catches multiplication overflowing size_t. Two, it returns T * rather than void *, which lets the compiler catch more type errors. Patch created with Coccinelle, with two manua

[Qemu-devel] [PULL 12/29] qemu-iotests: Fix 028 reference output for qed

2014-08-22 Thread Kevin Wolf
We need to filter out driver-specific options in the "Formatting..." string printed by qemu when creating the backup image. Reported-by: Peter Wu Signed-off-by: Kevin Wolf Tested-by: Peter Wu --- tests/qemu-iotests/028 | 1 + tests/qemu-iotests/028.out | 3 ++- tests/qemu-iot

[Qemu-devel] [PULL 04/29] block: Drop some superfluous casts from void *

2014-08-22 Thread Kevin Wolf
From: Markus Armbruster They clutter the code. Unfortunately, I can't figure out how to make Coccinelle drop all of them, so I have to settle for common special cases: @@ type T; T *pt; void *pv; @@ - pt = (T *)pv; + pt = pv; @@ type T; @@ - (T *)

[Qemu-devel] [PULL 02/29] block: Use g_new() & friends to avoid multiplying sizes

2014-08-22 Thread Kevin Wolf
From: Markus Armbruster g_new(T, n) is safer than g_malloc(sizeof(*v) * n) for two reasons. One, it catches multiplication overflowing size_t. Two, it returns T * rather than void *, which lets the compiler catch more type errors. Perhaps a conversion to g_malloc_n() would be neater in places,

[Qemu-devel] [PULL 18/29] blkverify: Implement bdrv_refresh_filename()

2014-08-22 Thread Kevin Wolf
From: Max Reitz Signed-off-by: Max Reitz Signed-off-by: Kevin Wolf --- block/blkverify.c | 29 + 1 file changed, 29 insertions(+) diff --git a/block/blkverify.c b/block/blkverify.c index 621b785..7c78ca4 100644 --- a/block/blkverify.c +++ b/block/blkverify.c @@ -10

[Qemu-devel] [PULL 14/29] virtio-blk: allow block_resize with dataplane

2014-08-22 Thread Kevin Wolf
From: Stefan Hajnoczi Now that block_resize acquires the AioContext we can safely allow resizing the disk. Reported-by: Andrey Korolyov Signed-off-by: Stefan Hajnoczi Reviewed-by: Max Reitz Signed-off-by: Kevin Wolf --- hw/block/dataplane/virtio-blk.c | 1 + 1 file changed, 1 insertion(+)

[Qemu-devel] [PULL 09/29] qcow2: Add runtime options for cache sizes

2014-08-22 Thread Kevin Wolf
From: Max Reitz Add options for specifying the size of the metadata caches. This can either be done directly for each cache (if only one is given, the other will be derived according to a default ratio) or combined for both. Signed-off-by: Max Reitz Signed-off-by: Kevin Wolf --- block/qcow2.c

[Qemu-devel] [PULL 08/29] qcow2: Use g_try_new0() for cache array

2014-08-22 Thread Kevin Wolf
From: Max Reitz With a variable cache size, the number given to qcow2_cache_create() may be huge. Therefore, use g_try_new0(). While at it, use g_new0() instead of g_malloc0() for allocating the Qcow2Cache object. Signed-off-by: Max Reitz Signed-off-by: Kevin Wolf --- block/qcow2-cache.c | 1

[Qemu-devel] [PULL 13/29] block: acquire AioContext in qmp_block_resize()

2014-08-22 Thread Kevin Wolf
From: Stefan Hajnoczi Make block_resize safe for dataplane where another thread may be running the BlockDriverState's AioContext. Signed-off-by: Stefan Hajnoczi Reviewed-by: Max Reitz Signed-off-by: Kevin Wolf --- blockdev.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-

[Qemu-devel] [PULL 21/29] iotests: Add test for image filename construction

2014-08-22 Thread Kevin Wolf
From: Max Reitz Testing a real in-use protocol such as NBD is hard; testing blkdebug and blkverify in its stead is easier and tests basically the same functionality. Signed-off-by: Max Reitz Signed-off-by: Kevin Wolf --- tests/qemu-iotests/099 | 116 +++

[Qemu-devel] [PULL 15/29] virtio-blk: fix reference a pointer which might be freed

2014-08-22 Thread Kevin Wolf
From: zhanghailiang In function virtio_blk_handle_request, it may freed memory pointed by req, So do not access member of req after calling this function. Cc: qemu-sta...@nongnu.org Reviewed-by: Michael S. Tsirkin Reviewed-by: Stefan Hajnoczi Signed-off-by: zhanghailiang Signed-off-by: Kevin

[Qemu-devel] [PULL 07/29] qcow2: Constant cache size in bytes

2014-08-22 Thread Kevin Wolf
From: Max Reitz Specifying the metadata cache sizes in clusters results in less clusters (and much less bytes) covered for small cluster sizes and vice versa. Using a constant byte size reduces this difference, and makes it possible to manually specify the cache size in an easily comprehensible u

[Qemu-devel] [PULL 20/29] quorum: Implement bdrv_refresh_filename()

2014-08-22 Thread Kevin Wolf
From: Max Reitz Signed-off-by: Max Reitz Signed-off-by: Kevin Wolf --- block/quorum.c | 39 +++ 1 file changed, 39 insertions(+) diff --git a/block/quorum.c b/block/quorum.c index d5ee9c0..0de07bb 100644 --- a/block/quorum.c +++ b/block/quorum.c @@ -16,7 +1

[Qemu-devel] [PULL 22/29] block/vvfat.c: remove debugging code to reinit stderr if NULL

2014-08-22 Thread Kevin Wolf
From: Michael Tokarev Just log to stderr unconditionally, like other similar code does. Signed-off-by: Michael Tokarev Reviewed-by: Peter Maydell Signed-off-by: Kevin Wolf --- block/vvfat.c | 9 - 1 file changed, 9 deletions(-) diff --git a/block/vvfat.c b/block/vvfat.c index e56f76

[Qemu-devel] [PULL 03/29] qemu-io-cmds: g_renew() can't fail, bury dead error handling

2014-08-22 Thread Kevin Wolf
From: Markus Armbruster Signed-off-by: Markus Armbruster Reviewed-by: Max Reitz Reviewed-by: Jeff Cody Signed-off-by: Kevin Wolf --- qemu-io-cmds.c | 11 +-- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/qemu-io-cmds.c b/qemu-io-cmds.c index afd8867..b224ede 100644 --

[Qemu-devel] [PULL 06/29] runner: Kill a program under test by time-out

2014-08-22 Thread Kevin Wolf
From: Maria Kustova If a program under test get frozen, the test should finish and report about its failure. In such cases the runner waits for 10 minutes until the program ends its execution. After this time-out the program will be terminated and the test will be marked as failed. For current l

[Qemu-devel] [PULL 11/29] test-coroutine: test cost introduced by coroutine

2014-08-22 Thread Kevin Wolf
From: Ming Lei This test runs dummy function with coroutine by using two enter and one yield since which is a common usage. So we can see the cost introduced by corouting for running one function, for example: Run operation 2000 iterations 4.841071 s, 4131K operations/s 242n

[Qemu-devel] [PULL 17/29] blkdebug: Implement bdrv_refresh_filename()

2014-08-22 Thread Kevin Wolf
From: Max Reitz Because blkdebug cannot simply create a configuration file, simply refuse to reconstruct a plain filename and only generate an options QDict from the rules instead. Signed-off-by: Max Reitz Signed-off-by: Kevin Wolf --- block/blkdebug.c | 97 +++

[Qemu-devel] [PULL 16/29] block: Add bdrv_refresh_filename()

2014-08-22 Thread Kevin Wolf
From: Max Reitz Some block devices may not have a filename in their BDS; and for some, there may not even be a normal filename at all. To work around this, add a function which tries to construct a valid filename for the BDS.filename field. If a filename exists or a block driver is able to recon

[Qemu-devel] [PULL 23/29] block/iscsi: fix memory corruption on iscsi resize

2014-08-22 Thread Kevin Wolf
From: Peter Lieven bs->total_sectors is not yet updated at this point. resulting in memory corruption if the volume has grown and data is written to the newly availble areas. CC: qemu-sta...@nongnu.org Signed-off-by: Peter Lieven Signed-off-by: Kevin Wolf --- block/iscsi.c | 3 ++- 1 file cha

[Qemu-devel] [PULL 19/29] nbd: Implement bdrv_refresh_filename()

2014-08-22 Thread Kevin Wolf
From: Max Reitz Signed-off-by: Max Reitz Signed-off-by: Kevin Wolf --- block/nbd.c | 36 1 file changed, 36 insertions(+) diff --git a/block/nbd.c b/block/nbd.c index 4eda095..89775e1 100644 --- a/block/nbd.c +++ b/block/nbd.c @@ -31,8 +31,10 @@ #include

[Qemu-devel] [PULL 25/29] qemu-iotests: add test case 101 for short file I/O

2014-08-22 Thread Kevin Wolf
From: Stefan Hajnoczi Signed-off-by: Stefan Hajnoczi Signed-off-by: Kevin Wolf --- tests/qemu-iotests/101 | 58 ++ tests/qemu-iotests/101.out | 10 tests/qemu-iotests/group | 1 + 3 files changed, 69 insertions(+) create mode 100755

[Qemu-devel] [PULL 24/29] raw-posix: fix O_DIRECT short reads

2014-08-22 Thread Kevin Wolf
From: Stefan Hajnoczi The following O_DIRECT read from a <512 byte file fails: $ truncate -s 320 test.img $ qemu-io -n -c 'read -P 0 0 512' test.img qemu-io: can't open device test.img: Could not read image for determining its format: Invalid argument Note that qemu-io completes successf

[Qemu-devel] [PULL 28/29] qemu-img: Allow source cache mode specification

2014-08-22 Thread Kevin Wolf
From: Max Reitz Many qemu-img subcommands only read the source file(s) once. For these use cases, a full write-back cache is unnecessary and mainly clutters host cache memory. Though this is generally no concern as cache memory is freely available and can be scaled by the host OS, it may become a

[Qemu-devel] [PULL 26/29] blkdebug: Delete BH in bdrv_aio_cancel

2014-08-22 Thread Kevin Wolf
From: Fam Zheng Otherwise error_callback_bh will access the already released acb. Cc: qemu-sta...@nongnu.org Signed-off-by: Fam Zheng Signed-off-by: Kevin Wolf --- block/blkdebug.c | 4 1 file changed, 4 insertions(+) diff --git a/block/blkdebug.c b/block/blkdebug.c index 95b7244..69b33

Re: [Qemu-devel] [PATCH v11 03/14] qcow2: Optimize bdrv_make_empty()

2014-08-22 Thread Kevin Wolf
Am 22.08.2014 um 15:59 hat Max Reitz geschrieben: > On 21.08.2014 16:31, Kevin Wolf wrote: > >Am 20.08.2014 um 20:17 hat Max Reitz geschrieben: > >>+/* > >>+ * Calculates the number of clusters required for an L1 table for an image > >>with > >>+ * the given parameters plus the reftable and the re

[Qemu-devel] [PULL 27/29] vmdk: Use bdrv_nb_sectors() where sectors, not bytes are wanted

2014-08-22 Thread Kevin Wolf
From: Markus Armbruster Instead of bdrv_getlength(). Commit 57322b7 did this all over block, but one more bdrv_getlength() has crept in since. Signed-off-by: Markus Armbruster Reviewed-by: Fam Zheng Reviewed-by: Benoît Canet Signed-off-by: Kevin Wolf --- block/vmdk.c | 11 +-- 1 fi

Re: [Qemu-devel] [PULL 00/29] Block patches

2014-08-22 Thread Daniel H Barboza
Any change of getting this patch pulled in this batch? "[PATCH v3] block.curl: adding 'timeout' option" Thanks On 08/22/2014 11:51 AM, Kevin Wolf wrote: The following changes since commit 302fa283789a2f9b1199c327047cfad2258a23a2: Revert "memory: Use canonical path component as the name" (

[Qemu-devel] [PULL 29/29] qemu-img: Allow cache mode specification for amend

2014-08-22 Thread Kevin Wolf
From: Max Reitz qemu-img amend may extensively modify the target image, depending on the options to be amended (e.g. conversion to qcow2 compat level 0.10 from 1.1 for an image with many unallocated zero clusters). Therefore it makes sense to allow the user to specify the cache mode to be used.

Re: [Qemu-devel] [PULL v3 00/22] Linux-user updates

2014-08-22 Thread Peter Maydell
On 22 August 2014 14:24, wrote: > From: Riku Voipio > > A usual set of improvements and bugfixes. New patches coming in and > I didn't have time to fix and test properly _handle_at calls so dropping > them too from the round. > > v1 -> v2: dropped "make binfmt flag O require P" has been dropped.

Re: [Qemu-devel] [PATCH v12 0/6] qcow2, raw: add preallocation=full and preallocation=falloc

2014-08-22 Thread Kevin Wolf
Am 22.08.2014 um 16:20 hat Daniel P. Berrange geschrieben: > On Fri, Aug 22, 2014 at 03:13:31PM +0200, Kevin Wolf wrote: > > Am 22.08.2014 um 14:25 hat Richard W.M. Jones geschrieben: > > > > > > On Mon, Jul 28, 2014 at 04:48:46PM +0800, Hu Tao wrote: > > > > ping... > > > > > > > > All the 6 pat

Re: [Qemu-devel] [PATCH v2 2/9] qcow2: Factor out refcount accounting for check

2014-08-22 Thread Max Reitz
On 21.08.2014 23:16, Benoît Canet wrote: On Thu, Aug 21, 2014 at 01:13:20PM -0600, Eric Blake wrote: On 08/21/2014 12:57 PM, Benoît Canet wrote: On Fri, Aug 15, 2014 at 05:16:19PM +0200, Max Reitz wrote: Put the code for calculating the reference counts during qemu-img check into an own functi

Re: [Qemu-devel] [PATCH v5 15/15] target-tricore: Add instructions of SR opcode format

2014-08-22 Thread Bastian Koppelmann
On 08/21/2014 09:48 PM, Richard Henderson wrote: On 08/13/2014 05:07 AM, Bastian Koppelmann wrote: +/* SR-format */ +case OPCM_16_SR_SYSTEM: +decode_sr_system(env, ctx); + break; +case OPCM_16_SR_ACCU: +decode_sr_accu(env, ctx); + break; Formatting is of

Re: [Qemu-devel] [PATCH v12 0/6] qcow2, raw: add preallocation=full and preallocation=falloc

2014-08-22 Thread Richard W.M. Jones
On Fri, Aug 22, 2014 at 05:22:33PM +0200, Kevin Wolf wrote: > It's still useful because it happens to reduce the overhead in most > implementations and it's a relatively quick operation, but the best way > I know of to actually _fully_ preallocate is still writing zeros. Which > of the two the user

Re: [Qemu-devel] [PATCH v2 2/9] qcow2: Factor out refcount accounting for check

2014-08-22 Thread Benoît Canet
On Fri, Aug 22, 2014 at 05:26:45PM +0200, Max Reitz wrote: > On 21.08.2014 23:16, Benoît Canet wrote: > >On Thu, Aug 21, 2014 at 01:13:20PM -0600, Eric Blake wrote: > >>On 08/21/2014 12:57 PM, Benoît Canet wrote: > >>>On Fri, Aug 15, 2014 at 05:16:19PM +0200, Max Reitz wrote: > Put the code for

Re: [Qemu-devel] [PATCH v3] trace: [qmp] Add QAPI/QMP commands to query and control event tracing state

2014-08-22 Thread Eric Blake
On 08/21/2014 11:52 AM, Lluís Vilanova wrote: > Also removes old "trace-event", "trace-file" and "info trace-events" HMP > commands. > > Signed-off-by: Lluís Vilanova > --- > monitor.c | 24 +++- > qapi-schema.json|3 ++ > qapi/trace.json | 44 ++

Re: [Qemu-devel] [PATCH v12 0/6] qcow2, raw: add preallocation=full and preallocation=falloc

2014-08-22 Thread Richard W.M. Jones
On Fri, Aug 22, 2014 at 04:34:40PM +0100, Richard W.M. Jones wrote: > - really really try as hard as possible to make sure that future >allocations will never fail (ie. write random non-zero data to the >file) s/will never fail/are not needed and will never fail/ Rich. -- Richard Jones

Re: [Qemu-devel] [PATCH v2 2/9] qcow2: Factor out refcount accounting for check

2014-08-22 Thread Max Reitz
On 22.08.2014 17:37, Benoît Canet wrote: On Fri, Aug 22, 2014 at 05:26:45PM +0200, Max Reitz wrote: On 21.08.2014 23:16, Benoît Canet wrote: On Thu, Aug 21, 2014 at 01:13:20PM -0600, Eric Blake wrote: On 08/21/2014 12:57 PM, Benoît Canet wrote: On Fri, Aug 15, 2014 at 05:16:19PM +0200, Max Re

Re: [Qemu-devel] [PATCH v2 2/9] qcow2: Factor out refcount accounting for check

2014-08-22 Thread Max Reitz
On 22.08.2014 17:44, Max Reitz wrote: [snip] […] Splitting the check won't help; […] Sorry, I meant “patch” instead of “check”. Max

Re: [Qemu-devel] [PATCH v2 2/9] qcow2: Factor out refcount accounting for check

2014-08-22 Thread Eric Blake
On 08/22/2014 09:44 AM, Max Reitz wrote: > This is not a consequence of the extracted functions moving up, but > because of check_refblocks() preceding calculate_refcounts(). Splitting > the check won't help; and I know that Eric dislikes > (forward-)declarations of static functions (which I have t

[Qemu-devel] [PATCH v6 00/15] TriCore architecture guest implementation

2014-08-22 Thread Bastian Koppelmann
Hi, my aim is to add Infineon's TriCore architecture to QEMU. This series of patches adds the target stubs, a basic testboard and a softmmu for system mode emulation. Furthermore it adds all the 16 bit long instructions of the architecture grouped by opcode format. After this series of patches

[Qemu-devel] [PATCH v6 01/15] target-tricore: Add target stubs and qom-cpu

2014-08-22 Thread Bastian Koppelmann
Add TriCore target stubs, and QOM cpu, and Maintainer Signed-off-by: Bastian Koppelmann --- v5 -> v6: - Add myself to MAINTAINERS MAINTAINERS | 6 + arch_init.c | 2 + cpu-exec.c| 11 +- cpus.c| 6 + incl

[Qemu-devel] [PATCH v6 05/15] target-tricore: Add masks and opcodes for decoding

2014-08-22 Thread Bastian Koppelmann
Add masks and opcodes for decoding TriCore instructions. Signed-off-by: Bastian Koppelmann Reviewed-by: Richard Henderson --- target-tricore/translate.c |1 + target-tricore/tricore-opcodes.h | 1406 ++ 2 files changed, 1407 insertions(+) create m

[Qemu-devel] [PATCH v6 04/15] target-tricore: Add initialization for translation and activate target

2014-08-22 Thread Bastian Koppelmann
Add tcg and cpu model initialization. Add gen_intermediate_code function. Activate target in configure and add softmmu config. Signed-off-by: Bastian Koppelmann Reviewed-by: Richard Henderson --- configure | 5 ++ default-configs/tricore-softmmu.mak | 3 + target-

[Qemu-devel] [PATCH v6 03/15] target-tricore: Add softmmu support

2014-08-22 Thread Bastian Koppelmann
Add basic softmmu support for TriCore Signed-off-by: Bastian Koppelmann --- v5 -> v6: - get_physical_address: Add PAGE_EXEC permission. target-tricore/helper.c| 54 +- target-tricore/op_helper.c | 33 +++- 2 files chang

[Qemu-devel] [PATCH v6 02/15] target-tricore: Add board for systemmode

2014-08-22 Thread Bastian Koppelmann
Add basic board to allow systemmode emulation Signed-off-by: Bastian Koppelmann --- v5 -> v6: - tricore_testboard: Fix machine name containing blanks. hw/tricore/Makefile.objs | 1 + hw/tricore/tricore_testboard.c | 129 + include/hw/tricore/t

<    1   2   3   >