Re: [Qemu-devel] [RFC PATCH] trace: Replace error with warning if event is not defined

2014-05-27 Thread Markus Armbruster
Copying Stefan. scripts/get_maintainer.pl would've told you so :) Alexey Kardashevskiy a...@ozlabs.ru writes: At the moment QEMU exits if trace point is not defined which makes a developer life harder if he has to switch between branches with different traces implemented. This replaces

Re: [Qemu-devel] patch: add -kbddelay option

2014-05-27 Thread Markus Armbruster
Dave Mielke d...@mielke.cc writes: [quoted lines by Dave Mielke on 2014/05/26 at 08:59 -0400] I'm sorry for quoting myself, but I'm doing it for context since I have a question: This patch, attached as qemu-kbddelay-1.patch, is a rework of the former curses UI patch so that the delay

[Qemu-devel] [PATCH 0/2] test virtio-blk hotplug

2014-05-27 Thread Amos Kong
It's worth to add a hotplug test to qtest, but without cooperation of guest OS, new devices can't be initialized by guest, and hot-unplug doesn't work. However, the new test can cover some part of code of hotplug/unplug. Amos Kong (2): virtio-blk-test.c: change pci_nop() to virtblk_init()

[Qemu-devel] [PATCH 2/2] virtio-blk-test.c: add hotplug subtest

2014-05-27 Thread Amos Kong
This patch adds a new subtest, it hotplugs 29 * 8 = 232 virtio-blk devices to guest, and try to hot-unplug them. Note: the hot-unplug can't work without cooperation of guest OS. Signed-off-by: Amos Kong ak...@redhat.com --- tests/virtio-blk-test.c | 55

[Qemu-devel] [PATCH 1/2] virtio-blk-test.c: change pci_nop() to virtblk_init()

2014-05-27 Thread Amos Kong
I want to add a new subtest in virtio-blk-test.c, it will start guest without network. The original pci_init() did nothing, but it's good to reserve a very simple initialization testing. Signed-off-by: Amos Kong ak...@redhat.com --- tests/virtio-blk-test.c | 13 ++--- 1 file changed, 6

[Qemu-devel] How to enable more than 2047 MB RAM on 32 bit host systems for 32 bit guests?

2014-05-27 Thread Erik Rull
Hi all, I would like to provide 3GB of RAM to my guest - I use kvm and don't see a real reason why this should not work. Currently, qemu-1.7.0 with kvm is in use. Any hints or solutions are welcome. Thanks. Best regards, Erik

Re: [Qemu-devel] [PATCH 5/9] target-ppc: Add POWER8 SPRs

2014-05-27 Thread Alexey Kardashevskiy
On 05/27/2014 06:09 AM, Alexander Graf wrote: On 26.05.14 17:45, Alexey Kardashevskiy wrote: On 05/22/2014 04:08 AM, Tom Musta wrote: On 5/21/2014 1:20 AM, Alexey Kardashevskiy wrote: This adds helper which adds TAR/BESCRS/BESCRSU/BESCRR/BESCRRU/ EBBHR/EBBRR/BESCR/TFHAR/TFIAR/TEXASR/TEXASRU

Re: [Qemu-devel] [Qemu-trivial] [PATCH] Fix 'name' option to work with -readconfig

