Re: [Qemu-devel] QEMU, self-modifying code, and Windows 7 64-bit (no KVM)

2014-08-19 Thread Paolo Bonzini
Il 18/08/2014 22:50, Hulin, Patrick - 0559 - MITLL ha scritto: Correct. Doesn¹t work. Haven¹t fully diagnosed why, but it doesn¹t seem to ever hit the current_tb_modified passage if you invalidate beforehand. Yeah - mem_io_pc doesn¹t get updated until we¹re inside io_write, so

[Qemu-devel] [PATCH V3] spapr: Fix stale HTAB during live migration

2014-08-19 Thread Samuel Mendoza-Jonas
If a guest reboots during a running migration, changes to the hash page table are not necessarily updated on the destination. Opening a new file descriptor to the HTAB forces the migration handler to resend the entire table. Signed-off-by: Samuel Mendoza-Jonas sam...@au1.ibm.com --- Changes in

Re: [Qemu-devel] [Question] Why doesn't PCIe hotplug work for Q35 machine?

2014-08-19 Thread Gonglei (Arei)
Subject: Re: [Question] Why doesn't PCIe hotplug work for Q35 machine? On Sun, 2014-08-17 at 13:00 +0200, Michael S. Tsirkin wrote: On Fri, Aug 15, 2014 at 07:33:29AM +, Gonglei (Arei) wrote: Hi, I noticed that the qemu-2.1 release change log says PCIe: Basic

Re: [Qemu-devel] [Qemu-trivial] [PATCH v7] block/vvfat: assert return value of fopen which may fail

2014-08-19 Thread zhanghailiang
On 2014/8/18 19:42, Michael Tokarev wrote: 18.08.2014 12:06, Peter Maydell wrote: On 18 August 2014 09:00, zhanghailiangzhang.zhanghaili...@huawei.com wrote: From: Li Liujohn.li...@huawei.com fopen() may return NULL which will cause setbuf() segmentfault Signed-off-by:

Re: [Qemu-devel] [PATCH] net: Forbid dealing with packets when VM is not running

2014-08-19 Thread zhanghailiang
On 2014/8/18 20:27, Dr. David Alan Gilbert wrote: * zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: For all NICs(except virtio-net) emulated by qemu, Such as e1000, rtl8139, pcnet and ne2k_pci, Qemu can still receive packets when VM is not running. If this happened in *migration's* last

Re: [Qemu-devel] [PATCH v5 10/10] hw/arm/dyn_sysbus_devtree: enable simple VFIO dynamic instantiation

