Re: [Qemu-devel] [PATCH] bitops.h: Add field32() and field64() functions to extract bitfields

2012-06-27 Thread Markus Armbruster
Blue Swirl blauwir...@gmail.com writes: On Tue, Jun 26, 2012 at 6:41 PM, Peter Maydell peter.mayd...@linaro.org wrote: On 26 June 2012 19:25, Blue Swirl blauwir...@gmail.com wrote: On Tue, Jun 26, 2012 at 6:11 PM, Peter Maydell peter.mayd...@linaro.org wrote: On 26 June 2012 18:58, Blue

[Qemu-devel] [PATCH V2] Exynos4: add RTC device

2012-06-27 Thread Oleg Ogurtsov
Signed-off-by: Oleg Ogurtsov o.ogurt...@samsung.com --- hw/arm/Makefile.objs |1 + hw/exynos4210.c |8 + hw/exynos4210_rtc.c | 595 ++ 3 files changed, 604 insertions(+), 0 deletions(-) create mode 100644 hw/exynos4210_rtc.c diff

[Qemu-devel] [PATCH V2] Exynos4: add RTC device

2012-06-27 Thread Oleg Ogurtsov
Oleg Ogurtsov (1): Exynos4: add RTC device hw/arm/Makefile.objs |1 + hw/exynos4210.c |8 + hw/exynos4210_rtc.c | 595 ++ 3 files changed, 604 insertions(+), 0 deletions(-) create mode 100644 hw/exynos4210_rtc.c -- 1.7.5.4

Re: [Qemu-devel] [PATCH V2] Exynos4: add RTC device

2012-06-27 Thread Oleg Ogurtsov
On 27.06.2012 10:06, Oleg Ogurtsov wrote: Oleg Ogurtsov (1): Exynos4: add RTC device hw/arm/Makefile.objs |1 + hw/exynos4210.c |8 + hw/exynos4210_rtc.c | 595 ++ 3 files changed, 604 insertions(+), 0 deletions(-) create

Re: [Qemu-devel] Fwd: qemu as dynamic binary translation infrastructure

2012-06-27 Thread Wei-Ren Chen
Thanks for heading up. i am not sure this software is related to QEMU, but it seems that BlueStacks is a system-emulator.  I would like to learn your experiences of qemu-user.  If you read carefully the thread mentioned in the link I gave you,

[Qemu-devel] [PATCH v5] kvm: notify host when the guest is panicked

2012-06-27 Thread Wen Congyang
We can know the guest is panicked when the guest runs on xen. But we do not have such feature on kvm. Another purpose of this feature is: management app(for example: libvirt) can do auto dump when the guest is panicked. If management app does not do auto dump, the guest's user can do dump by hand

[Qemu-devel] [PATCH 1/6 v5] start vm after reseting it

2012-06-27 Thread Wen Congyang
The guest should run after reseting it, but it does not run if its old state is RUN_STATE_INTERNAL_ERROR or RUN_STATE_PAUSED. Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- block.h |2 ++ qmp.c |2 +- vl.c|3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) diff

[Qemu-devel] [PATCH 2/6 v5] update linux headers

2012-06-27 Thread Wen Congyang
Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- linux-headers/asm-x86/kvm_para.h |2 ++ linux-headers/linux/kvm_para.h |6 ++ 2 files changed, 8 insertions(+), 0 deletions(-) diff --git a/linux-headers/asm-x86/kvm_para.h b/linux-headers/asm-x86/kvm_para.h index

[Qemu-devel] [PATCH 3/6 v5] add a new runstate: RUN_STATE_GUEST_PANICKED

2012-06-27 Thread Wen Congyang
Add a new runstate RUN_STATE_GUEST_PANICKED. The guest can be in this state if it is paused due to panicked event. Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- qapi-schema.json |6 +- qmp.c|3 ++- vl.c |7 ++- 3 files changed, 13 insertions(+),

[Qemu-devel] [PATCH 4/6 v5] add a new qevent: QEVENT_GUEST_PANICKED

2012-06-27 Thread Wen Congyang
Add a new qevent QEVENT_GUEST_PANICKED. QEMU will emit this event if the guest is panicked. Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- monitor.c |1 + monitor.h |1 + 2 files changed, 2 insertions(+), 0 deletions(-) diff --git a/monitor.c b/monitor.c index f6107ba..28f7482

[Qemu-devel] [PATCH 5/6 v5] deal with guest panicked event accoring to -onpanic parameter

2012-06-27 Thread Wen Congyang
When the guest is panicked, it will write 0x1 to the port KVM_PV_PORT. So if qemu reads 0x1 from this port, we can do the folloing three things according to the parameter -onpanic: 1. emit QEVENT_GUEST_PANICKED only 2. emit QEVENT_GUEST_PANICKED and pause the guest 3. emit QEVENT_GUEST_PANICKED

Re: [Qemu-devel] [RFC PATCH V1 1/2] arm_boot: added linux switch

2012-06-27 Thread Peter Maydell
On 27 June 2012 05:38, Peter Crosthwaite peter.crosthwa...@petalogix.com wrote: Ping! Whats the action item here? Put out an RFC about unifying bootloaders or some such? Something like that -- identify what all the architectures currently do with these command line arguments and propose

Re: [Qemu-devel] [PATCH] kvm: First step to push iothread lock out of inner run loop

2012-06-27 Thread Stefan Hajnoczi
On Tue, Jun 26, 2012 at 8:34 PM, Marcelo Tosatti mtosa...@redhat.com wrote: On Sat, Jun 23, 2012 at 12:55:49AM +0200, Jan Kiszka wrote: net.txt iothread flow = 1) Skip-work-if-device-locked select(tap fd ready) tap_send    if (trylock(TAPState-NetClientState-dev))

