Re: [Qemu-devel] [PATCH 2/4] spapr: Enable DABRX special register

2014-04-04 Thread Alexey Kardashevskiy
On 04/04/2014 12:19 AM, Alexander Graf wrote: On 03.04.14 15:14, Alexey Kardashevskiy wrote: This advertises Data Address Breakpoint Register Extension (DABRX) to the guest via hyperrtas list and enables it to migrate. Do all CPUs we support (970 anyone) have DABRX support? 970MP and

Re: [Qemu-devel] [PATCH] spapr: skip adding usb keyboard/mouse in case of -nodefaults

2014-04-04 Thread Markus Armbruster
Nikunj A Dadhania nik...@linux.vnet.ibm.com writes: The following commit caused the regression in qemu-system-ppc64 7effdaa3: spapr: Fix return value of vga initialization d44229c5: Fix vga_interface_type for command line argument '-device VGA' Even when -nodefaults was provided, USB

Re: [Qemu-devel] [PATCH 2.0] PPC: E500: Set PIR default reset value rather than SPR value

2014-04-04 Thread Alexander Graf
Am 04.04.2014 um 02:26 schrieb Alexey Kardashevskiy a...@ozlabs.ru: On 04/04/2014 05:58 AM, Alexander Graf wrote: On 03.04.2014, at 20:55, Peter Maydell peter.mayd...@linaro.org wrote: On 3 April 2014 19:48, Alexander Graf ag...@suse.de wrote: We now reset SPRs to their reset values

Re: [Qemu-devel] [PATCH] qga: trivial fix for unclear document of guest-set-time

2014-04-04 Thread Michal Privoznik
On 04.04.2014 02:53, Amos Kong wrote: We mixedly used guest time, system time, hardware time, RTC in document, it's unclear. This patch just added two remarks of RTC and replace two guest time by guest's system time. Signed-off-by: Amos Kong ak...@redhat.com Reviewed-by: Michal Privoznik

[Qemu-devel] [PATCH target-arm v1 1/1] net: cadence_gem: Make phy respond to broadcast

2014-04-04 Thread Peter Crosthwaite
Phys must respond to address 0 by specification. Implement. Signed-off-by: Nathan Rossi nathan.ro...@xilinx.com Signed-off-by: Peter Crosthwaite peter.crosthwa...@xilinx.com --- hw/net/cadence_gem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/net/cadence_gem.c

Re: [Qemu-devel] [PATCH 3/4] KVM: PPC: Support POWER8 registers

2014-04-04 Thread Alexey Kardashevskiy
On 04/04/2014 06:12 AM, Tom Musta wrote: On 4/3/2014 8:33 AM, Alexander Graf wrote: On 03.04.14 15:14, Alexey Kardashevskiy wrote: This enabled KVM and migration support for a number of POWER8 registers: snip Tom, please have a look through this as well :). --- snip ---

Re: [Qemu-devel] [PATCH 1/2] dma-helpers: Initialize DMAAIOCB in_cancel flag