2014-08-19 Thread Eric Auger
On 08/18/2014 11:54 PM, Joel Schopp wrote: +static void vfio_fdt_add_device_node(SysBusDevice *sbdev, void *opaque) +{ +PlatformDevtreeData *data = opaque; +void *fdt = data-fdt; +const char *parent_node = data-node; +int compat_str_len; +char *nodename; +int i,

Re: [Qemu-devel] [PATCH v2 4/4] block: Drop some superfluous casts from void *

2014-08-19 Thread Markus Armbruster
Max Reitz mre...@redhat.com writes: On 18.08.2014 18:10, Markus Armbruster wrote: 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; @@

Re: [Qemu-devel] [PATCH v2 4/4] block: Drop some superfluous casts from void *

2014-08-19 Thread Markus Armbruster
Jeff Cody jc...@redhat.com writes: On Mon, Aug 18, 2014 at 06:10:43PM +0200, Markus Armbruster wrote: 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

Re: [Qemu-devel] [PATCH 1/3] docs: List all image elements currently supported by the fuzzer

2014-08-19 Thread Fam Zheng
On Mon, 08/11 15:55, Maria Kustova wrote: Signed-off-by: Maria Kustova mari...@catit.be --- docs/image-fuzzer.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/image-fuzzer.txt b/docs/image-fuzzer.txt index 0d0005d..f707269 100644 --- a/docs/image-fuzzer.txt

Re: [Qemu-devel] [Qemu-trivial] [PATCH v6 03/10] virtio-blk: fix reference a pointer which might be freed

2014-08-19 Thread Michael Tokarev
19.08.2014 00:17, Michael S. Tsirkin wrote: [] By the way, could you please add Cc qemu-stable on bugfixes you have queued? These are likely appopriate for 2.1.1. Actually I've added Cc: qemu-stable@ in the commit message. So it will go to stable (or should) once I'll send a pull request.

[Qemu-devel] [PATCH] pcihp: fix possible array out of bounds

2014-08-19 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com When 'bsel == ACPI_PCIHP_MAX_HOTPLUG_BUS', the s-acpi_pcihp_pci_status[bsel] array will out of bounds. Add check for this. Signed-off-by: Gonglei arei.gong...@huawei.com --- hw/acpi/pcihp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [Qemu-devel] [PATCH] configure: no need to mkdir QMP

2014-08-19 Thread Michael Tokarev
Applied to -trivial, thank you! /mjt

Re: [Qemu-devel] [PATCH v5 10/10] hw/arm/dyn_sysbus_devtree: enable simple VFIO dynamic instantiation

2014-08-19 Thread Eric Auger
On 08/19/2014 12:11 AM, Peter Maydell wrote: On 18 August 2014 22:54, Joel Schopp joel.sch...@amd.com wrote: +static void vfio_fdt_add_device_node(SysBusDevice *sbdev, void *opaque) +{ +PlatformDevtreeData *data = opaque; +void *fdt = data-fdt; +const char *parent_node =

Re: [Qemu-devel] [Qemu-trivial] [PATCH v7] slirp/misc: Use g_malloc() instead of malloc()

2014-08-19 Thread zhanghailiang
On 2014/8/18 19:32, Michael Tokarev wrote: 18.08.2014 11:51, zhanghailiang пишет: Here we don't check the return value of malloc() which may fail. Use the g_malloc() instead, which will abort the program when there is not enough memory. Signed-off-by:

Re: [Qemu-devel] [Qemu-trivial] [PATCH v7] slirp/misc: Use g_malloc() instead of malloc()

2014-08-19 Thread Michael Tokarev
19.08.2014 11:30, zhanghailiang wrote: [] Hmm, it is a good idea to use g_new instead of g_malloc, we have to perform type cast for g_malloc.(BTW, i found in qemu there are several places use g_malloc but not perform appropriate type coercions) There's no need to perform explicit type

Re: [Qemu-devel] [PATCH v5 10/10] hw/arm/dyn_sysbus_devtree: enable simple VFIO dynamic instantiation

2014-08-19 Thread Eric Auger
On 08/19/2014 12:26 AM, Joel Schopp wrote: On 08/18/2014 05:11 PM, Peter Maydell wrote: On 18 August 2014 22:54, Joel Schopp joel.sch...@amd.com wrote: +static void vfio_fdt_add_device_node(SysBusDevice *sbdev, void *opaque) +{ +PlatformDevtreeData *data = opaque; +void *fdt =

Re: [Qemu-devel] [PATCH 2/3] fuzz: Add fuzzing functions for entries of refcount table and blocks

2014-08-19 Thread Fam Zheng
On Mon, 08/11 15:55, Maria Kustova wrote: Signed-off-by: Maria Kustova mari...@catit.be --- tests/image-fuzzer/qcow2/fuzz.py | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/tests/image-fuzzer/qcow2/fuzz.py b/tests/image-fuzzer/qcow2/fuzz.py index

Re: [Qemu-devel] [RFC 0/4] Adding -cdrom, -hd[abcd] and -drive file=... to Q35

2014-08-19 Thread Markus Armbruster
John Snow js...@redhat.com writes: Currently, the drive definitions created by drive_new() when using the -drive file=...[,if=ide] or -cdrom or -hd[abcd] options are not picked up by the Q35 initialization routine. To fix this, we have to add hooks to search for these drives using something

Re: [Qemu-devel] [Question] Why doesn't PCIe hotplug work for Q35 machine?

2014-08-19 Thread Paolo Bonzini
Il 19/08/2014 08:25, Gonglei (Arei) ha scritto: 1. Does qemu support ARI Forwarding for PCIe at present? If yes, how to enable it ? No, not yet. 2. If not, we should add some check for PCIe root ports and downstream ports, meanwhile add explaining document. 3. Those check should add in

Re: [Qemu-devel] [Question] Why doesn't PCIe hotplug work for Q35 machine?

2014-08-19 Thread Gonglei (Arei)
Hi, -Original Message- From: Paolo Bonzini [mailto:pbonz...@redhat.com] Sent: Tuesday, August 19, 2014 4:06 PM To: Gonglei (Arei); Marcel Apfelbaum; Michael S. Tsirkin Cc: qemu-devel@nongnu.org; imamm...@redhat.com; arm...@redhat.com; Huangweidong (C) Subject: Re: [Question] Why

Re: [Qemu-devel] [PATCH v5 10/10] hw/arm/dyn_sysbus_devtree: enable simple VFIO dynamic instantiation

2014-08-19 Thread Peter Maydell
On 19 August 2014 08:24, Eric Auger eric.au...@linaro.org wrote: Putting size=1 was the only solution I found to use an offset relative to the parent bus instead of an absolute base address. I would explain this because, in platform_bus_create_devtree, the function that creates the platform

[Qemu-devel] [PATCH v3 4/4] block: Drop some superfluous casts from void *

2014-08-19 Thread 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 v2 03/23] linux-user: Fix syscall instruction usermode emulation on X86_64

2014-08-19 Thread riku . voipio
From: Jincheng Miao jm...@redhat.com 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,

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

2014-08-19 Thread riku . voipio
From: Mike Frysinger vap...@chromium.org 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

[Qemu-devel] [PATCH v3 3/4] qemu-io-cmds: g_renew() can't fail, bury dead error handling

2014-08-19 Thread Markus Armbruster
Signed-off-by: Markus Armbruster arm...@redhat.com Reviewed-by: Max Reitz mre...@redhat.com Reviewed-by: Jeff Cody jc...@redhat.com --- 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 v2 07/23] linux-user: support ioprio_{get, set} syscalls

2014-08-19 Thread riku . voipio
From: Paul Burton p...@archlinuxmips.org Add support for the ioprio_get ioprio_set syscalls, allowing their use by target programs. Signed-off-by: Paul Burton p...@archlinuxmips.org Signed-off-by: Riku Voipio riku.voi...@linaro.org --- linux-user/syscall.c | 18 ++ 1 file

[Qemu-devel] [PULL v2 11/23] linux-user: Dereference Pointer Argument to ipc/semctl Sys Call

2014-08-19 Thread riku . voipio
From: Tom Musta tommu...@gmail.com 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

[Qemu-devel] [PULL v2 00/23] linux-user updates

2014-08-19 Thread riku . voipio
From: Riku Voipio riku.voi...@linaro.org The same as previous series, except the patch make binfmt flag O require P has been dropped. The following changes since commit 142f4ac5d5e024670ef4725e8943702b027e4218: Merge remote-tracking branch 'remotes/mjt/tags/trivial-patches-2014-08-15' into

[Qemu-devel] [PULL v2 08/23] linux-user: support {name_to, open_by}_handle_at syscalls

2014-08-19 Thread riku . voipio
From: Riku Voipio riku.voi...@linaro.org Implement support for the name_to_handle_at and open_by_handle_at syscalls, allowing their use by the target program. Modified by Riku - move syscalls to functions and put behind the already existing CONFIG_OPEN_BY_HANDLE to avoid build failure with old

[Qemu-devel] [PULL v2 01/23] linux-user: /proc/self/maps content

2014-08-19 Thread riku . voipio
From: Mikhail Ilyin m.i...@samsung.com 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 m.i...@samsung.com Signed-off-by: Riku Voipio riku.voi...@linaro.org ---

[Qemu-devel] [PULL v2 02/23] linux-user: redirect openat calls

2014-08-19 Thread riku . voipio
From: Riku Voipio riku.voi...@linaro.org 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

[Qemu-devel] [PULL v2 12/23] linux-user: Properly Handle semun Structure In Cross-Endian Situations

2014-08-19 Thread riku . voipio
From: Tom Musta tommu...@gmail.com 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.

[Qemu-devel] [PULL v2 09/23] linux-user: add setns and unshare

2014-08-19 Thread riku . voipio
From: Riku Voipio riku.voi...@linaro.org 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 p...@archlinuxmips.org Signed-off-by: Riku Voipio riku.voi...@linaro.org ---

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

2014-08-19 Thread riku . voipio
From: Riku Voipio riku.voi...@linaro.org 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

[Qemu-devel] [PULL v2 13/23] linux-user: Make ipc syscall's third argument an abi_long

2014-08-19 Thread riku . voipio
From: Tom Musta tommu...@gmail.com 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

[Qemu-devel] [PULL v2 16/23] linux-user: Handle NULL sched_param argument to sched_*

2014-08-19 Thread riku . voipio
From: Tom Musta tommu...@gmail.com 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 tommu...@gmail.com Signed-off-by: Riku Voipio

[Qemu-devel] [PULL v2 10/23] linux-user: PPC64 semid_ds Doesnt Include _unused1 and _unused2

2014-08-19 Thread riku . voipio
From: Tom Musta tommu...@gmail.com The 64 bit PowerPC platforms eliminate the _unused1 and _unused2 elements of the semid_ds structure from sys/sem.h. So eliminate these from the target_semid_ds structure. Signed-off-by: Tom Musta tommu...@gmail.com Signed-off-by: Riku Voipio

[Qemu-devel] [PULL v2 15/23] linux-user: Detect Negative Message Sizes in msgsnd System Call

2014-08-19 Thread riku . voipio
From: Tom Musta tommu...@gmail.com 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 tommu...@gmail.com Reviewed-by:

[Qemu-devel] [PULL v2 20/23] linux-user: clock_nanosleep errno Handling on PPC

2014-08-19 Thread riku . voipio
From: Tom Musta tommu...@gmail.com 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

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

2014-08-19 Thread riku . voipio
From: Peter Maydell peter.mayd...@linaro.org 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

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

2014-08-19 Thread riku . voipio
From: zhanghailiang zhang.zhanghaili...@huawei.com Signed-off-by: zhanghailiang zhang.zhanghaili...@huawei.com Acked-by: Riku Voipio riku.voi...@linaro.org Signed-off-by: Riku Voipio riku.voi...@linaro.org --- linux-user/syscall.c | 4 1 file changed, 4 insertions(+) diff --git

[Qemu-devel] [PULL v2 22/23] linux-user: writev Partial Writes

2014-08-19 Thread riku . voipio
From: Tom Musta tommu...@gmail.com 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

[Qemu-devel] [PULL v2 17/23] linux-user: Detect fault in sched_rr_get_interval

2014-08-19 Thread riku . voipio
From: Tom Musta tommu...@gmail.com Properly detect a fault when attempting to store into an invalid struct timespec pointer. Signed-off-by: Tom Musta tommu...@gmail.com Reviewed-by: Peter Maydell peter.mayd...@linaro.org Signed-off-by: Riku Voipio riku.voi...@linaro.org --- linux-user/syscall.c

[Qemu-devel] [PULL v2 14/23] linux-user: Conditionally Pass Attribute Pointer to mq_open()

2014-08-19 Thread riku . voipio
From: Tom Musta tommu...@gmail.com 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

[Qemu-devel] [PULL v2 18/23] linux-user: Move get_ppc64_abi

2014-08-19 Thread riku . voipio
From: Tom Musta tommu...@gmail.com 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).