[Qemu-devel] [PATCH 6/6 v5] deal with panicked event accoring to '-machine panic_action=action'

2012-06-27 Thread Wen Congyang
The action is the same as -onpanic parameter. Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- qemu-config.c |4 qemu-options.hx |4 +++- vl.c|7 +++ 3 files changed, 14 insertions(+), 1 deletions(-) diff --git a/qemu-config.c b/qemu-config.c index

Re: [Qemu-devel] [PATCH] kvm: First step to push iothread lock out of inner run loop

2012-06-27 Thread Stefan Hajnoczi
On Wed, Jun 27, 2012 at 8:39 AM, Stefan Hajnoczi stefa...@gmail.com wrote: On Tue, Jun 26, 2012 at 8:34 PM, Marcelo Tosatti mtosa...@redhat.com wrote: On Sat, Jun 23, 2012 at 12:55:49AM +0200, Jan Kiszka wrote: net.txt iothread flow = 1) Skip-work-if-device-locked

Re: [Qemu-devel] [RFC] block: Removed coroutine ownership assumption

2012-06-27 Thread Stefan Hajnoczi
On Wed, Jun 27, 2012 at 4:05 AM, Peter Crosthwaite peter.crosthwa...@petalogix.com wrote: I still think this thread points out a major flaw in block+coroutines, regardless of the fact im using it from a machine model. This bug is going to happen in any coroutine code that touches the block

Re: [Qemu-devel] [PATCH] kvm: First step to push iothread lock out of inner run loop

2012-06-27 Thread Avi Kivity
On 06/26/2012 10:34 PM, Marcelo Tosatti wrote: 1. read_lock(memmap_lock) 2. MemoryRegionSection mrs = lookup(addr) 3. qom_ref(mrs.mr-dev) 4. read_unlock(memmap_lock) 5. mutex_lock(dev-lock) 6. dispatch(mrs, addr, data, size) 7. mutex_unlock(dev-lock) 8.

Re: [Qemu-devel] [RFC] block: Removed coroutine ownership assumption

2012-06-27 Thread Peter Maydell
On 27 June 2012 08:48, Stefan Hajnoczi stefa...@gmail.com wrote: I'd like to see your code though because I still don't understand why it relies on the exact yield behavior.  Have you pushed it to a public git repo? I haven't seen Peter's code either, but his complaint makes sense to me -- the

[Qemu-devel] Regression commit 6e008585 qdev: remove info from class

2012-06-27 Thread Markus Armbruster
Before: $ qemu-system-x86_64 -display none -drive if=ide qemu-system-x86_64: Device needs media, but drive is empty qemu-system-x86_64: Initialization of device ide-hd failed [Exit 1 ] After: $ qemu-system-x86_64 -display none -drive if=ide qemu-system-x86_64: Device

Re: [Qemu-devel] [RFC] block: Removed coroutine ownership assumption

2012-06-27 Thread Stefan Hajnoczi
On Wed, Jun 27, 2012 at 8:59 AM, Peter Maydell peter.mayd...@linaro.org wrote: On 27 June 2012 08:48, Stefan Hajnoczi stefa...@gmail.com wrote: I'd like to see your code though because I still don't understand why it relies on the exact yield behavior.  Have you pushed it to a public git repo?

[Qemu-devel] [RFC PATCH 1/1] Stupid test case to demonstrate flawed crash handling

2012-06-27 Thread Markus Armbruster
Makes make check hang: QTEST_QEMU_BINARY=x86_64-softmmu/qemu-system-x86_64 gtester -k --verbose -m=quick tests/crash-test tests/rtc-test TEST: tests/crash-test... (pid=972) qemu-system-x86_64: Device needs media, but drive is empty [Nothing happens, wait a while, then hit ^C]

[Qemu-devel] Test harness goes into infinite loop when test case crashes

2012-06-27 Thread Markus Armbruster
Maybe I'm doing something wrong. But for me, make check hangs when a test cases manages to crash QEMU. I include a stupid test case that does just that. Markus Armbruster (1): Stupid test case to demonstrate flawed crash handling tests/Makefile |2 ++ tests/crash-test.c | 18

Re: [Qemu-devel] net: RFC New Socket-Based, Switched Network Backend (QDES)

2012-06-27 Thread Stefan Hajnoczi
On Tue, Jun 26, 2012 at 5:48 PM, Mike Lovell m...@dev-zero.net wrote: On 06/26/2012 02:29 AM, Stefan Hajnoczi wrote: On Mon, Jun 25, 2012 at 5:32 PM, Mike Lovell m...@dev-zero.net wrote: Oh. I forgot another reason why I decided to do this over using VDE. I'll do this one with an example.

Re: [Qemu-devel] [RFC] block: Removed coroutine ownership assumption

2012-06-27 Thread Markus Armbruster
Stefan Hajnoczi stefa...@gmail.com writes: On Wed, Jun 27, 2012 at 8:59 AM, Peter Maydell peter.mayd...@linaro.org wrote: On 27 June 2012 08:48, Stefan Hajnoczi stefa...@gmail.com wrote: I'd like to see your code though because I still don't understand why it relies on the exact yield

Re: [Qemu-devel] [PATCH v4 0/7] file descriptor passing using pass-fd

2012-06-27 Thread Kevin Wolf
Am 27.06.2012 00:28, schrieb Corey Bryant: On 06/26/2012 04:50 PM, Luiz Capitulino wrote: On Tue, 26 Jun 2012 13:45:52 +0200 Kevin Wolf kw...@redhat.com wrote: Am 26.06.2012 11:10, schrieb Daniel P. Berrange: I was thinking about some of the sources complexity when using FD passing from

