[Qemu-devel] [PATCH v3] XBZRLE: Fix qemu crash when resize the xbzrle cache

2014-02-22 Thread Gonglei (Arei)
Resizing the xbzrle cache during migration causes qemu-crash, because the main-thread and migration-thread modify the xbzrle cache size concurrently without lock-protection. Signed-off-by: ChenLiang chenlian...@huawei.com Signed-off-by: Gonglei arei.gong...@huawei.com Reviewed-by: Dr. David Alan

Re: [Qemu-devel] CentOS 5.x intermittently fails to boot on QEMU 1.7.0

2014-02-22 Thread Alex Bligh
On 22 Feb 2014, at 00:57, Matt Lupfer wrote: I did some more debugging and found the problem was elsewhere. This different timer behavior is exposing a bug in the HPET implementation. It's possible for the QEMU timer underlying the HPET to call the hpet_timer() callback between when the

Re: [Qemu-devel] CentOS 5.x intermittently fails to boot on QEMU 1.7.0

2014-02-22 Thread Paolo Bonzini
Il 22/02/2014 01:57, Matt Lupfer ha scritto: Thanks for the response. The hpet_timer() callback calls timer_mod() every 1 ms. That timerlist has no notify callback so it in turn calls qemu_notify_event(). The guest kernel is only enabling the HPET timer and looking for timer interrupts.

Re: [Qemu-devel] [PATCH] Don't enable a HPET timer if HPET is disabled

2014-02-22 Thread Paolo Bonzini
Il 22/02/2014 05:37, Matt Lupfer ha scritto: A HPET timer can be started when HPET is not yet enabled. This will not generate an interrupt to the guest, but causes problems when HPET is later enabled. A timer that is created and expires at least once before HPET is enabled will have an

Re: [Qemu-devel] [PATCH] Don't enable a HPET timer if HPET is disabled

2014-02-22 Thread Alex Bligh
On 22 Feb 2014, at 04:37, Matt Lupfer wrote: A HPET timer can be started when HPET is not yet enabled. This will not generate an interrupt to the guest, but causes problems when HPET is later enabled. A timer that is created and expires at least once before HPET is enabled will have an

Re: [Qemu-devel] [PATCH v7 0/2] target-ppc: CPU device tree id

2014-02-22 Thread Alexey Kardashevskiy
On 02/22/2014 01:51 PM, Benjamin Herrenschmidt wrote: On Sat, 2014-02-22 at 13:20 +1100, Alexey Kardashevskiy wrote: Sorry for bothering again. This is quite simple patchset, it does not touch a lot and just a small rework. This is v7, v1 was 31/10/2013 (~4 months), I sent ping to v5 5 times

Re: [Qemu-devel] [PATCH] Don't enable a HPET timer if HPET is disabled