Re: [Qemu-devel] Microcheckpointing: Memory-VCPU / Disk State consistency

2014-08-19 Thread Walid Nouri
Hi, I have tried to find more information on how to use drive-mirror besides what is available on the wiki. This was not very satisfactory... This may sound naive but are there some code examples in c or any other language, documentation of any kind, blog entries (developer), presentation

Re: [Qemu-devel] [PATCH v2 4/4] block: Drop some superfluous casts from void *

2014-08-19 Thread Markus Armbruster
Markus Armbruster arm...@redhat.com writes: Jeff Cody jc...@redhat.com writes: On Mon, Aug 18, 2014 at 06:10:43PM +0200, Markus Armbruster wrote: 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:

[Qemu-devel] [PULL v2 21/23] linux-user: Support target-to-host translation of mlockall argument

2014-08-19 Thread riku . voipio
From: Tom Musta tommu...@gmail.com 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

[Qemu-devel] [PULL v2 19/23] linux-user: Minimum Sig Handler Stack Size for PPC64 ELF V2

2014-08-19 Thread riku . voipio
From: Tom Musta tommu...@gmail.com The ELF V2 ABI for PPC64 defines MINSIGSTKSZ as 4096 bytes whereas it was 2048 previously. Signed-off-by: Tom Musta tommu...@gmail.com Signed-off-by: Riku Voipio riku.voi...@linaro.org --- linux-user/aarch64/syscall.h| 1 + linux-user/alpha/syscall.h

