Re: [Qemu-devel] [PATCH v4] exec: Fix non-power-of-2 sized accesses

2013-08-16 Thread Paolo Bonzini
Il 16/08/2013 23:58, Alex Williamson ha scritto: > Since commit 23326164 we align access sizes to match the alignment of > the address, but we don't align the access size itself. This means we > let illegal access sizes (ex. 3) slip through if the address is > sufficiently aligned (ex. 4). This r

[Qemu-devel] [PATCH v2 3/3] disas-objdump: Pass --adjust-vma to objdump

2013-08-16 Thread Richard Henderson
This gives the dumped blob its correct address during disassembly, which makes pc-relative insns much easier to interpret. Signed-off-by: Richard Henderson --- scripts/disas-objdump.pl | 18 +++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/scripts/disas-objdump.p

Re: [Qemu-devel] [RFC PATCH 0/3] v2.2 RCU Implementation for QEMU

2013-08-16 Thread Paolo Bonzini
Il 16/08/2013 16:41, Mike Day ha scritto: > This patch set merges Paolo's conversion of address spaces to enable > RCU. There is one more patchset coming for TLB access that I'm > debugging right now. After I submit the last one I'll start working on > enabling RCU more widely - and the series will

[Qemu-devel] [PATCH v2 1/3] disas: Implement fallback to dump object code as hex

2013-08-16 Thread Richard Henderson
The OBJD-[HT] tags will be used by a script to run the hex blob through objdump --disassemble. Signed-off-by: Richard Henderson --- disas.c | 47 +-- 1 file changed, 37 insertions(+), 10 deletions(-) diff --git a/disas.c b/disas.c index 71007fb..0203e

[Qemu-devel] [PATCH v2 2/3] disas: Add disas-objdump.pl

2013-08-16 Thread Richard Henderson
The script massages the output produced for architectures that are not supported internally by qemu though an external objdump program for disassembly. Signed-off-by: Richard Henderson --- scripts/disas-objdump.pl | 87 1 file changed, 87 insertio

[Qemu-devel] [PATCH v2 0/3] Disassembly with external objdump

2013-08-16 Thread Richard Henderson
V2 adds the --adjust-vma idea from Max Filippov. r~ Richard Henderson (3): disas: Implement fallback to dump object code as hex disas: Add disas-objdump.pl disas-objdump: Pass --adjust-vma to objdump disas.c | 47 ++- scripts/disas-objdump.pl | 99 ++

Re: [Qemu-devel] [PATCH v3 04/19] block: update bs->total_sectors on writes

2013-08-16 Thread Paolo Bonzini
Il 02/08/2013 09:05, Peter Lieven ha scritto: > can you give an update what are to current plans/schedule to merge this > series? I have > a few patches in the queue that in their current version depend on this > series being merged. It should go in soon, perhaps a couple of weeks. Paolo

Re: [Qemu-devel] [PATCH 1/2] alpha-linux-user: Fix umount syscall numbers

2013-08-16 Thread Richard Henderson
Ping. r~ On 07/24/2013 12:50 PM, Richard Henderson wrote: > It has been pointed out on LKML that the alpha umount syscall numbers > are named wrong, and a patch to rectify that has been posted for 3.11. > > Glibc works around this by treating NR_umount as NR_umount2 if > NR_oldumount exists. T

Re: [Qemu-devel] [PATCH for-next 00/15] Collection of improvements for tcg/ppc64

2013-08-16 Thread Richard Henderson
Ping. r~ On 08/05/2013 11:28 AM, Richard Henderson wrote: > About half of these patches are focused on reducing the number of > full 64-bit constants that need to be generated for addresses: > > E.g. patch 5, looking through the function descriptor. If the > program is built --disable-pie, the

Re: [Qemu-devel] qemu-1.4.0 support in CentOS 6.3

2013-08-16 Thread Paolo Bonzini
Il 16/08/2013 14:41, ashish yadav ha scritto: > Hi All, > > I am using CentOS 6.3 . > > I want to use qemu-1.4.0 with it ( due to dpdk_ovs requirement) . > If qemu-1.4.0 is supported with Centos 6.3 ( kernel version 2.6.32-279) ? It works, you just have to compile it yourself. Paolo

[Qemu-devel] [PULL 4/4] target-alpha: Implement the typhoon iommu

