[Qemu-devel] [PULL 00/42] Block patches

2013-08-22 Thread Stefan Hajnoczi
I'm away tomorrow and Kevin is also on vacation. So here is the weekly pull request one day early. We've got plenty of patches sitting in the block queue :). The following changes since commit ecfe10c9a6f9bc77d0e4b7eb5d0f5d61e8fbaed8: Merge remote-tracking branch 'pmaydell/tags/pull-target-ar

[Qemu-devel] [PULL 31/42] aio / timers: Add qemu_clock_get_ms and qemu_clock_get_ms

2013-08-22 Thread Stefan Hajnoczi
From: Alex Bligh Add utility functions qemu_clock_get_ms and qemu_clock_get_us Signed-off-by: Alex Bligh Signed-off-by: Stefan Hajnoczi --- include/qemu/timer.h | 28 1 file changed, 28 insertions(+) diff --git a/include/qemu/timer.h b/include/qemu/timer.h index

[Qemu-devel] [PULL 05/42] vmdk: Move l1_size check into vmdk_add_extent()

2013-08-22 Thread Stefan Hajnoczi
From: Fam Zheng This header check is common to VMDK3 and VMDK4, so move it into vmdk_add_extent(). Signed-off-by: Fam Zheng Signed-off-by: Stefan Hajnoczi --- block/vmdk.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/block/vmdk.c b/block/vmdk.c index 34

[Qemu-devel] [PULL 12/42] aio / timers: Consistent treatment of disabled clocks for deadlines

2013-08-22 Thread Stefan Hajnoczi
From: Alex Bligh Make treatment of disabled clocks consistent in deadline calculation Signed-off-by: Alex Bligh Signed-off-by: Stefan Hajnoczi --- qemu-timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu-timer.c b/qemu-timer.c index df8f12b..be29adf 100644 --- a/q

[Qemu-devel] [PULL 30/42] aio / timers: Remove legacy qemu_clock_deadline & qemu_timerlist_deadline

2013-08-22 Thread Stefan Hajnoczi
From: Alex Bligh Remove qemu_clock_deadline and qemu_timerlist_deadline now we are using the ns functions throughout. Signed-off-by: Alex Bligh Signed-off-by: Stefan Hajnoczi --- include/qemu/timer.h | 16 qemu-timer.c | 20 2 files changed, 36 de

[Qemu-devel] [PULL 27/42] aio / timers: Use all timerlists in icount warp calculations

2013-08-22 Thread Stefan Hajnoczi
From: Alex Bligh Notify all timerlists derived from vm_clock in icount warp calculations. When calculating timer delay based on vm_clock deadline, use all timerlists. For compatibility, maintain an apparent bug where when using icount, if no vm_clock timer was set, qemu_clock_deadline would ret

Re: [Qemu-devel] VNC key presses not correct

2013-08-22 Thread Erik Rull
Markus Armbruster wrote: Erik Rull writes: Markus Armbruster wrote: Erik Rull writes: Hi all, I'm struggling with the QEMU VNC on qemu-kvm-1.2.0 a bit, the following two things are not working properly: Have you tried to reproduce on a current version? Hello Markus, yes, I was able

Re: [Qemu-devel] VNC key presses not correct

2013-08-22 Thread Anthony Liguori
On Aug 22, 2013 4:55 PM, "Erik Rull" wrote: > > Markus Armbruster wrote: >> >> Erik Rull writes: >> >>> Markus Armbruster wrote: Erik Rull writes: > Hi all, > > I'm struggling with the QEMU VNC on qemu-kvm-1.2.0 a bit, the following two > things are not working pro

Re: [Qemu-devel] [PATCH -V2 1/4] target-ppc: Update slb array with correct index values.

2013-08-22 Thread Alexander Graf
Am 22.08.2013 um 18:58 schrieb Andreas Färber : > Am 20.08.2013 12:49, schrieb Aneesh Kumar K.V: >> From: "Aneesh Kumar K.V" >> >> Without this, a value of rb=0 and rs=0 results in replacing the 0th >> index. This can be observed when using gdb remote debugging support. >> >> (gdb) x/10i do_f