Re: [Qemu-devel] [libvirt] [PATCH v4 0/7] file descriptor passing using pass-fd

2012-06-27 Thread Kevin Wolf
Am 26.06.2012 20:40, schrieb Corey Bryant: Here is a quick proof of concept (ie untested) patch to demonstrate what I mean. It relies on Cory's patch which converts everything to use qemu_open. It is also still valuable to make the change to qemu_open() to support /dev/fd/N for passing FDs

Re: [Qemu-devel] [RFC] block: Removed coroutine ownership assumption

2012-06-27 Thread Andreas Färber
Am 22.06.2012 12:59, schrieb Peter Crosthwaite: On Fri, Jun 22, 2012 at 6:53 PM, Kevin Wolf kw...@redhat.com wrote: Am 22.06.2012 10:20, schrieb Peter Crosthwaite: [...] I thought that was the point of coroutines vs threads? coroutines you control yield behaviour explicitly whearas thread you

Re: [Qemu-devel] [RFC] block: Removed coroutine ownership assumption

2012-06-27 Thread Peter Maydell
On 27 June 2012 10:10, Andreas Färber afaer...@suse.de wrote: Maybe I'm misunderstanding the discussion, but there's three coroutine implementations, including one based on GThread. So in that case any coroutine can be preempted anywhere and there are no such guarantees as discussed here, are

Re: [Qemu-devel] [PATCH v4 0/7] file descriptor passing using pass-fd

2012-06-27 Thread Kevin Wolf
Am 27.06.2012 00:54, schrieb Eric Blake: It seems like libvirt would be in a better position to understand when a file is no longer in use, and then it can call close_fd. No? Of course the the only fd that needs to be closed is the originally passed fd. The dup'd fd's are closed by QEMU.

Re: [Qemu-devel] [PATCH 1/4] dump: create writable files

2012-06-27 Thread Wen Congyang
At 06/27/2012 04:27 AM, Luiz Capitulino Wrote: On Wed, 20 Jun 2012 22:58:20 +0530 Rabin Vincent ra...@rab.in wrote: Make dump-guest-memory not create read-only files, so that it can overwrite a file created by a previous invocation without having it to be removed externally. I think we

Re: [Qemu-devel] [PATCH v4 0/7] file descriptor passing using pass-fd

2012-06-27 Thread Daniel P. Berrange
On Wed, Jun 27, 2012 at 11:16:32AM +0200, Kevin Wolf wrote: Am 27.06.2012 00:54, schrieb Eric Blake: It seems like libvirt would be in a better position to understand when a file is no longer in use, and then it can call close_fd. No? Of course the the only fd that needs to be closed is

Re: [Qemu-devel] [RFC] block: Removed coroutine ownership assumption

2012-06-27 Thread Peter Crosthwaite
On Wed, Jun 27, 2012 at 6:33 PM, Markus Armbruster arm...@redhat.com wrote: Stefan Hajnoczi stefa...@gmail.com writes: On Wed, Jun 27, 2012 at 8:59 AM, Peter Maydell peter.mayd...@linaro.org wrote: On 27 June 2012 08:48, Stefan Hajnoczi stefa...@gmail.com wrote: I'd like to see your code

[Qemu-devel] [Bug 1013714] Re: Data corruption after block migration (LV-LV)

2012-06-27 Thread Dennis Krul
Hello Paolo, We backported most of the block migration fixes from upstream to the RHEL6 qemu-kvm package ourselves and are now unable to reproduce the disk corruption problem anymore. So I guess the issues are (mostly) fixed upstream. You can close this bug, but I would still appreciate it if

Re: [Qemu-devel] [PATCH v4 0/7] file descriptor passing using pass-fd

2012-06-27 Thread Kevin Wolf
Am 27.06.2012 11:20, schrieb Daniel P. Berrange: On Wed, Jun 27, 2012 at 11:16:32AM +0200, Kevin Wolf wrote: The really bad case that nobody thought of is that, when block-commit has finished, we need to switch back to read-only. This is an event that is not triggered by a certain monitor

[Qemu-devel] [PATCH v7 00/16] QEMU OpenRISC support

2012-06-27 Thread Jia Liu
This is the OpenCores OpenRISC 1200 support for QEMU. Full implementation of the system-model and linux-user-model support. OpenRISC 1200 is a OpenCores open source CPU, its architecture manual can be found at http://opencores.org/svnget,or1k?file=/trunk/docs/openrisc_arch.pdf A OpenRISC Linux

[Qemu-devel] [PATCH v7 01/16] target-or32: Add target stubs and cpu support

2012-06-27 Thread Jia Liu
Add OpenRISC target stubs and cpu support. Signed-off-by: Jia Liu pro...@gmail.com --- arch_init.c |2 + arch_init.h |1 + configure| 14 +- cpu-exec.c |2 + default-configs/or32-softmmu.mak |

[Qemu-devel] [PATCH v7 03/16] target-or32: Add MMU support

2012-06-27 Thread Jia Liu
Add OpenRISC MMU support. Signed-off-by: Jia Liu pro...@gmail.com --- target-openrisc/cpu.h| 75 +++- target-openrisc/mmu.c| 199 +- target-openrisc/mmu_helper.c | 20 + 3 files changed, 292 insertions(+), 2

[Qemu-devel] [PATCH v7 02/16] target-or32: Add target machine