2013-08-16 Thread Richard Henderson
Signed-off-by: Richard Henderson --- hw/alpha/typhoon.c | 202 + 1 file changed, 174 insertions(+), 28 deletions(-) diff --git a/hw/alpha/typhoon.c b/hw/alpha/typhoon.c index b7fb044..2450045 100644 --- a/hw/alpha/typhoon.c +++ b/hw/alpha/typho

Re: [Qemu-devel] [PATCH v5] spapr-vscsi: add task management

2013-08-16 Thread Paolo Bonzini
Il 16/08/2013 11:45, Alexey Kardashevskiy ha scritto: > > Did this patch go anywhere? I could not find it in > git://github.com/bonzini/qemu.git scsi-next or anywhere else. > > Should I repost it as qemu 1.6 was released and we started new cycle? > > I am asking because I have 2 more patches abo

[Qemu-devel] [PULL 2/4] target-alpha: Use goto_tb in call_pal

2013-08-16 Thread Richard Henderson
With appropriate flushing when the PALBR changes, the target of a CALL_PAL is so predictable we can chain to it. Signed-off-by: Richard Henderson --- target-alpha/helper.h | 1 + target-alpha/sys_helper.c | 5 + target-alpha/translate.c | 20 3 files changed, 26 i

[Qemu-devel] [PULL 3/4] target-alpha: Consider the superpage when threading and ending TBs

2013-08-16 Thread Richard Henderson
This allows significantly more threading, and occasionally larger TBs, when processing code for the kernel and PALcode. Signed-off-by: Richard Henderson --- target-alpha/translate.c | 37 + 1 file changed, 29 insertions(+), 8 deletions(-) diff --git a/target-

[Qemu-devel] [PULL 1/4] target-alpha: Implement call_pal without an exception

2013-08-16 Thread Richard Henderson
The destination of the call_pal, and the cpu state, is very predictable; there's no need for exiting the cpu loop. Signed-off-by: Richard Henderson --- target-alpha/helper.h | 1 + target-alpha/sys_helper.c | 12 target-alpha/translate.c | 25 ++--- 3 files

[Qemu-devel] [PULL 0/4] alpha-softmmu improvements

2013-08-16 Thread Richard Henderson
No changes since the patch set was first posted, but rebased against head. r~ The following changes since commit f202039811d8746b0586d2fd5f61de6c8cf68056: Open up 1.7 development branch (2013-08-15 15:41:13 -0500) are available in the git repository at: git://github.com/rth7680/qemu.git

[Qemu-devel] [PATCH v2 9/9] tcg-arm: Rearrange slow-path qemu_ld/st

2013-08-16 Thread Richard Henderson
Instead of using a branch-call-branch sequence, arrange for a call-branch sequence, using the ARM's conditional call insn. This reduces the size of the slow-path within the TB, and makes the GETPC_EXT implementation identical for TCG and not-TCG. Signed-off-by: Richard Henderson --- include/exec

[Qemu-devel] [PATCH v2 7/9] tcg-i386: Use new return-argument ld/st helpers

2013-08-16 Thread Richard Henderson
Discontinue the jump-around-jump-to-jump scheme, trading it for a single immediate move instruction. The two extra jumps always consume 7 bytes, whereas the immediate move is either 5 or 7 bytes depending on where the code_gen_buffer gets located. Signed-off-by: Richard Henderson --- include/ex

[Qemu-devel] [PATCH v2 4/9] tcg-i386: Tidy qemu_ld/st slow path

2013-08-16 Thread Richard Henderson
Use existing stack space for arguments; don't push/pop. Use less ifdefs and more C ifs. Signed-off-by: Richard Henderson --- tcg/i386/tcg-target.c | 165 ++ 1 file changed, 74 insertions(+), 91 deletions(-) diff --git a/tcg/i386/tcg-target.c b/tcg

[Qemu-devel] [PATCH v2 2/9] tcg-i386: Add and use tcg_out64

2013-08-16 Thread Richard Henderson
No point in splitting the write into 32-bit pieces. Reviewed-by: Aurelien Jarno Signed-off-by: Richard Henderson --- tcg/i386/tcg-target.c | 3 +-- tcg/tcg.c | 7 +++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/tcg/i386/tcg-target.c b/tcg/i386/tcg-target.c ind

[Qemu-devel] [PATCH v2 6/9] tcg: Tidy softmmu_template.h