[Qemu-devel] [PATCH] target-i386: Fix segment cache dump

2013-08-22 Thread Tobias Markus
When in Long Mode, cpu_x86_seg_cache() logs "DS16" because the Default operation size bit (D/B bit) is not set for Long Mode Data Segments since there are only Data Segments in Long Mode and no explicit 16/32/64-bit Descriptors. This patch fixes this by checking the Long Mode Active bit of the hidd

Re: [Qemu-devel] [PATCH v5 0/8] Implement reference count for BlockDriverState [resend]

2013-08-22 Thread Fam Zheng
On Thu, 08/22 13:38, Stefan Hajnoczi wrote: > On Fri, Aug 09, 2013 at 06:01:53PM +0800, Fam Zheng wrote: > > [resend to the correct list] > > > > BlockDriverState lifecycle management is needed by future features such as > > image fleecing and blockdev-add. This series adds reference count to > >

[Qemu-devel] [PATCH v6 0/8] Implement reference count for BlockDriverState

2013-08-22 Thread Fam Zheng
BlockDriverState lifecycle management is needed by future features such as image fleecing and blockdev-add. This series adds reference count to BlockDriverState. The first two patches clean up two odd BlockDriverState use cases, so all code uses bdrv_new() to create BlockDriverState instance. The

[Qemu-devel] [PATCH v6 4/8] block: make bdrv_delete() static

2013-08-22 Thread Fam Zheng
Manage BlockDriverState lifecycle with refcnt, so bdrv_delete() is no longer public and should be called by bdrv_unref() if refcnt is decreased to 0. This is an identical change because effectively, there's no multiple reference of BDS now: no caller of bdrv_ref() yet, only bdrv_new() sets bs->ref

[Qemu-devel] [PATCH v6 6/8] xen_disk: simplify blk_disconnect with refcnt

2013-08-22 Thread Fam Zheng
We call bdrv_attach_dev when initializing whether or not bs is created locally, so call bdrv_detach_dev and let the refcnt handle the lifecycle. Signed-off-by: Fam Zheng --- hw/block/xen_disk.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/hw/block/xen_disk.c b/

[Qemu-devel] [PATCH v6 2/8] iscsi: use bdrv_new() instead of stack structure

2013-08-22 Thread Fam Zheng
BlockDriverState structure needs bdrv_new() to initialize refcnt, don't allocate a local structure variable and memset to 0, becasue with coming refcnt implementation, bdrv_unref will crash if bs->refcnt not initialized to 1. Signed-off-by: Fam Zheng --- block/iscsi.c | 16 +--- 1 fi

[Qemu-devel] [PATCH v6 3/8] block: implement reference count for BlockDriverState

2013-08-22 Thread Fam Zheng
Introduce bdrv_ref/bdrv_unref to manage the lifecycle of BlockDriverState. They are unused for now but will used to replace bdrv_delete() later. Signed-off-by: Fam Zheng --- block.c | 21 + include/block/block.h | 2 ++ include/block/block_int.h | 1 +

[Qemu-devel] [PATCH v6 5/8] migration: omit drive ref as we have bdrv_ref now

2013-08-22 Thread Fam Zheng
block-migration.c does not actually use DriveInfo anywhere. Hence it's safe to drive ref code, we really only care about referencing BDS. Signed-off-by: Fam Zheng --- block-migration.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/block-migration.c b/block-migration.c

[Qemu-devel] [PATCH v6 1/8] vvfat: use bdrv_new() to allocate BlockDriverState

2013-08-22 Thread Fam Zheng
we need bdrv_new() to properly initialize BDS, don't allocate memory manually. Signed-off-by: Fam Zheng --- block/vvfat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/vvfat.c b/block/vvfat.c index cd3b8ed..a827d91 100644 --- a/block/vvfat.c +++ b/block/vvfat.c @@ -29

[Qemu-devel] [PATCH v6 7/8] nbd: use BlockDriverState refcnt