2012-06-27 Thread Jia Liu
Add OpenRISC machine. Signed-off-by: Jia Liu pro...@gmail.com --- target-openrisc/cpu.h | 67 - target-openrisc/machine.c | 22 ++- 2 files changed, 87 insertions(+), 2 deletions(-) diff --git a/target-openrisc/cpu.h

[Qemu-devel] [PATCH v7 05/16] target-or32: Add exception support

2012-06-27 Thread Jia Liu
Add OpenRISC exception support. Signed-off-by: Jia Liu pro...@gmail.com --- target-openrisc/Makefile.objs |4 ++-- target-openrisc/excp.c| 27 +++ target-openrisc/excp.h| 28 target-openrisc/excp_helper.c | 27

[Qemu-devel] [PATCH v7 11/16] target-or32: Add a IIS dummy board

2012-06-27 Thread Jia Liu
Add a IIS dummy board. Signed-off-by: Jia Liu pro...@gmail.com --- hw/openrisc/Makefile.objs |2 +- hw/openrisc_sim.c | 149 + 2 files changed, 150 insertions(+), 1 deletion(-) create mode 100644 hw/openrisc_sim.c diff --git

Re: [Qemu-devel] [PATCH v3 5/6] qapi: convert sendkey

2012-06-27 Thread Amos Kong
On 27/06/12 04:22, Luiz Capitulino wrote: On Wed, 20 Jun 2012 06:53:40 -0600 Eric Blakeebl...@redhat.com wrote: On 06/19/2012 10:47 PM, Amos Kong wrote: Convert 'sendkey' to use QAPI. do_sendkey() depends on some variables/functions in monitor.c, so reserve qmp_sendkey() to monitor.c

Re: [Qemu-devel] [RFC] block: Removed coroutine ownership assumption

2012-06-27 Thread Stefan Hajnoczi
On Wed, Jun 27, 2012 at 10:25 AM, Peter Crosthwaite peter.crosthwa...@petalogix.com wrote: On Wed, Jun 27, 2012 at 6:33 PM, Markus Armbruster arm...@redhat.com wrote: Stefan Hajnoczi stefa...@gmail.com writes: On Wed, Jun 27, 2012 at 8:59 AM, Peter Maydell peter.mayd...@linaro.org wrote: On

Re: [Qemu-devel] [PATCH v2 0/3] Microblaze and Device Tree Maintainerships

2012-06-27 Thread Edgar E. Iglesias
On Tue, Jun 26, 2012 at 02:29:39PM +1000, Peter A. G. Crosthwaite wrote: Set some missing maintainer ships. Patch 1 is the Petalogix ML605 machine model (me). Patch 2 is the Xilinx EDK device suite (me + Edgar). Patch 3 is the device tree subsystem (me + Alex). Applied, Thanks!

[Qemu-devel] [PATCH v7 07/16] target-or32: Add float instruction helpers

2012-06-27 Thread Jia Liu
Add OpenRISC float instruction helpers. Signed-off-by: Jia Liu pro...@gmail.com --- target-openrisc/Makefile.objs |2 +- target-openrisc/fpu_helper.c | 275 + target-openrisc/helper.h | 33 + 3 files changed, 309 insertions(+), 1

[Qemu-devel] [PATCH v7 04/16] target-or32: Add interrupt support

2012-06-27 Thread Jia Liu
Add OpenRISC interrupt support. Signed-off-by: Jia Liu pro...@gmail.com --- cpu-exec.c | 17 + target-openrisc/Makefile.objs |2 +- target-openrisc/cpu.h |9 ++- target-openrisc/helper.h| 25 +++

[Qemu-devel] [PATCH v7 12/16] target-or32: Add system instructions

2012-06-27 Thread Jia Liu
Add OpenRISC system instructions. Signed-off-by: Jia Liu pro...@gmail.com --- target-openrisc/Makefile.objs |3 +- target-openrisc/helper.h |4 + target-openrisc/sys_helper.c | 244 + target-openrisc/translate.c | 10 ++ 4 files changed,

Re: [Qemu-devel] [PATCH 1/2] Add usb option in machine options to enable/disable usb

2012-06-27 Thread Li Zhang
Hi Andreas, I send out this patch with vga enablement on papr, which needs usb enabled. Is there any more suggestion about this patch? Who else need to ack it? Thank you very much. :) On Mon, Jun 18, 2012 at 5:22 PM, Li Zhang zhlci...@gmail.com wrote: For pseries machine, it needs to enable

[Qemu-devel] [PATCH v7 13/16] target-or32: Add gdb stub

2012-06-27 Thread Jia Liu
Add OpenRISC gdb stub support. Signed-off-by: Jia Liu pro...@gmail.com --- gdbstub.c | 64 + 1 file changed, 64 insertions(+) diff --git a/gdbstub.c b/gdbstub.c index 08cf864..5d37dd9 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1155,6

[Qemu-devel] [PATCH v7 14/16] target-or32: Add linux syscall, signal and termbits

2012-06-27 Thread Jia Liu
Add OpenRISC linux syscall, signal and termbits. Signed-off-by: Jia Liu pro...@gmail.com --- linux-user/openrisc/syscall.h | 24 ++ linux-user/openrisc/syscall_nr.h| 506 +++ linux-user/openrisc/target_signal.h | 26 ++

Re: [Qemu-devel] [PATCH 2/2] spapr: Add support for -vga option

2012-06-27 Thread Li Zhang
Hi Andreas, This patch is to enable vga which works well on our internal tree. Would you please help review it? Any suggestion is appreciated. Thanks a lot. :) On Mon, Jun 18, 2012 at 5:34 PM, Li Zhang zhlci...@gmail.com wrote: Also instanciate the USB keyboard and mouse when that option is