2013-08-16 Thread Richard Henderson
Avoid a loop in the tlb_fill path; the fill will either succeed or generate an exception. Inline the slow_ld/st function; it was a complete copy of the main helper except for the actual cross-page unaligned code, and the compiler was inlining it anyway. Add unlikely markers optimizing for the mos

[Qemu-devel] [PATCH v2 8/9] tcg-arm: Use ldrd/strd for appropriate qemu_ld/st64

2013-08-16 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/arm/tcg-target.c | 48 +++- 1 file changed, 43 insertions(+), 5 deletions(-) diff --git a/tcg/arm/tcg-target.c b/tcg/arm/tcg-target.c index 6c4854d..6cfceff 100644 --- a/tcg/arm/tcg-target.c +++ b/tcg/arm/tcg-ta

[Qemu-devel] [PATCH v2 0/9] Improve tcg ldst optimization

2013-08-16 Thread Richard Henderson
V2: * Feedback from Aurelien * Added the first patch. * ARM patches fixed. Sorry about not merging back from the tree on my arm machine before posting the patch set last time. r~ Richard Henderson (9): tcg: Tidy generated code for tcg_outN tcg-i386: Add and use tcg_out64 tcg

[Qemu-devel] [PATCH v2 5/9] tcg: Add mmu helpers that take a return address argument

2013-08-16 Thread Richard Henderson
Allow the code that tcg generates to be less obtuse, passing in the return address directly instead of computing it in the helper. Maintain the old entrance point unchanged as an alternate entry point. Delete the helper_st*_cmmu prototypes; the implementations did not exist. Signed-off-by: Richa

[Qemu-devel] [PATCH v2 3/9] tcg-i386: Try pc-relative lea for constant formation

2013-08-16 Thread Richard Henderson
Use a 7 byte lea before the ultimate 10 byte movq. Signed-off-by: Richard Henderson --- tcg/i386/tcg-target.c | 25 - 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/tcg/i386/tcg-target.c b/tcg/i386/tcg-target.c index 841bd75..8226171 100644 --- a/tcg/i386/

[Qemu-devel] [PATCH v2 1/9] tcg: Tidy generated code for tcg_outN

2013-08-16 Thread Richard Henderson
Aliasing was forcing s->code_ptr to be re-read after the store. Keep the pointer in a local variable to help the compiler. Signed-off-by: Richard Henderson --- tcg/tcg.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tcg/tcg.c b/tcg/tcg.c index dac8224..42c95af 10

Re: [Qemu-devel] [PULL 08/18] block/gluster: drop qemu_gluster_aio_flush_cb()

2013-08-16 Thread Bharata B Rao
> From: Stefan Hajnoczi > Since .io_flush() is no longer called we do not need > qemu_gluster_aio_flush_cb() anymore. It turns out that qemu_aio_count > is unused now and can be dropped. > > Signed-off-by: Stefan Hajnoczi Tested-by: Bharata B Rao Tested GlusterFS backend, but it needed the b

Re: [Qemu-devel] [PATCH] w32: Fix broken out-of-tree builds (missing version.o)

2013-08-16 Thread Michael Roth
Quoting Stefan Weil (2013-08-16 14:51:53) > Commit 0b516ef0dfad9a7b34c675c98e8ec92ab4d38466 added version.o to all > executables, but broke out-of-tree builds: for those builds the pattern > rule %.o: %.rc from rules.mak does not match, so version.o was no longer > built. > > Adding explicit build

[Qemu-devel] [PATCH v4] exec: Fix non-power-of-2 sized accesses

2013-08-16 Thread Alex Williamson
Since commit 23326164 we align access sizes to match the alignment of the address, but we don't align the access size itself. This means we let illegal access sizes (ex. 3) slip through if the address is sufficiently aligned (ex. 4). This results in an abort which would be easy for a guest to tri

Re: [Qemu-devel] [PATCH v3] exec: Fix non-power-of-2 sized accesses

2013-08-16 Thread Alex Williamson
On Fri, 2013-08-16 at 23:00 +0200, Laszlo Ersek wrote: > On 08/16/13 18:00, Alex Williamson wrote: > > Since commit 23326164 we align access sizes to match the alignment of > > the address, but we don't align the access size itself. This means we > > let illegal access sizes (ex. 3) slip through i

Re: [Qemu-devel] [PATCH v3] exec: Fix non-power-of-2 sized accesses