Re: [Qemu-devel] [PATCH] net: Forbid dealing with packets when VM is not running

2014-08-19 Thread Dr. David Alan Gilbert
* zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: On 2014/8/18 20:27, Dr. David Alan Gilbert wrote: * zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: For all NICs(except virtio-net) emulated by qemu, Such as e1000, rtl8139, pcnet and ne2k_pci, Qemu can still receive packets when

Re: [Qemu-devel] Microcheckpointing: Memory-VCPU / Disk State consistency

2014-08-19 Thread Walid Nouri
Hi Paolo, thanks for your hint. I missed your mail from last sunday. I will take a look on that! Walid Am 17.08.2014 um 11:52 schrieb Paolo Bonzini pbonz...@redhat.com: Il 11/08/2014 22:15, Michael R. Hines ha scritto: Excellent question: QEMU does have a feature called drive-mirror in

Re: [Qemu-devel] [PATCH V2 0/2] runner: Control test duration

2014-08-19 Thread Stefan Hajnoczi
On Tue, Aug 19, 2014 at 12:02:33AM +0400, Maria Kustova wrote: The first patch adds the '--duration SECONDS' argument. After the specified duration the runner allows to end the current test and then exits. The second patch adds forced termination of a program under test, if the test

Re: [Qemu-devel] [PULL] virtio-serial: avoid duplicate port names

2014-08-19 Thread Peter Maydell
On 18 August 2014 18:18, Amit Shah amit.s...@redhat.com wrote: Hi, Patches have been on list for a while.. The following changes since commit 08ab59770da57648bfb8fc9be37f0ef7fb50b0f9: Merge remote-tracking branch 'remotes/mcayland/qemu-sparc' into staging (2014-08-18 12:55:02 +0100)

Re: [Qemu-devel] [PATCH 3/3] layout: Add generators for refcount tbles and blocks

2014-08-19 Thread Fam Zheng
On Mon, 08/11 15:55, Maria Kustova wrote: Refcount structures are placed in clusters randomly selected from all not allocated host clusters. s/not allocated/unallocated/ Signed-off-by: Maria Kustova mari...@catit.be --- tests/image-fuzzer/qcow2/layout.py | 136

Re: [Qemu-devel] [PATCH] image-fuzzer: Trivial readability and formatting improvements

2014-08-19 Thread Stefan Hajnoczi
On Tue, Aug 19, 2014 at 02:00:24AM +0400, Maria Kustova wrote: diff --git a/tests/image-fuzzer/qcow2/fuzz.py b/tests/image-fuzzer/qcow2/fuzz.py index 6e272c6..c652dc9 100644 --- a/tests/image-fuzzer/qcow2/fuzz.py +++ b/tests/image-fuzzer/qcow2/fuzz.py @@ -123,7 +123,7 @@ def