2014-04-04 Thread Stefan Hajnoczi
On Fri, Mar 28, 2014 at 02:22:49PM +, Peter Maydell wrote: Initialize the dbs-in_cancel flag in dma_bdrv_io(), since qemu_aio_get() does not return zero-initialized memory. Spotted by the clang sanitizer (which complained when the value loaded in dma_complete() was not valid for a bool

[Qemu-devel] [PATCH] spapr_nvram: Correct max nvram size

2014-04-04 Thread Alexey Kardashevskiy
Currently it is UINT16_MAX*16 = 65536*16 = 1048560 which is not a round number and therefore a bit confusing. This defines MAX_NVRAM_SIZE precisely as 1MB. Suggested-by: Thomas Huth th...@linux.vnet.ibm.com Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru --- hw/nvram/spapr_nvram.c | 2 +- 1

Re: [Qemu-devel] [PATCH v7] net: L2TPv3 transport

2014-04-04 Thread Stefan Hajnoczi
On Mon, Mar 31, 2014 at 03:39:19PM +0100, anton.iva...@kot-begemot.co.uk wrote: +static void net_l2tpv3_process_queue(NetL2TPV3State *s) +{ +int size = 0; +struct iovec *vec; +bool bad_read; +int data_size; +struct mmsghdr *msgvec; + +/* go into ring mode only if

Re: [Qemu-devel] [PATCH 2.0] PPC: E500: Set PIR default reset value rather than SPR value

2014-04-04 Thread Frederic Konrad
Hi Alex, Seems to works for me ;). On 03/04/2014 20:48, Alexander Graf wrote: We now reset SPRs to their reset values on CPU reset. So if we want to have an SPR persistently changed, we need to change its default reset value rather than the value itself manually. Do this for SPR_BOOKE_PIR,

Re: [Qemu-devel] [PATCH] qcow2: Flush metadata during read-only reopen

2014-04-04 Thread Stefan Hajnoczi
On Thu, Apr 03, 2014 at 03:46:32PM +0200, Kevin Wolf wrote: If lazy refcounts are enabled for a backing file, committing to this backing file may leave it in a dirty state even if the commit succeeds. The reason is that the bdrv_flush() call in bdrv_commit() doesn't flush refcount updates with

Re: [Qemu-devel] [PATCH v5 34/37] target-arm: Implement CBAR for Cortex-A57

2014-04-04 Thread Peter Maydell
On 4 April 2014 06:32, Peter Crosthwaite peter.crosthwa...@xilinx.com wrote: +if (arm_feature(env, ARM_FEATURE_AARCH64)) { +/* 32 bit view is [31:18] 0...0 [43:32]. */ +uint32_t cbar32 = cpu-reset_cbar Should you extract64 on the lower order bits as well to

Re: [Qemu-devel] [PATCH] spapr: skip adding usb keyboard/mouse in case of -nodefaults

2014-04-04 Thread Nikunj A Dadhania
Markus Armbruster arm...@redhat.com writes: Nikunj A Dadhania nik...@linux.vnet.ibm.com writes: Have you considered extending QEMUMachineInitArgs instead of adding this function? Did not think of this option earlier. You mean doing something like this? diff --git a/hw/ppc/spapr.c

Re: [Qemu-devel] Documentation tools for QEMU

2014-04-04 Thread Paolo Bonzini
Il 03/04/2014 20:56, Anirudha Bose ha scritto: Hi Paolo ! I would like to volunteer to develop Documentation tools for QEMU during my summer holidays. Yesterday I had expressed my intent to work on this project in the IRC channel of QEMU. This is a follow up email of your reply. That's

Re: [Qemu-devel] [PATCH v5 01/24] vmstate: reduce code duplication

2014-04-04 Thread Juan Quintela
Michael S. Tsirkin m...@redhat.com wrote: move size offset and number of elements math out to functions, to reduce code duplication. Signed-off-by: Michael S. Tsirkin m...@redhat.com Cc: Dr. David Alan Gilbert dgilb...@redhat.com Reviewed-by: Juan Quintela quint...@redhat.com Added to

[Qemu-devel] [PATCH-trivial v2] vl: Report accelerator not supported for target more nicely

2014-04-04 Thread Chen Gang
When you ask for an accelerator not supported for your target, you get a bogus accelerator does not exist message: $ qemu-system-arm -machine none,accel=kvm KVM not supported for this target kvm accelerator does not exist. No accelerator found! Suppress it. Signed-off-by: Chen Gang

Re: [Qemu-devel] [PATCH v5 02/24] vmstate: add VMS_MUST_EXIST

2014-04-04 Thread Juan Quintela
Michael S. Tsirkin m...@redhat.com wrote: Can be used to verify a required field exists or validate state in some other way. Signed-off-by: Michael S. Tsirkin m...@redhat.com Reviewed-by: Dr. David Alan Gilbert dgilb...@redhat.com What should this do? We can change the semantics of

Re: [Qemu-devel] [PATCH v5 12/24] vmstate: fix buffer overflow in target-arm/machine.c

2014-04-04 Thread Juan Quintela
Michael S. Tsirkin m...@redhat.com wrote: CVE-2013-4531 cpreg_vmstate_indexes is a VARRAY_INT32. A negative value for cpreg_vmstate_array_len will cause a buffer overflow. VMSTATE_INT32_LE was supposed to protect against this but doesn't because it doesn't validate that input is

Re: [Qemu-devel] [PATCH v5 22/24] vmstate: s/VMSTATE_INT32_LE/VMSTATE_INT32_POSITIVE_LE/

2014-04-04 Thread Juan Quintela
Michael S. Tsirkin m...@redhat.com wrote: As the macro verifies the value is positive, rename it to make the function clearer. Signed-off-by: Michael S. Tsirkin m...@redhat.com Reviewed-by: Juan Quintela quint...@redhat.com

Re: [Qemu-devel] [PATCH v5 24/24] savevm: Ignore minimum_version_id_old if there is no load_state_old

2014-04-04 Thread Juan Quintela
Michael S. Tsirkin m...@redhat.com wrote: From: Peter Maydell peter.mayd...@linaro.org At the moment we require vmstate definitions to set minimum_version_id_old to the same value as minimum_version_id if they do not provide a load_state_old handler. Since the load_state_old functionality is

[Qemu-devel] [PATCH V2 2/4] vmxnet3: validate queues configuration coming from quest

2014-04-04 Thread Dmitry Fleytman
CVE-2013-4544 Signed-off-by: Dmitry Fleytman dmi...@daynix.com Reported-by: Michael S. Tsirkin m...@redhat.com Signed-off-by: Michael S. Tsirkin m...@redhat.com --- hw/net/vmxnet3.c | 19 ++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/hw/net/vmxnet3.c

[Qemu-devel] [PATCH V2 4/4] vmxnet3: validate queues configuration read on migration

2014-04-04 Thread Dmitry Fleytman
CVE-2013-4544 Signed-off-by: Dmitry Fleytman dmi...@daynix.com Reported-by: Michael S. Tsirkin m...@redhat.com Signed-off-by: Michael S. Tsirkin m...@redhat.com --- hw/net/vmxnet3.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c index a0723c0..ddcee4b

[Qemu-devel] [PATCH V2 1/4] vmxnet3: validate interrupt indices coming from guest

2014-04-04 Thread Dmitry Fleytman
CVE-2013-4544 Signed-off-by: Dmitry Fleytman dmi...@daynix.com Reported-by: Michael S. Tsirkin m...@redhat.com Signed-off-by: Michael S. Tsirkin m...@redhat.com --- hw/net/vmxnet3.c | 36 ++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git

[Qemu-devel] [PATCH V2 0/4] CVE-2013-4544

2014-04-04 Thread Dmitry Fleytman
Changes since V1: * Comments added and extended as sugested by Dave and Michael Dmitry Fleytman (4): vmxnet3: validate interrupt indices coming from guest vmxnet3: validate queues configuration coming from quest vmxnet3: validate interrupt indices read on migration vmxnet3: validate

[Qemu-devel] [PATCH V2 3/4] vmxnet3: validate interrupt indices read on migration

2014-04-04 Thread Dmitry Fleytman
CVE-2013-4544 Signed-off-by: Dmitry Fleytman dmi...@daynix.com Reported-by: Michael S. Tsirkin m...@redhat.com Signed-off-by: Michael S. Tsirkin m...@redhat.com --- hw/net/vmxnet3.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c index 4fefc7b..a0723c0

Re: [Qemu-devel] [PATCH v4 27/30] vmxnet3: validate interrupt indices coming from guest

2014-04-04 Thread Dmitry Fleytman
On Apr 3, 2014, at 19:07 PM, Michael S. Tsirkin m...@redhat.com wrote: On Tue, Apr 01, 2014 at 02:07:52PM +0100, Dr. David Alan Gilbert wrote: * Dmitry Fleytman (dmi...@daynix.com) wrote: On Apr 1, 2014, at 14:33 PM, Dr. David Alan Gilbert dgilb...@redhat.com wrote: * Michael S.

Re: [Qemu-devel] [PATCH v5 09/24] hpet: fix buffer overrun on invalid state load

2014-04-04 Thread Juan Quintela
Michael S. Tsirkin m...@redhat.com wrote: CVE-2013-4527 hw/timer/hpet.c buffer overrun hpet is a VARRAY with a uint8 size but static array of 32 To fix, make sure num_timers is valid using VMSTATE_VALID hook. Reported-by: Anthony Liguori anth...@codemonkey.ws Signed-off-by: Michael S.

Re: [Qemu-devel] [PATCH v5 02/24] vmstate: add VMS_MUST_EXIST

2014-04-04 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: Michael S. Tsirkin m...@redhat.com wrote: Can be used to verify a required field exists or validate state in some other way. Signed-off-by: Michael S. Tsirkin m...@redhat.com Reviewed-by: Dr. David Alan Gilbert dgilb...@redhat.com What

[Qemu-devel] [PATCH v5 00/10] migration: Optimizate the xbzrle and fix one corruption issue

2014-04-04 Thread arei.gonglei
From: ChenLiang chenlian...@huawei.com V5--V4 * Fix two issues: one is cache_insert don't update the page which has been in the cache. Another avoiding the risk that run xbzrle_encode_buffer on changing data. a. Optimization the xbzrle remarkable decrease the cache misses. The

[Qemu-devel] [PATCH v5 09/10] migration: optimize xbzrle by reducing data copy

2014-04-04 Thread arei.gonglei
From: ChenLiang chenlian...@huawei.com Reducing data copy can reduce cpu overhead. Signed-off-by: ChenLiang chenlian...@huawei.com Signed-off-by: Gonglei arei.gong...@huawei.com --- arch_init.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/arch_init.c b/arch_init.c

[Qemu-devel] [PATCH v5 10/10] migration: clear the dead code

2014-04-04 Thread arei.gonglei
From: ChenLiang chenlian...@huawei.com clear the dead code Signed-off-by: ChenLiang chenlian...@huawei.com Signed-off-by: Gonglei arei.gong...@huawei.com Reviewed-by: Juan Quintela quint...@redhat.com --- arch_init.c | 13 - page_cache.c | 58

[Qemu-devel] [PATCH v5 04/10] migration: expose xbzrle cache miss rate

2014-04-04 Thread arei.gonglei
From: ChenLiang chenlian...@huawei.com expose xbzrle cache miss rate Signed-off-by: ChenLiang chenlian...@huawei.com Signed-off-by: Gonglei arei.gong...@huawei.com Reviewed-by: Eric Blake ebl...@redhat.com --- arch_init.c | 18 ++ hmp.c

[Qemu-devel] [PATCH v5 06/10] XBZRLE: rebuild the cache_is_cached function

2014-04-04 Thread arei.gonglei
From: ChenLiang chenlian...@huawei.com Rebuild the cache_is_cached function by cache_get_by_addr. And drops the asserts because the caller is also asserting the same thing. Signed-off-by: ChenLiang chenlian...@huawei.com Signed-off-by: Gonglei arei.gong...@huawei.com Reviewed-by: Dr. David Alan

[Qemu-devel] [PATCH v5 03/10] migration: expose the bitmap_sync_count to the end

2014-04-04 Thread arei.gonglei
From: ChenLiang chenlian...@huawei.com expose the count that logs the times of updating the dirty bitmap to end user. Signed-off-by: ChenLiang chenlian...@huawei.com Signed-off-by: Gonglei arei.gong...@huawei.com Reviewed-by: Eric Blake ebl...@redhat.com --- arch_init.c | 1 +

[Qemu-devel] [PATCH v5 05/10] XBZRLE: optimize XBZRLE to decrease the cache misses

2014-04-04 Thread arei.gonglei
From: ChenLiang chenlian...@huawei.com Avoid hot pages being replaced by others to remarkably decrease cache misses Sample results with the test program which quote from xbzrle.txt ran in vm:(migrate bandwidth:1GE and xbzrle cache size 8MB) the test program: include stdlib.h include stdio.h

[Qemu-devel] [PATCH v5 07/10] xbzrle: don't check the value in the vm ram repeatedly

2014-04-04 Thread arei.gonglei
From: ChenLiang chenlian...@huawei.com xbzrle_encode_buffer checks the value in the vm ram repeatedly. It is risk if runs xbzrle_encode_buffer on changing data. And it is not necessary. Reported-by: Dr. David Alan Gilbert dgilb...@redhat.com Signed-off-by: ChenLiang chenlian...@huawei.com

[Qemu-devel] [PATCH v5 08/10] xbzrle: check 8 bytes at a time after an concurrency scene

2014-04-04 Thread arei.gonglei
From: ChenLiang chenlian...@huawei.com The logic of old code is correct. But Checking byte by byte will consume time after an concurrency scene. Signed-off-by: ChenLiang chenlian...@huawei.com Signed-off-by: Gonglei arei.gong...@huawei.com --- xbzrle.c | 28 ++-- 1 file

[Qemu-devel] [PATCH v5 01/10] XBZRLE: Fix one XBZRLE corruption issues

2014-04-04 Thread arei.gonglei
From: ChenLiang chenlian...@huawei.com The page may not be inserted into cache after executing save_xbzrle_page. In case of failure to insert, the original page should be sent rather than the page in the cache. Signed-off-by: ChenLiang chenlian...@huawei.com Signed-off-by: Gonglei

[Qemu-devel] [PATCH v5 02/10] migration: Add counts of updating the dirty bitmap

2014-04-04 Thread arei.gonglei
From: ChenLiang chenlian...@huawei.com Add counts to log the times of updating the dirty bitmap. Signed-off-by: ChenLiang chenlian...@huawei.com Signed-off-by: Gonglei arei.gong...@huawei.com Reviewed-by: Eric Blake ebl...@redhat.com --- arch_init.c | 5 + 1 file changed, 5 insertions(+)

[Qemu-devel] [PATCH v3 4/4] gtk: Add Grab On Click option

2014-04-04 Thread Takashi Iwai
I simply like it better, you don't? :) Signed-off-by: Takashi Iwai ti...@suse.de --- ui/gtk.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/ui/gtk.c b/ui/gtk.c index 6668bd8226d5..4427d9f6c1e9 100644 --- a/ui/gtk.c +++ b/ui/gtk.c @@ -141,6 +141,7 @@ typedef struct

[Qemu-devel] [PATCH v3 3/4] gtk: Remember the last grabbed pointer position

2014-04-04 Thread Takashi Iwai
It's pretty annoying that the pointer reappears at a random place once after grabbing and ungrabbing the input. Better to restore to the original position where the pointer was grabbed. Reference: https://bugzilla.novell.com/show_bug.cgi?id=849587 Tested-by: Cole Robinson crobi...@redhat.com

[Qemu-devel] [PATCH v3 1/4] gtk: Use gtk generic event signal instead of motion-notify-event

2014-04-04 Thread Takashi Iwai
The GDK motion-notify-event isn't generated when the pointer goes out of the target window even if the pointer is grabbed, which essentially means to lose the pointer tracking in gtk-ui. Meanwhile the generic event signal is sent when the pointer is grabbed, so we can use this and pick the motion

[Qemu-devel] [PATCH v3 2/4] gtk: Fix the relative pointer tracking mode

2014-04-04 Thread Takashi Iwai
The relative pointer tracking mode was still buggy even after the previous fix of the motion-notify-event since the events are filtered out when the pointer moves outside the drawing window due to the boundary check for the absolute mode. This patch fixes the issue by moving the unnecessary

[Qemu-devel] [PATCH v3 0/4] Fix relative pointer tracking on Gtk UI

2014-04-04 Thread Takashi Iwai
Hi, this is the revisited patch series. The only difference from v2 is that now they are checkpatch-clean and Cole's acks have been added to patches 1-3. Takashi

Re: [Qemu-devel] [PATCH-trivial v2] vl: Report accelerator not supported for target more nicely

2014-04-04 Thread Markus Armbruster
Chen Gang gang.chen.5...@gmail.com writes: When you ask for an accelerator not supported for your target, you get a bogus accelerator does not exist message: $ qemu-system-arm -machine none,accel=kvm KVM not supported for this target kvm accelerator does not exist. No accelerator

Re: [Qemu-devel] [PATCH] spapr: skip adding usb keyboard/mouse in case of -nodefaults

2014-04-04 Thread Markus Armbruster
Nikunj A Dadhania nik...@linux.vnet.ibm.com writes: Markus Armbruster arm...@redhat.com writes: Nikunj A Dadhania nik...@linux.vnet.ibm.com writes: Have you considered extending QEMUMachineInitArgs instead of adding this function? Did not think of this option earlier. You mean doing

Re: [Qemu-devel] [PATCH] spapr: skip adding usb keyboard/mouse in case of -nodefaults

2014-04-04 Thread Paolo Bonzini
Il 04/04/2014 12:58, Markus Armbruster ha scritto: Have you considered extending QEMUMachineInitArgs instead of adding this function? Did not think of this option earlier. You mean doing something like this? Yes. Looks nicer, doesn't it? I still think it's a libvirt bug. Mixing

Re: [Qemu-devel] [PATCH] spapr: skip adding usb keyboard/mouse in case of -nodefaults

2014-04-04 Thread Paolo Bonzini
Il 04/04/2014 07:28, Nikunj A Dadhania ha scritto: And -usb is translated to adding pci-ohci controller for spapr Yeah, but with -nodefaults it's better to use -device directly. I think there is special handling for this in vl.c bool usb_enabled(bool default_usb) { return

Re: [Qemu-devel] [PATCH] spapr: skip adding usb keyboard/mouse in case of -nodefaults

2014-04-04 Thread Markus Armbruster
Paolo Bonzini pbonz...@redhat.com writes: Il 04/04/2014 12:58, Markus Armbruster ha scritto: Have you considered extending QEMUMachineInitArgs instead of adding this function? Did not think of this option earlier. You mean doing something like this? Yes. Looks nicer, doesn't it?

Re: [Qemu-devel] [PATCH] spapr: skip adding usb keyboard/mouse in case of -nodefaults

2014-04-04 Thread Nikunj A Dadhania
Paolo Bonzini pbonz...@redhat.com writes: Il 04/04/2014 07:28, Nikunj A Dadhania ha scritto: And -usb is translated to adding pci-ohci controller for spapr Yeah, but with -nodefaults it's better to use -device directly. I think there is special handling for this in vl.c bool

Re: [Qemu-devel] [PATCH] spapr: skip adding usb keyboard/mouse in case of -nodefaults

2014-04-04 Thread Paolo Bonzini
Il 04/04/2014 13:40, Nikunj A Dadhania ha scritto: Sure. However, I'm saying that it's fine for spapr to make -usb mean OHCI, and also keyboard mouse if there is a VGA card in the system. If libvirt used -device pci-ohci unconditionally, it would fix the bug *and* it would ensure that the

[Qemu-devel] [PATCH for-2.0 v2 0/2] fix bugs involving linux-user signal handling

2014-04-04 Thread Peter Maydell
This patch series fixes bugs reported by Andrei Warkentin involving signal handling in linux-user mode. The first is Andrei's first patch (though I have tweaked the commit message a little). The second patch is aimed at fixing the locking bug that Andrei noted, in a somewhat simpler way than his

[Qemu-devel] [PATCH for-2.0] iscsi: Don't set error if already set in iscsi_do_inquiry

2014-04-04 Thread Fam Zheng
This eliminates the possible assertion failure in error_setg(). Signed-off-by: Fam Zheng f...@redhat.com --- block/iscsi.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/block/iscsi.c b/block/iscsi.c index 21c18a3..64a509f 100644 --- a/block/iscsi.c +++ b/block/iscsi.c

[Qemu-devel] [PATCH for-2.0 v2 1/2] page_check_range: don't bail out early after unprotecting page

2014-04-04 Thread Peter Maydell
From: Andrei Warkentin andrey.warken...@gmail.com When checking a page range, if we found that a page was made read-only by QEMU because it contained translated code, we were incorrectly returning immediately after unprotecting that page, rather than continuing to check the entire range, so we

[Qemu-devel] [PATCH for-2.0 v2 2/2] cpu-exec: Unlock tb_lock if we longjmp out of code generation

2014-04-04 Thread Peter Maydell
If the guest attempts to execute from unreadable memory, this will cause us to longjmp back to the main loop from inside the target frontend decoder. For linux-user mode, this means we will still hold the tb_ctx.tb_lock, and will deadlock when we try to start executing code again. Unlock the lock

Re: [Qemu-devel] [PATCH for-2.0] iscsi: Don't set error if already set in iscsi_do_inquiry

2014-04-04 Thread Paolo Bonzini
Il 04/04/2014 13:53, Fam Zheng ha scritto: This eliminates the possible assertion failure in error_setg(). Signed-off-by: Fam Zheng f...@redhat.com --- block/iscsi.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/block/iscsi.c b/block/iscsi.c index 21c18a3..64a509f

[Qemu-devel] [PATCH for-2.0 0/3] bdrv_open() fixes

2014-04-04 Thread Kevin Wolf
Kevin Wolf (3): block: Don't parse 'filename' option qemu-iotests: Remove CR line endings in reference output block: Fix snapshot=on for protocol parsed from filename block.c| 152 +++-- include/block/block.h | 1 +

[Qemu-devel] [PATCH 3/3] block: Fix snapshot=on for protocol parsed from filename

2014-04-04 Thread Kevin Wolf
Since commit 9fd3171a, BDRV_O_SNAPSHOT uses an option QDict to specify the originally requested image as the backing file of the newly created temporary snapshot. This means that the filename is stored in file.filename, which is an option that is not parsed for protocol names. Therefore things

[Qemu-devel] [PATCH 1/3] block: Don't parse 'filename' option

2014-04-04 Thread Kevin Wolf
When using the QDict option 'filename', it is supposed to be interpreted literally. The code did correctly avoid guessing the protocol from any string before the first colon, but it still called bdrv_parse_filename() which would, for example, incorrectly remove a 'file:' prefix in the raw-posix

[Qemu-devel] [PATCH 2/3] qemu-iotests: Remove CR line endings in reference output

2014-04-04 Thread Kevin Wolf
qemu doesn't print these CRs any more. The test still didn't fail because the output comparison ignores line endings, but the change turns up each time when you want to update the output. Signed-off-by: Kevin Wolf kw...@redhat.com --- tests/qemu-iotests/051.out | 10 +- 1 file changed, 5

Re: [Qemu-devel] [PATCH for-2.0] iscsi: Don't set error if already set in iscsi_do_inquiry

2014-04-04 Thread Kevin Wolf
Am 04.04.2014 um 13:57 hat Paolo Bonzini geschrieben: Il 04/04/2014 13:53, Fam Zheng ha scritto: This eliminates the possible assertion failure in error_setg(). Signed-off-by: Fam Zheng f...@redhat.com --- block/iscsi.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff

Re: [Qemu-devel] [PATCH v3 1/1] char/serial: Fix emptyness handling

2014-04-04 Thread Peter Crosthwaite
On Fri, Mar 28, 2014 at 10:10 PM, Paolo Bonzini pbonz...@redhat.com wrote: Il 28/03/2014 12:43, Don Slutz ha scritto: Ping. (Since this is a bug fix, I think it can go into 2.0) -Don Slutz I think the problem is that not many people understand the 8250 device model. CCing someone who

Re: [Qemu-devel] [PATCH v2] pseries: Update SLOF firmware image to qemu-slof-20140404

2014-04-04 Thread Alexander Graf
On 04/04/2014 02:57 AM, Alexey Kardashevskiy wrote: The change log is: Isolate sc 1 detection logic build: auto-detect ppc64 architecture cas: increase hcall buffer size to accomodate 256 cpus usb: change device tree naming usb-core: adjust port numbers in set_address

Re: [Qemu-devel] [PATCH] spapr_nvram: Correct max nvram size

2014-04-04 Thread Alexander Graf
On 04/04/2014 09:26 AM, Alexey Kardashevskiy wrote: Currently it is UINT16_MAX*16 = 65536*16 = 1048560 which is not a round number and therefore a bit confusing. This defines MAX_NVRAM_SIZE precisely as 1MB. Suggested-by: Thomas Huth th...@linux.vnet.ibm.com Signed-off-by: Alexey Kardashevskiy

[Qemu-devel] [PATCH] qcow2: Put cache reference in error case

2014-04-04 Thread Kevin Wolf
When qcow2_get_cluster_offset() sees a zero cluster in a version 2 image, it (rightfully) returns an error. But in doing so it shouldn't leak an L2 table cache reference. Signed-off-by: Kevin Wolf kw...@redhat.com --- block/qcow2-cluster.c | 1 + 1 file changed, 1 insertion(+) diff --git

Re: [Qemu-devel] [PATCH for-2.0] iscsi: Don't set error if already set in iscsi_do_inquiry

2014-04-04 Thread Stefan Hajnoczi
On Fri, Apr 04, 2014 at 07:53:29PM +0800, Fam Zheng wrote: This eliminates the possible assertion failure in error_setg(). Signed-off-by: Fam Zheng f...@redhat.com --- block/iscsi.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) Reviewed-by: Stefan Hajnoczi

Re: [Qemu-devel] [PATCH 2/4] spapr: Enable DABRX special register

2014-04-04 Thread Alexander Graf
On 04/04/2014 08:13 AM, Alexey Kardashevskiy wrote: On 04/04/2014 12:19 AM, Alexander Graf wrote: On 03.04.14 15:14, Alexey Kardashevskiy wrote: This advertises Data Address Breakpoint Register Extension (DABRX) to the guest via hyperrtas list and enables it to migrate. Do all CPUs we support

Re: [Qemu-devel] [PATCH 3/4] KVM: PPC: Support POWER8 registers

2014-04-04 Thread Alexander Graf
On 04/04/2014 08:58 AM, Alexey Kardashevskiy wrote: On 04/04/2014 06:12 AM, Tom Musta wrote: On 4/3/2014 8:33 AM, Alexander Graf wrote: On 03.04.14 15:14, Alexey Kardashevskiy wrote: This enabled KVM and migration support for a number of POWER8 registers: snip Tom, please have a look

Re: [Qemu-devel] [RFC PATCH] target-ppc: enable migration within the same CPU family

2014-04-04 Thread Alexander Graf
On 04/04/2014 07:17 AM, Alexey Kardashevskiy wrote: On 03/24/2014 04:28 PM, Alexey Kardashevskiy wrote: Currently only migration fails if CPU version is different even a bit. For example, migration from POWER7 v2.0 to POWER7 v2.1 fails because of that. Since there is no difference between CPU

Re: [Qemu-devel] [PATCH v5 34/37] target-arm: Implement CBAR for Cortex-A57

2014-04-04 Thread Peter Crosthwaite
On Fri, Apr 4, 2014 at 6:25 PM, Peter Maydell peter.mayd...@linaro.org wrote: On 4 April 2014 06:32, Peter Crosthwaite peter.crosthwa...@xilinx.com wrote: +if (arm_feature(env, ARM_FEATURE_AARCH64)) { +/* 32 bit view is [31:18] 0...0 [43:32]. */ +uint32_t cbar32

Re: [Qemu-devel] [PATCH 2/4] spapr: Enable DABRX special register

2014-04-04 Thread Tom Musta
On 4/3/2014 7:51 PM, Alexey Kardashevskiy wrote: Since I'll be touching this code soon, I can make copy content of init_proc_POWER7 to init_proc_POWER8 and remove DABRX if this is what you mean. Ok? Yes it is. Thanks, Alexey.

Re: [Qemu-devel] [PATCH v5 34/37] target-arm: Implement CBAR for Cortex-A57

2014-04-04 Thread Peter Maydell
On 4 April 2014 13:32, Peter Crosthwaite peter.crosthwa...@xilinx.com wrote: On Fri, Apr 4, 2014 at 6:25 PM, Peter Maydell peter.mayd...@linaro.org wrote: On 4 April 2014 06:32, Peter Crosthwaite peter.crosthwa...@xilinx.com wrote: +if (arm_feature(env, ARM_FEATURE_AARCH64)) { +

Re: [Qemu-devel] [PATCH] spapr: skip adding usb keyboard/mouse in case of -nodefaults

2014-04-04 Thread Andreas Färber
Am 04.04.2014 10:28, schrieb Nikunj A Dadhania: diff --git a/vl.c b/vl.c index 017f92d..0d6c36c 100644 --- a/vl.c +++ b/vl.c @@ -4348,7 +4348,8 @@ int main(int argc, char **argv, char **envp) .kernel_filename = kernel_filename,

Re: [Qemu-devel] [PATCH v5 06/37] target-arm: Provide syndrome information for MMU faults

2014-04-04 Thread Peter Maydell
On 1 April 2014 04:10, Peter Crosthwaite peter.crosthwa...@xilinx.com wrote: On Sat, Mar 29, 2014 at 2:09 AM, Peter Maydell peter.mayd...@linaro.org wrote: +static inline uint32_t syn_insn_abort(bool same_el, int ea, int s1ptw, int fsc) Why the mix of bools and ints for the 1 bit fields?

Re: [Qemu-devel] [PATCH v7] target-ppc: gdbstub allow byte swapping for reading/writing registers

2014-04-04 Thread Tom Musta
On 4/1/2014 3:03 PM, Thomas Falcon wrote: This patch allows registers to be properly read from and written to when using the gdbstub to debug a ppc guest running in little endian mode. It accomplishes this goal by byte swapping the values of any registers if the MSR:LE value is set.

[Qemu-devel] [PATCH 01/35] qemu-option: introduce qemu_find_opts_singleton

2014-04-04 Thread Igor Mammedov
From: Paolo Bonzini pbonz...@redhat.com Reviewed-by: Laszlo Ersek ler...@redhat.com Reviewed-by: Andreas Färber afaer...@suse.de Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Igor Mammedov imamm...@redhat.com --- include/qemu/config-file.h | 2 ++ util/qemu-config.c |

[Qemu-devel] [PATCH 00/35] pc: ACPI memory hotplug

2014-04-04 Thread Igor Mammedov
What's new since v7: * Per Andreas' suggestion dropped DIMMBus concept. * Added hotplug binding for bus-less devices * DIMM device is split to backend and frontend. Therefore following command/options were added for supporting it: For memory-ram backend: CLI: -object-add memory-ram,

[Qemu-devel] [PATCH 05/35] vl.c: extend -m option to support options for memory hotplug

2014-04-04 Thread Igor Mammedov
Add following parameters: slots - total number of hotplug memory slots maxmem - maximum possible memory slots and maxmem should go in pair and maxmem should be greater than mem for memory hotplug to be enabled. Signed-off-by: Igor Mammedov imamm...@redhat.com --- include/hw/boards.h | 2 ++

[Qemu-devel] [PATCH 04/35] add memdev backend infrastructure

2014-04-04 Thread Igor Mammedov
Provides framework for splitting host RAM allocation/ policies into a separate backend that could be used by devices. Initially only legacy RAM backend is provided, which uses memory_region_init_ram() allocator and compatible with every CLI option that affects memory_region_init_ram().

[Qemu-devel] [PATCH 02/35] vl: convert -m to QemuOpts

2014-04-04 Thread Igor Mammedov
Adds option to -m size - startup memory amount For compatibility with legacy CLI if suffix-less number is passed, it assumes amount in Mb. Otherwise user is free to use suffixed number using suffixes b,k/K,M,G Signed-off-by: Igor Mammedov imamm...@redhat.com Signed-off-by: Paolo Bonzini

[Qemu-devel] [PATCH 08/35] qdev: hotplug for buss-less devices

2014-04-04 Thread Igor Mammedov
Adds get_hotplug_handler() method to machine, and makes bus-less device to use it during hotplug as a means to discover hotplug handler controller. Returned controller is used to permorm a hotplug action. Signed-off-by: Igor Mammedov imamm...@redhat.com --- hw/core/qdev.c | 13 +

[Qemu-devel] [PATCH 14/35] pc: exit QEMU if slots 256

2014-04-04 Thread Igor Mammedov
... which is current ACPI implementation limit. Signed-off-by: Igor Mammedov imamm...@redhat.com --- hw/i386/pc.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 69e4225..6fe1803 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1204,6 +1204,12 @@

[Qemu-devel] [PATCH 11/35] memory: add memory_region_is_mapped() API

2014-04-04 Thread Igor Mammedov
which allows to check if MemoryRegion is already mapped. Signed-off-by: Igor Mammedov imamm...@redhat.com --- include/exec/memory.h | 8 memory.c | 15 ++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/include/exec/memory.h

[Qemu-devel] [PATCH 25/35] pc: ich9 lpc: make it work with global/compat properties

2014-04-04 Thread Igor Mammedov
Propeties of object should be available after its instances_init() callback is finished and not added in PCIDeviceClass.init which is roughly corresponds to realize() method. Moving properties adding into instances_init will fix missing property error when global/compat property mechanism is used.

[Qemu-devel] [PATCH 07/35] pc: create custom generic PC machine type

2014-04-04 Thread Igor Mammedov
it will be used for PC specific options/variables Signed-off-by: Igor Mammedov imamm...@redhat.com --- hw/i386/pc.c | 36 hw/i386/pc_piix.c| 36 ++-- hw/i386/pc_q35.c | 12 ++-- include/hw/i386/pc.h | 24

[Qemu-devel] [PATCH 13/35] pc: initialize memory hotplug address space

2014-04-04 Thread Igor Mammedov
initialize and map hotplug memory address space container into guest's RAM address space. Signed-off-by: Igor Mammedov imamm...@redhat.com --- hw/i386/pc.c | 19 +-- include/hw/i386/pc.h | 10 ++ 2 files changed, 27 insertions(+), 2 deletions(-) diff --git

[Qemu-devel] [PATCH 32/35] pc: ACPI BIOS: use enum for defining memory affinity flags

2014-04-04 Thread Igor Mammedov
replace magic numbers with enum describing Flags field of memory affinity in SRAT table. MemoryAffinityFlags enum will define flags decribed by: ACPI spec 5.0, 5.2.16.2 Memory Affinity Structure, Table 5-69 Flags - Memory Affinity Structure Signed-off-by: Igor Mammedov imamm...@redhat.com ---

[Qemu-devel] [PATCH 16/35] pc: add memory hotplug handler to PC_MACHINE

2014-04-04 Thread Igor Mammedov
that will perform mapping of DIMM device into guest's RAM address space Signed-off-by: Igor Mammedov imamm...@redhat.com --- hw/i386/pc.c | 52 include/hw/i386/pc.h | 8 2 files changed, 60 insertions(+) diff --git

[Qemu-devel] [PATCH 29/35] pc: ACPI BIOS: punch holes in PCI0._CRS for memory hotplug IO region

2014-04-04 Thread Igor Mammedov
... to make sure that IO range used by memory hotlug won't be used by PCI devices. Signed-off-by: Igor Mammedov imamm...@redhat.com --- hw/i386/acpi-dsdt.dsl | 10 +- hw/i386/q35-acpi-dsdt.dsl | 10 +- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git

[Qemu-devel] [PATCH 18/35] dimm: add busy slot check and slot auto-allocation

2014-04-04 Thread Igor Mammedov
- if slot property is not specified on -device/device_add command, treat default value as request for assigning DimmDevice to the first free slot. - if slot is provided with -device/device_add command, attempt to use it or fail command if it's already occupied. Signed-off-by: Igor Mammedov

[Qemu-devel] [PATCH 10/35] dimm: implement dimm device abstraction

2014-04-04 Thread Igor Mammedov
Each hotplug-able memory slot is a DimmDevice. A hot-add operation for a DIMM: - creates a new DimmDevice and makes hotplug controller to map it into guest address space Hotplug operations are done through normal device_add commands. For migration case, all hotplugged DIMMs on source should be

[Qemu-devel] [PATCH 19/35] acpi: rename cpu_hotplug_defs.h to acpi_defs.h

2014-04-04 Thread Igor Mammedov
to make it more generic, so it could be used for memory hotplug as well. Signed-off-by: Igor Mammedov imamm...@redhat.com --- hw/i386/acpi-dsdt.dsl | 2 +- hw/i386/q35-acpi-dsdt.dsl | 2 +- include/hw/acpi/acpi_defs.h| 32

[Qemu-devel] [PATCH 33/35] pc: ACPI BIOS: reserve SRAT entry for hotplug mem hole

2014-04-04 Thread Igor Mammedov
Needed for Windows to use hotplugged memory device, otherwise it complains that server is not configured for memory hotplug. Tests shows that aftewards it uses dynamically provided proximity value from _PXM() method if available. Signed-off-by: Igor Mammedov imamm...@redhat.com ---

[Qemu-devel] [PATCH 23/35] acpi:piix4: make plug/unlug callbacks generic

2014-04-04 Thread Igor Mammedov
... and report error if plugged in device is not supported. Later generic callbacks will be used by memory hotplug. Signed-off-by: Igor Mammedov imamm...@redhat.com --- hw/acpi/piix4.c | 31 ++- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git

[Qemu-devel] [PATCH 26/35] acpi:ich9: add memory hotplug handling

2014-04-04 Thread Igor Mammedov
Add memory hotplug initialization/handling to ICH9 LPC device and enable it by default for post 2.0 machine types Signed-off-by: Igor Mammedov imamm...@redhat.com --- hw/acpi/ich9.c | 38 ++ hw/i386/pc_q35.c | 4 hw/isa/lpc_ich9.c | 20

[Qemu-devel] [PATCH 31/35] pc: ACPI BIOS: implement memory hotplug interface

2014-04-04 Thread Igor Mammedov
- provides static SSDT object for memory hotplug - SSDT template for memory devices and runtime generator of them in SSDT table. Signed-off-by: Vasilis Liaskovitis vasilis.liaskovi...@profitbricks.com Signed-off-by: Igor Mammedov imamm...@redhat.com --- hw/i386/Makefile.objs | 3 +-

[Qemu-devel] [PATCH 34/35] pc: ACPI BIOS: make GPE.3 handle memory hotplug event on PIIX and Q35 machines

2014-04-04 Thread Igor Mammedov
also make handler edge based to avoid loosing events, the same as it has been done for PCI and CPU hotplug handlers. Signed-off-by: Igor Mammedov imamm...@redhat.com --- hw/i386/acpi-dsdt.dsl | 5 - hw/i386/q35-acpi-dsdt.dsl | 5 - 2 files changed, 8 insertions(+), 2 deletions(-)

Re: [Qemu-devel] [PATCH 2/3] qemu-iotests: Remove CR line endings in reference output

2014-04-04 Thread Max Reitz
On 04.04.2014 14:03, Kevin Wolf wrote: qemu doesn't print these CRs any more. The test still didn't fail because the output comparison ignores line endings, but the change turns up each time when you want to update the output. Signed-off-by: Kevin Wolf kw...@redhat.com ---

[Qemu-devel] [PATCH 27/35] pc: migrate piix4 ich9 MemHotplugState

2014-04-04 Thread Igor Mammedov
Adds an optional vmstate field that allows to migrate current state of acpi_memory_hotplug of ACPI PM device. Signed-off-by: Igor Mammedov imamm...@redhat.com --- hw/acpi/ich9.c | 8 hw/acpi/memory_hotplug.c | 27 +++ hw/acpi/piix4.c

Re: [Qemu-devel] [PATCH 1/3] block: Don't parse 'filename' option

2014-04-04 Thread Max Reitz
On 04.04.2014 14:03, Kevin Wolf wrote: When using the QDict option 'filename', it is supposed to be interpreted literally. The code did correctly avoid guessing the protocol from any string before the first colon, but it still called bdrv_parse_filename() which would, for example, incorrectly

  1   2   >