2013-08-16 Thread Laszlo Ersek
On 08/16/13 18:00, Alex Williamson wrote: > Since commit 23326164 we align access sizes to match the alignment of > the address, but we don't align the access size itself. This means we > let illegal access sizes (ex. 3) slip through if the address is > sufficiently aligned (ex. 4). This results

[Qemu-devel] [Bug 1213196] [NEW] -serial tcp should hang up when DTR goes low

2013-08-16 Thread Nathaniel Filardo
Public bug reported: In keeping with the spirit of serial modem control signals, de-asserting DTR should cause the TCP connection to break; asserting DTR should cause QEMU to initiate a new connection or for it to accept another (in server mode; this may involve waiting for one to arrive, too). *

Re: [Qemu-devel] [PATCH v2] exec: Fix non-power-of-2 sized accesses

2013-08-16 Thread Eric Blake
On 08/16/2013 01:46 PM, Richard Henderson wrote: > On 08/16/2013 08:37 AM, Alex Williamson wrote: >> On Fri, 2013-08-16 at 08:27 -0700, Richard Henderson wrote: >>> On 08/16/2013 05:50 AM, Alex Williamson wrote: +/* Size must be a power of 2 */ +if (l & (l - 1)) { +wh

[Qemu-devel] [PATCH] w32: Fix broken out-of-tree builds (missing version.o)

2013-08-16 Thread Stefan Weil
Commit 0b516ef0dfad9a7b34c675c98e8ec92ab4d38466 added version.o to all executables, but broke out-of-tree builds: for those builds the pattern rule %.o: %.rc from rules.mak does not match, so version.o was no longer built. Adding explicit build rules fixes this. Reported-by: Michael Roth Signed-

Re: [Qemu-devel] [PATCH v2] exec: Fix non-power-of-2 sized accesses

2013-08-16 Thread Richard Henderson
On 08/16/2013 08:37 AM, Alex Williamson wrote: > On Fri, 2013-08-16 at 08:27 -0700, Richard Henderson wrote: >> On 08/16/2013 05:50 AM, Alex Williamson wrote: >>> +/* Size must be a power of 2 */ >>> +if (l & (l - 1)) { >>> +while (l & (access_size_max - 1)) { >>> +acces

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

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

Re: [Qemu-devel] [PATCH v2 for 1.6] w32: Add missing version.o to all executables (fix regression)

2013-08-16 Thread Michael Roth
Quoting Michael Roth (2013-08-16 13:27:32) > Quoting Stefan Weil (2013-08-16 00:55:07) > > Am 16.08.2013 00:19, schrieb Michael Roth: > > > > Quoting Stefan Weil (2013-08-08 13:18:07) > > > > > QEMU executables for w32, w64 had included meta information built from > > > version.rc. These rules

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

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

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

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

2013-08-16 Thread 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 return INT32_MAX and a

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

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

2013-08-16 Thread 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 QEMUTimerList implementati

[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/timer.

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

[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 15/31] aio / timers: Convert aio_poll to use AioContext timers' deadline

2013-08-16 Thread 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 tests/test-aio.c w

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

[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 17/31] aio / timers: On timer modification, qemu_notify or aio_notify

2013-08-16 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. main-loop.c produces a (possibly spurious) warning a

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

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

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

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

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

2013-08-16 Thread 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 milliseconds for w

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

2013-08-16 Thread Alex Bligh
[ This patch set is available from git at: https://github.com/abligh/qemu/tree/aio-timers12 As autogenerated patch 30 of the series is too large for the mailing list. ] This patch series adds support for timers attached to an AioContext clock which get called within aio_poll. In doing so it re

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

Re: [Qemu-devel] [PATCH v2 for 1.6] w32: Add missing version.o to all executables (fix regression)

2013-08-16 Thread Michael Roth
Quoting Stefan Weil (2013-08-16 00:55:07) > Am 16.08.2013 00:19, schrieb Michael Roth: > > Quoting Stefan Weil (2013-08-08 13:18:07) > > > QEMU executables for w32, w64 had included meta information built from > > version.rc. These rules were changed several times some months ago. > > > > Th

Re: [Qemu-devel] minimal linux distribution for qemu

2013-08-16 Thread Andreas Färber
Am 16.08.2013 18:17, schrieb Herbei Dacian: > my system should run in far less memory. something like 2-4MB. I thought either 16MB or 64MB RAM was a lower limit for uCLinux? If you want to write your own custom firmware then you can go pretty low of course. For low-end ARM embedded development th

[Qemu-devel] [PULL 3/6] qom: Introduce instance_post_init hook

2013-08-16 Thread Andreas Färber
From: Eduardo Habkost This will allow classes to specify a function to be called after all instance_init functions were called. This will be used by DeviceState to call qdev_prop_set_globals() at the right moment. Signed-off-by: Eduardo Habkost Signed-off-by: Andreas Färber --- include/qom/o

[Qemu-devel] [PULL 6/6] cpus: Use cpu_is_stopped() efficiently

2013-08-16 Thread Andreas Färber
From: Tiejun Chen It makes more sense and will make things simpler later. Signed-off-by: Tiejun Chen Signed-off-by: Andreas Färber --- cpus.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/cpus.c b/cpus.c index 0f65e76..70cc617 100644 --- a/cpus.c +++ b/cpu

[Qemu-devel] [PULL 2/6] tests: Unit tests for qdev global properties handling

2013-08-16 Thread Andreas Färber
From: Eduardo Habkost This tests the qdev global-properties handling code. Signed-off-by: Eduardo Habkost Signed-off-by: Andreas Färber --- tests/.gitignore | 1 + tests/Makefile | 7 +++ tests/test-qdev-global-props.c | 107 ++

[Qemu-devel] [PULL 5/6] target-i386: Move hyperv_* static globals to X86CPU

2013-08-16 Thread Andreas Färber
From: Igor Mammedov - since hyperv_* helper functions are used only in target-i386/kvm.c move them there as static helpers Requested-by: Eduardo Habkost Signed-off-by: Igor Mammedov Signed-off-by: Andreas Färber --- target-i386/Makefile.objs | 2 +- target-i386/cpu-qom.h | 4 +++ tar

[Qemu-devel] [PULL 0/6] QOM CPUState patch queue 2013-08-16

2013-08-16 Thread Andreas Färber
Hello Anthony, This is my current QOM CPU patch queue. Please pull. Thanks, Andreas Cc: Anthony Liguori The following changes since commit f202039811d8746b0586d2fd5f61de6c8cf68056: Open up 1.7 development branch (2013-08-15 15:41:13 -0500) are available in the git repository at: git://g

[Qemu-devel] [PULL 4/6] qdev: Set globals in instance_post_init function

2013-08-16 Thread Andreas Färber
From: Eduardo Habkost This way, properties registered in the instance_init function of child classes will be handled properly by qdev_prop_set_globals(), too. Includes a unit test for the new functionality. Signed-off-by: Eduardo Habkost Signed-off-by: Andreas Färber --- hw/core/qdev.c

[Qemu-devel] [PULL 1/6] gdbstub: Fix gdb_register_coprocessor() register counting

2013-08-16 Thread Andreas Färber
Commit a0e372f0c49ac01faeaeb73a6e8f50e8ac615f34 reorganized the register counting for GDB. While it seems correct not to let the total number of registers skyrocket in an SMP scenario through a static variable, the distinction between total register count and 'g' packet register count (last_reg vs.

Re: [Qemu-devel] [PATCH RFT qom-cpu for-next] gdbstub: Fix gdb_register_coprocessor() register counting

2013-08-16 Thread Peter Maydell
On 16 August 2013 11:59, Andreas Färber wrote: > Peter, could you verify the ARM FP registers are now as expected? Yes, we seem to be back to sending them separately rather than in the 'g' packet with the integer registers. -- PMM

Re: [Qemu-devel] [RFC PATCH 0/3] v2.2 RCU Implementation for QEMU

2013-08-16 Thread Mike Day
Andreas Färber writes: >> https://github.com/ncultra/qemu/tree/rcu-for-1.7 >> >> Mike Day (2): >> fixup changes from commit f63ca950 >> fixup changes from commit f62a6b2f from Paulo Bonzini > > These two patches are certainly not acceptable for upstream, lacking any > textual explanation a

Re: [Qemu-devel] minimal linux distribution for qemu

2013-08-16 Thread Rob Landley
On 08/15/2013 09:18:48 AM, Herbei Dacian wrote: but you said that "qemu-system-arm" is not maintained and it doesn't work. Who said that? git log --pretty=format:"%h %ci %s" hw/arm be2f78b 2013-08-05 11:46:58 -0500 pxa2xx: Avoid object_get_link_property() asser cfc6b24 2013-07-29 21:06:2

Re: [Qemu-devel] minimal linux distribution for qemu

2013-08-16 Thread Herbei Dacian
my system should run in far less memory. something like 2-4MB. but first I need to have a system running so that I can monitor with qemu the addresses accessed for read execute and write by the code run by the emulator. if I reach that is a real big deal. dacian ___

Re: [Qemu-devel] minimal linux distribution for qemu

2013-08-16 Thread Herbei Dacian
Thanks Rob I think that should do it for me. From: Rob Landley To: Andreas Färber Cc: Herbei Dacian ; QEmu Devel Sent: Friday, 16 August 2013, 17:59 Subject: Re: [Qemu-devel] minimal linux distribution for qemu On 08/15/2013 06:53:30 AM, Andreas Färbe

Re: [Qemu-devel] minimal linux distribution for qemu

2013-08-16 Thread Rob Landley
On 08/15/2013 09:01:19 AM, Herbei Dacian wrote: yes but which binary do I use to call to run an emulated arm image? is there an actual binary that can emulate an existing arm board, anyboard? qemu? if not which is the emulator that works with arm? If not where is the project that I can tweak

[Qemu-devel] [PULL 18/18] aio: drop io_flush argument

2013-08-16 Thread Stefan Hajnoczi
The .io_flush() handler no longer exists and has no users. Drop the io_flush argument to aio_set_fd_handler() and related functions. The AioFlushEventNotifierHandler and AioFlushHandler typedefs are no longer used and are dropped too. Reviewed-by: Paolo Bonzini Signed-off-by: Stefan Hajnoczi -

[Qemu-devel] [PATCH v3] exec: Fix non-power-of-2 sized accesses

2013-08-16 Thread Alex Williamson
Since commit 23326164 we align access sizes to match the alignment of the address, but we don't align the access size itself. This means we let illegal access sizes (ex. 3) slip through if the address is sufficiently aligned (ex. 4). This results in an abort which would be easy for a guest to tri

Re: [Qemu-devel] minimal linux distribution for qemu

2013-08-16 Thread Rob Landley
On 08/15/2013 06:53:30 AM, Andreas Färber wrote: Hi, Am 15.08.2013 10:57, schrieb Herbei Dacian: > > please, can anyone recommend me a distribution that offers a barebone > linux kernel. > minimum that I need on that image are: > _ the kernel > _ the compiler and development infrastructure to

[Qemu-devel] [PULL 17/18] tests: drop event_active_cb()

2013-08-16 Thread Stefan Hajnoczi
Drop the io_flush argument to aio_set_event_notifier(). Reviewed-by: Paolo Bonzini Signed-off-by: Stefan Hajnoczi --- tests/test-aio.c | 22 -- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/tests/test-aio.c b/tests/test-aio.c index 1251952..7b2892a 100644 --

[Qemu-devel] [PULL 05/18] tests: adjust test-thread-pool to new aio_poll() semantics

2013-08-16 Thread Stefan Hajnoczi
aio_poll(ctx, true) will soon block when fd handlers have been set. Previously aio_poll() would return early if all .io_flush() returned false. This means we need to check the equivalent of the .io_flush() condition *before* calling aio_poll(ctx, true) to avoid deadlock. Reviewed-by: Paolo Bonzin

[Qemu-devel] [PULL 15/18] dataplane/virtio-blk: drop flush_true() and flush_io()

2013-08-16 Thread Stefan Hajnoczi
.io_flush() is no longer called so drop flush_true() and flush_io(). Signed-off-by: Stefan Hajnoczi --- hw/block/dataplane/virtio-blk.c | 17 ++--- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/hw/block/dataplane/virtio-blk.c b/hw/block/dataplane/virtio-blk.c index 5

[Qemu-devel] [PULL 14/18] block/ssh: drop return_true()

2013-08-16 Thread Stefan Hajnoczi
.io_flush() is no longer called so drop return_true(). Signed-off-by: Stefan Hajnoczi --- block/ssh.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/block/ssh.c b/block/ssh.c index d7e7bf8..e149da9 100644 --- a/block/ssh.c +++ b/block/ssh.c @@ -740,14 +740,6 @@ sta

[Qemu-devel] [PULL 12/18] block/rbd: drop qemu_rbd_aio_flush_cb()

2013-08-16 Thread Stefan Hajnoczi
.io_flush() is no longer called so drop qemu_rbd_aio_flush_cb(). qemu_aio_count is unused now so drop it too. Signed-off-by: Stefan Hajnoczi --- block/rbd.c | 14 +- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/block/rbd.c b/block/rbd.c index cb71751..71b4a0c 100644

[Qemu-devel] [PULL 10/18] block/linux-aio: drop qemu_laio_completion_cb()

2013-08-16 Thread Stefan Hajnoczi
.io_flush() is no longer called so drop qemu_laio_completion_cb(). It turns out that count is now unused so drop that too. Signed-off-by: Stefan Hajnoczi --- block/linux-aio.c | 17 ++--- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/block/linux-aio.c b/block/linux-

[Qemu-devel] [PULL 09/18] block/iscsi: drop iscsi_process_flush()

2013-08-16 Thread Stefan Hajnoczi
.io_flush() is no longer called so drop iscsi_process_flush(). Signed-off-by: Stefan Hajnoczi --- block/iscsi.c | 9 + 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/block/iscsi.c b/block/iscsi.c index e7c1c2b..180b827 100644 --- a/block/iscsi.c +++ b/block/iscsi.c @@ -146,

[Qemu-devel] [PULL 08/18] block/gluster: drop qemu_gluster_aio_flush_cb()

2013-08-16 Thread Stefan Hajnoczi
Since .io_flush() is no longer called we do not need qemu_gluster_aio_flush_cb() anymore. It turns out that qemu_aio_count is unused now and can be dropped. Signed-off-by: Stefan Hajnoczi --- block/gluster.c | 16 +--- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/bl

[Qemu-devel] [PULL 16/18] thread-pool: drop thread_pool_active()

2013-08-16 Thread Stefan Hajnoczi
.io_flush() is no longer called so drop thread_pool_active(). The block layer is the only thread-pool.c user and it already tracks in-flight requests, therefore we do not need thread_pool_active(). Signed-off-by: Stefan Hajnoczi --- thread-pool.c | 8 +--- 1 file changed, 1 insertion(+), 7

[Qemu-devel] [PULL 07/18] block/curl: drop curl_aio_flush()

2013-08-16 Thread Stefan Hajnoczi
.io_flush() is no longer called so drop curl_aio_flush(). The acb[] array that the function checks is still used in other parts of block/curl.c. Therefore we cannot remove acb[], it is needed. Signed-off-by: Stefan Hajnoczi --- block/curl.c | 22 +++--- 1 file changed, 3 insert

[Qemu-devel] [PULL 03/18] dataplane/virtio-blk: check exit conditions before aio_poll()

2013-08-16 Thread Stefan Hajnoczi
Check exit conditions before entering blocking aio_poll(). This is mainly for consistency since it's unlikely that we are stopping in the first event loop iteration. Signed-off-by: Stefan Hajnoczi --- hw/block/dataplane/virtio-blk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) dif

[Qemu-devel] [PULL 11/18] block/nbd: drop nbd_have_request()

2013-08-16 Thread Stefan Hajnoczi
.io_flush() is no longer called so drop nbd_have_request(). We cannot drop in_flight since it is still used by other block/nbd.c code. Signed-off-by: Stefan Hajnoczi --- block/nbd.c | 13 +++-- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/block/nbd.c b/block/nbd.c inde

[Qemu-devel] [PULL 06/18] aio: stop using .io_flush()

2013-08-16 Thread Stefan Hajnoczi
Now that aio_poll() users check their termination condition themselves, it is no longer necessary to call .io_flush() handlers. The behavior of aio_poll() changes as follows: 1. .io_flush() is no longer invoked and file descriptors are *always* monitored. Previously returning 0 from .io_flush()

[Qemu-devel] [PULL 04/18] tests: adjust test-aio to new aio_poll() semantics

2013-08-16 Thread Stefan Hajnoczi
aio_poll(ctx, true) will soon block if any fd handlers have been set. Previously it would only block when .io_flush() returned true. This means that callers must check their wait condition *before* aio_poll() to avoid deadlock. Reviewed-by: Paolo Bonzini Signed-off-by: Stefan Hajnoczi --- test

[Qemu-devel] [PULL 02/18] block: stop relying on io_flush() in bdrv_drain_all()

2013-08-16 Thread Stefan Hajnoczi
If a block driver has no file descriptors to monitor but there are still active requests, it can return 1 from .io_flush(). This is used to spin during synchronous I/O. Stop relying on .io_flush() and instead check QLIST_EMPTY(&bs->tracked_requests) to decide whether there are active requests. T

  1   2   >