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

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] [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 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] 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 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] [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 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

[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:

[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 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 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 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 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 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 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 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

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

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 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] 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 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 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

[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

[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] [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] [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 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 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 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 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 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 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 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 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 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 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 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

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] 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 -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

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] 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

[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

[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 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 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 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 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 39/42] aio / timers: Remove legacy interface

2013-08-22 Thread Stefan Hajnoczi
From: Alex Bligh Remove the legacy interface from include/qemu/timers.h. Ensure struct QEMUClock is not exposed at all. Signed-off-by: Alex Bligh Signed-off-by: Stefan Hajnoczi --- include/qemu/timer.h | 214 +-- qemu-timer.c | 35 +---

[Qemu-devel] [PULL 28/42] aio / timers: Add documentation and new format calls

2013-08-22 Thread Stefan Hajnoczi
From: Alex Bligh Add documentation for existing qemu timer calls. Add new format calls of the format timer_XXX rather than qemu_XXX_timer for consistency. Signed-off-by: Alex Bligh Signed-off-by: Stefan Hajnoczi --- include/qemu/timer.h | 206 +-

Re: [Qemu-devel] pvpanic plans?

2013-08-22 Thread Peter Maydell
On 22 August 2013 21:09, Anthony Liguori wrote: > Paolo Bonzini writes: >> Not just that. Panic notifiers are called in a substantially unknown >> environment, with locks taken or interrupts already set up. > > If you make the panic notify a config space write, then on virtio-pci, > it's an outb

[Qemu-devel] [PULL 29/42] aio / timers: Remove alarm timers

2013-08-22 Thread Stefan Hajnoczi
From: Alex Bligh Remove alarm timers from qemu-timers.c now we use g_poll / ppoll instead. Signed-off-by: Alex Bligh Signed-off-by: Stefan Hajnoczi --- include/qemu/timer.h | 3 - main-loop.c | 4 - qemu-timer.c | 500 +-- v

Re: [Qemu-devel] [PATCH 11/18] migration: introduce capability localhost

2013-08-22 Thread Michael R. Hines
On 08/21/2013 11:18 AM, Paolo Bonzini wrote: Il 21/08/2013 09:18, Lei Li ha scritto: } else if (strstart(uri, "unix:", &p)) { +if (s->enabled_capabilities[MIGRATION_CAPABILITY_LOCALHOST]) { +local_start_outgoing_migration(s, p, &local_err); +} unix_sta

Re: [Qemu-devel] [PATCH 10/18] migration-local: implementation of outgoing part

2013-08-22 Thread Michael R. Hines
On 08/21/2013 03:18 AM, Lei Li wrote: Implementation of outgoing part for localhost migration. The integration of migration thread and corresponding adjustment will be in coming patches. Signed-off-by: Lei Li --- include/migration/migration.h |2 + migration-local.c | 85 ++

[Qemu-devel] [PULL 07/42] vmdk: support vmfsSparse files

2013-08-22 Thread Stefan Hajnoczi
From: Fam Zheng VMware ESX hosts use a variant of the VMDK3 format, identified by the vmfsSparse create type ad the VMFSSPARSE extent type. It has 16 KB grain tables (L2) and a variable-size grain directory (L1). In addition, the grain size is always 512, but that is not a problem because it is

[Qemu-devel] [PULL 15/42] aio / timers: Make qemu_run_timers and qemu_run_all_timers return progress

2013-08-22 Thread Stefan Hajnoczi
From: Alex Bligh Make qemu_run_timers and qemu_run_all_timers return progress so that aio_poll etc. can determine whether a timer has been run. Signed-off-by: Alex Bligh Signed-off-by: Stefan Hajnoczi --- include/qemu/timer.h | 21 +++-- qemu-timer.c | 18 -

Re: [Qemu-devel] [PATCH 08/18] migration-local: introduce qemu_fopen_local()

2013-08-22 Thread Michael R. Hines
On 08/21/2013 03:18 AM, Lei Li wrote: Introduce read/write backend of QEMUFileLocal used by localhost migration. The unix domain socket will be replaced by PIPE with vmsplice mechanism. Signed-off-by: Lei Li --- Makefile.objs |1 + migration-local.c | 211 +++

Re: [Qemu-devel] pvpanic plans?

2013-08-22 Thread Anthony Liguori
On Thu, Aug 22, 2013 at 3:36 PM, Laszlo Ersek wrote: > On 08/22/13 22:09, Anthony Liguori wrote: > >> The difference is that ACPI or platform devices in general are >> unexpected to be added. By definition it means that the motherboard has >> most likely been changed. > > You could encounter a ne

[Qemu-devel] [PULL 01/42] qcow2: Change default for new images to compat=1.1

2013-08-22 Thread Stefan Hajnoczi
From: Kevin Wolf By the time that qemu 1.7 will be released, enough time will have passed since qemu 1.1, which is the first version to understand version 3 images, that changing the default shouldn't hurt many people any more and the benefits of using the new format outweigh the pain. qemu-iote

Re: [Qemu-devel] pvpanic plans?

2013-08-22 Thread Laszlo Ersek
On 08/22/13 22:09, Anthony Liguori wrote: > The difference is that ACPI or platform devices in general are > unexpected to be added. By definition it means that the motherboard has > most likely been changed. You could encounter a new ACPI artifact after simply re-flashing your MB with an update

Re: [Qemu-devel] [PATCH 07/18] arch_init: export RAM_SAVE_xxx flags

2013-08-22 Thread Michael R. Hines
On 08/21/2013 06:49 AM, Paolo Bonzini wrote: Il 21/08/2013 09:18, Lei Li ha scritto: Export RAM_SAVE_xxx flags for localhost migration. Signed-off-by: Lei Li --- arch_init.c | 12 include/migration/migration.h | 14 ++ 2 files changed, 14 inse

[Qemu-devel] [PULL 33/42] aio / timers: Remove main_loop_timerlist

2013-08-22 Thread Stefan Hajnoczi
From: Alex Bligh Now we have timerlistgroups implemented and main_loop_tlg, we no longer need the concept of a default timer list associated with each clock. Remove it and simplify initialisation of clocks and timer lists. Signed-off-by: Alex Bligh Signed-off-by: Stefan Hajnoczi --- include/q

[Qemu-devel] [PULL 40/42] aio / timers: remove dummy_io_handler_flush from tests/test-aio.c

2013-08-22 Thread Stefan Hajnoczi
From: Alex Bligh Remove dummy_io_handler_flush from tests/test-aio.c as it does nothing now. Signed-off-by: Alex Bligh Signed-off-by: Stefan Hajnoczi --- tests/test-aio.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/tests/test-aio.c b/tests/test-aio.c index 3ad

[Qemu-devel] [PULL 41/42] aio-win32: replace incorrect AioHandler->opaque usage with ->e

2013-08-22 Thread Stefan Hajnoczi
The AioHandler->opaque field does not exist in aio-win32.c. The code that uses it was incorrectly copied from aio-posix.c. For Windows we can use AioHandler->e to match against AioContext->notifier. This patch fixes the Windows build for aio-win32.o. Reviewed-by: Stefan Weil Signed-off-by: Ste

[Qemu-devel] [PULL 32/42] aio / timers: Rearrange timer.h & make legacy functions call non-legacy

2013-08-22 Thread Stefan Hajnoczi
From: Alex Bligh Rearrange timer.h so it is in order by function type. Make legacy functions call non-legacy functions rather than vice-versa. Convert cpus.c to use new API. Signed-off-by: Alex Bligh Signed-off-by: Stefan Hajnoczi --- cpus.c | 112 +- hw/acpi/piix4.c

[Qemu-devel] [PULL 37/42] aio / timers: Add scripts/switch-timer-api

2013-08-22 Thread Stefan Hajnoczi
From: Alex Bligh Add scripts/switch-timer-api to programatically rewrite source files to use the new timer system. Signed-off-by: Alex Bligh Signed-off-by: Stefan Hajnoczi --- scripts/switch-timer-api | 178 +++ 1 file changed, 178 insertions(+) cr

[Qemu-devel] [PULL 35/42] aio / timers: convert block_job_sleep_ns and co_sleep_ns to new API

2013-08-22 Thread Stefan Hajnoczi
From: Alex Bligh Convert block_job_sleep_ns and co_sleep_ns to use the new timer API. Signed-off-by: Alex Bligh Signed-off-by: Stefan Hajnoczi --- block/backup.c| 4 ++-- block/commit.c| 2 +- block/mirror.c| 4 ++-- block/stream.c| 2 +- bl

[Qemu-devel] [PULL 42/42] win32-aio: drop win32_aio_flush_cb()

2013-08-22 Thread Stefan Hajnoczi
The io_flush argument to qemu_aio_set_event_notifier() has been removed since the block layer learnt to drain requests by itself. Fix the Windows build for win32-aio.o by updating the qemu_aio_set_event_notifier() call and dropping win32_aio_flush_cb(). Reviewed-by: Stefan Weil Signed-off-by: St

[Qemu-devel] [PULL 36/42] aio / timers: Add test harness for AioContext timers

2013-08-22 Thread Stefan Hajnoczi
From: Alex Bligh Add a test harness for AioContext timers. The g_source equivalent is unsatisfactory as it suffers from false wakeups. Signed-off-by: Alex Bligh Signed-off-by: Stefan Hajnoczi --- tests/test-aio.c | 134 +++ 1 file changed, 1

[Qemu-devel] [PULL 34/42] aio / timers: Convert rtc_clock to be a QEMUClockType

2013-08-22 Thread Stefan Hajnoczi
From: Alex Bligh Convert rtc_clock to be a QEMUClockType Move rtc_clock users to use the new API Signed-off-by: Alex Bligh Signed-off-by: Stefan Hajnoczi --- hw/arm/omap1.c| 4 ++-- hw/arm/pxa2xx.c | 35 +++ hw/arm/strongarm.c| 1

[Qemu-devel] [PULL 26/42] aio / timers: Introduce new API timer_new and friends

2013-08-22 Thread Stefan Hajnoczi
From: Alex Bligh Introduce new API for creating timers - timer_new and _ns, _ms, _us derivatives. Signed-off-by: Alex Bligh Signed-off-by: Stefan Hajnoczi --- include/qemu/timer.h | 69 1 file changed, 69 insertions(+) diff --git a/include

[Qemu-devel] [PULL 25/42] aio / timers: On timer modification, qemu_notify or aio_notify

2013-08-22 Thread Stefan Hajnoczi
From: Alex Bligh On qemu_mod_timer_ns, ensure qemu_notify or aio_notify is called to end the appropriate poll(), irrespective of use_icount value. On qemu_clock_enable, ensure qemu_notify or aio_notify is called for all QEMUTimerLists attached to the QEMUClock. Signed-off-by: Alex Bligh Signed

[Qemu-devel] [PULL 23/42] aio / timers: Convert aio_poll to use AioContext timers' deadline

2013-08-22 Thread Stefan Hajnoczi
From: Alex Bligh Convert aio_poll to use deadline based on AioContext's timers. aio_poll has been changed to return accurately whether progress has occurred. Prior to this commit, aio_poll always returned true if g_poll was entered, whether or not any progress was made. This required a change to

[Qemu-devel] [PULL 20/42] aio / timers: Add a notify callback to QEMUTimerList

2013-08-22 Thread Stefan Hajnoczi
From: Alex Bligh Add a notify pointer to QEMUTimerList so it knows what to notify on a timer change. Signed-off-by: Alex Bligh Signed-off-by: Stefan Hajnoczi --- async.c | 7 ++- include/qemu/timer.h | 27 +++ qemu-timer.c | 31 +++

[Qemu-devel] [PULL 24/42] aio / timers: Convert mainloop to use timeout

2013-08-22 Thread Stefan Hajnoczi
From: Alex Bligh Convert mainloop to use timeout from default timerlist group (i.e. the current 3 static timers) main-loop.c produces a (possibly spurious) warning about multiple iterations. Adapt the way this works for a signed timeout and make the warning a bit safer. Signed-off-by: Alex Blig

[Qemu-devel] [PULL 19/42] aio / timers: Add QEMUTimerListGroup to AioContext

2013-08-22 Thread Stefan Hajnoczi
From: Alex Bligh Add a QEMUTimerListGroup each AioContext (meaning a QEMUTimerList associated with each clock is added) and delete it when the AioContext is freed. Signed-off-by: Alex Bligh Signed-off-by: Stefan Hajnoczi --- async.c | 2 ++ include/block/aio.h | 4

[Qemu-devel] [PULL 22/42] aio / timers: Add aio_timer_init & aio_timer_new wrappers

2013-08-22 Thread Stefan Hajnoczi
From: Alex Bligh Add aio_timer_init and aio_timer_new wrapper functions. Signed-off-by: Alex Bligh Signed-off-by: Stefan Hajnoczi --- include/block/aio.h | 43 +++ 1 file changed, 43 insertions(+) diff --git a/include/block/aio.h b/include/block/aio.h

[Qemu-devel] [PULL 17/42] aio / timers: Untangle include files

2013-08-22 Thread Stefan Hajnoczi
From: Alex Bligh include/qemu/timer.h has no need to include main-loop.h and doing so causes an issue for the next patch. Unfortunately various files assume including timers.h will pull in main-loop.h. Untangle this mess. Signed-off-by: Alex Bligh Signed-off-by: Stefan Hajnoczi --- dma-helper

[Qemu-devel] [PULL 14/42] aio / timers: Add prctl(PR_SET_TIMERSLACK, 1, ...) to reduce timer slack

2013-08-22 Thread Stefan Hajnoczi
From: Alex Bligh Where supported, called prctl(PR_SET_TIMERSLACK, 1, ...) to set one nanosecond timer slack to increase precision of timer calls. Signed-off-by: Alex Bligh Signed-off-by: Stefan Hajnoczi --- configure| 18 ++ qemu-timer.c | 7 +++ 2 files changed, 25 i

[Qemu-devel] [PULL 18/42] aio / timers: Add QEMUTimerListGroup and helper functions

2013-08-22 Thread Stefan Hajnoczi
From: Alex Bligh Add QEMUTimerListGroup and helper functions, to represent a QEMUTimerList associated with each clock. Add a default QEMUTimerListGroup representing the default timer lists which are not associated with any other object (e.g. an AioContext as added by future patches). Signed-off-

[Qemu-devel] [PULL 10/42] aio / timers: Rename qemu_new_clock and expose clock types

2013-08-22 Thread Stefan Hajnoczi
From: Alex Bligh Rename qemu_new_clock to qemu_clock_new. Expose clock types. Signed-off-by: Alex Bligh Signed-off-by: Stefan Hajnoczi --- include/qemu/timer.h | 4 qemu-timer.c | 12 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/include/qemu/timer

[Qemu-devel] [PULL 21/42] aio / timers: aio_ctx_prepare sets timeout from AioContext timers

2013-08-22 Thread Stefan Hajnoczi
From: Alex Bligh Calculate the timeout in aio_ctx_prepare taking into account the timers attached to the AioContext. Alter aio_ctx_check similarly. Signed-off-by: Alex Bligh Signed-off-by: Stefan Hajnoczi --- async.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff -

[Qemu-devel] [PULL 04/42] block: better error message for read only format name

2013-08-22 Thread Stefan Hajnoczi
From: Fam Zheng When user tries to use read-only whitelist format in the command line option, failure message was "'foo' invalid format". It might be invalid only for writable, but valid for read-only, so it is confusing. Give the user easier to understand information. Signed-off-by: Fam Zheng

[Qemu-devel] [PULL 16/42] aio / timers: Split QEMUClock into QEMUClock and QEMUTimerList

2013-08-22 Thread Stefan Hajnoczi
From: Alex Bligh Split QEMUClock into QEMUClock and QEMUTimerList so that we can have more than one QEMUTimerList associated with the same clock. Introduce a main_loop_timerlist concept and make existing qemu_clock_* calls that actually should operate on a QEMUTimerList call the relevant QEMUTim

[Qemu-devel] [PULL 13/42] aio / timers: add ppoll support with qemu_poll_ns

2013-08-22 Thread Stefan Hajnoczi
From: Alex Bligh Add qemu_poll_ns which works like g_poll but takes a nanosecond timeout. Signed-off-by: Alex Bligh Signed-off-by: Stefan Hajnoczi --- configure| 19 +++ include/qemu/timer.h | 12 qemu-timer.c | 24 3 f

[Qemu-devel] [PULL 06/42] vmdk: fix L1 and L2 table size in vmdk3 open

2013-08-22 Thread Stefan Hajnoczi
From: Fam Zheng VMDK3 header has the field l1dir_size, but vmdk_open_vmdk3 hardcoded the value. This patch honors the header field. And the L2 table size is 4096 according to VMDK spec[1], instead of 1 << 9 (512). [1]: http://www.vmware.com/support/developer/vddk/vmdk_50_technote.pdf?src=vmdk

[Qemu-devel] [PULL 11/42] aio / timers: add qemu-timer.c utility functions

2013-08-22 Thread Stefan Hajnoczi
From: Alex Bligh Add utility functions to qemu-timer.c for nanosecond timing. Add qemu_clock_deadline_ns to calculate deadlines to nanosecond accuracy. Add utility function qemu_soonest_timeout to calculate soonest deadline. Add qemu_timeout_ns_to_ms to convert a timeout in nanoseconds back to

[Qemu-devel] [PULL 03/42] block: Produce zeros when protocols reading beyond end of file

2013-08-22 Thread Stefan Hajnoczi
From: MORITA Kazutaka While Asias is debugging an issue creating qcow2 images on top of non-file protocols. It boils down to this example using NBD: $ qemu-io -c 'open -g nbd+unix:///?socket=/tmp/nbd.sock' -c 'read -v 0 512' Notice the open -g option to set bs->growable. This means you can re

[Qemu-devel] [PULL 08/42] vmdk: support vmfs files

2013-08-22 Thread Stefan Hajnoczi
From: Paolo Bonzini VMware ESX hosts also use different create and extent types for flat files, respectively "vmfs" and "VMFS". This is not documented, but it can be found at http://kb.vmware.com/kb/10002511 (Recreating a missing virtual machine disk (VMDK) descriptor file). Signed-off-by: Paol

[Qemu-devel] [PULL 02/42] block: Introduce bs->zero_beyond_eof

2013-08-22 Thread Stefan Hajnoczi
From: Asias He In 4146b46c42e0989cb5842e04d88ab6ccb1713a48 (block: Produce zeros when protocols reading beyond end of file), we break qemu-iotests ./check -qcow2 022. This happens because qcow2 temporarily sets ->growable = 1 for vmstate accesses (which are stored beyond the end of regular image

[Qemu-devel] [PULL 09/42] aio / timers: Rename qemu_timer_* functions

2013-08-22 Thread Stefan Hajnoczi
From: Alex Bligh Rename four functions in preparation for new API. Rename qemu_timer_expired to timer_expired Rename qemu_timer_expire_time_ns to timer_expire_time_ns Rename qemu_timer_pending to timer_pending Rename qemu_timer_expired_ns to timer_expired_ns Signed-off-by: Alex Bligh Signed-of

Re: [Qemu-devel] pvpanic plans?

2013-08-22 Thread Anthony Liguori
Paolo Bonzini writes: > Il 22/08/2013 19:53, Laszlo Ersek ha scritto: >>> > We should just introduce a simple watchdog device based on virtio and >>> > call it a day. Then it's cross platform, solves the guest enumeration >>> > problem, and libvirt can detect the presence of the new device. >> I

Re: [Qemu-devel] [PATCH 0/2] win32: build fixes due to io_flush removal

2013-08-22 Thread Stefan Hajnoczi
On Thu, Aug 22, 2013 at 03:28:34PM +0200, Stefan Hajnoczi wrote: > Stefan Weil noticed that the win32 build is broken with my io_flush changes > applied. The issues are simple build failures that should have been avoided > by > test building Windows, which I didn't. > > To make amends I've set u

Re: [Qemu-devel] [PATCH] aio / timers: remove dummy_io_handler_flush from tests/test-aio.c

2013-08-22 Thread Stefan Hajnoczi
On Thu, Aug 22, 2013 at 07:59:16PM +0100, Alex Bligh wrote: > Remove dummy_io_handler_flush from tests/test-aio.c as it does > nothing now. > > Signed-off-by: Alex Bligh > --- > tests/test-aio.c |9 ++--- > 1 file changed, 2 insertions(+), 7 deletions(-) Thanks, applied to my block tree

Re: [Qemu-devel] [libvirt] pvpanic plans?

2013-08-22 Thread Eric Blake
On 08/22/2013 01:41 PM, Laszlo Ersek wrote: > On 08/22/13 21:19, Paolo Bonzini wrote: >> Il 22/08/2013 19:15, Laszlo Ersek ha scritto: 2) On all versions, will only work if the element is there. >>> >>> I like this, because, if on_crash doesn't work without panic_notifier >>> *at all*, then w

  1   2   3   >