[Qemu-devel] [PATCH] qemu-img rebase: allow backing file to be specified as '-'

2012-10-15 Thread Alex Bligh
/4d5b3b431d8dd276f4c564d8a82c6d25cb111381 Signed-off-by: Alex Bligh --- qemu-img.c| 26 -- qemu-img.texi |4 +++- 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index f17f187..770e221 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -1558,13

Re: [Qemu-devel] [PATCH] qemu-img rebase: allow backing file to be specified as '-'

2012-10-15 Thread Alex Bligh
commits https://github.com/abligh/qemu/commit/4cce9c961fa52a71bd6520a9c499f4dc4b174b97 and https://github.com/abligh/qemu/commit/4d5b3b431d8dd276f4c564d8a82c6d25cb111381 -- Alex Bligh diff --git a/qemu-img.c b/qemu-img.c index f17f187..7a4e73f 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -1558,13 +1

[Qemu-devel] [PATCH] qemu-img rebase: allow empty file name as new backing file to mean rebase with no backing file [attempt 2]

2012-10-15 Thread Alex Bligh
s not used. Signed-off-by: Alex Bligh --- qemu-img.c| 26 -- qemu-img.texi |4 +++- 2 files changed, 19 insertions(+), 11 deletions(-) Also obtainable from: https://github.com/abligh/qemu.git Commit at: https://github.com/abligh/q

Re: [Qemu-devel] [PATCH] qemu-img rebase: allow backing file to be specified as '-'

2012-10-15 Thread Alex Bligh
o, most of qemu uses spaces on both sides of '='. Fixed. But the overall idea looks nice. Thanks -- Alex Bligh

[Qemu-devel] [PATCHv3] qemu-img rebase: use empty string to rebase without backing file

2012-10-15 Thread Alex Bligh
s not used. Signed-off-by: Alex Bligh --- qemu-img.c| 26 -- qemu-img.texi |4 +++- 2 files changed, 19 insertions(+), 11 deletions(-) Also obtainable from: https://github.com/abligh/qemu.git Commit at: https://github.com/abligh/q

Re: [Qemu-devel] [PATCH] qemu-img rebase: allow empty file name as new backing file to mean rebase with no backing file [attempt 2]

2012-10-15 Thread Alex Bligh
no backing file (i.e. independent of any backing file). According to Eric Blake, qemu-imag rebase s/qemu-imag/qemu-img/ and that fixed -- Alex Bligh

[Qemu-devel] [PATCHv4] qemu-img rebase: use empty string to rebase without backing file

2012-10-16 Thread Alex Bligh
s not used. Signed-off-by: Alex Bligh --- qemu-img.c| 29 +++-- qemu-img.texi |4 +++- 2 files changed, 22 insertions(+), 11 deletions(-) Also obtainable from: https://github.com/abligh/qemu.git Commit at: https://github.com/abligh/q

Re: [Qemu-devel] [PATCHv3] qemu-img rebase: use empty string to rebase without backing file

2012-10-16 Thread Alex Bligh
Kevin, --On 16 October 2012 13:22:47 +0200 Kevin Wolf wrote: Apart from the coding style problems, the patch looks good to me. Coding problems fixed & v4 sent under separate cover. -- Alex Bligh

Re: [Qemu-devel] [PATCHv4] qemu-img rebase: use empty string to rebase without backing file

2012-10-18 Thread Alex Bligh
now have different semantics with and without -u. Note if no -b parameter is supplied, there is also a possible null pointer exception at line 1693 (null passed to error_report). -- Alex Bligh

[Qemu-devel] VHDX support

2012-08-30 Thread Alex Bligh
Is anyone currently working on VHDX (as opposed to VHD) support, as used by the most recent version of Hyper-V? If not, would you be interested in patches? File format at: http://www.microsoft.com/en-us/download/details.aspx?id=29681 (Word format, sadly) -- Alex Bligh

[Qemu-devel] [PATCHv3] QEMU(upstream): Disable xen's use of O_DIRECT by default as it results in crashes.