Re: [Qemu-devel] [PATCH v3 5/6] qapi: convert sendkey

2012-06-27 Thread Amos Kong
On 27/06/12 04:21, Luiz Capitulino wrote: On Wed, 20 Jun 2012 12:47:40 +0800 Amos Kongak...@redhat.com wrote: Convert 'sendkey' to use QAPI. do_sendkey() depends on some variables/functions in monitor.c, so reserve qmp_sendkey() to monitor.c key_defs[] in monitor.c is the mapping of key name

[Qemu-devel] [PATCH v2] bitops.h: Add field32() and field64() functions to extract bitfields

2012-06-27 Thread Peter Maydell
Add field32() and field64() functions which extract a particular bit field from a word and return it. Based on an idea by Jia Liu. Suggested-by: Jia Liu pro...@gmail.com Signed-off-by: Peter Maydell peter.mayd...@linaro.org --- v1-v2: added missing brackets to field32() to bring it in to line

[Qemu-devel] [PATCH v7 09/16] target-or32: Add PIC support

2012-06-27 Thread Jia Liu
Add OpenRISC Programmable Interrupt Controller support. Signed-off-by: Jia Liu pro...@gmail.com --- hw/openrisc_pic.c | 48 1 file changed, 48 insertions(+) diff --git a/hw/openrisc_pic.c b/hw/openrisc_pic.c index 0d14bbe..76bd792 100644 ---

Re: [Qemu-devel] [PATCH] Revert rtl8139: do the network/host communication only in normal operating mode

2012-06-27 Thread Avi Kivity
On 06/04/2012 03:28 PM, Anthony Liguori wrote: Michael has some concern on this patch, so I post another patch of validating the rx buf instead of checking the opmode, please see http://lists.gnu.org/archive/html/qemu-devel/2012-05/msg02385.html. So maybe we can apply that or I need to send

[Qemu-devel] [PATCH v13 01/13] Add MigrationParams structure

2012-06-27 Thread Orit Wasserman
From: Isaku Yamahata yamah...@valinux.co.jp Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- block-migration.c |8 migration.c | 13 - migration.h |8 ++-- qemu-common.h |1 + savevm.c | 13 + sysemu.h

[Qemu-devel] [PATCH v13 12/13] Add set_cachesize command

2012-06-27 Thread Orit Wasserman
Change XBZRLE cache size in bytes (the size should be a power of 2). If XBZRLE cache size is too small there will be many cache miss. Signed-off-by: Benoit Hudzia benoit.hud...@sap.com Signed-off-by: Petter Svard pett...@cs.umu.se Signed-off-by: Aidan Shribman aidan.shrib...@sap.com

[Qemu-devel] [PATCH v13 08/13] Change ram_save_block to return -1 if there are no more changes

2012-06-27 Thread Orit Wasserman
It will return 0 if the page is unmodifed. Signed-off-by: Orit Wasserman owass...@redhat.com --- arch_init.c | 15 +-- 1 files changed, 9 insertions(+), 6 deletions(-) diff --git a/arch_init.c b/arch_init.c index ee20c33..ef7b4d6 100644 --- a/arch_init.c +++ b/arch_init.c @@

[Qemu-devel] [PATCH v13 11/13] Add XBZRLE to ram_save_block and ram_save_live

2012-06-27 Thread Orit Wasserman
In the outgoing migration check to see if the page is cached and changed than send compressed page by using save_xbrle_page function. In the incoming migration check to see if RAM_SAVE_FLAG_XBRLE is set and decompress the page (by using load_xbrle function). Signed-off-by: Benoit Hudzia

[Qemu-devel] [PATCH v13 10/13] Add xbzrle_encode_buffer and xbzrle_decode_buffer functions

2012-06-27 Thread Orit Wasserman
Signed-off-by: Benoit Hudzia benoit.hud...@sap.com Signed-off-by: Petter Svard pett...@cs.umu.se Signed-off-by: Aidan Shribman aidan.shrib...@sap.com Signed-off-by: Orit Wasserman owass...@redhat.com --- migration.h |4 ++ savevm.c| 145

[Qemu-devel] [PATCH v7 10/16] target-or32: Add timer support

2012-06-27 Thread Jia Liu
Add OpenRISC timer support. Signed-off-by: Jia Liu pro...@gmail.com --- hw/openrisc_timer.c | 130 +++ 1 file changed, 130 insertions(+) diff --git a/hw/openrisc_timer.c b/hw/openrisc_timer.c index df384f6..25cde1a 100644 ---

[Qemu-devel] [PATCH v13 04/13] Add cache handling functions

2012-06-27 Thread Orit Wasserman
Add LRU page cache mechanism. The page are accessed by their address. Signed-off-by: Benoit Hudzia benoit.hud...@sap.com Signed-off-by: Petter Svard pett...@cs.umu.se Signed-off-by: Aidan Shribman aidan.shrib...@sap.com Signed-off-by: Orit Wasserman owass...@redhat.com --- Makefile.objs|

[Qemu-devel] [PATCH v13 05/13] Add uleb encoding/decoding functions

2012-06-27 Thread Orit Wasserman
Implement Unsigned Little Endian Base 128. Signed-off-by: Orit Wasserman owass...@redhat.com --- cutils.c | 32 qemu-common.h |8 2 files changed, 40 insertions(+), 0 deletions(-) diff --git a/cutils.c b/cutils.c index af308cd..3f81d53 100644

[Qemu-devel] race condition in qemu-kvm-1.0.1