[Qemu-devel] [PATCH 3/3] pcie: using error_setg instead of impolite assert

2014-08-19 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com It's enough of reporting an error. Assert() is not acceptable because the error is not a fatal error. Signed-off-by: Gonglei arei.gong...@huawei.com --- hw/pci/pcie.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hw/pci/pcie.c

[Qemu-devel] [PATCH 2/3] qdev: Refactor device_set_realized to avoid resource leak

2014-08-19 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com At present, the local variable local_err is reused at multi-places, Which will cause resource leak in some scenarios. Example: 1. Assuming that dc-realize(dev, local_err) execute successful and local_err == NULL; 2. Executing device hotplug in

[Qemu-devel] [PATCH 1/3] qdev: add missing error check

2014-08-19 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com If local_err is not null, the next code logic is useless. Signed-off-by: Gonglei arei.gong...@huawei.com --- hw/core/qdev.c | 5 + 1 file changed, 5 insertions(+) diff --git a/hw/core/qdev.c b/hw/core/qdev.c index da1ba48..3e7085e 100644 ---

[Qemu-devel] [PATCH 0/3] Refactor device_set_realized to avoid resource leak.

2014-08-19 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com after committing [PATCH v6 0/9] Refactor PCI/SHPC/PCIE hotplug to use a more generic hotplug API if devcie hotplgging failed, will casuse resource leak. This patch series include address resouce leak and two other issuses. BTW, for patch 2/3,

Re: [Qemu-devel] [PATCH] image-fuzzer: Trivial readability and formatting improvements

2014-08-19 Thread Fam Zheng
On Tue, 08/19 02:00, Maria Kustova wrote: Signed-off-by: Maria Kustova mari...@catit.be --- tests/image-fuzzer/qcow2/fuzz.py | 15 ++-- tests/image-fuzzer/runner.py | 51 2 files changed, 34 insertions(+), 32 deletions(-) diff --git

Re: [Qemu-devel] [PATCH] image-fuzzer: Trivial readability and formatting improvements

2014-08-19 Thread M.Kustova
On Tue, Aug 19, 2014 at 1:38 PM, Stefan Hajnoczi stefa...@redhat.com wrote: On Tue, Aug 19, 2014 at 02:00:24AM +0400, Maria Kustova wrote: diff --git a/tests/image-fuzzer/qcow2/fuzz.py b/tests/image-fuzzer/qcow2/fuzz.py index 6e272c6..c652dc9 100644 --- a/tests/image-fuzzer/qcow2/fuzz.py

Re: [Qemu-devel] [PATCH] image-fuzzer: Trivial readability and formatting improvements

2014-08-19 Thread M.Kustova
On Tue, Aug 19, 2014 at 1:44 PM, Fam Zheng f...@redhat.com wrote: On Tue, 08/19 02:00, Maria Kustova wrote: Signed-off-by: Maria Kustova mari...@catit.be --- tests/image-fuzzer/qcow2/fuzz.py | 15 ++-- tests/image-fuzzer/runner.py | 51

Re: [Qemu-devel] [PATCH 09/11] target-arm: Implement ARMv8 single-step handling for A64 code

2014-08-19 Thread Edgar E. Iglesias
On Fri, Aug 08, 2014 at 01:18:12PM +0100, Peter Maydell wrote: Implement ARMv8 software single-step handling for A64 code: correctly update the single-step state machine and generate debug exceptions when stepping A64 code. This patch has no behavioural change since MDSCR_EL1.SS can't be

Re: [Qemu-devel] [PATCH 3/3] layout: Add generators for refcount tbles and blocks

2014-08-19 Thread M.Kustova
On Tue, Aug 19, 2014 at 1:36 PM, Fam Zheng f...@redhat.com wrote: On Mon, 08/11 15:55, Maria Kustova wrote: Refcount structures are placed in clusters randomly selected from all not allocated host clusters. s/not allocated/unallocated/ Signed-off-by: Maria Kustova mari...@catit.be ---

Re: [Qemu-devel] KVM call for agenda for 2014-08-19

2014-08-19 Thread Juan Quintela
Juan Quintela quint...@redhat.com wrote: Hi Please, send any topic that you are interested in covering. People have complained on the past that I don't cancel the call until the very last minute. So, what do you think that deadline for submitting topics is 23:00UTC on Monday? As there are

Re: [Qemu-devel] [PATCH 09/11] target-arm: Implement ARMv8 single-step handling for A64 code

2014-08-19 Thread Peter Maydell
On 19 August 2014 10:56, Edgar E. Iglesias edgar.igles...@gmail.com wrote: On Fri, Aug 08, 2014 at 01:18:12PM +0100, Peter Maydell wrote: --- a/target-arm/cpu.h +++ b/target-arm/cpu.h @@ -1211,6 +1211,10 @@ static inline bool arm_singlestep_active(CPUARMState *env) #define