2013-08-22 Thread Fam Zheng
Previously, nbd calls drive_get_ref() on the drive of bs. A BDS doesn't always have associated dinfo, which nbd doesn't care either. We already have BDS ref count, so use it to make it safe for a BDS w/o blockdev. Signed-off-by: Fam Zheng --- blockdev-nbd.c | 10 +- nbd.c | 5 +

[Qemu-devel] [PATCH 0/3] Patchset description

2013-08-22 Thread Ákos Kovács
Patch 1: Move sysbus and PCI specific code to a new files from hw/usb/hcd-ohci.c. Patch 2: Make them new configuration variables *_OHCI_SYSBUS and *_OHCI_PCI and add them to the arm and sh4 default configuration. Patch 3: Create similar configuration variables for hcd-uhci-sysbus.c and hcd-uh

[Qemu-devel] [PATCH 2/3] hw/usb/Makefile.objs: Make config options for ohci-pci

2013-08-22 Thread Ákos Kovács
Create CONFIG_USB_OHCI_PCI and CONFIG_USB_OHCI_SYSBUS configuration options for the new hcd-ohci-pci.c and hcd-ohci-sysbus.c files. Add CONFIG_USB_OHCI_PCI to default-configs/{arm,sh4}-softmmu.mak. Signed-off-by: Ákos Kovács --- default-configs/arm-softmmu.mak |2 ++ default-configs/sh4-sof

[Qemu-devel] [PATCH v6 8/8] block: use BDS ref for block jobs

2013-08-22 Thread Fam Zheng
Block jobs used drive_get_ref(drive_get_by_blockdev(bs)) to avoid BDS being deleted. Now we have BDS reference count, and block jobs don't care about dinfo, so replace them to get cleaner code. It is also the safe way when BDS has no drive info. Signed-off-by: Fam Zheng --- blockdev.c | 49 +

[Qemu-devel] [PATCH 1/3] hw/usb/hcd-ohci.c: Move sysbus and PCI code to new files

2013-08-22 Thread Ákos Kovács
Move the existing sysbus and PCI logic to hcd-ohci-sysbus.c and hcd-ohci-pci.c from hcd-ohci.c. Create a new hcd-ohci.h header for the shared declarations and macros. Signed-off-by: Ákos Kovács --- hw/usb/hcd-ohci-pci.c| 96 ++ hw/usb/hcd-ohci-sysbus.c | 84 + hw/usb/hcd-

[Qemu-devel] [PATCH 3/3] Makefile.objs: Split CONFIG_USB_EHCI

2013-08-22 Thread Ákos Kovács
Create new configuration variables, CONFIG_USB_EHCI_SYSBUS and CONFIG_USB_EHCI_PCI for hcd-ehci-sysbus.o and hcd-ehci-pci.o. Make CONFIG_USB_EHCI_SYSBUS default for arm-softmmu.mak. Signed-off-by: Ákos Kovács --- default-configs/arm-softmmu.mak |1 + hw/usb/Makefile.objs|4 +

[Qemu-devel] [Bug 1213797] Re: Guest hang after live migration

2013-08-22 Thread Lei Li
Hi, Yes, qemu-kvm is no longer maintained since 1.3, it'd be better to switch to qemu if you want an active one. This patch will be applying to up/master in QEMU branch as well. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https:

[Qemu-devel] [Bug 1213797] Re: Guest hang after live migration