2013-03-18 Thread Alex Bligh
. Acked-by: Stefano Stabellini Signed-off-by: Alex Bligh --- hw/xen_disk.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/xen_disk.c b/hw/xen_disk.c index a402ac8..14f8723 100644 --- a/hw/xen_disk.c +++ b/hw/xen_disk.c @@ -603,7 +603,7 @@ static int blk_init(stru

Re: [Qemu-devel] [PATCHv3] QEMU(upstream): Disable xen's use of O_DIRECT by default as it results in crashes.

2013-03-18 Thread Alex Bligh
bably has been an issue 'forever', I think it would be fair to say there has not been an enormous amount of interest in fixing the underlying problem. -- Alex Bligh

Re: [Qemu-devel] [PATCHv3] QEMU(upstream): Disable xen's use of O_DIRECT by default as it results in crashes.

2013-03-18 Thread Alex Bligh
based disk backend. So we need a workaround in the meantime which doesn't require a kernel fix. -- Alex Bligh

Re: [Qemu-devel] [PATCHv3] QEMU(upstream): Disable xen's use of O_DIRECT by default as it results in crashes.

2013-03-18 Thread Alex Bligh
ive discussion on xen-devel ... I've no idea what else it affects. I'd suggest it also affects kvm, save that the kvm 'bad' will be writing the wrong data, not hosing the whole machine. -- Alex Bligh

Re: [Qemu-devel] [PATCHv3] QEMU(upstream): Disable xen's use of O_DIRECT by default as it results in crashes.

2013-03-18 Thread Alex Bligh
es the paths that I/O goes through. Apparently the discussion was not enough. What would you suggest? -- Alex Bligh

Re: [Qemu-devel] [PATCHv3] QEMU(upstream): Disable xen's use of O_DIRECT by default as it results in crashes.

2013-03-18 Thread Alex Bligh
pages prior to the write being marked as complete. I can't claim to be familiar with blkback, but I presume this would require a similar fix elsewhere. -- Alex Bligh

Re: [Qemu-devel] [PATCHv3] QEMU(upstream): Disable xen's use of O_DIRECT by default as it results in crashes.

2013-03-18 Thread Alex Bligh
, and the files cannot be opened, until after the migration is nearly complete, and certainly until after the file is closed on the sending side. That is my understanding. Thank you for putting it better than I did :-) -- Alex Bligh

Re: [Qemu-devel] [PATCHv11 00/31] aio / timers: Add AioContext timers and use ppoll