2012-06-27 Thread Peter Lieven
Hi, we recently came across multiple VMs racing and stopping working. It seems to happen when the system is at 100% cpu. One way to reproduce this is: qemu-kvm-1.0.1 with vnc-thread enabled cmdline (or similar): /usr/bin/qemu-kvm-1.0.1 -net

[Qemu-devel] [PATCH v13 09/13] Add migration_end function

2012-06-27 Thread Orit Wasserman
Signed-off-by: Orit Wasserman owass...@redhat.com --- arch_init.c |7 ++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/arch_init.c b/arch_init.c index ef7b4d6..6703c72 100644 --- a/arch_init.c +++ b/arch_init.c @@ -304,6 +304,11 @@ static void sort_ram_list(void)

[Qemu-devel] [PATCH v13 13/13] Add XBZRLE statistics

2012-06-27 Thread Orit Wasserman
Signed-off-by: Benoit Hudzia benoit.hud...@sap.com Signed-off-by: Petter Svard pett...@cs.umu.se Signed-off-by: Aidan Shribman aidan.shrib...@sap.com Signed-off-by: Orit Wasserman owass...@redhat.com --- arch_init.c | 68 +- hmp.c

Re: [Qemu-devel] [PATCH v7 08/16] target-or32: Add instruction translation