Re: [Qemu-devel] [PATCH 0/3] image-fuzzer: Support refcount structures in the qcow2 image generator

2014-08-19 Thread Stefan Hajnoczi
On Mon, Aug 11, 2014 at 03:55:03PM +0400, Maria Kustova wrote: This patch series adds support of refcount tables and blocks to the qcow2 image generator. This patch series was created for the 'block-next' branch and based on the next series: [PATCH V3] layout: Reduce number of

[Qemu-devel] [PULL 00/20] SCSI and memory changes for 2014-08-18

2014-08-19 Thread Paolo Bonzini
The following changes since commit 5a7348045091a2bc15d85bb177e5956aa6114e5a: Update version for v2.1.0-rc2 release (2014-07-15 18:55:37 +0100) are available in the git repository at: git://github.com/bonzini/qemu.git tags/for-upstream for you to fetch changes up to

[Qemu-devel] [PULL 03/20] scsi-block: extract scsi_block_is_passthrough

2014-08-19 Thread Paolo Bonzini
This will be used for both scsi_block_new_request and the scsi-block implementation of parse_cdb. Reviewed-by: Fam Zheng f...@redhat.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- hw/scsi/scsi-disk.c | 38 ++ 1 file changed, 26 insertions(+), 12

[Qemu-devel] [PULL 05/20] virtio-scsi: implement parse_cdb

2014-08-19 Thread Paolo Bonzini
Enable passthrough of vendor-specific commands. Reviewed-by: Fam Zheng f...@redhat.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- hw/scsi/virtio-scsi.c | 25 + 1 file changed, 25 insertions(+) diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c index

[Qemu-devel] [PULL 02/20] scsi-bus: introduce parse_cdb in SCSIDeviceClass and SCSIBusInfo

2014-08-19 Thread Paolo Bonzini
These callbacks will let devices do their own request parsing, or defer it to the bus. If the bus does not provide an implementation, in turn, fall back to the default parsing routine. Swap the first two arguments to scsi_req_parse, and rename it to scsi_req_parse_cdb, for consistency.

[Qemu-devel] [PULL 01/20] scsi-bus: prepare scsi_req_new for introduction of parse_cdb

2014-08-19 Thread Paolo Bonzini
The per-SCSIDevice parse_cdb callback must not be called if the request will go through special SCSIReqOps, so detect the special cases early enough. Reviewed-by: Fam Zheng f...@redhat.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- hw/scsi/scsi-bus.c | 51

[Qemu-devel] [PULL 06/20] qom: object: delete properties before calling instance_finalize

2014-08-19 Thread Paolo Bonzini
This ensures that the children's unparent callback will still have a usable parent. Reviewed-by: Peter Crosthwaite peter.crosthwa...@xilinx.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- qom/object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qom/object.c

[Qemu-devel] [PULL 04/20] scsi-block, scsi-generic: implement parse_cdb

2014-08-19 Thread Paolo Bonzini
The callback lets the bus provide the direction and transfer count for passthrough commands, enabling passthrough of vendor-specific commands. Reviewed-by: Fam Zheng f...@redhat.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- hw/scsi/scsi-bus.c | 3 +-- hw/scsi/scsi-disk.c| 14

[Qemu-devel] [PULL 13/20] memory: remove memory_region_destroy

2014-08-19 Thread Paolo Bonzini
The function is empty after the previous patch, so remove it. Reviewed-by: Peter Crosthwaite peter.crosthwa...@xilinx.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- backends/hostmem.c | 10 -- hw/audio/ac97.c| 9 - hw/audio/es1370.c

[Qemu-devel] [PULL 07/20] qom: object: move unparenting to the child property's release callback

2014-08-19 Thread Paolo Bonzini
This ensures that the unparent callback is called automatically when the parent object is finalized. Note that there's no need to keep a reference neither in object_unparent nor in object_finalize_child_property. The reference held by the child property itself will do. Reviewed-by: Peter

[Qemu-devel] [PULL 11/20] ioport: split deletion and destruction

2014-08-19 Thread Paolo Bonzini
Of the two functions portio_list_del and portio_list_destroy, the latter is just freeing a memory area. However, portio_list_del is the logical equivalent of memory_region_del_subregion so destruction of memory regions does not belong there. Actually, neither of these APIs are in use; portio is

[Qemu-devel] [PULL 10/20] nic: do not destroy memory regions in cleanup functions

2014-08-19 Thread Paolo Bonzini
The memory regions should be destroyed in the unrealize function; since these NICs are not even qdev-ified, they cannot be unplugged and they do not have to do anything to destroy their memory regions. Reviewed-by: Stefan Hajnoczi stefa...@redhat.com Reviewed-by: Peter Crosthwaite

Re: [Qemu-devel] [PATCH 09/11] target-arm: Implement ARMv8 single-step handling for A64 code