2014-05-27 Thread Dr. David Alan Gilbert
* Michael Tokarev (m...@tls.msk.ru) wrote: 06.05.2014 15:15, Dr. David Alan Gilbert (git) wrote: From: Dr. David Alan Gilbert dgilb...@redhat.com The 'name' option silently failed when used in config files ( http://lists.gnu.org/archive/html/qemu-devel/2014-04/msg00378.html )

[Qemu-devel] [PATCH v3] rules.mak: Rewrite unnest-vars

2014-05-27 Thread Fam Zheng
The macro unnest-vars is the most important, complicated but hard to track magic in QEMU's build system. Rewrite it in a (hopefully) clearer way, with more comments, to make it easier to understand and maintain. Remove DSO_CFLAGS and module-objs-m that are not used. A bonus fix of this version

Re: [Qemu-devel] [Qemu-trivial] patch: add delay=msecs suboption to -display curses

2014-05-27 Thread Dave Mielke
[quoted lines by Gerd Hoffmann on 2014/05/27 at 07:44 +0200] What exactly is the problem? At the user level, the keyboard appears to be dead. An inspection of the udnerlying code reveals that the application itsllf is querying the MS-DOS keyboard input buffer in a bad way. Those apps can't be

[Qemu-devel] [PATCH] qtest: fix hex2nib for capital characters

2014-05-27 Thread serge . fdrv
From: Sergey Fedorov serge.f...@gmail.com Signed-off-by: Sergey Fedorov serge.f...@gmail.com --- qtest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qtest.c b/qtest.c index 2aba20d..87ccd62 100644 --- a/qtest.c +++ b/qtest.c @@ -148,7 +148,7 @@ static int hex2nib(char

Re: [Qemu-devel] [PATCH v3] rules.mak: Rewrite unnest-vars

2014-05-27 Thread Paolo Bonzini
Il 27/05/2014 09:54, Fam Zheng ha scritto: The macro unnest-vars is the most important, complicated but hard to track magic in QEMU's build system. Rewrite it in a (hopefully) clearer way, with more comments, to make it easier to understand and maintain. Remove DSO_CFLAGS and module-objs-m

[Qemu-devel] [PATCH V9 0/4] qemu-img: add preallocation=full

2014-05-27 Thread Chen Fan
From: Hu Tao hu...@cn.fujitsu.com The purpose of this series is to use posix_fallocate() when creating img file to ensure there are disk space for it which is way fast than acturally writing to disk. But this only works in file system level. For cases like thin provisioning, an option full

Re: [Qemu-devel] [Qemu-stable] [PATCH 01/14] qemu-img: Plug memory leak on block option help error path

2014-05-27 Thread Benoît Canet
The Monday 26 May 2014 à 19:37:02 (+0200), Markus Armbruster wrote : Introduced in commit a283cb6; mostly harmless. Spotted by Coverity. Signed-off-by: Markus Armbruster arm...@redhat.com --- qemu-img.c | 1 + 1 file changed, 1 insertion(+) diff --git a/qemu-img.c b/qemu-img.c index

[Qemu-devel] [PATCH V9 1/4] qapi: introduce PreallocMode and a new PreallocMode full.

2014-05-27 Thread Chen Fan
From: Hu Tao hu...@cn.fujitsu.com This patch prepares for the subsequent patches. Reviewed-by: Fam Zheng f...@redhat.com Reviewed-by: Eric Blake ebl...@redhat.com Signed-off-by: Hu Tao hu...@cn.fujitsu.com --- block/qcow2.c| 8 qapi-schema.json | 14 ++ 2 files

[Qemu-devel] [PATCH V9 3/4] raw-posix: Add full image preallocation option

2014-05-27 Thread Chen Fan
From: Hu Tao hu...@cn.fujitsu.com This patch adds a new option preallocation for raw format, and implements full preallocation by writing zeros to disk. The metadata option is changed to use posix_fallocate() to ensure subsquent writes to image file won't fail because of lack of disk space. The

[Qemu-devel] [PATCH V9 2/4] raw, qcow2: don't convert file size to sector size

2014-05-27 Thread Chen Fan
From: Hu Tao hu...@cn.fujitsu.com and avoid converting it back later. And round up file size to nearest sector. Signed-off-by: Hu Tao hu...@cn.fujitsu.com --- block/qcow2.c | 8 block/raw-posix.c | 5 +++-- block/raw-win32.c | 5 +++-- 3 files changed, 10 insertions(+), 8

[Qemu-devel] [PATCH V9 4/4] qcow2: Add full image preallocation option

2014-05-27 Thread Chen Fan
From: Hu Tao hu...@cn.fujitsu.com This adds a preallocation=full mode to qcow2 image creation, which creates a non-sparse image file. Signed-off-by: Hu Tao hu...@cn.fujitsu.com --- block/qcow2.c | 79 -- tests/qemu-iotests/082.out | 54

[Qemu-devel] [RFC] qdict: issue about usb controller hot-plug/unplug

2014-05-27 Thread Gonglei (Arei)
Hi, Those day, I'm working for usb controller hot-plugging/unplugging( not enable multifunction capability). Everything work well, but when I test the case of hot-plug/unplug reiteratively, qemu will be aborted: qemu-system-x86_64: qobject/qdict.c:432: qentry_destroy: Assertion `e-value !=

Re: [Qemu-devel] [RFC 1/3] using CPUMASK bitmaps to calculate cpu index

2014-05-27 Thread chen.fan.f...@cn.fujitsu.com
On Thu, 2014-05-22 at 15:26 +0200, Igor Mammedov wrote: On Tue, 13 May 2014 18:08:47 +0800 Chen Fan chen.fan.f...@cn.fujitsu.com wrote: instead of seeking the number of CPUs, using CPUMASK bitmaps to calculate the cpu index, also would be a gread benefit to remove cpu index. How would

Re: [Qemu-devel] [PATCH 02/14] block/vvfat: Plug memory leak in enable_write_target()

2014-05-27 Thread Benoît Canet
The Monday 26 May 2014 à 19:37:03 (+0200), Markus Armbruster wrote : I figure the leak originated in bdrv_create2(), and was duplicated into callers when commit 91a073ak dropped that function. Looks like the other places have since been fixed. Spotted by Coverity. Signed-off-by: Markus

Re: [Qemu-devel] [PATCH 04/14] block: Plug memory leak on brv_open_image() error path

2014-05-27 Thread Benoît Canet
The Monday 26 May 2014 à 19:37:05 (+0200), Markus Armbruster wrote : Introduced in commit da557a. Spotted by Coverity. Signed-off-by: Markus Armbruster arm...@redhat.com --- block.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block.c b/block.c index 40c5e1a..1996f84 100644 ---

[Qemu-devel] [PATCH v5 0/2] vmdk: Optimize cluster allocation

2014-05-27 Thread Fam Zheng
Fam Zheng (2): qemu-iotests: Add data pattern in version3 VMDK sample image in 059 vmdk: Optimize cluster allocation block/vmdk.c | 222 + tests/qemu-iotests/059 | 4 + tests/qemu-iotests/059.out

[Qemu-devel] [PATCH v5 2/2] vmdk: Optimize cluster allocation

2014-05-27 Thread Fam Zheng
This drops the unnecessary bdrv_truncate() from, and also improves, cluster allocation code path. Before, when we need a new cluster, get_cluster_offset truncates the image to bdrv_getlength() + cluster_size, and returns the offset of added area, i.e. the image length before truncating. This is

Re: [Qemu-devel] [PATCH 05/14] qemu-io: Support multiple -o in open command

2014-05-27 Thread Benoît Canet
The Monday 26 May 2014 à 19:37:06 (+0200), Markus Armbruster wrote : Instead of ignoring all option values but the last one, multiple -o options now have the same meaning as having a single option with all settings in the order of their respective -o options. Same as commit 2dc8328 for

[Qemu-devel] [PATCH v7 0/3] EEH Support for VFIO devices on sPAPR

2014-05-27 Thread Gavin Shan
EEH Support for VFIO PCI Device The series of patches intend to support EEH for VFIO PCI devices on sPAPR platform. It requires corresponding host kernel support. Also, it was built on top of Alexey's VFIO-for-sPAPR git repository. QEMU: git://github.com/aik/qemu.git (branch: vfio) Kernel:

[Qemu-devel] [PATCH v5 1/2] qemu-iotests: Add data pattern in version3 VMDK sample image in 059

2014-05-27 Thread Fam Zheng
It's possible that we diverge from the specification with our implementation. Having a reference image in the test cases may detect such problems when we introduce a bug that can read what it creates, but can't handle a real VMDK. Signed-off-by: Fam Zheng f...@redhat.com ---

[Qemu-devel] [PATCH v7 3/3] sPAPR: EEH support for VFIO PCI device

2014-05-27 Thread Gavin Shan
The patch introduces EEH RTAS servers on sPAPR platform and handle them there. Each sPAPRPHBVFIOState is binding with only one IOMMU group, so it can be regarded as PE in nature. The PE address is maintained in sPAPRPHBState, which has default value 0x for non-VFIO PHBs. Otherwise, the PE

Re: [Qemu-devel] [RFC v1 05/25] memory: MemoryRegion: Add contained flag

2014-05-27 Thread Peter Crosthwaite
On Fri, May 16, 2014 at 11:52 AM, Peter Crosthwaite peter.crosthwa...@xilinx.com wrote: Rather than use the .parent == NULL check to determine if a memory region is contained, add a purpose specific boolean flag. This allows for .parent to be easily converted to a link property while preserving

[Qemu-devel] [PATCH v7 1/3] headers: Sync with Linux header

2014-05-27 Thread Gavin Shan
The patch synchronizes with linux header (vfio.h). Signed-off-by: Gavin Shan gws...@linux.vnet.ibm.com --- linux-headers/linux/vfio.h | 66 ++ 1 file changed, 66 insertions(+) diff --git a/linux-headers/linux/vfio.h b/linux-headers/linux/vfio.h index

[Qemu-devel] [PATCH v7 2/3] VFIO: Helper function to retrieve container fd

2014-05-27 Thread Gavin Shan
The patch adds function vfio_get_container_fd_by_group_id() to retrieve the container's fd of the specified VFIO group. The fd will be used by subsequent patches. Signed-off-by: Gavin Shan gws...@linux.vnet.ibm.com --- hw/misc/vfio.c | 17 + include/hw/misc/vfio.h | 1 +

Re: [Qemu-devel] [PATCH 06/14] qemu-io: Plug memory leak in open command

2014-05-27 Thread Benoît Canet
The Monday 26 May 2014 à 19:37:07 (+0200), Markus Armbruster wrote : Introduced in commit b543c5c. Spotted by Coverity. Signed-off-by: Markus Armbruster arm...@redhat.com --- qemu-io.c | 1 + 1 file changed, 1 insertion(+) diff --git a/qemu-io.c b/qemu-io.c index ef3fef6..ffbad25

Re: [Qemu-devel] [PATCH] tests: check empty qmp output visitor

2014-05-27 Thread Marcel Apfelbaum
On Tue, 2014-05-27 at 09:53 +0800, Amos Kong wrote: On Tue, May 20, 2014 at 07:19:49PM -0500, Michael Roth wrote: Quoting Marcel Apfelbaum (2014-05-20 10:07:59) Checks the output visitor behaviour for NULL values. Signed-off-by: Marcel Apfelbaum marce...@redhat.com --- Notes:

Re: [Qemu-devel] [PATCH 03/14] qcow2: Plug memory leak on qcow2_invalidate_cache() error paths

2014-05-27 Thread Benoît Canet
The Monday 26 May 2014 à 19:37:04 (+0200), Markus Armbruster wrote : Introduced in commit 5a8a30d. Spotted by Coverity. Signed-off-by: Markus Armbruster arm...@redhat.com --- block/qcow2.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/block/qcow2.c

Re: [Qemu-devel] [Bug 1308341] Re: Multiple CPUs causes blue screen on Windows guest (14.04 regression)

2014-05-27 Thread Yan Vugenfirer
Please upload zipped kernel dump or mini dump so it can be examined. Thanks, Yan. On May 26, 2014, at 12:41 PM, Gordon Kaltofen kalto...@dresearch-fe.de wrote: Hallo to all, this is my first post here. I have exactly the same problem occurred after Distribution Update Ubuntu Server x64

[Qemu-devel] [PATCH] [qemu-devel] fix wrong order when doing live block migration setup

2014-05-27 Thread chai wen
If we want to track dirty blocks using dirty_maps on a BlockDriverState when doing live block-migration, its correspoding 'BlkMigDevState' should be add to block_mig_state.bmds_list firstly for subsequent processing. Otherwise set_dirty_tracking will do nothing on an empty list than allocating

Re: [Qemu-devel] [PATCH 07/14] qemu-io: Don't print NULL when open without non-option arg fails

2014-05-27 Thread Benoît Canet
The Monday 26 May 2014 à 19:37:08 (+0200), Markus Armbruster wrote : Reproducer: open -o a=b. Broken in commit fd0fee3. Signed-off-by: Markus Armbruster arm...@redhat.com --- qemu-io.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/qemu-io.c b/qemu-io.c index

Re: [Qemu-devel] [PATCH V2 4/4] hw/machine: qemu machine opts as properties to QemuMachineState

2014-05-27 Thread Marcel Apfelbaum
On Mon, 2014-05-26 at 18:20 +0200, Andreas Färber wrote: Am 26.05.2014 14:40, schrieb Marcel Apfelbaum: Make machine's QemuOpts QOM properties of machine. The properties are automatically filled in. This opens the possiblity to create opts per machine rather than global. Signed-off-by:

Re: [Qemu-devel] [PATCH V2 0/4] machine: QemuOpts per machine

2014-05-27 Thread Marcel Apfelbaum
On Mon, 2014-05-26 at 18:42 +0200, Andreas Färber wrote: Am 26.05.2014 14:48, schrieb Michael S. Tsirkin: On Mon, May 26, 2014 at 03:40:54PM +0300, Marcel Apfelbaum wrote: V1 - V2: - Rebased on qom-next queue. - Patch 1/4: - Since there are a lot of discussions on the correct

Re: [Qemu-devel] [PATCH 08/14] blockdev: Plug memory leak in blockdev_init()

2014-05-27 Thread Benoît Canet
The Monday 26 May 2014 à 19:37:09 (+0200), Markus Armbruster wrote : blockdev_init() leaks bs_opts when qemu_opts_create() fails, i.e. when the ID is bad. Missed in commit ec9c10d. Signed-off-by: Markus Armbruster arm...@redhat.com --- blockdev.c | 5 +++-- 1 file changed, 3

[Qemu-devel] [PATCH memory v2 0/9] Memory Region QOMification

2014-05-27 Thread Peter Crosthwaite
Hi Paolo, Andreas, This patch series QOMifies Memory regions. This is the Memory API specific subset of patches forming part of the Memory/GPIO/Sysbus QOMification. I think Paolo already has P1 enqeued. Including for ease of review. some QOM patches in P2-3 that cut down on later boilerplate.

[Qemu-devel] [PATCH memory v2 1/9] memory: Simplify mr_add_subregion() if-else

2014-05-27 Thread Peter Crosthwaite
This if else is not needed. The previous call to memory_region_add (whether _overlap or not) will always set priority and may_overlap to desired values. And its not possible to get here without having called memory_region_add_subregion due to the null guard on parent. So we can just directly call

[Qemu-devel] [PATCH memory v2 2/9] qom: object: Ignore refs/unrefs of NULL

2014-05-27 Thread Peter Crosthwaite
Just do nothing if passed NULL for a ref or unref. This avoids call sites that manage a combination of NULL or non-NULL pointers having to add iffery around every ref and unref. Signed-off-by: Peter Crosthwaite peter.crosthwa...@xilinx.com --- qom/object.c | 14 -- 1 file changed, 8

[Qemu-devel] [PATCH memory v2 4/9] memory: Coreify subregion add functionality

2014-05-27 Thread Peter Crosthwaite
Split off the core looping code that actually adds subregions into it's own fn. This prepares support for Memory Region qomification where setting the MR address or parent via QOM will back onto this more minimal function. Signed-off-by: Peter Crosthwaite peter.crosthwa...@xilinx.com ---

Re: [Qemu-devel] [Qemu-stable] [PATCH 09/14] blockdev: Plug memory leak in drive_init()

2014-05-27 Thread Benoît Canet
The Monday 26 May 2014 à 19:37:10 (+0200), Markus Armbruster wrote : Introduced in commit f298d07. Spotted by Coverity. Signed-off-by: Markus Armbruster arm...@redhat.com --- blockdev.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/blockdev.c b/blockdev.c index 6460c70..7ec7d79

[Qemu-devel] [PATCH memory v2 5/9] memory: MemoryRegion: factor out memory region re-adder

2014-05-27 Thread Peter Crosthwaite
memory_region_set_address is mostly just a function that deletes and re-adds a memory region. Factor this generic functionality out into a re-usable function. This prepares support for further QOMification of MemoryRegion. Signed-off-by: Peter Crosthwaite peter.crosthwa...@xilinx.com ---

[Qemu-devel] [PATCH memory v2 7/9] memory: MemoryRegion: Add container and addr props

2014-05-27 Thread Peter Crosthwaite
Expose the already existing .parent and .addr fields as QOM properties. .parent (i.e. the field describing the memory region that contains this one in Memory hierachy) is renamed container. This is to avoid confusion with the owner field, which is much more akin to an actual QOM parent. Setting

[Qemu-devel] [PATCH memory v2 8/9] memory: MemoryRegion: Add may-overlap and priority props

2014-05-27 Thread Peter Crosthwaite
QOM propertyify the .may-overlap and .priority fields. The setters will re-add the memory as a subregion if needed (i.e. the values change when the memory region is already contained). Signed-off-by: Peter Crosthwaite peter.crosthwa...@xilinx.com --- changed since v1: Converted priority to signed

[Qemu-devel] [PATCH memory v2 6/9] memory: MemoryRegion: QOMify

2014-05-27 Thread Peter Crosthwaite
QOMify memory regions as an Object. The former init() and destroy() routines become instance_init() and instance_finalize() resp. memory_region_init() is re-implemented to be: object_initialize() + set fields memory_region_destroy() is re-implemented to call finalize(). Signed-off-by: Peter

Re: [Qemu-devel] [Qemu-trivial] patch: add delay=msecs suboption to -display curses

2014-05-27 Thread Gerd Hoffmann
On Di, 2014-05-27 at 04:15 -0400, Dave Mielke wrote: [quoted lines by Gerd Hoffmann on 2014/05/27 at 07:44 +0200] What exactly is the problem? At the user level, the keyboard appears to be dead. An inspection of the udnerlying code reveals that the application itsllf is querying the

[Qemu-devel] [PATCH memory v2 9/9] memory: MemoryRegion: Add size property

2014-05-27 Thread Peter Crosthwaite
To allow devices to dynamically resize the device. The motivation is to allow devices with variable size to init their memory_region without size early and then correctly populate size at realize() time. Signed-off-by: Peter Crosthwaite peter.crosthwa...@xilinx.com --- memory.c | 38

Re: [Qemu-devel] [RFC 1/3] using CPUMASK bitmaps to calculate cpu index

2014-05-27 Thread Igor Mammedov
On Tue, 27 May 2014 08:39:00 + chen.fan.f...@cn.fujitsu.com chen.fan.f...@cn.fujitsu.com wrote: On Thu, 2014-05-22 at 15:26 +0200, Igor Mammedov wrote: On Tue, 13 May 2014 18:08:47 +0800 Chen Fan chen.fan.f...@cn.fujitsu.com wrote: instead of seeking the number of CPUs, using

Re: [Qemu-devel] [v3][PATCH 0/5] xen: add Intel IGD passthrough support

2014-05-27 Thread Chen, Tiejun
Any further comments? Thanks Tiejun -Original Message- From: qemu-devel-bounces+tiejun.chen=intel@nongnu.org [mailto:qemu-devel-bounces+tiejun.chen=intel@nongnu.org] On Behalf Of Tiejun Chen Sent: Monday, May 26, 2014 5:43 PM To: anthony.per...@citrix.com;

Re: [Qemu-devel] [PATCH 11/14] block/vvfat: Plug memory leak in check_directory_consistency()

2014-05-27 Thread Benoît Canet
The Monday 26 May 2014 à 19:37:12 (+0200), Markus Armbruster wrote : On error path. Introduced in commit a046433a. Spotted by Coverity. Signed-off-by: Markus Armbruster arm...@redhat.com --- block/vvfat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/vvfat.c

[Qemu-devel] [PATCH memory v2 3/9] qom: Publish object_resolve_link

2014-05-27 Thread Peter Crosthwaite
The lower level API object_resolve_path is already published to the world as part of the QOM API. Add object_resolve link as well. This allows QOM clients to roll their own link property setters without having to fallback to the less safe object_resolve_path. Signed-off-by: Peter Crosthwaite

Re: [Qemu-devel] [PATCH 12/14] block/vvfat: Plug memory leak in read_directory()

2014-05-27 Thread Benoît Canet
The Monday 26 May 2014 à 19:37:13 (+0200), Markus Armbruster wrote : Has always been leaky. Spotted by Coverity. Signed-off-by: Markus Armbruster arm...@redhat.com --- block/vvfat.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/block/vvfat.c b/block/vvfat.c

Re: [Qemu-devel] [PATCH 13/14] block/sheepdog: Plug memory leak in sd_snapshot_create()

2014-05-27 Thread Benoît Canet
The Monday 26 May 2014 à 19:37:14 (+0200), Markus Armbruster wrote : Has always been leaky. Spotted by Coverity. Signed-off-by: Markus Armbruster arm...@redhat.com --- block/sheepdog.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/block/sheepdog.c

Re: [Qemu-devel] KVM call agenda for 2014-05-27

2014-05-27 Thread Michael Mueller
On Mon, 26 May 2014 14:00:20 +0200 Christian Borntraeger borntrae...@de.ibm.com wrote: On 21/05/14 23:43, Juan Quintela wrote: Hi Please, send any topic that you are interested in covering. (mostly) Michael Mueller - CPU models on s390 and other

Re: [Qemu-devel] [PATCH 14/14] qemu-img: Plug memory leak in convert command

2014-05-27 Thread Benoît Canet
The Monday 26 May 2014 à 19:37:15 (+0200), Markus Armbruster wrote : Introduced in commit 661a0f7. Spotted by Coverity. Signed-off-by: Markus Armbruster arm...@redhat.com --- qemu-img.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu-img.c b/qemu-img.c index

Re: [Qemu-devel] [PATCH 10/14] block/qapi: Plug memory leak in dump_qobject() case QTYPE_QERROR

2014-05-27 Thread Benoît Canet
The Monday 26 May 2014 à 19:37:11 (+0200), Markus Armbruster wrote : Introduced in commit a8d8ecb. Spotted by Coverity. Signed-off-by: Markus Armbruster arm...@redhat.com --- block/qapi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/qapi.c b/block/qapi.c index

Re: [Qemu-devel] [RFC] qdict: issue about usb controller hot-plug/unplug

2014-05-27 Thread Gerd Hoffmann
On Di, 2014-05-27 at 08:28 +, Gonglei (Arei) wrote: Hi, Those day, I'm working for usb controller hot-plugging/unplugging( not enable multifunction capability). Everything work well, but when I test the case of hot-plug/unplug reiteratively, qemu will be aborted: Guess you've removed

Re: [Qemu-devel] [RFC] qdict: issue about usb controller hot-plug/unplug

2014-05-27 Thread Gonglei (Arei)
-Original Message- From: Gerd Hoffmann [mailto:kra...@redhat.com] Sent: Tuesday, May 27, 2014 5:25 PM To: Gonglei (Arei) Cc: qemu-devel@nongnu.org; pbonz...@redhat.com; m...@redhat.com; lcapitul...@redhat.com; peter.mayd...@linaro.org Subject: Re: [RFC] qdict: issue about usb

Re: [Qemu-devel] [PATCH] [qemu-devel] fix wrong order when doing live block migration setup

2014-05-27 Thread Chai Wen
Hi, Sorry for forgetting to cc maintainers. I got this issue when doing live migration test, and simple steps to reproduce are master: qemu -enable-kvm -smp 1 -m 512 -drive file=/data1/src.img,if=virtio \ -net none -monitor stdio -vnc 0:2 slave: qemu -enable-kvm -smp 1

Re: [Qemu-devel] [v2 PATCH] target-mips: implement UserLocal Register

2014-05-27 Thread James Hogan
Hi Richard, On 27/05/14 03:38, Richard Henderson wrote: On 05/26/2014 07:32 PM, Petar Jovanovic wrote: From: Richard Henderson [rth7...@gmail.com] on behalf of Richard Henderson [r...@twiddle.net] Sent: Tuesday, May 27, 2014 3:35 AM To: Petar

Re: [Qemu-devel] [PATCH v3 3/9] target-ppc: Implement compat CPU option

2014-05-27 Thread Alexander Graf
On 23.05.14 04:26, Alexey Kardashevskiy wrote: This adds basic support for the compat CPU option. By specifying the compat property, the user can manually switch guest CPU mode from raw to architected. This defines feature disable bits which are not used yet as, for example, PowerISA 2.07 says

Re: [Qemu-devel] [PATCH 7/8] dump: Fix use-after-free in create_kdump_vmcore()

2014-05-27 Thread Laszlo Ersek
On 05/27/14 03:40, arei.gong...@huawei.com wrote: From: Gonglei arei.gong...@huawei.com Spotted by Coverity: (7) Event closed_arg: write_dump_pages(DumpState *) closes s-fd. [details] Also see events: [pass_closed_arg] 1490ret = write_dump_pages(s); (8) Event cond_false:

Re: [Qemu-devel] [PATCH] [qemu-devel] fix wrong order when doing live block migration setup

2014-05-27 Thread Fam Zheng
On Tue, 05/27 16:54, chai wen wrote: If we want to track dirty blocks using dirty_maps on a BlockDriverState when doing live block-migration, its correspoding 'BlkMigDevState' should be add to block_mig_state.bmds_list firstly for subsequent processing. Otherwise set_dirty_tracking will do

[Qemu-devel] [PATCH v3 18/24] target-ppc: Add POWER8's FSCR SPR

2014-05-27 Thread Alexey Kardashevskiy
This adds an FSCR (Facility Status and Control Register) SPR. Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru --- target-ppc/cpu.h| 1 + target-ppc/translate_init.c | 9 + 2 files changed, 10 insertions(+) diff --git a/target-ppc/cpu.h b/target-ppc/cpu.h index

[Qemu-devel] [PATCH v3 10/24] target-ppc: Introduce and reuse generalized init_proc_POWER()

2014-05-27 Thread Alexey Kardashevskiy
At the moment every POWER CPU family has its own init_proc_POWERX function. E500 already has common init function so we try to do the same thing. This introduces BOOK3S_CPU_TYPE enum with 2 values - 970 and POWER5+. This introduces generalized init_proc_POWER() which accepts a CPU type as a

[Qemu-devel] [PATCH v3 04/24] target-ppc: Copy and split gen_spr_7xx() for 970

2014-05-27 Thread Alexey Kardashevskiy
This stops using 7xx common SPRs init function and adds separate set of helpers for 970. This does not copy ICTC SPR as neither 970 manual nor PowerISA mention it. This defines 970/book3s PMU SPRs constants as they differs from the ones used for 7XX. Signed-off-by: Alexey Kardashevskiy

[Qemu-devel] [PATCH v3 08/24] target-ppc: Add PMC7/8 to 970 class

2014-05-27 Thread Alexey Kardashevskiy
Compared to PowerISA-compliant CPUs, 970 family has most of them plus PMC7/8 which are only present on 970 but not on POWER5 and later CPUs. Since we are changing SPRs for Book3s/970 families, let's add them too. Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru --- target-ppc/cpu.h

[Qemu-devel] [PATCH v3 03/24] target-ppc: Refactor PPC970

2014-05-27 Thread Alexey Kardashevskiy
This splits one init_proc_970() into a set of small helpers. Later init_proc_970() will be generalized and will call different set of helpers depending on the current CPU class. Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru --- target-ppc/translate_init.c | 97

[Qemu-devel] [PATCH v3 15/24] target-ppc: Refactor class init for POWER7/8

2014-05-27 Thread Alexey Kardashevskiy
This extends init_proc_POWER to support POWER7 and POWER8. Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru --- target-ppc/translate_init.c | 96 - 1 file changed, 59 insertions(+), 37 deletions(-) diff --git a/target-ppc/translate_init.c

[Qemu-devel] [PATCH v3 13/24] target-ppc: Enable PMU SPRs migration

2014-05-27 Thread Alexey Kardashevskiy
This enabled PMU SPRs migration by hooking hypv privileged versions with KVM one reg IDs. Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru --- target-ppc/translate_init.c | 104 ++-- 1 file changed, 52 insertions(+), 52 deletions(-) diff --git

[Qemu-devel] [PATCH v3 01/24] target-ppc: Rename 7XX/60x/74XX/e600 PMU SPRs

2014-05-27 Thread Alexey Kardashevskiy
As defined in Linux kernel, PMC*, SIAR, MMCR0/1 have different numbers for 32 and 64 bit POWERPC. We are going to support 64bit versions too so let's rename 32bit ones to avoid confusion. This is a mechanical patch so it does not fix obvious mistake with these registers in POWER7 yet, this will

[Qemu-devel] [PATCH v3 11/24] target-ppc: Remove check_pow_970FX

2014-05-27 Thread Alexey Kardashevskiy
After merging 970s into one class, check_pow_970() is used for all of them. Since POWER5+ is no different in the matter of supported power modes, let's use the same check_pow() callback for POWER5+ too, Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru --- target-ppc/translate_init.c | 10

[Qemu-devel] [PATCH v3 14/24] target-ppc: Move POWER7/8 SPR registration to helpers

2014-05-27 Thread Alexey Kardashevskiy
This puts SPRs into groups and moves their registration to group helpers. Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru --- target-ppc/translate_init.c | 161 +++- 1 file changed, 85 insertions(+), 76 deletions(-) diff --git

[Qemu-devel] [PATCH v3 19/24] target-ppc: Add POWER8's TM SPRs

2014-05-27 Thread Alexey Kardashevskiy
This adds TM (Transactional Memory) SPRs. Since TEXASRU is an upper half of TEXASR, special handling is needed here. This adds two helpers: spr_read_prev_upper32()/spr_write_prev_upper32(). They read/write upper half of a previous 64bit SPR. Since TEXASR and TEXASRU have consequent numbers, that

[Qemu-devel] [PATCH v3 12/24] target-ppc: Enable Hypervisor State bit in MSR for POWER5+

2014-05-27 Thread Alexey Kardashevskiy
PowerISA 2.03 defines the HV bit. Since POWER5+ is 2.03-compliant, enable the bit in msr_mask. Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru --- target-ppc/translate_init.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c index

[Qemu-devel] [PATCH v3 22/24] KVM: target-ppc: Enable transactional state migration

2014-05-27 Thread Alexey Kardashevskiy
This adds migration support for registers saved before transaction started. Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru --- target-ppc/cpu.h | 19 +++ target-ppc/kvm.c | 38 ++ target-ppc/machine.c | 35

[Qemu-devel] [PATCH v3 24/24] spapr_hcall: Add address-translation-mode-on-interrupt resource in H_SET_MODE

2014-05-27 Thread Alexey Kardashevskiy
This adds handling of the RESOURCE_ADDR_TRANS_MODE resource from the H_SET_MODE, for POWER8 (PowerISA 2.07) only. This defines AIL flags for LPCR special register. This changes @excp_prefix according to the mode, takes effect in TCG. This turns support of a new capability PPC2_ISA207S flag for

[Qemu-devel] [PATCH v3 00/24] book3s powerpc classes rework

2014-05-27 Thread Alexey Kardashevskiy
Started as POWER7/8 SPRs patchset, this became a rework of book3s/970 CPU classes initialization. The aim is to boot little endian guests in TCG mode with -cpu POWER8 (ironically, POWER8 emulation still fails, debugging it now but most of the set is still valid). Please comment. Alexey

[Qemu-devel] [PATCH v3 16/24] target-ppc: Add POWER7's TIR SPR

2014-05-27 Thread Alexey Kardashevskiy
This adds TIR (Thread Identification Register) SPR first defined in PowerISA 2.05. Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru --- target-ppc/cpu.h| 1 + target-ppc/translate_init.c | 5 + 2 files changed, 6 insertions(+) diff --git a/target-ppc/cpu.h b/target-ppc/cpu.h

[Qemu-devel] [PATCH v3 23/24] spapr_hcall: Split h_set_mode()

2014-05-27 Thread Alexey Kardashevskiy
This moves H_SET_MODE_RESOURCE_LE handler to a separate function as there are other resources coming and this is going to become ugly. Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru --- Changes: v2: * s/becode/become/ in commit log --- hw/ppc/spapr_hcall.c | 67

[Qemu-devel] [PATCH v3 21/24] target-ppc: Enable PPR and VRSAVE SPRs migration

2014-05-27 Thread Alexey Kardashevskiy
This hooks SPR with theit KVM set_one_reg counterparts which enables their migration. Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru --- target-ppc/translate_init.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/target-ppc/translate_init.c

[Qemu-devel] [PATCH v3 20/24] target-ppc: Add more POWER8's branch control SPRs

2014-05-27 Thread Alexey Kardashevskiy
POWER8 supports Event-Based Branch Facility (EBB) and Target Address Register (TAR). They are controlled via set of SPRs access to which should generate an Facility Unavailable interrupt if the facilities are not enabled in FSCR for problem state. This adds EBB and TAR SPRs. This adds

[Qemu-devel] [PATCH v3 17/24] target-ppc: Add POWER8's MMCR2/MMCRS SPRs

2014-05-27 Thread Alexey Kardashevskiy
This adds POWER8 specific PMU MMCR2/MMCRS SPRs. Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru --- target-ppc/cpu.h| 3 +++ target-ppc/translate_init.c | 17 + 2 files changed, 20 insertions(+) diff --git a/target-ppc/cpu.h b/target-ppc/cpu.h index

[Qemu-devel] [PATCH v3 06/24] target-ppc: Enable writes to user-privileged PMU registers

2014-05-27 Thread Alexey Kardashevskiy
This adds spr_write_ureg() helper and uses it for UPMCx and MMCR0 SPRs. Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru --- target-ppc/translate_init.c | 25 +++-- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/target-ppc/translate_init.c

[Qemu-devel] [PATCH v3 02/24] target-ppc: Merge 970FX and 970MP into a single 970 class

2014-05-27 Thread Alexey Kardashevskiy
The differences between classes were: 1. SLB size, was 32 for 970 and 64 for others, should be 64 for all; 2. check_pow() callback, HID0 format is the same so should be the same 0x01C0 which means deep nap, doze and nap bits set; 3. LPCR - 970 does not have it but 970MP had one (by mistake).

[Qemu-devel] [PATCH v3 07/24] target-ppc: Add PMC5/6, SDAR and MMCRA to 970 family

2014-05-27 Thread Alexey Kardashevskiy
MMCR0, MMCR1, MMCRA, PMC1..6, SIAR, SDAR are defined for 970 and PowerISA CPUs. Since we are building common infrastructure for SPRs intialization to share it between 970 and POWER5+/7/..., let's add missing SPRs to the 970 family. Later rework of CPU class initialization will use those for all

Re: [Qemu-devel] [PATCH 01/18] migration: dump vmstate info as a json file for static analysis

2014-05-27 Thread Amit Shah
On (Wed) 21 May 2014 [05:45:25], Eric Blake wrote: On 05/12/2014 10:12 PM, Amit Shah wrote: Hi, On (Mon) 12 May 2014 [06:51:54], Eric Blake wrote: On 05/12/2014 05:16 AM, Amit Shah wrote: This commit adds a new command, '-dump-vmstate', that takes a filename as a parameter. When

Re: [Qemu-devel] [PATCH 01/18] migration: dump vmstate info as a json file for static analysis

2014-05-27 Thread Amit Shah
On (Wed) 21 May 2014 [13:47:44], Markus Armbruster wrote: Amit Shah amit.s...@redhat.com writes: On (Wed) 21 May 2014 [11:03:04], Dr. David Alan Gilbert wrote: * Amit Shah (amit.s...@redhat.com) wrote: The idea is to be able to take a qemu binary and compare with another binary; if

[Qemu-devel] [PATCH] arm: Bugfix: Fix cpu_reset() / vcpu_init() order

2014-05-27 Thread Christoffer Dall
This fix a bug introduced by commit 50a2c6e55fa2ce5a2916a2c206bad2c6b0e06df1, but I'm not sure it is a proper fix. Acked-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Christoffer Dall christoffer.d...@linaro.org --- target-arm/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

Re: [Qemu-devel] [PATCH] PPC: Fix popcntb opcode id

2014-05-27 Thread Tom Musta
On 5/23/2014 9:21 AM, Alexander Graf wrote: The popcntb opcode is at 31/122 according to the spec. In QEMU's internal opcode representation that sums up to 1f/1a/03. Fix the opcode definition to match on the correct ID. This fixes booting Linux with -cpu POWER7,compat=power6 in TCG mode

Re: [Qemu-devel] How to enable more than 2047 MB RAM on 32 bit host systems for 32 bit guests?

2014-05-27 Thread Gerd Hoffmann
On Di, 2014-05-27 at 09:33 +0200, Erik Rull wrote: Hi all, I would like to provide 3GB of RAM to my guest - I use kvm and don't see a real reason why this should not work. Currently, qemu-1.7.0 with kvm is in use. No way. Userspace has 3G address space on 32bit machines, and you can't

[Qemu-devel] [PATCH v3 09/24] target-ppc: Add HID4 SPR for PPC970

2014-05-27 Thread Alexey Kardashevskiy
Previously LPCR was registered for the 970 class which was wrong as it does not have LPCR. Instead, HID4 is used which this patch registers. Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru --- target-ppc/cpu.h| 1 + target-ppc/translate_init.c | 11 +++ 2 files changed,

Re: [Qemu-devel] x86 emulation on ARM host (Samsung Chromebook)

2014-05-27 Thread Richard W.M. Jones
On Wed, May 21, 2014 at 12:57:59PM +, Violaine V. wrote: Hi everyone, I’m trying to use QEMU (qemu-system-x86_64) to emulate an x86 virtual machine on an ARM host : a Samsung Chromebook with Cortex-A15 CPU. The Chromebook only has 2 GB of RAM and a relatively slow 32 bit processor, and

Re: [Qemu-devel] [PATCH 5/8] qemu-bridge-helper: Fix fd leak in main()

2014-05-27 Thread Stefan Hajnoczi
On Tue, May 27, 2014 at 09:40:02AM +0800, arei.gong...@huawei.com wrote: From: Gonglei arei.gong...@huawei.com Signed-off-by: Gonglei arei.gong...@huawei.com --- qemu-bridge-helper.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/qemu-bridge-helper.c

Re: [Qemu-devel] [PATCH 4/8] qcow2-cluster: Fix memory leak in copy_sectors

2014-05-27 Thread Stefan Hajnoczi
On Tue, May 27, 2014 at 09:40:01AM +0800, arei.gong...@huawei.com wrote: From: Gonglei arei.gong...@huawei.com Spotted by Coverity: (3) Event alloc_fn: Storage is returned from allocation function qemu_blockalign(BlockDriverState *, size_t). [details] (4) Event var_assign: Assigning:

Re: [Qemu-devel] Disk image fuzz testing (OPW)

2014-05-27 Thread Richard W.M. Jones
On Mon, May 26, 2014 at 01:53:57PM +0400, M.Kustova wrote: About fuzzer effectiveness. 'qemu-img' was set as the fuzzer target, so its commands under interest are any that modify or/and read an image. As first step, a tested command will be selected randomly or specified by user. qemu-io

  1   2   3   4   5   6   >