2013-08-16 Thread Alex Bligh
ed (I've snipped all of stdout/stderr save this error), and you will see the main-loop warning appears even before the first of my patches is applied. -- Alex Bligh Thu Aug 15 20:21:08 BST 2013: >>>> CHECKOUT 68a5d29 Thu Aug 15 20:21:08 BST 2013: >>>> CHECKED OUT 68a5d2

[Qemu-devel] [PATCHv12 06/31] aio / timers: Add prctl(PR_SET_TIMERSLACK, 1, ...) to reduce timer slack

2013-08-16 Thread 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 --- configure| 18 ++ qemu-timer.c |7 +++ 2 files changed, 25 insertions(+) diff --git a/configure b

[Qemu-devel] [PATCHv12 00/31] aio / timers: Add AioContext timers and use ppoll

2013-08-16 Thread Alex Bligh
rn progress * aio_notify / qemu_notify when timers are modified * change comment in deprecation of clock options Alex Bligh (31): aio / timers: Rename qemu_timer_* functions aio / timers: Rename qemu_new_clock and expose clock types aio / timers: add qemu-timer.c utility functions aio / timers: Cons

[Qemu-devel] [PATCHv12 03/31] aio / timers: add qemu-timer.c utility functions

2013-08-16 Thread Alex Bligh
when ppoll is not used. Signed-off-by: Alex Bligh --- include/qemu/timer.h | 42 ++ qemu-timer.c | 50 ++ 2 files changed, 92 insertions(+) diff --git a/include/qemu/timer.h b/include/qemu/timer.h

[Qemu-devel] [PATCHv12 12/31] aio / timers: Add a notify callback to QEMUTimerList

2013-08-16 Thread Alex Bligh
Add a notify pointer to QEMUTimerList so it knows what to notify on a timer change. Signed-off-by: Alex Bligh --- async.c |7 ++- include/qemu/timer.h | 27 +++ qemu-timer.c | 31 --- 3 files changed, 53

[Qemu-devel] [PATCHv12 07/31] aio / timers: Make qemu_run_timers and qemu_run_all_timers return progress

2013-08-16 Thread 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 --- include/qemu/timer.h | 21 +++-- qemu-timer.c | 18 -- 2 files changed, 31 insertions(+), 8

[Qemu-devel] [PATCHv12 01/31] aio / timers: Rename qemu_timer_* functions

2013-08-16 Thread 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 --- backends/baum.c

[Qemu-devel] [PATCHv12 25/31] aio / timers: Remove main_loop_timerlist

2013-08-16 Thread 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 --- include/qemu/timer.h |6 + qemu-timer.c

[Qemu-devel] [PATCHv12 02/31] aio / timers: Rename qemu_new_clock and expose clock types

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

[Qemu-devel] [PATCHv12 14/31] aio / timers: Add aio_timer_init & aio_timer_new wrappers

2013-08-16 Thread Alex Bligh
Add aio_timer_init and aio_timer_new wrapper functions. Signed-off-by: Alex Bligh --- include/block/aio.h | 43 +++ 1 file changed, 43 insertions(+) diff --git a/include/block/aio.h b/include/block/aio.h index 06f3aad..2efdf41 100644 --- a/include

[Qemu-devel] [PATCHv12 18/31] aio / timers: Introduce new API timer_new and friends

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

[Qemu-devel] [PATCHv12 10/31] aio / timers: Add QEMUTimerListGroup and helper functions

2013-08-16 Thread 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-by: Alex Bligh

[Qemu-devel] [PATCHv12 16/31] aio / timers: Convert mainloop to use timeout

2013-08-16 Thread Alex Bligh
Convert mainloop to use timeout from default timerlist group (i.e. the current 3 static timers) Signed-off-by: Alex Bligh --- main-loop.c | 45 ++--- 1 file changed, 34 insertions(+), 11 deletions(-) diff --git a/main-loop.c b/main-loop.c index 2d9774e

[Qemu-devel] [PATCHv12 17/31] aio / timers: On timer modification, qemu_notify or aio_notify

2013-08-16 Thread Alex Bligh
about multiple iterations. Adapt the way this works for a signed timeout and make the warning a bit safer. Signed-off-by: Alex Bligh --- include/qemu/timer.h |9 + main-loop.c |6 +++--- qemu-timer.c | 13 ++--- 3 files changed, 22 insertions(+), 6

[Qemu-devel] [PATCHv12 13/31] aio / timers: aio_ctx_prepare sets timeout from AioContext timers

2013-08-16 Thread 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 --- async.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/async.c b/async.c index cff0ab9..e458026

[Qemu-devel] [PATCHv12 11/31] aio / timers: Add QEMUTimerListGroup to AioContext

2013-08-16 Thread 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 --- async.c |2 ++ include/block/aio.h |4 tests/test-aio.c |3 +++ tests

[Qemu-devel] [PATCHv12 15/31] aio / timers: Convert aio_poll to use AioContext timers' deadline

2013-08-16 Thread Alex Bligh
aio.c where an assert was backwards. Signed-off-by: Alex Bligh --- aio-posix.c | 18 -- aio-win32.c | 20 ++-- 2 files changed, 30 insertions(+), 8 deletions(-) diff --git a/aio-posix.c b/aio-posix.c index 2440eb9..bd06f33 100644 --- a/aio-posix.c +++ b/aio-po

[Qemu-devel] [PATCHv12 20/31] aio / timers: Add documentation and new format calls

2013-08-16 Thread 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 --- include/qemu/timer.h | 206 -- 1 file changed, 184 insertions(+), 22 deletions

[Qemu-devel] [PATCHv12 22/31] aio / timers: Remove legacy qemu_clock_deadline & qemu_timerlist_deadline

2013-08-16 Thread Alex Bligh
Remove qemu_clock_deadline and qemu_timerlist_deadline now we are using the ns functions throughout. Signed-off-by: Alex Bligh --- include/qemu/timer.h | 16 qemu-timer.c | 20 2 files changed, 36 deletions(-) diff --git a/include/qemu/timer.h

[Qemu-devel] [PATCHv12 23/31] aio / timers: Add qemu_clock_get_ms and qemu_clock_get_ms

2013-08-16 Thread Alex Bligh
Add utility functions qemu_clock_get_ms and qemu_clock_get_us Signed-off-by: Alex Bligh --- include/qemu/timer.h | 28 1 file changed, 28 insertions(+) diff --git a/include/qemu/timer.h b/include/qemu/timer.h index 3e9506c..63b964f 100644 --- a/include/qemu

[Qemu-devel] [PATCHv12 08/31] aio / timers: Split QEMUClock into QEMUClock and QEMUTimerList

2013-08-16 Thread Alex Bligh
is used in the next patch. Signed-off-by: Alex Bligh --- include/qemu/timer.h | 348 ++ qemu-timer.c | 207 ++ 2 files changed, 476 insertions(+), 79 deletions(-) diff --git a/include/qemu/timer.h b/include/qe

[Qemu-devel] [PATCHv12 29/31] aio / timers: Add scripts/switch-timer-api

2013-08-16 Thread Alex Bligh
Add scripts/switch-timer-api to programatically rewrite source files to use the new timer system. Signed-off-by: Alex Bligh --- scripts/switch-timer-api | 178 ++ 1 file changed, 178 insertions(+) diff --git a/scripts/switch-timer-api b/scripts

[Qemu-devel] [PATCHv12 19/31] aio / timers: Use all timerlists in icount warp calculations

2013-08-16 Thread Alex Bligh
always set an icount clock expiry about 2 seconds ahead. NB: thread safety - when different timerlists sit on different threads, this will need some locking. Signed-off-by: Alex Bligh --- cpus.c | 46 +- include/qemu/timer.h | 13

[Qemu-devel] [PATCHv12 27/31] aio / timers: convert block_job_sleep_ns and co_sleep_ns to new API

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

[Qemu-devel] [PATCHv12 31/31] aio / timers: Remove legacy interface

2013-08-16 Thread Alex Bligh
Remove the legacy interface from include/qemu/timers.h. Ensure struct QEMUClock is not exposed at all. Signed-off-by: Alex Bligh --- include/qemu/timer.h | 214 +- qemu-timer.c | 35 + 2 files changed, 5 insertions(+), 244

[Qemu-devel] [PATCHv12 24/31] aio / timers: Rearrange timer.h & make legacy functions call non-legacy

2013-08-16 Thread 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 --- cpus.c | 112 - hw/acpi/piix4.c |2 +- hw/input/tsc2005.c |4 +- hw

[Qemu-devel] [PATCHv12 26/31] aio / timers: Convert rtc_clock to be a QEMUClockType

2013-08-16 Thread Alex Bligh
Convert rtc_clock to be a QEMUClockType Move rtc_clock users to use the new API Signed-off-by: Alex Bligh --- hw/arm/omap1.c|4 ++-- hw/arm/pxa2xx.c | 35 +++ hw/arm/strongarm.c| 10 +- hw/timer/m48t59.c

[Qemu-devel] [PATCHv12 28/31] aio / timers: Add test harness for AioContext timers

2013-08-16 Thread 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 --- tests/test-aio.c | 134 ++ 1 file changed, 134 insertions(+) diff --git a/tests/test-aio.c b

[Qemu-devel] [PATCHv12 04/31] aio / timers: Consistent treatment of disabled clocks for deadlines

2013-08-16 Thread Alex Bligh
Make treatment of disabled clocks consistent in deadline calculation Signed-off-by: Alex Bligh --- 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/qemu-timer.c +++ b/qemu-timer.c @@ -264,7 +264,7

[Qemu-devel] [PATCHv12 05/31] aio / timers: add ppoll support with qemu_poll_ns

2013-08-16 Thread Alex Bligh
Add qemu_poll_ns which works like g_poll but takes a nanosecond timeout. Signed-off-by: Alex Bligh --- configure| 19 +++ include/qemu/timer.h | 12 qemu-timer.c | 24 3 files changed, 55 insertions(+) diff --git a

[Qemu-devel] [PATCHv12 09/31] aio / timers: Untangle include files

2013-08-16 Thread 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 --- dma-helpers.c |1 + hw/dma/xilinx_axidma.c

[Qemu-devel] [PATCHv12 21/31] aio / timers: Remove alarm timers

2013-08-16 Thread Alex Bligh
Remove alarm timers from qemu-timers.c now we use g_poll / ppoll instead. Signed-off-by: Alex Bligh --- include/qemu/timer.h |3 - main-loop.c |4 - qemu-timer.c | 500 +- vl.c |4 +- 4 files changed

[Qemu-devel] vmdk stream-optimised format

2013-08-19 Thread Alex Bligh
://github.com/imcleod/VMDK-stream-converter which is some Python from Ian McLeod Life would be easier if qemu-img supported this directly. It does not look fantastically difficult. -- Alex Bligh

Re: [Qemu-devel] vmdk stream-optimised format

2013-08-19 Thread Alex Bligh
. Extensive testing with qemu in Q1 this year indicates that it is not possible to use qemu-img convert to produce anything that will upload. I went as far as hexdump at the time. I believe I tried compat6 and the various subformat options. I believe we /read/ this format fine. -- Alex Bligh

Re: [Qemu-devel] Using aio_poll for timer carrier threads

2013-08-19 Thread Alex Bligh
all to read the clock value first, and would speed things up if write locking was slow. -- Alex Bligh

Re: [Qemu-devel] [PATCHv11 13/31] aio / timers: aio_ctx_prepare sets timeout from AioContext timers

2013-08-19 Thread Alex Bligh
xed by my series. If you are asking WHERE it gets set to -1, I don't claim to be a glib expert but I believe it's the line gint source_timeout = -1 around line 2816 in glib/gmain.c -- Alex Bligh

Re: [Qemu-devel] vmdk stream-optimised format

2013-08-19 Thread Alex Bligh
qemu-img convert works, one can't guarantee the writes are sequential. -- Alex Bligh

Re: [Qemu-devel] [PATCHv11 13/31] aio / timers: aio_ctx_prepare sets timeout from AioContext timers

2013-08-20 Thread Alex Bligh
prepare. Therefore the implemented way is safer (only reducing the timeout). -- Alex Bligh

Re: [Qemu-devel] [PATCHv11 13/31] aio / timers: aio_ctx_prepare sets timeout from AioContext timers

2013-08-20 Thread Alex Bligh
On 20 Aug 2013, at 12:19, Wenchao Xia wrote: > So it is an undefined value, should avoid use it? It's not an undefined value. It's the value that the poll should wait for subject to modification by the prepare call. -- Alex Bligh

Re: [Qemu-devel] vmdk stream-optimised format

2013-08-20 Thread Alex Bligh
Possibly inadequate haruspication on my part. I suspect it's only a minor modification to support it. -- Alex Bligh

Re: [Qemu-devel] vmdk stream-optimised format

2013-08-20 Thread Alex Bligh
On 20 Aug 2013, at 14:37, Paolo Bonzini wrote: > Yes, because vmdk does not implement bdrv_write_compressed. Sorry for > leaving out the small "detail". :( Would that be easy for me to fix? -- Alex Bligh

Re: [Qemu-devel] [RFC] Convert AioContext to Gsource sub classes

2013-08-20 Thread Alex Bligh
ntext - a sort of AioContext superclass which would handle the loop stuff but need not be modelled on block I/O. This could remain modelled on the glib interface (as AioContext is) if we want. -- Alex Bligh

Re: [Qemu-devel] [PATCH v3 3/3] slirp: set mainloop timeout with more precise value

2013-08-21 Thread Alex Bligh
ight as well change that 1000 as well, and hopefully comment why that particular magic value is there. +Slirp *slirp; +uint32_t t; + +*timeout = MIN(1000, *timeout); +if (*timeout <= TIMEOUT_FAST) { +return; +} +t = *timeout; -- Alex Bligh

Re: [Qemu-devel] [RFC] Convert AioContext to Gsource sub classes

2013-08-21 Thread Alex Bligh
ty to libqblock. ... and there is qemu_timeout_ns_to_ms for this purpose which does the rounding right. -- Alex Bligh

Re: [Qemu-devel] [PATCHv11 13/31] aio / timers: aio_ctx_prepare sets timeout from AioContext timers

2013-08-21 Thread Alex Bligh
- it's not our job to calculate the minimum, glib will do that after calling all .prepare() functions. I would drop this hunk. OK I will put that into v13. Anything else for v13 or are you ready to merge? I will rebase (again) on block-next obviously. -- Alex Bligh

[Qemu-devel] [PATCHv13 01/31] aio / timers: Rename qemu_timer_* functions

2013-08-21 Thread 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 --- backends/baum.c

[Qemu-devel] [PATCHv13 02/31] aio / timers: Rename qemu_new_clock and expose clock types

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

[Qemu-devel] [PATCHv13 07/31] aio / timers: Make qemu_run_timers and qemu_run_all_timers return progress

2013-08-21 Thread 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 --- include/qemu/timer.h | 21 +++-- qemu-timer.c | 18 -- 2 files changed, 31 insertions(+), 8

[Qemu-devel] [PATCHv13 04/31] aio / timers: Consistent treatment of disabled clocks for deadlines

2013-08-21 Thread Alex Bligh
Make treatment of disabled clocks consistent in deadline calculation Signed-off-by: Alex Bligh --- 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/qemu-timer.c +++ b/qemu-timer.c @@ -264,7 +264,7

[Qemu-devel] [PATCHv13 10/31] aio / timers: Add QEMUTimerListGroup and helper functions

2013-08-21 Thread 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-by: Alex Bligh

[Qemu-devel] [PATCHv13 05/31] aio / timers: add ppoll support with qemu_poll_ns

2013-08-21 Thread Alex Bligh
Add qemu_poll_ns which works like g_poll but takes a nanosecond timeout. Signed-off-by: Alex Bligh --- configure| 19 +++ include/qemu/timer.h | 12 qemu-timer.c | 24 3 files changed, 55 insertions(+) diff --git a

[Qemu-devel] [PATCHv13 06/31] aio / timers: Add prctl(PR_SET_TIMERSLACK, 1, ...) to reduce timer slack

2013-08-21 Thread 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 --- configure| 18 ++ qemu-timer.c |7 +++ 2 files changed, 25 insertions(+) diff --git a/configure b

[Qemu-devel] [PATCHv13 00/31] aio / timers: Add AioContext timers and use ppoll

2013-08-21 Thread Alex Bligh
f above & drop glib types * Do not use a global list of qemu clocks * Add AioContext * to QEMUClock * Split up conversion to use ppoll and timers * Indentation fix * Fix aio_win32.c aio_poll to return progress * aio_notify / qemu_notify when timers are modified * change comment in deprecation

[Qemu-devel] [PATCHv13 11/31] aio / timers: Add QEMUTimerListGroup to AioContext

2013-08-21 Thread 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 --- async.c |2 ++ include/block/aio.h |4 tests/test-aio.c |3 +++ tests

[Qemu-devel] [PATCHv13 14/31] aio / timers: Add aio_timer_init & aio_timer_new wrappers

2013-08-21 Thread Alex Bligh
Add aio_timer_init and aio_timer_new wrapper functions. Signed-off-by: Alex Bligh --- include/block/aio.h | 43 +++ 1 file changed, 43 insertions(+) diff --git a/include/block/aio.h b/include/block/aio.h index 06f3aad..2efdf41 100644 --- a/include

[Qemu-devel] [PATCHv13 23/31] aio / timers: Add qemu_clock_get_ms and qemu_clock_get_ms

2013-08-21 Thread Alex Bligh
Add utility functions qemu_clock_get_ms and qemu_clock_get_us Signed-off-by: Alex Bligh --- include/qemu/timer.h | 28 1 file changed, 28 insertions(+) diff --git a/include/qemu/timer.h b/include/qemu/timer.h index 3e9506c..63b964f 100644 --- a/include/qemu

[Qemu-devel] [PATCHv13 28/31] aio / timers: Add test harness for AioContext timers

2013-08-21 Thread 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 --- tests/test-aio.c | 134 ++ 1 file changed, 134 insertions(+) diff --git a/tests/test-aio.c b

[Qemu-devel] [PATCHv13 03/31] aio / timers: add qemu-timer.c utility functions

2013-08-21 Thread Alex Bligh
when ppoll is not used. Signed-off-by: Alex Bligh --- include/qemu/timer.h | 42 ++ qemu-timer.c | 50 ++ 2 files changed, 92 insertions(+) diff --git a/include/qemu/timer.h b/include/qemu/timer.h

[Qemu-devel] [PATCHv13 19/31] aio / timers: Use all timerlists in icount warp calculations

2013-08-21 Thread Alex Bligh
always set an icount clock expiry about 2 seconds ahead. NB: thread safety - when different timerlists sit on different threads, this will need some locking. Signed-off-by: Alex Bligh --- cpus.c | 46 +- include/qemu/timer.h | 13

[Qemu-devel] [PATCHv13 27/31] aio / timers: convert block_job_sleep_ns and co_sleep_ns to new API

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

[Qemu-devel] [PATCHv13 18/31] aio / timers: Introduce new API timer_new and friends

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

[Qemu-devel] [PATCHv13 08/31] aio / timers: Split QEMUClock into QEMUClock and QEMUTimerList

2013-08-21 Thread Alex Bligh
is used in the next patch. Signed-off-by: Alex Bligh --- include/qemu/timer.h | 348 ++ qemu-timer.c | 207 ++ 2 files changed, 476 insertions(+), 79 deletions(-) diff --git a/include/qemu/timer.h b/include/qe

[Qemu-devel] [PATCHv13 29/31] aio / timers: Add scripts/switch-timer-api

2013-08-21 Thread Alex Bligh
Add scripts/switch-timer-api to programatically rewrite source files to use the new timer system. Signed-off-by: Alex Bligh --- scripts/switch-timer-api | 178 ++ 1 file changed, 178 insertions(+) diff --git a/scripts/switch-timer-api b/scripts

[Qemu-devel] [PATCHv13 31/31] aio / timers: Remove legacy interface

2013-08-21 Thread Alex Bligh
Remove the legacy interface from include/qemu/timers.h. Ensure struct QEMUClock is not exposed at all. Signed-off-by: Alex Bligh --- include/qemu/timer.h | 214 +- qemu-timer.c | 35 + 2 files changed, 5 insertions(+), 244

[Qemu-devel] [PATCHv13 26/31] aio / timers: Convert rtc_clock to be a QEMUClockType

2013-08-21 Thread Alex Bligh
Convert rtc_clock to be a QEMUClockType Move rtc_clock users to use the new API Signed-off-by: Alex Bligh --- hw/arm/omap1.c|4 ++-- hw/arm/pxa2xx.c | 35 +++ hw/arm/strongarm.c| 10 +- hw/timer/m48t59.c

[Qemu-devel] [PATCHv13 24/31] aio / timers: Rearrange timer.h & make legacy functions call non-legacy

2013-08-21 Thread 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 --- cpus.c | 112 - hw/acpi/piix4.c |2 +- hw/input/tsc2005.c |4 +- hw

[Qemu-devel] [PATCHv13 15/31] aio / timers: Convert aio_poll to use AioContext timers' deadline

2013-08-21 Thread Alex Bligh
aio.c where an assert was backwards. Signed-off-by: Alex Bligh --- aio-posix.c | 18 -- aio-win32.c | 20 ++-- 2 files changed, 30 insertions(+), 8 deletions(-) diff --git a/aio-posix.c b/aio-posix.c index 2440eb9..bd06f33 100644 --- a/aio-posix.c +++ b/aio-po

[Qemu-devel] [PATCHv13 21/31] aio / timers: Remove alarm timers

2013-08-21 Thread Alex Bligh
Remove alarm timers from qemu-timers.c now we use g_poll / ppoll instead. Signed-off-by: Alex Bligh --- include/qemu/timer.h |3 - main-loop.c |4 - qemu-timer.c | 500 +- vl.c |4 +- 4 files changed

[Qemu-devel] [PATCHv13 16/31] aio / timers: Convert mainloop to use timeout

2013-08-21 Thread 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 Bligh --- main

[Qemu-devel] [PATCHv13 13/31] aio / timers: aio_ctx_prepare sets timeout from AioContext timers

2013-08-21 Thread 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 --- async.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/async.c b/async.c index cff0ab9..5fb3fa6

[Qemu-devel] [PATCHv13 25/31] aio / timers: Remove main_loop_timerlist

2013-08-21 Thread 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 --- include/qemu/timer.h |6 + qemu-timer.c

[Qemu-devel] [PATCHv13 17/31] aio / timers: On timer modification, qemu_notify or aio_notify

2013-08-21 Thread 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 --- include/qemu

[Qemu-devel] [PATCHv13 12/31] aio / timers: Add a notify callback to QEMUTimerList

2013-08-21 Thread Alex Bligh
Add a notify pointer to QEMUTimerList so it knows what to notify on a timer change. Signed-off-by: Alex Bligh --- async.c |7 ++- include/qemu/timer.h | 27 +++ qemu-timer.c | 31 --- 3 files changed, 53

[Qemu-devel] [PATCHv13 22/31] aio / timers: Remove legacy qemu_clock_deadline & qemu_timerlist_deadline

2013-08-21 Thread Alex Bligh
Remove qemu_clock_deadline and qemu_timerlist_deadline now we are using the ns functions throughout. Signed-off-by: Alex Bligh --- include/qemu/timer.h | 16 qemu-timer.c | 20 2 files changed, 36 deletions(-) diff --git a/include/qemu/timer.h

[Qemu-devel] [PATCHv13 09/31] aio / timers: Untangle include files

2013-08-21 Thread 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 --- dma-helpers.c |1 + hw/dma/xilinx_axidma.c

[Qemu-devel] [PATCHv13 20/31] aio / timers: Add documentation and new format calls

2013-08-21 Thread 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 --- include/qemu/timer.h | 206 -- 1 file changed, 184 insertions(+), 22 deletions

Re: [Qemu-devel] [PATCHv4] add qemu-img convert -C option (skip target volume creation)

2013-08-22 Thread Alex Bligh
out? I am aware there are a number of people who have been using the patch with -C for some time. -- Alex Bligh

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

2013-08-22 Thread Alex Bligh
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(-) diff --git a/tests/test-aio.c b/tests/test-aio.c index 3ad2294..07a1f61 100644 --- a/tests/test-aio.c

Re: [Qemu-devel] [PATCHv4] add qemu-img convert -C option (skip target volume creation)

2013-08-22 Thread Alex Bligh
volume, or error. These all seem reasonably easy (the expand option presumably being a call to bdrv_truncate). Before we get to testing, I'm guessing we should establish whether (a) is correct (I think yes), and what the correct behaviour is for (b). -- Alex Bligh

Re: [Qemu-devel] [PATCH 2/2] osdep: warn if open(O_DIRECT) on fails with EINVAL

2013-08-22 Thread Alex Bligh
is undesirable as the result of opening without O_DIRECT when you really wanted O_DIRECT could be subtle data corruption due to unexpected caching. Is an error not more appropriate here than proceeding regardless? -- Alex Bligh

Re: [Qemu-devel] [PATCHv4] add qemu-img convert -C option (skip target volume creation)

2013-08-22 Thread Alex Bligh
things. So this would be the first flag that is consistent I think! -- Alex Bligh

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

2013-08-23 Thread Alex Bligh
--On 23 August 2013 09:48:42 +0200 Paolo Bonzini wrote: As a matter of fact, 2^28 madvise system calls will take much, much longer than 100ms. Probably a stupid question, but why would you need to do one call per page? It takes a 'size_t length' parameter. -- Alex Bligh

[Qemu-devel] Changes to QEMU's timer system

2013-08-24 Thread Alex Bligh
I did a blog post on the aio-timers changes I made to the timer system, including a diagram of how it works now: http://blog.alex.org.uk/2013/08/24/changes-to-qemus-timer-system/ Comments welcome. -- Alex Bligh

  1   2   3   4   5   6   7   8   9   10   >