2014-08-19 Thread Peter Maydell
On 19 August 2014 11:25, Peter Maydell peter.mayd...@linaro.org wrote: On 19 August 2014 10:56, Edgar E. Iglesias edgar.igles...@gmail.com wrote: On Fri, Aug 08, 2014 at 01:18:12PM +0100, Peter Maydell wrote: --- a/target-arm/cpu.h +++ b/target-arm/cpu.h @@ -1211,6 +1211,10 @@ static inline

[Qemu-devel] [PULL 08/20] sysbus: remove unused function sysbus_del_io

2014-08-19 Thread Paolo Bonzini
Reviewed-by: Peter Crosthwaite peter.crosthwa...@xilinx.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- hw/core/sysbus.c| 5 - include/hw/sysbus.h | 1 - 2 files changed, 6 deletions(-) diff --git a/hw/core/sysbus.c b/hw/core/sysbus.c index f4e760d..414e2a1 100644 ---

[Qemu-devel] [PULL 12/20] memory: convert memory_region_destroy to object_unparent

2014-08-19 Thread Paolo Bonzini
Explicitly call object_unparent in the few places where we will re-create the memory region. If the memory region is simply being destroyed as part of device teardown, let QOM handle it. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- docs/memory.txt | 15 ++-

[Qemu-devel] [PULL 19/20] memory: Use canonical path component as the name

2014-08-19 Thread Paolo Bonzini
From: Peter Crosthwaite peter.crosthwa...@xilinx.com Rather than having the name as separate state. This prepares support for creating a MemoryRegion dynamically (i.e. without memory_region_init() and friends) and the MemoryRegion still getting a usable name. Signed-off-by: Peter Crosthwaite

[Qemu-devel] [PULL 20/20] mtree: remove write-only field

2014-08-19 Thread Paolo Bonzini
ml-printed is never set to true. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- memory.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/memory.c b/memory.c index 8da29af..031ff51 100644 --- a/memory.c +++ b/memory.c @@ -1972,7 +1972,6 @@ typedef struct

[Qemu-devel] [PULL 09/20] vga: do not dynamically allocate chain4_alias

2014-08-19 Thread Paolo Bonzini
Instead, add a boolean variable to indicate the presence of the region. This avoids a repeated malloc/free (later we can also avoid the add_child/unparent by changing the offset/size of the alias). Reviewed-by: Peter Crosthwaite peter.crosthwa...@xilinx.com Signed-off-by: Paolo Bonzini

[Qemu-devel] [PULL 14/20] tpm_tis: remove instance_finalize callback

2014-08-19 Thread Paolo Bonzini
It is never used, since ISA device are not hot-unpluggable. Reviewed-by: Peter Crosthwaite peter.crosthwa...@xilinx.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- hw/tpm/tpm_tis.c | 8 1 file changed, 8 deletions(-) diff --git a/hw/tpm/tpm_tis.c b/hw/tpm/tpm_tis.c index

[Qemu-devel] [PULL 15/20] loader: Abstract away ref to memory region names

2014-08-19 Thread Paolo Bonzini
From: Peter Crosthwaite peter.crosthwa...@xilinx.com Use the function provided rather than spying on the struct. Signed-off-by: Peter Crosthwaite peter.crosthwa...@xilinx.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- hw/core/loader.c | 2 +- 1 file changed, 1 insertion(+), 1

[Qemu-devel] [PULL 18/20] memory: Use memory_region_name for name access

2014-08-19 Thread Paolo Bonzini
From: Peter Crosthwaite peter.crosthwa...@xilinx.com Despite being local to memory.c, use the helper function. This prepares support for fully QOMifiying the name field of MR (which will remove this state from MR completely). Signed-off-by: Peter Crosthwaite peter.crosthwa...@xilinx.com

Re: [Qemu-devel] [Qemu-ppc] [PATCH V3] spapr: Fix stale HTAB during live migration

2014-08-19 Thread Alexander Graf
On 19.08.14 08:17, Samuel Mendoza-Jonas wrote: If a guest reboots during a running migration, changes to the hash page table are not necessarily updated on the destination. Opening a new file descriptor to the HTAB forces the migration handler to resend the entire table. Signed-off-by:

[Qemu-devel] [PULL 16/20] exec: Abstract away ref to memory region names

2014-08-19 Thread Paolo Bonzini
From: Peter Crosthwaite peter.crosthwa...@xilinx.com Use the function provided rather than spying on the struct. Signed-off-by: Peter Crosthwaite peter.crosthwa...@xilinx.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- exec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)

[Qemu-devel] [PULL 17/20] memory: constify memory_region_name

2014-08-19 Thread Paolo Bonzini
From: Peter Crosthwaite peter.crosthwa...@xilinx.com It doesn't change the MR and some prospective call sites will have const MRs at hand. Signed-off-by: Peter Crosthwaite peter.crosthwa...@xilinx.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- include/exec/memory.h | 2 +- memory.c