2013-08-22 Thread chao zhou
OK. Thanks. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1213797 Title: Guest hang after live migration Status in QEMU: New Bug description: Environment: Host OS (ia32/ia32e

Re: [Qemu-devel] [PATCH v5 0/8] Implement reference count for BlockDriverState [resend]

2013-08-22 Thread Wenchao Xia
于 2013-8-22 19:38, Stefan Hajnoczi 写道: On Fri, Aug 09, 2013 at 06:01:53PM +0800, Fam Zheng wrote: [resend to the correct list] BlockDriverState lifecycle management is needed by future features such as image fleecing and blockdev-add. This series adds reference count to BlockDriverState. The f

Re: [Qemu-devel] [PATCH v2] block: Introduce bs->zero_beyond_eof

2013-08-22 Thread Asias He
On Thu, Aug 22, 2013 at 02:12:29PM +0200, Stefan Hajnoczi wrote: > On Thu, Aug 22, 2013 at 03:24:14PM +0800, Asias He wrote: > > In 4146b46c42e0989cb5842e04d88ab6ccb1713a48 (block: Produce zeros when > > protocols reading beyond end of file), we break qemu-iotests ./check > > -qcow2 022. This happe

Re: [Qemu-devel] [PATCH] spapr-pci: rework MSI/MSIX

2013-08-22 Thread Alexey Kardashevskiy
On 08/01/2013 09:22 AM, Anthony Liguori wrote: > Alexey Kardashevskiy writes: > >> On 08/01/2013 04:02 AM, Anthony Liguori wrote: >>> Alexey Kardashevskiy writes: >>> On the sPAPR platform a guest allocates MSI/MSIX vectors via RTAS hypercalls which return global IRQ numbers to a guest

Re: [Qemu-devel] [PATCH 04/18] savevm: set right return value for qemu_file_rate_limit

2013-08-22 Thread Lei Li
On 08/21/2013 06:42 PM, Paolo Bonzini wrote: Il 21/08/2013 09:18, Lei Li ha scritto: Commit 1964a397063967acc5ce71a2a24ed26e74824ee1 refactors rate limiting to QEMUFile, but set the return value for qemu_file_rate_limit to 1 in the case of qemu_file_get_error. It is wrong and should be negative

Re: [Qemu-devel] [PATCH 06/18] bugfix: wrong error set by ram_control_load_hook()

2013-08-22 Thread Lei Li
On 08/21/2013 06:40 PM, Paolo Bonzini wrote: Il 21/08/2013 09:18, Lei Li ha scritto: It should set negative error value if there has been an error. Signed-off-by: Lei Li --- savevm.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/savevm.c b/savevm.c index 1522d95.

Re: [Qemu-devel] [PATCH v3 2/8] xics: add pre_save/post_load/cpu_setup dispatchers

2013-08-22 Thread Alexey Kardashevskiy
On 08/19/2013 11:54 PM, Andreas Färber wrote: > Am 19.08.2013 07:55, schrieb Alexey Kardashevskiy: >> The upcoming support of in-kernel XICS will redefine migration callbacks >> for both ICS and ICP so classes and callback pointers are added. >> >> This adds a cpu_setup callback to the XICS device

[Qemu-devel] [PATCH V9 07/12] NUMA: parse guest numa nodes memory policy

2013-08-22 Thread Wanlong Gao
The memory policy setting format is like: policy={default|membind|interleave|preferred}[,relative=true],host-nodes=N-N And we are adding this setting as a suboption of "-numa mem,", the memory policy then can be set like following: -numa node,nodeid=0,cpus=0 \ -numa node,nodeid=1,cpus=1

[Qemu-devel] [PATCH V9 04/12] NUMA: move numa related code to numa.c

2013-08-22 Thread Wanlong Gao
Signed-off-by: Wanlong Gao --- cpus.c | 14 - include/sysemu/cpus.h | 1 - include/sysemu/sysemu.h | 2 ++ numa.c | 76 + vl.c| 57 + 5 files chang

[Qemu-devel] [PATCH V9 01/12] NUMA: add NumaOptions, NumaNodeOptions and NumaMemOptions

2013-08-22 Thread Wanlong Gao
These are used to generate stuff for OptsVisitor. Reviewed-by: Laszlo Ersek Signed-off-by: Wanlong Gao --- qapi-schema.json | 47 +++ 1 file changed, 47 insertions(+) diff --git a/qapi-schema.json b/qapi-schema.json index a51f7d2..11851a1 100644 ---

[Qemu-devel] [PATCH V9 00/12] Add support for binding guest numa nodes to host numa nodes

2013-08-22 Thread Wanlong Gao
As you know, QEMU can't direct it's memory allocation now, this may cause guest cross node access performance regression. And, the worse thing is that if PCI-passthrough is used, direct-attached-device uses DMA transfer between device and qemu process. All pages of the guest will be pinned by get_u

[Qemu-devel] [PATCH V9 06/12] NUMA: Add Linux libnuma detection

2013-08-22 Thread Wanlong Gao
Add detection of libnuma (mostly contained in the numactl package) to the configure script. Can be enabled or disabled on the command line, default is use if available. Signed-off-by: Andre Przywara Signed-off-by: Wanlong Gao --- configure | 32 1 file changed,

[Qemu-devel] [PATCH V9 10/12] NUMA: add hmp command set-mem-policy

2013-08-22 Thread Wanlong Gao
Add hmp command set-mem-policy to set host memory policy for a guest NUMA node. Then we can also set node's memory policy using the monitor command like: (qemu) set-mem-policy 0 policy=membind,relative=false,host-nodes=0-1 Signed-off-by: Wanlong Gao --- hmp-commands.hx | 16 ++ h

[Qemu-devel] [PATCH V9 12/12] NUMA: convert hmp command info_numa to use qmp command query_numa

2013-08-22 Thread Wanlong Gao
Signed-off-by: Wanlong Gao --- hmp.c | 54 ++ hmp.h | 1 + monitor.c | 21 + 3 files changed, 56 insertions(+), 20 deletions(-) diff --git a/hmp.c b/hmp.c index 98d2a76..3b2f04d 100644 --- a/hmp.c +++ b/hmp.c @@ -27

[Qemu-devel] [PATCH V9 05/12] NUMA: Add numa_info structure to contain numa nodes info

2013-08-22 Thread Wanlong Gao
Add the numa_info structure to contain the numa nodes memory, VCPUs information and the future added numa nodes host memory policies. Reviewed-by: Eduardo Habkost Signed-off-by: Andre Przywara Signed-off-by: Wanlong Gao --- hw/i386/pc.c| 4 ++-- include/sysemu/sysemu.h | 8 ++

[Qemu-devel] [PATCH V9 08/12] NUMA: set guest numa nodes memory policy

2013-08-22 Thread Wanlong Gao
Set the guest numa nodes memory policies using the mbind(2) system call node by node. After this patch, we are able to set guest nodes memory policies through the QEMU options, this arms to solve the guest cross nodes memory access performance issue. And as you all know, if PCI-passthrough is used,

[Qemu-devel] [PATCH V9 09/12] NUMA: add qmp command set-mem-policy to set memory policy for NUMA node

2013-08-22 Thread Wanlong Gao
This QMP command allows user set guest node's memory policy through the QMP protocol. The qmp-shell command is like: set-mem-policy nodeid=0 policy=membind relative=true host-nodes=0-1 Signed-off-by: Wanlong Gao --- numa.c | 62 ++

[Qemu-devel] [PATCH V9 11/12] NUMA: add qmp command query-numa

2013-08-22 Thread Wanlong Gao
Add qmp command query-numa to show guest NUMA information. Signed-off-by: Wanlong Gao --- numa.c | 69 qapi-schema.json | 36 + qmp-commands.hx | 49 3 files c

[Qemu-devel] [PATCH V9 03/12] NUMA: check if the total numa memory size is equal to ram_size

2013-08-22 Thread Wanlong Gao
If the total number of the assigned numa nodes memory is not equal to the assigned ram size, it will write the wrong data to ACPI talb, then the guest will ignore the wrong ACPI table and recognize all memory to one node. It's buggy, we should check it to ensure that we write the right data to ACPI

[Qemu-devel] [PATCH V9 02/12] NUMA: split -numa option

2013-08-22 Thread Wanlong Gao
Change -numa option like following as Paolo suggested: -numa node,nodeid=0,cpus=0-1 \ -numa mem,nodeid=0,size=1G This new option will make later coming memory hotplug better. And this new option is implemented using OptsVisitor. And just remain "-numa node,mem=xx" as legacy. Reviewed-by:

Re: [Qemu-devel] [PATCH 1/2] kvm irqfd: support msimessage to irq translation in PHB

2013-08-22 Thread Alexey Kardashevskiy
On 08/19/2013 07:01 PM, Michael S. Tsirkin wrote: > On Mon, Aug 19, 2013 at 06:10:01PM +1000, Alexey Kardashevskiy wrote: >> On 08/19/2013 05:54 PM, Michael S. Tsirkin wrote: >>> On Mon, Aug 19, 2013 at 05:44:04PM +1000, Alexey Kardashevskiy wrote: On 08/19/2013 05:35 PM, Michael S. Tsirkin wr

Re: [Qemu-devel] [PATCH 04/18] savevm: set right return value for qemu_file_rate_limit

2013-08-22 Thread Paolo Bonzini
> Say, In ram_save_iterate(), the current logic is: > > ret = qemu_file_rate_limit(); > while(ret == 0) { > save RAM blocks until no more to send. > } > if (ret < 0) { > return ret; > } > ... > > And in savevm layer, qemu_savevm_state_iterate() set an error if the return > value of ram_

Re: [Qemu-devel] [PATCH 06/18] bugfix: wrong error set by ram_control_load_hook()

2013-08-22 Thread Paolo Bonzini
> On 08/21/2013 06:40 PM, Paolo Bonzini wrote: > > Il 21/08/2013 09:18, Lei Li ha scritto: > >> It should set negative error value if there has been an error. > >> > >> Signed-off-by: Lei Li > >> --- > >> savevm.c |2 +- > >> 1 files changed, 1 insertions(+), 1 deletions(-) > >> > >> diff -

Re: [Qemu-devel] VNC key presses not correct

2013-08-22 Thread Markus Armbruster
Anthony Liguori writes: > On Aug 22, 2013 4:55 PM, "Erik Rull" wrote: >> >> Markus Armbruster wrote: >>> >>> Erik Rull writes: >>> Markus Armbruster wrote: > > Erik Rull writes: > >> Hi all, >> >> I'm struggling with the QEMU VNC on qemu-kvm-1.2.0 a bit, the follow

Re: [Qemu-devel] [PATCH 13/18] arch_init: adjust ram_save_setup() for migrate_is_localhost

2013-08-22 Thread Lei Li
On 08/21/2013 06:48 PM, Paolo Bonzini wrote: Il 21/08/2013 09:18, Lei Li ha scritto: Send all the ram blocks hooked by save_page, which will copy ram page and MADV_DONTNEED the page just copied. You should implement this entirely in the hook. It will be a little less efficient because of the d

Re: [Qemu-devel] [PATCH 06/18] bugfix: wrong error set by ram_control_load_hook()

2013-08-22 Thread Lei Li
On 08/23/2013 01:34 PM, Paolo Bonzini wrote: On 08/21/2013 06:40 PM, Paolo Bonzini wrote: Il 21/08/2013 09:18, Lei Li ha scritto: It should set negative error value if there has been an error. Signed-off-by: Lei Li --- savevm.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-)

Re: [Qemu-devel] [PATCH] block: Fix race in gluster_finish_aiocb

2013-08-22 Thread Bharata B Rao
On Wed, Aug 21, 2013 at 05:40:11PM +0200, Paolo Bonzini wrote: > > We could just use a bottom half, too. Add a bottom half to acb, > schedule it in gluster_finish_aiocb, delete it in the bottom half's own > callback. I tried this approach (the patch at the end of this mail), but see this occasio

Re: [Qemu-devel] VNC key presses not correct

2013-08-22 Thread Erik Rull
> On August 23, 2013 at 7:42 AM Markus Armbruster wrote: > > > Anthony Liguori writes: > > > On Aug 22, 2013 4:55 PM, "Erik Rull" wrote: > >> > >> Markus Armbruster wrote: > >>> > >>> Erik Rull writes: > >>> > Markus Armbruster wrote: > > > > Erik Rull writes: > > > >> Hi

<    1   2   3