2014-02-22 Thread Paolo Bonzini
Il 22/02/2014 10:03, Alex Bligh ha scritto: I am unfamiliar with the HPET code but symmetry suggests perhaps the 'else' condition should be changed too: } else if (deactivating_bit(old_val, new_val, HPET_TN_ENABLE) || !hpet_enabled(s)) {

Re: [Qemu-devel] [PATCH V2 3/3] qemu-io-test: Disable Quorum test when not compiled in.

2014-02-22 Thread Benoît Canet
The Saturday 22 Feb 2014 à 15:38:15 (+0800), Fam Zheng wrote : On Sat, 02/22 02:20, Benoît Canet wrote: Quorum is not compiled by default: make the quorum 081 test aware of this. Signed-off-by: Benoit Canet ben...@irqsave.net --- tests/qemu-iotests/081 | 3 +++ 1 file changed, 3

Re: [Qemu-devel] [Qemu-trivial] [PATCH] object: Report type in error when not user creatable.

2014-02-22 Thread Michael Tokarev
Thanks, applied to the trivial patches queue. /mjt

Re: [Qemu-devel] [Qemu-trivial] [PATCH 0/2] bswap: Clean prototypes of st* functions

2014-02-22 Thread Michael Tokarev
19.02.2014 09:11, Stefan Weil wrote: These modifications avoid type conversions for non optimized code. ld* function prototypes will follow later. [PATCH 1/2] bswap: Modify prototype of stb_p (avoid type [PATCH 2/2] bswap: Modify prototypes of st[wl]_{le,be}_p (avoid type Thanks, applied

[Qemu-devel] [PATCH] block/iscsi: fix segfault if writesame fails

2014-02-22 Thread Peter Lieven
commit fa6252b0 introduced a segfault because it tries to read iTask.task-sense after iTask.task has been freed. CC: qemu-sta...@nongnu.org Signed-off-by: Peter Lieven p...@kamp.de --- block/iscsi.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git

Re: [Qemu-devel] [PATCH] Don't enable a HPET timer if HPET is disabled

2014-02-22 Thread Alex Bligh
Paolo, On 22 Feb 2014, at 10:55, Paolo Bonzini wrote: Il 22/02/2014 10:03, Alex Bligh ha scritto: I am unfamiliar with the HPET code but symmetry suggests perhaps the 'else' condition should be changed too: } else if (deactivating_bit(old_val, new_val, HPET_TN_ENABLE) ||

[Qemu-devel] [RFC PATCH] block: optimize zero writes with bdrv_write_zeroes

2014-02-22 Thread Peter Lieven
this patch tries to optimize zero write requests by automatically using bdrv_write_zeroes if it is supported by the format. i know that there is a lot of potential for discussion, but i would like to know what the others think. this should significantly speed up file system initialization and

[Qemu-devel] [Bug 1278977] Re: qemu-system-sparc64 crash when initializing disk

2014-02-22 Thread wbx
Hi Mark, the strace is from qemu-system-sparc64 host process. Inside the running system (Linux 3.13.3, glib 2.19, busybox) I get: [pid 273] umask(0)= 022 [pid 273] umask(022) = 0 [pid 273] mkdir(perl-5.18.1/, 0777) = -1 EEXIST (File exists) [pid 273]

Re: [Qemu-devel] [PATCH 2/7] allwinner-a10-pic: fix interrupt clear behaviour

2014-02-22 Thread Beniamino Galvani
On Wed, Feb 19, 2014 at 10:02:36AM +0800, Li Guang wrote: Beniamino Galvani wrote: On Tue, Feb 18, 2014 at 11:49:51AM +0800, Li Guang wrote: Beniamino Galvani wrote: According to this mail thread [1], writing to pending register seems to have no effect on actual pending status of interrupts.

Re: [Qemu-devel] [PATCH] Don't enable a HPET timer if HPET is disabled

2014-02-22 Thread Paolo Bonzini
Il 22/02/2014 13:25, Alex Bligh ha scritto: Paolo, On 22 Feb 2014, at 10:55, Paolo Bonzini wrote: Il 22/02/2014 10:03, Alex Bligh ha scritto: I am unfamiliar with the HPET code but symmetry suggests perhaps the 'else' condition should be changed too: } else if

Re: [Qemu-devel] [PATCH] KVM: x86: expose new instruction RDSEED to guest

2014-02-22 Thread Paolo Bonzini
Il 21/02/2014 18:33, Liu, Jinsong ha scritto: From 24ffdce9efebf13c6ed4882f714b2b57ef1141eb Mon Sep 17 00:00:00 2001 From: Liu Jinsong jinsong@intel.com Date: Thu, 20 Feb 2014 17:38:26 +0800 Subject: [PATCH] KVM: x86: expose new instruction RDSEED to guest RDSEED instruction return a random

Re: [Qemu-devel] [PATCH] KVM: x86: Fix xsave cpuid exposing bug

2014-02-22 Thread Paolo Bonzini
Il 21/02/2014 18:39, Liu, Jinsong ha scritto: From 00c920c96127d20d4c3bb790082700ae375c39a0 Mon Sep 17 00:00:00 2001 From: Liu Jinsong jinsong@intel.com Date: Fri, 21 Feb 2014 23:47:18 +0800 Subject: [PATCH] KVM: x86: Fix xsave cpuid exposing bug EBX of cpuid(0xD, 0) is dynamic per XCR0

Re: [Qemu-devel] [PATCH] KVM: x86: expose ADX feature to guest

2014-02-22 Thread Paolo Bonzini
Il 21/02/2014 18:36, Liu, Jinsong ha scritto: From 0750e335eb5860b0b483e217e8a08bd743cbba16 Mon Sep 17 00:00:00 2001 From: Liu Jinsong jinsong@intel.com Date: Thu, 20 Feb 2014 17:39:32 +0800 Subject: [PATCH] KVM: x86: expose ADX feature to guest ADCX and ADOX instructions perform an

Re: [Qemu-devel] [PATCH] block/iscsi: fix segfault if writesame fails

2014-02-22 Thread Paolo Bonzini
Il 22/02/2014 13:17, Peter Lieven ha scritto: commit fa6252b0 introduced a segfault because it tries to read iTask.task-sense after iTask.task has been freed. CC: qemu-sta...@nongnu.org Not needed, it's not in the 1.7.1 pending release. Applied to scsi-next, thanks. Paolo Signed-off-by:

Re: [Qemu-devel] [PATCH V2 3/3] qemu-io-test: Disable Quorum test when not compiled in.

2014-02-22 Thread Fam Zheng
On Sat, 02/22 12:58, Benoît Canet wrote: The Saturday 22 Feb 2014 à 15:38:15 (+0800), Fam Zheng wrote : On Sat, 02/22 02:20, Benoît Canet wrote: Quorum is not compiled by default: make the quorum 081 test aware of this. Signed-off-by: Benoit Canet ben...@irqsave.net ---

Re: [Qemu-devel] [RFC PATCH] block: optimize zero writes with bdrv_write_zeroes

2014-02-22 Thread Fam Zheng
On Sat, 02/22 14:00, Peter Lieven wrote: this patch tries to optimize zero write requests by automatically using bdrv_write_zeroes if it is supported by the format. i know that there is a lot of potential for discussion, but i would like to know what the others think. this should

[Qemu-devel] [PATCH V3 0/3] Fix some quorum nits after merge

2014-02-22 Thread Benoît Canet
in v3: use $QEMU_IMG (Fam) apply Eric reviewed by in v2: make error optional and return strerror(-ret) [Eric] better documentation of the error string [Eric] apply Eric reviewed by Benoît Canet (3): qmp: Fix BlockdevOptionQuorum. qmp: Make Quorum error events more

[Qemu-devel] [PATCH V3 1/3] qmp: Fix BlockdevOptionQuorum.

2014-02-22 Thread Benoît Canet
Fix some nits before QEMU 2.0 freeze. Signed-off-by: Benoit Canet ben...@irqsave.net Reviewed-by: Eric Blake ebl...@redhat.com --- qapi-schema.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/qapi-schema.json b/qapi-schema.json index fcb22800..ab5cdde 100644 ---

[Qemu-devel] [PATCH V3 3/3] qemu-io-test: Disable Quorum test when not compiled in.

2014-02-22 Thread Benoît Canet
Quorum is not compiled by default: make the quorum 081 test aware of this. Signed-off-by: Benoit Canet ben...@irqsave.net --- tests/qemu-iotests/081 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/qemu-iotests/081 b/tests/qemu-iotests/081 index f053f11..b512d00 100755 ---

[Qemu-devel] [PATCH V3 2/3] qmp: Make Quorum error events more palatable.

2014-02-22 Thread Benoît Canet
Insert quorum QMP events documentation alphabetically. Also change the ret errno value by an optional error being an strerror(-ret) in the QUORUM_REPORT_BAD qmp event. Signed-off-by: Benoit Canet ben...@irqsave.net Reviewed-by: Eric Blake ebl...@redhat.com --- block/quorum.c | 9

[Qemu-devel] [Bug 1283519] [NEW] PowerPC altivec rounding instructions vrfi(m|n|z)not correctly mapped

2014-02-22 Thread Mathias Gaunard
Public bug reported: When using ppc-linux-user/qemu-ppc on a ppc ELF executable, I see that QEMU wrongly recognizes the vrfim, vrfin and vrfiz instructions: If the binary contains vrfim QEMU sees vrfiz If the binary contains vrfin QEMU sees vrfim If the binary contains vrfiz QEMU sees vrfin The

[Qemu-devel] [Bug 1256546] Re: qemu-s390x-static: segmentation fault entering chroot

2014-02-22 Thread Bug Watch Updater
** Changed in: qemu (Debian) Status: Unknown = New -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1256546 Title: qemu-s390x-static: segmentation fault entering chroot Status in QEMU:

[Qemu-devel] [Bug 1256546] Re: qemu-s390x-static: segmentation fault entering chroot

2014-02-22 Thread Mitsuya Shibata
** Bug watch added: Debian Bug tracker #739800 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=739800 ** Also affects: qemu (Debian) via http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=739800 Importance: Unknown Status: Unknown -- You received this bug notification because you

Re: [Qemu-devel] [PATCH 1/2 v2] pci: change default value of rom_bar to 2

2014-02-22 Thread Alex Williamson
On Thu, 2014-02-20 at 10:12 +0200, Michael S. Tsirkin wrote: On Wed, Feb 19, 2014 at 03:20:54PM -0500, Bandan Das wrote: The following patch depends on the value of rom_bar to determine rom blacklist behavior. Existing code shouldn't be affected by changing the default value of rom_bar

Re: [Qemu-devel] [PULL 04/54] block: Add reference parameter to bdrv_open()

2014-02-22 Thread Fam Zheng
On Fri, 02/21 23:12, Kevin Wolf wrote: From: Max Reitz mre...@redhat.com Allow bdrv_open() to handle references to existing block devices just as bdrv_file_open() is already capable of. Signed-off-by: Max Reitz mre...@redhat.com Signed-off-by: Kevin Wolf kw...@redhat.com --- block.c

[Qemu-devel] [PATCH v15 00/14] Drop in_use from BlockDriverState and enable point-in-time snapshot exporting over NBD

2014-02-22 Thread Fam Zheng
This series adds for point-in-time snapshot NBD exporting based on blockdev-backup (variant of drive-backup with existing device as target). We get a thin point-in-time snapshot by COW mechanism of drive-backup, and export it through built in NBD server. The steps are as below: 1. (SHELL)

[Qemu-devel] [PATCH v15 03/14] block: Replace in_use with operation blocker

2014-02-22 Thread Fam Zheng
This drops BlockDriverState.in_use with op_blockers: - Call bdrv_op_block_all in place of bdrv_set_in_use(bs, 1). - Call bdrv_op_unblock_all in place of bdrv_set_in_use(bs, 0). - Check bdrv_op_is_blocked() in place of bdrv_in_use(bs). The specific types are used, e.g. in place of

[Qemu-devel] [PATCH v15 02/14] block: Introduce op_blockers to BlockDriverState

2014-02-22 Thread Fam Zheng
BlockDriverState.op_blockers is an array of lists with BLOCK_OP_TYPE_MAX elements. Each list is a list of blockers of an operation type (BlockOpType), that marks this BDS as currently blocked for a certain type of operation with reason errors stored in the list. The rule of usage is: * BDS user

[Qemu-devel] [PATCH v15 01/14] block: Add BlockOpType enum

2014-02-22 Thread Fam Zheng
This adds the enum of all the operations that can be taken on a block device. Signed-off-by: Fam Zheng f...@redhat.com Reviewed-by: Benoit Canet ben...@irqsave.net --- include/block/block.h | 19 +++ 1 file changed, 19 insertions(+) diff --git a/include/block/block.h

[Qemu-devel] [PATCH v15 05/14] block: Add bdrv_set_backing_hd()

2014-02-22 Thread Fam Zheng
This is the common but non-trivial steps to assign or change the backing_hd of BDS. Signed-off-by: Fam Zheng f...@redhat.com --- block.c | 46 ++ include/block/block.h | 1 + 2 files changed, 39 insertions(+), 8 deletions(-) diff --git

[Qemu-devel] [PATCH v15 04/14] block: Move op_blocker check from block_job_create to its caller

2014-02-22 Thread Fam Zheng
It makes no sense to check for any blocker on bs, we are here only because of the mechanical conversion from in_use to op_blockers. Remove it now, and let the callers check specific operation types. Backup and mirror already have it, add checker to stream and commit. Signed-off-by: Fam Zheng

[Qemu-devel] [PATCH v15 09/14] stream: Use bdrv_drop_intermediate and drop close_unused_images

2014-02-22 Thread Fam Zheng
This reuses the new bdrv_drop_intermediate. Signed-off-by: Fam Zheng f...@redhat.com --- block/stream.c | 30 +- 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/block/stream.c b/block/stream.c index dd0b4ac..9cdcf0e 100644 --- a/block/stream.c +++

[Qemu-devel] [PATCH v15 08/14] block: Support dropping active in bdrv_drop_intermediate

2014-02-22 Thread Fam Zheng
Dropping intermediate could be useful both for commit and stream, and BDS refcnt plus bdrv_swap could do most of the job nicely. It also needs to work with op blockers. Signed-off-by: Fam Zheng f...@redhat.com --- block.c| 137 +++--

[Qemu-devel] [PATCH v15 14/14] qemu-iotests: Image fleecing test case 083

2014-02-22 Thread Fam Zheng
This tests the workflow of creating a lightweight point-in-time snapshot with blockdev-backup command and export it with built-in NBD server. It's tested that after the snapshot it created, writing to the original device doesn't change data that can be read from target with NBD. Signed-off-by:

[Qemu-devel] [PATCH v15 10/14] qmp: Add command 'blockdev-backup'

2014-02-22 Thread Fam Zheng
Similar to drive-backup, but this command uses a device id as target instead of creating/opening an image file. Also add blocker on target bs, since the target is also a named device now. Add check and report error for bs == target which became possible but is an illegal case with introduction

[Qemu-devel] [PATCH v15 07/14] block: Parse backing option to reference existing BDS

2014-02-22 Thread Fam Zheng
Now it's safe to allow reference for backing_hd in the interface. Signed-off-by: Fam Zheng f...@redhat.com --- block.c | 26 -- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/block.c b/block.c index edfbe59..a8d1012 100644 --- a/block.c +++ b/block.c @@

[Qemu-devel] [PATCH v15 11/14] block: Allow backup on referenced named BlockDriverState

2014-02-22 Thread Fam Zheng
Drive backup is a read only operation on source bs. We want to allow this specific case to enable image-fleecing. Note that when image-fleecing job starts, the job still add its blocker to source bs, and any other operation on it will be blocked by that. Signed-off-by: Fam Zheng f...@redhat.com

[Qemu-devel] [PATCH v15 12/14] block: Add blockdev-backup to transaction

2014-02-22 Thread Fam Zheng
Signed-off-by: Fam Zheng f...@redhat.com --- blockdev.c | 48 qapi-schema.json | 1 + 2 files changed, 49 insertions(+) diff --git a/blockdev.c b/blockdev.c index 5ffae90..5db5bbb 100644 --- a/blockdev.c +++ b/blockdev.c @@ -1409,6 +1409,49

[Qemu-devel] [PATCH v15 13/14] qemu-iotests: Test blockdev-backup in 055

2014-02-22 Thread Fam Zheng
This applies cases on drive-backup on blockdev-backup, except cases with target format and mode. Also add a case to check source == target. Signed-off-by: Fam Zheng f...@redhat.com --- tests/qemu-iotests/055 | 275 ++--- tests/qemu-iotests/055.out |

[Qemu-devel] A problem of VM with nbd network disk

2014-02-22 Thread Caizhifeng
Hello, I've been tring to use QEMU-1.5.0 and Libvirt-1.1.0 to run a VM with a nbd network disk, the VM is created by Libvirt as follow(Please attention to the red words): root@xxx-11:~# ps -ef | grep kvm root 1647 2 0 Feb05 ?00:00:00 [kvm-irqfd-clean] root 8304 1 37

[Qemu-devel] [PATCH v15 06/14] block: Add backing_blocker in BlockDriverState

2014-02-22 Thread Fam Zheng
This makes use of op_blocker and blocks all the operations except for commit target, on each BlockDriverState-backing_hd. The asserts for op_blocker in bdrv_swap are removed because with this change, the target of block commit has at least the backing blocker of its child, so the assertion is not

[Qemu-devel] Questions about timer

2014-02-22 Thread Xuebing Wang
Hi Community, I am new to qemu, I am trying to familiarize myself with aarch64 timer/interrupt support (maybe someone already did this, but not merged into mainline yet). As shown in include/qemu/timer.h, there are 6 categories of APIs: - QEMUClockType - QEMUTimerList - QEMUTimerListGroup -

[Qemu-devel] [PATCH] hw/9pfs: use g_strdup_printf() instead of PATH_MAX limitation

2014-02-22 Thread Chen Gang
When path is truncated by PATH_MAX limitation, it causes QEMU to access incorrect file. So use original full path instead of PATH_MAX within 9pfs (need check/process ENOMEM for related memory allocation). Also find/fix several another related issues when failure occurs. - check 'fh' in

Re: [Qemu-devel] [PATCH] hw/9pfs: use g_strdup_printf() instead of PATH_MAX limitation

2014-02-22 Thread Chen Gang
During the test, I found that if the path is long, the performance is very very slow under 9pfs (whether apply this patch or not, the results are the same). So after this patch passes checking, I will/should analyse this performance issue, next. Thanks. On 02/23/2014 12:48 PM, Chen Gang wrote:

Re: [Qemu-devel] [PATCH 1/2 v2] pci: change default value of rom_bar to 2

2014-02-22 Thread Michael S. Tsirkin
On Sat, Feb 22, 2014 at 04:28:26PM -0700, Alex Williamson wrote: On Thu, 2014-02-20 at 10:12 +0200, Michael S. Tsirkin wrote: On Wed, Feb 19, 2014 at 03:20:54PM -0500, Bandan Das wrote: The following patch depends on the value of rom_bar to determine rom blacklist behavior. Existing code

Re: [Qemu-devel] [PATCH] virtio-net: calculate proper msix vectors on init

2014-02-22 Thread Michael S. Tsirkin
On Fri, Feb 21, 2014 at 01:00:57PM +0800, Jason Wang wrote: Currently, the default msix vectors for virtio-net-pci is 3 which is obvious not suitable for multiqueue guest, so we depends on the user or management tools to pass a correct vectors parameter. In fact, we can simplifying this by

[Qemu-devel] [PATCH v2 1/2] usb-hid: Add high speed mouse configuration

2014-02-22 Thread Jan Vesely
v2: add usb_mouse_properties use macros for bmAttributes Signed-off-by: Jan Vesely jano.ves...@gmail.com --- hw/usb/dev-hid.c | 73 +--- 1 file changed, 65 insertions(+), 8 deletions(-) diff --git a/hw/usb/dev-hid.c b/hw/usb/dev-hid.c

[Qemu-devel] [PATCH v2 2/2] usb-hid: Add high speed keyboard configuration

2014-02-22 Thread Jan Vesely
v2: add usb_keyboard_properties use macros for bmAttributes Signed-off-by: Jan Vesely jano.ves...@gmail.com --- hw/usb/dev-hid.c | 73 +--- 1 file changed, 65 insertions(+), 8 deletions(-) diff --git a/hw/usb/dev-hid.c b/hw/usb/dev-hid.c