Re: [Qemu-devel] [PATCH] image-fuzzer: Trivial readability and formatting improvements

2014-08-19 Thread Markus Armbruster
M.Kustova m...@catit.be writes: On Tue, Aug 19, 2014 at 1:44 PM, Fam Zheng f...@redhat.com wrote: On Tue, 08/19 02:00, Maria Kustova wrote: [...] diff --git a/tests/image-fuzzer/runner.py b/tests/image-fuzzer/runner.py index fd97c40..b142577 100755 --- a/tests/image-fuzzer/runner.py +++

Re: [Qemu-devel] [PATCH v5 10/10] hw/arm/dyn_sysbus_devtree: enable simple VFIO dynamic instantiation

2014-08-19 Thread Alexander Graf
On 19.08.14 00:26, Joel Schopp wrote: On 08/18/2014 05:11 PM, Peter Maydell wrote: On 18 August 2014 22:54, Joel Schopp joel.sch...@amd.com wrote: +static void vfio_fdt_add_device_node(SysBusDevice *sbdev, void *opaque) +{ +PlatformDevtreeData *data = opaque; +void *fdt =

Re: [Qemu-devel] [PATCH v3 0/4] block: Use g_new() friends more

2014-08-19 Thread Kevin Wolf
Am 19.08.2014 um 10:31 hat Markus Armbruster geschrieben: PATCH 1+2 convert some allocations. While preparing them, I stumbled over dead error handling and some useless casts, which led to PATCH 3+4. I posted a tree-wide version of PATCH 1 some time ago, and was told to split it up. This

Re: [Qemu-devel] [PULL 0/3] QMP queue

2014-08-19 Thread Peter Maydell
On 18 August 2014 20:26, Luiz Capitulino lcapitul...@redhat.com wrote: Three little birds. The following changes since commit 08ab59770da57648bfb8fc9be37f0ef7fb50b0f9: Merge remote-tracking branch 'remotes/mcayland/qemu-sparc' into staging (2014-08-18 12:55:02 +0100) are available in

Re: [Qemu-devel] [PATCH V2 0/2] runner: Control test duration

2014-08-19 Thread Kevin Wolf
Am 19.08.2014 um 11:18 hat Stefan Hajnoczi geschrieben: On Tue, Aug 19, 2014 at 12:02:33AM +0400, Maria Kustova wrote: The first patch adds the '--duration SECONDS' argument. After the specified duration the runner allows to end the current test and then exits. The second patch adds

Re: [Qemu-devel] [PATCH] block/vvfat.c: remove debugging code to reinit stderr if NULL

2014-08-19 Thread Kevin Wolf
Am 18.08.2014 um 13:41 hat Michael Tokarev geschrieben: Just log to stderr unconditionally, like other similar code does. Signed-off-by: Michael Tokarev m...@tls.msk.ru --- block/vvfat.c |5 - 1 file changed, 5 deletions(-) diff --git a/block/vvfat.c b/block/vvfat.c index

Re: [Qemu-devel] [PULL v2 00/23] linux-user updates

2014-08-19 Thread Peter Maydell
On 19 August 2014 09:32, riku.voi...@linaro.org wrote: From: Riku Voipio riku.voi...@linaro.org The same as previous series, except the patch make binfmt flag O require P has been dropped. The following changes since commit 142f4ac5d5e024670ef4725e8943702b027e4218: Merge remote-tracking

Re: [Qemu-devel] [PATCH] block/vvfat.c: remove debugging code to reinit stderr if NULL

2014-08-19 Thread Peter Maydell
On 19 August 2014 12:58, Kevin Wolf kw...@redhat.com wrote: This specific patch isn't as trivial as it might look at the first sight (in other words: it's wrong). The part that you probably missed is that stderr isn't the real one when DEBUG is set: #undef stderr #define stderr

Re: [Qemu-devel] [PATCH] block/vvfat.c: remove debugging code to reinit stderr if NULL

2014-08-19 Thread Eric Blake
On 08/19/2014 05:58 AM, Kevin Wolf wrote: Am 18.08.2014 um 13:41 hat Michael Tokarev geschrieben: Just log to stderr unconditionally, like other similar code does. -DLOG(if (stderr == NULL) { -stderr = fopen(vvfat.log, a); -setbuf(stderr, NULL); -}) - This specific patch

Re: [Qemu-devel] [PATCH 09/11] target-arm: Implement ARMv8 single-step handling for A64 code

2014-08-19 Thread Edgar E. Iglesias
On Tue, Aug 19, 2014 at 11:46:23AM +0100, Peter Maydell wrote: On 19 August 2014 11:25, Peter Maydell peter.mayd...@linaro.org wrote: On 19 August 2014 10:56, Edgar E. Iglesias edgar.igles...@gmail.com wrote: On Fri, Aug 08, 2014 at 01:18:12PM +0100, Peter Maydell wrote: ---

  1   2   3   >