2012-06-27 Thread Max Filippov
On Wed, Jun 27, 2012 at 1:54 PM, Jia Liu pro...@gmail.com wrote: Add OpenRISC instruction tanslation routines. Signed-off-by: Jia Liu pro...@gmail.com [...] +    case 0x0009: +        switch (op1) { +        case 0x03:    /* l.div */ +            LOG_DIS(l.div r%d, r%d, r%d\n, rd, ra,

[Qemu-devel] [PATCH v7 08/16] target-or32: Add instruction translation

2012-06-27 Thread Jia Liu
Add OpenRISC instruction tanslation routines. Signed-off-by: Jia Liu pro...@gmail.com --- target-openrisc/translate.c | 1680 +++ 1 file changed, 1680 insertions(+) diff --git a/target-openrisc/translate.c b/target-openrisc/translate.c index

[Qemu-devel] [PATCH v13 02/13] Add migration capabilites

2012-06-27 Thread Orit Wasserman
Add migration capabilites that can be queried by the management. The management can query the source QEMU and the destination QEMU in order to verify both support some migration capability (currently only XBZRLE). The managment can enable a capability for the next migration by using

[Qemu-devel] [PATCH v7 06/16] target-or32: Add int instruction helpers

2012-06-27 Thread Jia Liu
Add OpenRISC int instruction helpers. Signed-off-by: Jia Liu pro...@gmail.com --- target-openrisc/Makefile.objs |2 +- target-openrisc/helper.h |5 +++ target-openrisc/int_helper.c | 85 + 3 files changed, 91 insertions(+), 1 deletion(-)

[Qemu-devel] race condition in qemu-kvm-1.0.1

2012-06-27 Thread Peter Lieven
Hi, we recently came across multiple VMs racing and stopping working. It seems to happen when the system is at 100% cpu. One way to reproduce this is: qemu-kvm-1.0.1 with vnc-thread enabled cmdline (or similar): /usr/bin/qemu-kvm-1.0.1 -net

[Qemu-devel] [PATCH v7 15/16] target-or32: Add linux user support

2012-06-27 Thread Jia Liu
Add QEMU OpenRISC linux user support. Signed-off-by: Jia Liu pro...@gmail.com --- configure |1 + default-configs/or32-linux-user.mak |1 + linux-user/elfload.c| 41 +++ linux-user/main.c | 100 +++

[Qemu-devel] [PATCH v13 03/13] Add XBZRLE documentation

2012-06-27 Thread Orit Wasserman
Signed-off-by: Orit Wasserman owass...@redhat.com --- docs/xbzrle.txt | 142 +++ 1 files changed, 142 insertions(+), 0 deletions(-) create mode 100644 docs/xbzrle.txt diff --git a/docs/xbzrle.txt b/docs/xbzrle.txt new file mode 100644 index

[Qemu-devel] [PATCH v13 06/13] Add save_block_hdr function

2012-06-27 Thread Orit Wasserman
Signed-off-by: Benoit Hudzia benoit.hud...@sap.com Signed-off-by: Petter Svard pett...@cs.umu.se Signed-off-by: Aidan Shribman aidan.shrib...@sap.com Signed-off-by: Orit Wasserman owass...@redhat.com --- arch_init.c | 26 ++ 1 files changed, 14 insertions(+), 12

[Qemu-devel] [PATCH v13 07/13] Add debugging infrastructure

2012-06-27 Thread Orit Wasserman
Signed-off-by: Orit Wasserman owass...@redhat.com --- arch_init.c | 33 +++-- 1 files changed, 27 insertions(+), 6 deletions(-) diff --git a/arch_init.c b/arch_init.c index 9dafb6e..ee20c33 100644 --- a/arch_init.c +++ b/arch_init.c @@ -44,6 +44,14 @@ #include

Re: [Qemu-devel] [PATCH] kvm: First step to push iothread lock out of inner run loop

2012-06-27 Thread Marcelo Tosatti
On Wed, Jun 27, 2012 at 08:41:49AM +0100, Stefan Hajnoczi wrote: On Wed, Jun 27, 2012 at 8:39 AM, Stefan Hajnoczi stefa...@gmail.com wrote: On Tue, Jun 26, 2012 at 8:34 PM, Marcelo Tosatti mtosa...@redhat.com wrote: On Sat, Jun 23, 2012 at 12:55:49AM +0200, Jan Kiszka wrote: net.txt

Re: [Qemu-devel] [PATCH v2] bitops.h: Add field32() and field64() functions to extract bitfields

2012-06-27 Thread Andreas Färber
Am 27.06.2012 12:29, schrieb Peter Maydell: Add field32() and field64() functions which extract a particular bit field from a word and return it. Based on an idea by Jia Liu. Suggested-by: Jia Liu pro...@gmail.com Signed-off-by: Peter Maydell peter.mayd...@linaro.org --- v1-v2: added

[Qemu-devel] [PATCH v13 00/13] XBZRLE delta for live migration of large memory app

2012-06-27 Thread Orit Wasserman
Changes from v12: - use bool for blk and shared params - use long when decoding buffer - fix QMP commands - always display migration parameters in info migrate - update current_addr inside the while loop in ram_save_block - display statistics after

Re: [Qemu-devel] [PATCH v2] bitops.h: Add field32() and field64() functions to extract bitfields

2012-06-27 Thread Eric Blake
On 06/27/2012 04:29 AM, Peter Maydell wrote: Add field32() and field64() functions which extract a particular bit field from a word and return it. Based on an idea by Jia Liu. +static inline uint64_t field64(uint64_t value, int start, int length) +{ +assert(start = 0 start = 63

Re: [Qemu-devel] [PATCH 1/2] Add usb option in machine options to enable/disable usb

2012-06-27 Thread Andreas Färber
Am 18.06.2012 11:22, schrieb Li Zhang: For pseries machine, it needs to enable usb to add keyboard or usb mouse. -usb option won't be used in the future, and machine options is a better way to enable usb. So this patch is to add usb option to machine options (-machine

Re: [Qemu-devel] [Qemu-ppc] [PATCH 2/2] spapr: Add support for -vga option

2012-06-27 Thread Alexander Graf
On 18.06.2012, at 11:34, Li Zhang wrote: Also instanciate the USB keyboard and mouse when that option is used (you can still use -device to create individual devices without all the defaults) Signed-off-by: Benjamin Herrenschmidt b...@kernel.crashing.org Signed-off-by: Li Zhang

[Qemu-devel] [PATCH] pseries: Add support for new KVM hash table control call

2012-06-27 Thread Benjamin Herrenschmidt
From: David Gibson da...@gibson.dropbear.id.au This adds support for then new reset htab ioctl which allows qemu to properly cleanup the MMU hash table when the guest is reset. With the corresponding kernel support, reset of a guest now works properly. This also paves the way for indicating a

Re: [Qemu-devel] [PATCH] pseries: Add support for new KVM hash table control call

2012-06-27 Thread Benjamin Herrenschmidt
On Wed, 2012-06-27 at 22:10 +1000, Benjamin Herrenschmidt wrote: From: David Gibson da...@gibson.dropbear.id.au This adds support for then new reset htab ioctl which allows qemu to properly cleanup the MMU hash table when the guest is reset. With the corresponding kernel support, reset of a

Re: [Qemu-devel] [PATCH v3 5/6] qapi: convert sendkey

2012-06-27 Thread Eric Blake
On 06/27/2012 03:59 AM, Amos Kong wrote: The interface looks like we have settled into something useful that libvirt can live with. I will leave a more thorough review of the series to those more familiar with qemu's internals. However, as long as we are fine-tuning things, I have some

Re: [Qemu-devel] [PATCH v7 11/16] target-or32: Add a IIS dummy board

2012-06-27 Thread Peter Crosthwaite
Hi Jia, On Wed, Jun 27, 2012 at 7:54 PM, Jia Liu pro...@gmail.com wrote: Add a IIS dummy board. Signed-off-by: Jia Liu pro...@gmail.com ---  hw/openrisc/Makefile.objs |    2 +-  hw/openrisc_sim.c         |  149 +  2 files changed, 150

Re: [Qemu-devel] [PATCH] pseries: Add support for new KVM hash table control call

2012-06-27 Thread Alexander Graf
On 27.06.2012, at 14:10, Benjamin Herrenschmidt wrote: From: David Gibson da...@gibson.dropbear.id.au This adds support for then new reset htab ioctl which allows qemu to properly cleanup the MMU hash table when the guest is reset. With the corresponding kernel support, reset of a guest

Re: [Qemu-devel] [PATCH v7 08/16] target-or32: Add instruction translation

2012-06-27 Thread Jia Liu
Hi Max, On Wed, Jun 27, 2012 at 7:03 PM, Max Filippov jcmvb...@gmail.com wrote: On Wed, Jun 27, 2012 at 1:54 PM, Jia Liu pro...@gmail.com wrote: Add OpenRISC instruction tanslation routines. Signed-off-by: Jia Liu pro...@gmail.com [...] +    case 0x0009: +        switch (op1) { +        

[Qemu-devel] [PATCH] qdev: fix use-after-free in the error path of qdev_init_nofail

2012-06-27 Thread Anthony Liguori
From Markus: Before: $ qemu-system-x86_64 -display none -drive if=ide qemu-system-x86_64: Device needs media, but drive is empty qemu-system-x86_64: Initialization of device ide-hd failed [Exit 1 ] After: $ qemu-system-x86_64 -display none -drive if=ide

Re: [Qemu-devel] [PATCH v3 5/6] qapi: convert sendkey

2012-06-27 Thread Luiz Capitulino
On Wed, 27 Jun 2012 17:59:04 +0800 Amos Kong ak...@redhat.com wrote: On 27/06/12 04:22, Luiz Capitulino wrote: On Wed, 20 Jun 2012 06:53:40 -0600 Eric Blakeebl...@redhat.com wrote: On 06/19/2012 10:47 PM, Amos Kong wrote: Convert 'sendkey' to use QAPI. do_sendkey() depends on some

Re: [Qemu-devel] [PATCH v2] bitops.h: Add field32() and field64() functions to extract bitfields

2012-06-27 Thread Peter Maydell
On 27 June 2012 12:29, Andreas Färber afaer...@suse.de wrote: Do you have followup patches that make use of this? Might illustrate what variables and types are being passed in. Here's a random snippet from the LPAE patch I'm working on: uint32_t t0sz = field32(env-cp15.c2_control, 0, 3);

Re: [Qemu-devel] [PATCH v7 11/16] target-or32: Add a IIS dummy board

2012-06-27 Thread Andreas Färber
Am 27.06.2012 14:25, schrieb Peter Crosthwaite: Hi Jia, On Wed, Jun 27, 2012 at 7:54 PM, Jia Liu pro...@gmail.com wrote: +static void openrisc_sim_init(ram_addr_t ram_size, + const char *boot_device, + const char *kernel_filename, +

Re: [Qemu-devel] [PATCH v2] bitops.h: Add field32() and field64() functions to extract bitfields

2012-06-27 Thread Peter Maydell
On 27 June 2012 12:39, Eric Blake ebl...@redhat.com wrote: On 06/27/2012 04:29 AM, Peter Maydell wrote: +static inline uint64_t field64(uint64_t value, int start, int length) +{ +    assert(start = 0 start = 63 length 0 start + length = 64); You're failing to account for wraparound:

Re: [Qemu-devel] [PATCH v2] bitops.h: Add field32() and field64() functions to extract bitfields

2012-06-27 Thread Jay Foad
Eric Blake wrote: assert(start = 0 length 0 (unsigned) start + length = 64); This is shorter and avoids the ugly cast: assert(start = 0 length 0 length = 64 - start); Jay.

Re: [Qemu-devel] [PATCH v7 11/16] target-or32: Add a IIS dummy board

2012-06-27 Thread Peter Crosthwaite
On Wed, Jun 27, 2012 at 11:04 PM, Andreas Färber afaer...@suse.de wrote: Am 27.06.2012 14:25, schrieb Peter Crosthwaite: Hi Jia, On Wed, Jun 27, 2012 at 7:54 PM, Jia Liu pro...@gmail.com wrote: +static void openrisc_sim_init(ram_addr_t ram_size, +                              const char

Re: [Qemu-devel] [PATCH 1/2] Add usb option in machine options to enable/disable usb

2012-06-27 Thread Li Zhang
On Wed, Jun 27, 2012 at 8:00 PM, Andreas Färber afaer...@suse.de wrote: Am 18.06.2012 11:22, schrieb Li Zhang: For pseries machine, it needs to enable usb to add keyboard or usb mouse. -usb option won't be used in the future, and machine options is a better way to enable usb. So this patch

Re: [Qemu-devel] [PATCH] qdev: fix use-after-free in the error path of qdev_init_nofail

2012-06-27 Thread Andreas Färber
Am 27.06.2012 14:41, schrieb Anthony Liguori: From Markus: Before: $ qemu-system-x86_64 -display none -drive if=ide qemu-system-x86_64: Device needs media, but drive is empty qemu-system-x86_64: Initialization of device ide-hd failed [Exit 1 ] After: $

Re: [Qemu-devel] [PATCH v2] bitops.h: Add field32() and field64() functions to extract bitfields

2012-06-27 Thread Avi Kivity
On 06/27/2012 01:29 PM, Peter Maydell wrote: Add field32() and field64() functions which extract a particular bit field from a word and return it. Based on an idea by Jia Liu. +/** + * field64 - return a specified bit field from a uint64_t value + * @value: The value to extract the bit

Re: [Qemu-devel] [PATCH v3 5/6] qapi: convert sendkey

2012-06-27 Thread Luiz Capitulino
On Wed, 27 Jun 2012 18:22:48 +0800 Amos Kong ak...@redhat.com wrote: On 27/06/12 04:21, Luiz Capitulino wrote: On Wed, 20 Jun 2012 12:47:40 +0800 Amos Kongak...@redhat.com wrote: Convert 'sendkey' to use QAPI. do_sendkey() depends on some variables/functions in monitor.c, so reserve

Re: [Qemu-devel] [PATCH v2] bitops.h: Add field32() and field64() functions to extract bitfields

2012-06-27 Thread Avi Kivity
On 06/27/2012 04:15 PM, Avi Kivity wrote: On 06/27/2012 01:29 PM, Peter Maydell wrote: Add field32() and field64() functions which extract a particular bit field from a word and return it. Based on an idea by Jia Liu. +/** + * field64 - return a specified bit field from a uint64_t value

Re: [Qemu-devel] [PATCH v2] bitops.h: Add field32() and field64() functions to extract bitfields

2012-06-27 Thread Peter Maydell
On 27 June 2012 14:15, Avi Kivity a...@redhat.com wrote: I suggest adding the analogous functions for writing.  I believe the common naming is extract/deposit. static inline uint64_t deposit64(uint64_t *pvalue, unsigned start,                                 unsigned length, uint64_t

Re: [Qemu-devel] [PATCH 1/2] Add usb option in machine options to enable/disable usb

2012-06-27 Thread Peter Crosthwaite
On Wed, Jun 27, 2012 at 11:13 PM, Li Zhang zhlci...@gmail.com wrote: On Wed, Jun 27, 2012 at 8:00 PM, Andreas Färber afaer...@suse.de wrote: Am 18.06.2012 11:22, schrieb Li Zhang: For pseries machine, it needs to enable usb to add keyboard or usb mouse. -usb option won't be used in Grammar:

  1   2   3   >