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

2013-08-16 Thread Mike Day
ies is availale online at: 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 Paolo Bonzini (1): exec: change iotlb APIs to take AddressSpaceDispatch aio-posix.c| 1

[Qemu-devel] [PATCH 3/3] exec: change iotlb APIs to take AddressSpaceDispatch

2013-08-16 Thread Mike Day
-by: Mike Day --- cputlb.c | 7 --- exec.c| 9 + include/exec/cputlb.h | 9 ++--- 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/cputlb.c b/cputlb.c index 977c0ca..1f74d08 100644 --- a/cputlb.c +++ b/cputlb.c @@ -255,6 +255,7 @@ v

[Qemu-devel] [PATCH 1/3] fixup changes from commit f63ca950

2013-08-16 Thread Mike Day
From: Paolo Bonzini Reviewed-by: Mike Day --- aio-posix.c | 1 + aio-win32.c | 1 + 2 files changed, 2 insertions(+) diff --git a/aio-posix.c b/aio-posix.c index 562add6..7f27ea5 100644 --- a/aio-posix.c +++ b/aio-posix.c @@ -176,6 +176,7 @@ bool aio_poll(AioContext *ctx, bool blocking

[Qemu-devel] [PATCH 2/3] fixup changes from commit f62a6b2f from Paulo Bonzini

2013-08-16 Thread Mike Day
From: Paolo Bonzini Reviewed-by: Mike Day --- cpus.c | 3 +++ exec.c | 4 +++- include/exec/cpu-all.h | 3 +++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/cpus.c b/cpus.c index 624658e..d6f2775 100644 --- a/cpus.c +++ b/cpus.c @@ -764,6 +764,7

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 upstrea

[Qemu-devel] [PATCH] Fixup some dynamic casts in the Qemu device tree to correspond to the QOM type-checking system. These patches change from using Linux kernel style upcasts to typesafe object orien

2013-08-19 Thread Mike Day
These patches apply to Paolo Bonzini's rcu tree: https://github.com/bonzini/qemu/tree/rcu commit 781e47bf1693a80b84eec298a6a1c7b29ab2c135 Signed-off-by: Mike Day --- hw/misc/ivshmem.c | 2 +- hw/pci-bridge/pci_bridge_dev.c | 6 +++--- hw/pci/pci_bridge.c| 2 +- 3

[Qemu-devel] [PATCH RESEND] RCU implementation for Qemu. Fixup some dynamic casts in the Qemu device tree to correspond to the QOM type-checking system.

2013-08-19 Thread Mike Day
These patches change from using Linux kernel style upcasts to typesafe object oriented casts with runtime checking semantics. These patches apply to Paolo Bonzini's rcu tree: https://github.com/bonzini/qemu/tree/rcu commit 781e47bf1693a80b84eec298a6a1c7b29ab2c135 Signed-off-by: Mik

Re: [Qemu-devel] [PATCH] Fixup some dynamic casts in the Qemu device tree to correspond to the QOM type-checking system. These patches change from using Linux kernel style upcasts to typesafe object o

2013-08-19 Thread Mike Day
Peter Maydell writes: > On 19 August 2013 19:33, Mike Day wrote: >> These patches apply to Paolo Bonzini's rcu tree: >> >> https://github.com/bonzini/qemu/tree/rcu >> commit 781e47bf1693a80b84eec298a6a1c7b29ab2c135 >> >> Signed-off-by: Mike Day &

[Qemu-devel] [RFC PATCH] Introduce RCU-enabled DQs.

2013-08-23 Thread Mike Day
interface. To accompany the RCU-enabled DQ, there is also a test file that uses concurrent readers to contend with a single updater. This patchset builds on top of Paolo Bonzini's rcu tree: https://github.com/bonzini/qemu/tree/rcu Signed-off-by: Mike Day --- docs/rcu.txt

[Qemu-devel] [RFC PATCH] Introduce RCU-enabled DQs (v2)

2013-08-24 Thread Mike Day
to contend with a single updater. This patchset builds on top of Paolo Bonzini's rcu tree: https://github.com/bonzini/qemu/tree/rcu Signed-off-by: Mike Day --- docs/rcu.txt | 2 +- include/qemu/queue.h | 11 -- include/qemu/rcu_queue.h | 145

Re: [Qemu-devel] [RFC PATCH] Introduce RCU-enabled DQs (v2)

2013-08-25 Thread Mike Day
of the previous list element) this is assiging the *previous* element's next pointer, the way I read it. The Linux list_del_rcu is dealing with a singly linked list and therefore does not set a value in the previous node's element. But I'm still unclear on whether or not the memory barrier is needed because the deleted element won't be reclaimed right away. Mike -- Mike Day | + 1 919 371-8786 | ncm...@ncultra.org "Endurance is a Virtue"

Re: [Qemu-devel] [RFC PATCH] Introduce RCU-enabled DQs (v2)

2013-08-26 Thread Mike Day
#x27;m working with it right now. I like the idea of using a flag to provide a form of atomicity for the doubly-linked list elements. I'm also planning on running some timing tests to see of the additional memory barriers and atomic accesses make *any* difference whatsoever. Mike Mike Day | ncm...@ncultra.org | +1 919 371-8786

[Qemu-devel] [RFC PATCH V3 ] Introduce RCU-enabled DQs

2013-08-27 Thread Mike Day
ith a single updater. This patchset builds on top of Paolo Bonzini's rcu tree: https://github.com/bonzini/qemu/tree/rcu Signed-off-by: Mike Day --- docs/rcu.txt | 2 +- include/qemu/queue.h | 11 -- include/qemu/rcu_queue.h | 137 +++ tests/Makefile

[Qemu-devel] [RFC PATCH] convert ram_list to RCU DQ

2013-08-28 Thread Mike Day
x, and arm targets. It has not been tested further than that at this point. To apply this patch, you must base upon Paolo Bonzini's rcu tree and also apply the RCU DQ patch (below). https://github.com/bonzini/qemu/tree/rcu http://article.gmane.org/gmane.comp.emulators.qemu/230159/ Signed-o

Re: [Qemu-devel] [RFC PATCH] convert ram_list to RCU DQ

2013-08-29 Thread Mike Day
On Wed, Aug 28, 2013 at 12:35 PM, Paolo Bonzini wrote: > > > @@ -828,13 +829,18 @@ static inline void *host_from_stream_offset(QEMUFile *f, > > qemu_get_buffer(f, (uint8_t *)id, len); > > id[len] = 0; > > > > -QTAILQ_FOREACH(block, &ram_list.blocks, next) { > > -if (!strncmp(

Re: [Qemu-devel] [RFC PATCH] convert ram_list to RCU DQ

2013-08-30 Thread Mike Day
On Fri, Aug 30, 2013 at 4:19 AM, Paolo Bonzini wrote: > > > I'm not sure about that; returning an RCU-protected variable after > rcu_read_unlock() seems wrong to me because the pointer may not be valid > at that point. I suggest using a comment that asks to call > host_from_stream_offset within r

[Qemu-devel] [RFC PATCH] Convert ram_list to RCU DQ V2

2013-08-30 Thread Mike Day
at at this point. To apply this patch, you must base upon Paolo Bonzini's rcu tree and also apply the RCU DQ patch (below). https://github.com/bonzini/qemu/tree/rcu http://article.gmane.org/gmane.comp.emulators.qemu/230159/ Signed-off-by: Mike Day --- arch_init.c

Re: [Qemu-devel] [RFC PATCH] Convert ram_list to RCU DQ V2

2013-09-03 Thread Mike Day
On Fri, Aug 30, 2013 at 12:38 PM, Paolo Bonzini wrote: > > > @@ -867,7 +879,12 @@ static int ram_load(QEMUFile *f, void *opaque, int version_id) > > if (version_id < 4 || version_id > 4) { > > return -EINVAL; > > } > > - > > +/* this implements a long-running RCU critical se

Re: [Qemu-devel] [RFC PATCH] Convert ram_list to RCU DQ V2

2013-09-03 Thread Mike Day
On Tue, Sep 3, 2013 at 10:09 AM, Paolo Bonzini wrote: > > Il 03/09/2013 15:56, Mike Day ha scritto: > >> > +/* this implements a long-running RCU critical section. > >> > + * When rcu reclaims in the code start to become numerous > >> >

[Qemu-devel] [PATCH] Convert ram_list to RCU DQ V3

2013-09-04 Thread Mike Day
upon Paolo Bonzini's rcu tree and also apply the RCU DQ patch (below). https://github.com/bonzini/qemu/tree/rcu http://article.gmane.org/gmane.comp.emulators.qemu/230159/ Signed-off-by: Mike Day --- arch_init.c | 103 ++ exec.c

[Qemu-devel] [RFC PATCH] Convert ram_list to RCU DQ V4

2013-09-04 Thread Mike Day
u/tree/rcu http://article.gmane.org/gmane.comp.emulators.qemu/230159/ Signed-off-by: Mike Day --- arch_init.c | 96 +--- exec.c | 162 +-- include/exec/cpu-all.h | 13 ++-- include/qemu/rcu_queue.h | 8 +++

Re: [Qemu-devel] [RFC PATCH] Convert ram_list to RCU DQ V4

2013-09-04 Thread Mike Day
On Wed, Sep 4, 2013 at 3:58 PM, Paolo Bonzini wrote: > > > @@ -1323,23 +1325,21 @@ static RAMBlock *qemu_get_ram_block(ram_addr_t addr) > > { > > RAMBlock *block; > > > > -/* The list is protected by the iothread lock here. */ > > +/* This assumes the iothread lock is taken here too

[Qemu-devel] [RFC PATCH 02/14] rcu: add rcu library

2013-08-14 Thread Mike Day
rcu_read_{lock,unlock} but requires the program to manually annotate quiescent points or intervals. QEMU threads usually have easily identified quiescent periods, so this should not be a problem. Signed-off-by: Paolo Bonzini Reviewed-by: Mike Day --- docs/rcu.txt | 301

[Qemu-devel] [RFC PATCH 05/14] rcu: add call_rcu

2013-08-14 Thread Mike Day
From: Paolo Bonzini Signed-off-by: Paolo Bonzini Reviewed-by: Mike Day --- docs/rcu.txt | 108 +-- include/qemu/rcu.h | 22 ++ util/rcu.c | 120 + 3 files changed, 246

[Qemu-devel] [RFC PATCH 00/14] RCU Implementation for Qemu

2013-08-14 Thread Mike Day
This is a rebase of Paolo's May patchset on v1.6.0-rc3 The tree is availavle on github: https://github.com/ncultra/qemu/tree/rcu-for-1.7 Mike Day (3): fix #include directive for rcu header include osdep.h for definition of glue(a,b) fix pointer reference to rcu_assign_pointer

[Qemu-devel] [RFC PATCH 04/14] qemu-thread: register threads with RCU

2013-08-14 Thread Mike Day
From: Paolo Bonzini Signed-off-by: Paolo Bonzini Reviewed-by: Mike Day --- docs/rcu.txt | 13 +++-- util/qemu-thread-posix.c | 28 +++- util/qemu-thread-win32.c | 2 ++ 3 files changed, 36 insertions(+), 7 deletions(-) diff --git a/docs/rcu.txt b

[Qemu-devel] [RFC PATCH 08/14] qemu-thread: report RCU quiescent states

2013-08-14 Thread Mike Day
: Paolo Bonzini Reviewed-by: Mike Day --- docs/rcu.txt | 27 +++ util/qemu-thread-posix.c | 29 + util/qemu-thread-win32.c | 16 +++- util/rcu.c | 3 --- 4 files changed, 67 insertions(+), 8 deletions(-) diff

[Qemu-devel] [RFC PATCH 07/14] rcu: allow nested calls to rcu_thread_offline/rcu_thread_online

2013-08-14 Thread Mike Day
From: Paolo Bonzini Signed-off-by: Paolo Bonzini Reviewed-by: Mike Day --- docs/rcu.txt | 5 + include/qemu/rcu.h | 21 +++-- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/docs/rcu.txt b/docs/rcu.txt index d7c4f0b..4e7cde3 100644 --- a/docs/rcu.txt

[Qemu-devel] [RFC PATCH 03/14] fix #include directive for rcu header

2013-08-14 Thread Mike Day
Signed-off-by: Mike Day --- hw/9pfs/virtio-9p-synth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/9pfs/virtio-9p-synth.c b/hw/9pfs/virtio-9p-synth.c index d5f5842..fdfea21 100644 --- a/hw/9pfs/virtio-9p-synth.c +++ b/hw/9pfs/virtio-9p-synth.c @@ -17,7 +17,7

[Qemu-devel] [RFC PATCH 09/14] event loop: report RCU quiescent states

2013-08-14 Thread Mike Day
From: Paolo Bonzini Threads that run event loops also have places that can sleep for an extended time. Place an extended quiescent state there. Signed-off-by: Paolo Bonzini Reviewed-by: Mike Day --- aio-posix.c | 9 - aio-win32.c | 7 +++ main-loop.c | 7 ++- 3 files changed

[Qemu-devel] [PATCH 13/14] include osdep.h for definition of glue(a, b)

2013-08-14 Thread Mike Day
diff --git a/include/qemu/rcu.h b/include/qemu/rcu.h index 3a55045..f398e6c 100644 --- a/include/qemu/rcu.h +++ b/include/qemu/rcu.h @@ -39,6 +39,7 @@ #include "qemu/compiler.h" #include "qemu/rcu-pointer.h" #include "qemu/thread.h" +#include "qemu/osdep.h" #include "qemu/queue.h" #include "qe

[Qemu-devel] [RFC PATCH 10/14] cpus: report RCU quiescent states

2013-08-14 Thread Mike Day
From: Paolo Bonzini CPU threads have extended quiescent states while relinquishing control to the accelerator (except TCG). Signed-off-by: Paolo Bonzini Reviewed-by: Mike Day --- cpus.c| 3 +++ kvm-all.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/cpus.c b/cpus.c index

[Qemu-devel] [RFC PATCH 11/14] block: report RCU quiescent states

2013-08-14 Thread Mike Day
From: Paolo Bonzini The aio workers may spend a long time executing I/O operations; mark that time as an extended quiescent state. Signed-off-by: Paolo Bonzini Reviewed-by: Mike Day --- block/raw-posix.c | 3 +++ block/raw-win32.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/block

[Qemu-devel] [PATCH 14/14] fix pointer reference to rcu_assign_pointer

2013-08-14 Thread Mike Day
Signed-off-by: Mike Day --- tests/rcutorture.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/rcutorture.c b/tests/rcutorture.c index 236c628..b219ff5 100644 --- a/tests/rcutorture.c +++ b/tests/rcutorture.c @@ -293,7 +293,7 @@ static void *rcu_update_stress_test(void

[Qemu-devel] [RFC PATCH 12/14] migration: report RCU quiescent states

2013-08-14 Thread Mike Day
From: Paolo Bonzini The migration thread polls s->state periodically, it does not use a mutex or condition variable, so it has to report quiescent states manually. Signed-off-by: Paolo Bonzini Reviewed-by: Mike Day --- migration.c | 2 ++ 1 file changed, 2 insertions(+) diff --gi

[Qemu-devel] [RFC PATCH 01/14] qemu-thread: add QemuEvent

2013-08-14 Thread Mike Day
synchronize_rcu (the latter being the single consumer), and to report call_rcu invocations to the thread that receives them. Signed-off-by: Paolo Bonzini Reviewed-by: Mike Day --- include/qemu/thread-posix.h | 8 +++ include/qemu/thread-win32.h | 4 ++ include/qemu/thread.h | 7 +++ util

[Qemu-devel] [RFC PATCH 06/14] rcu: add rcutorture

2013-08-14 Thread Mike Day
From: Paolo Bonzini A stress test program (works, too :)). Signed-off-by: Paolo Bonzini Reviewed-by: Mike Day --- tests/Makefile | 4 +- tests/rcutorture.c | 439 + 2 files changed, 442 insertions(+), 1 deletion(-) create mode 100644

[Qemu-devel] [PATCH 1/2] fixed tests/Makefile to correctly link rcutorture

2013-08-15 Thread Mike Day
From: Paolo Bonzini Reviewed-by: Mike Day --- tests/Makefile | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/tests/Makefile b/tests/Makefile index b4a52b4..4d68d28 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -44,9 +44,14 @@ check-unit-y += tests/test

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

2013-08-15 Thread Mike Day
This series applies on top today's git.qemu.org/master and is online at: https://github.com/ncultra/qemu/tree/rcu-for-1.7 Paolo Bonzini (2): fixed tests/Makefile to correctly link rcutorture enable TLS in build and activate test-tls in make check configure | 63

[Qemu-devel] [PATCH 2/2] enable TLS in build and activate test-tls in make check

2013-08-15 Thread Mike Day
From: Paolo Bonzini Reviewed-by: Mike Day --- configure | 63 ++ include/qemu/tls.h | 127 + include/qom/cpu.h | 2 +- tests/Makefile | 2 +- tests/test-tls.c | 87

Re: [Qemu-devel] [PATCH] Update QEMU checkpatch.pl to current linux version

2014-05-08 Thread Mike Day
On Wed, May 7, 2014 at 5:16 PM, Hani Benhabiles wrote: > FWIW, this new version doesn't trigger a false positive I was having with > patches 05-07 in [1]. > > However, from a quick test for this patch on a couple of patches, I am getting > warnings like this: "WARNING: braces {} are not necessary

Re: [Qemu-devel] [PATCH] Update QEMU checkpatch.pl to current linux version

2014-05-08 Thread Mike Day
On Thu, May 8, 2014 at 10:02 AM, Peter Maydell wrote: >>> total: 0 errors, 0 warnings, 79 lines checked >>> >>> /tmp/a has no obvious style problems and is ready for submission. >>> Check 500, Bad 52 >> >> How does your new checkpatch compare to our current one? > > Yes; we do sometimes let checkp

Re: [Qemu-devel] [PATCH 1/6] xics: add flags for interrupts

2014-05-09 Thread Mike Day
On Thu, May 8, 2014 at 11:12 PM, Alexey Kardashevskiy wrote: >> There are >> a couple ways to mitigate this type of situation by using alternative >> data structures to inform the loop traversal. I don't know if it is >> worth the effort, though. > > Here I lost you :) If I read the code correctl

[Qemu-devel] [PATCH] qemu-img fails to delete last snapshot

2014-05-09 Thread Mike Day
When deleting the last snapshot, copying the resulting snapshot table currently fails, causing the delete operation to also fail. Fix the failure by skipping the copy and just writing the snapshot header and freeing the extra clusters. Signed-off-by: Mike Day --- There are two specific problems

[Qemu-devel] [PATCH] Add backing file option to qemu-img create help.

2014-05-12 Thread Mike Day
For the create subcommand the backing file (-b) option is documented on-line but not in the binary. Add it. Signed-off-by: Mike Day --- qemu-img-cmds.hx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qemu-img-cmds.hx b/qemu-img-cmds.hx index d029609..7724709 100644

Re: [Qemu-devel] [PATCH] Add backing file option to qemu-img create help.

2014-05-12 Thread Mike Day
On Mon, May 12, 2014 at 11:20 AM, Eric Blake wrote: > Online where? In 'qemu-img --help', or on some web page (at what URL)? http://qemu.weilnetz.de/qemu-doc.html#vm_005fsnapshots -o backing file is not documented in the help command. Mike

Re: [Qemu-devel] [PATCH] Add backing file option to qemu-img create help.

2014-05-12 Thread Mike Day
On Mon, May 12, 2014 at 11:53 AM, Eric Blake wrote: > Ah, but it is: > > $ qemu-img create -f qcow2 -o help > Supported options: > size Virtual disk size > compat Compatibility level (0.10 or 1.1) > backing_file File name of a base image > backing_fmt Image format of

Re: [Qemu-devel] [PATCH] Add backing file option to qemu-img create help.

2014-05-12 Thread Mike Day
On Mon, May 12, 2014 at 12:36 PM, Kevin Wolf wrote: > What would qemu-img rebase do with -o? It is just for (safely) changing > the backing file, not for updating options. There is qemu-img amend for > that, and it does have an -o option. A little background ... I'm writing a 4-day KVM training

Re: [Qemu-devel] [PATCH] qemu-img fails to delete last snapshot

2014-05-12 Thread Mike Day
On Mon, May 12, 2014 at 12:39 PM, Eric Blake wrote: > This information is actually quite useful in understanding the patch, > and I would have included it prior to the --- for inclusion in git, > rather than in the reviewer-only commentary that gets stripped during > 'git am'. > >> >> block/qcow2

[Qemu-devel] [PATCH v2] qemu-img fails to delete last snapshot

2014-05-12 Thread Mike Day
moving the last snapshot there are no existing snapshots to be shifted. All that needs to be done is to write the header and unallocate the blocks. Signed-off-by: Mike Day Reviewed-by: Eric Blake --- v2: improved the git log entry added Eric Blake as a reviewer block/qcow2-snapshot.

[Qemu-devel] [PATCH] qemu-img: sort block formats in help message

2014-05-13 Thread Mike Day
ind a specific format in the list. [Added suggestions from Fam Zheng to declare variables at the top of the scope in help() and to omit explicit cast for void* opaque. --Stefan] [Removed call to g_sequence_lookup because it breaks the build on machines with glib < 2.28. --Mike] Signed-off-

Re: [Qemu-devel] [PULL 03/17] qemu-img: sort block formats in help message

2014-05-13 Thread Mike Day
On Tue, May 13, 2014 at 10:18 AM, Cornelia Huck wrote: > > qemu-img.o: In function `add_format_to_seq': > /home/cohuck/git/qemu/qemu-img.c:73: undefined reference to > `g_sequence_lookup' > collect2: ld returned 1 exit status > > g_sequence_lookup has been added with glib 2.28, and this box has >

[Qemu-devel] [PATCH] Remove g_sequence_lookup from qemu-img help function

2014-05-13 Thread Mike Day
ned-off-by: Mike Day --- qemu-img.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index 04ce02a..bf5e74c 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -70,11 +70,8 @@ static void add_format_to_seq(void *opaque, const char *fmt_name) { GSequence *seq = opa

[Qemu-devel] [PATCH] Remove g_sequence_lookup from qemu-img help function

2014-05-13 Thread Mike Day
Signed-off-by: Mike Day --- qemu-img.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index 04ce02a..1ad899e 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -70,11 +70,8 @@ static void add_format_to_seq(void *opaque, const char *fmt_name) { G

Re: [Qemu-devel] [PULL 03/17] qemu-img: sort block formats in help message

2014-05-14 Thread Mike Day
On Wed, May 14, 2014 at 8:35 AM, Stefan Hajnoczi wrote: > Jeff Cody recently wanted to eliminate duplicate entries in the list. I > thought part of your intention was to address the duplicates with your > patch. > > We can back out the sequence API if it's not supported on older glib but > it wou

Re: [Qemu-devel] [PATCH] qemu-img: sort block formats in help message

2014-05-14 Thread Mike Day
On Wed, May 14, 2014 at 9:02 AM, Stefan Hajnoczi wrote: > Yes, we cannot change the git commit history once a commit is in the > public qemu.git repository. The only options are to: > > 1. Add a patch on top that fixes the issue. > 2. Use git-revert(1) to undo your commit entirely (this adds a ne

Re: [Qemu-devel] [PULL 03/17] qemu-img: sort block formats in help message

2014-05-14 Thread Mike Day
On Wed, May 14, 2014 at 9:43 AM, Jeff Cody wrote: > Prior to a recent commit, this function did not make distinction on > duplicates. As of commit e855e4fb7, duplicates are not longer printed > in the help message: > > e855e4fb7: Ignore duplicate or NULL format_name in bdrv_iterate_format): > Th

Re: [Qemu-devel] [PATCH v2] qemu-img fails to delete last snapshot

2014-05-15 Thread Mike Day
On Wed, May 14, 2014 at 11:15 AM, Kevin Wolf wrote: >> freeing the extra clusters. > > Do you have an easy reproducer? Because I can't see the bug. Thanks for the review! I was having a hard time reproducing this until I did a bisect. This bug was fixed by 65f33bc which was merged at or after th

Re: [Qemu-devel] [PATCH] [v2 PATCH] qemu-img: sort block formats in help message

2014-05-16 Thread Mike Day
On Fri, May 16, 2014 at 9:59 AM, Laurent Desnogues wrote: > > just noticed the use of some too recent glib features: g_strcmp0 > and GSequence related ones. There is a patch upstream that removes g_sequence_lookup, which was not linking on one platform. I haven't seen any other reports of breakag

Re: [Qemu-devel] [RFC PATCH v2] PPC: smp: autodetect numbers of threads per core

2014-01-09 Thread Mike Day
threads = threads > 0 ? threads : 1; > +} > if (cpus == 0) { > cpus = cores * threads * sockets; > } -- Mike Day | "Endurance is a Virtue"

Re: [Qemu-devel] [RFC PATCH v2] PPC: smp: autodetect numbers of threads per core

2014-01-10 Thread Mike Day
3. machine_init - creates CPUs which may or may be not "host". The patch as it its now is very simple and well-contained. I wonder how much it would expand if we added a max thread count to the cpu class. It seems like the need for a max thread count is idiomatic to powerpc. Mike -- Mike Day | "Endurance is a Virtue"

Re: [Qemu-devel] [RFC PATCH v2] PPC: smp: autodetect numbers of threads per core

2014-01-10 Thread Mike Day
ax" is a more user-friendly option. In my understanding this is strictly a usability issue. Mike -- Mike Day | "Endurance is a Virtue"

Re: [Qemu-devel] [RFC PATCH v2] PPC: smp: autodetect numbers of threads per core

2014-01-10 Thread Mike Day
On Fri, Jan 10, 2014 at 9:13 AM, Alexey Kardashevskiy wrote: > On 01/11/2014 01:00 AM, Alexander Graf wrote: >> Can't we determine the number of "default threads" at a common place, >> preferably derived from cpu type? > > We can do anything. I asked how exactly as I really (really) do not > unde

Re: [Qemu-devel] [RFC PATCH v2] PPC: smp: autodetect numbers of threads per core

2014-01-10 Thread Mike Day
On Fri, Jan 10, 2014 at 9:25 AM, Alexander Graf wrote: >>> On 01/11/2014 01:00 AM, Alexander Graf wrote: >> Can't we determine the number of "default threads" at a common place, preferably derived from cpu type? >>> >>> We can do anything. I asked how exactly as I really (really) do not

Re: [Qemu-devel] [PULL 14/28] exec: make address spaces 64-bit wide

2014-01-14 Thread Mike Day
and 64-bit BARs are required to be supported. It is legal to construct a 64-bit BAR by masking all the high bits to zero. Presumably it would be OK to mask the 16 high bits to zero as well, constructing a 48-bit address. Mike -- Mike Day | "Endurance is a Virtue"

Re: [Qemu-devel] [PULL 14/28] exec: make address spaces 64-bit wide

2014-01-14 Thread Mike Day
On Tue, Jan 14, 2014 at 9:05 AM, Michael S. Tsirkin wrote: > On Tue, Jan 14, 2014 at 08:50:54AM -0500, Mike Day wrote: >> >> Also, both 32-bit and 64-bit BARs are required to be supported. It is >> legal to construct a 64-bit BAR by masking all the high bits to >> zero

Re: [Qemu-devel] [PULL 14/28] exec: make address spaces 64-bit wide

2014-01-14 Thread Mike Day
>> > > >>> >> > > > Prior to this change, there was no re-map with the >> > > > febe > If we choose not to map them, how do we distinguish them from guest RAM? > There's no MemoryRegion flag that I'm aware of to distinguish a ram_ptr > that points to a chunk of gue

Re: [Qemu-devel] [PULL 14/28] exec: make address spaces 64-bit wide

2014-01-14 Thread Mike Day
On Tue, Jan 14, 2014 at 12:49 PM, Mike Day wrote: >>> > > >>>>>>> >>> > > >>>>>>>>> Prior to this change, there was no re-map with the >>> > > >>>>>>>>> febe >

Re: [Qemu-devel] [PULL 14/28] exec: make address spaces 64-bit wide

2014-01-14 Thread Mike Day
>> >> The address above has already been masked. What you need to do is read >> the BAR. If the value from the BAR end in '1', its MMIO. If it ends in >> '10', its RAM. If it ends in '0n' its disabled. The first thing that >> the PCI software does after reading the BAR is mask off the two low >> bi

Re: [Qemu-devel] [PATCH v2 01/14] spapr: populate DRC entries for root dt node

2014-01-20 Thread Mike Day
On Sun, Jan 19, 2014 at 9:58 PM, Alexey Kardashevskiy wrote: > > I did not realize DRC is not just for PCI. How hard would it be to add hot > plug support for a whole PHB? The current QEMU trend is to make QEMU > monitor's "device_add" equal to the command line's "-device" which is not > (yet) tru

Re: [Qemu-devel] [PULL 14/28] exec: make address spaces 64-bit wide

2014-01-20 Thread Mike Day
Do you know which device is writing to the BAR below? From the trace it appears it should be restoring the memory address to the BAR after writing all 1s to the BAR and reading back the contents. (the protocol for finding the length of the bar memory.) On Thu, Jan 9, 2014 at 12:24 PM, Alex William

Re: [Qemu-devel] [PATCH v2 01/14] spapr: populate DRC entries for root dt node

2014-01-20 Thread Mike Day
On Mon, Jan 20, 2014 at 12:24 PM, Michael Roth wrote: > Quoting Alexey Kardashevskiy (2014-01-19 20:58:20) > > Would need to look at it a bit more closely to say for certain, but after > discussing it a bit Tyrel/Mike, I think the main considerations would be: > > 1) PHB hotplug/unplug would need

[Qemu-devel] [PATCH] [RFC] Convert Qemu Timer List and Active Timers to RCU

2014-02-12 Thread Mike Day
Allow readers to use RCU when reading Qemu timer lists. Applies to Paolo Bonzini's RCU branch, https://github.com/bonzini/qemu/tree/rcu. This patch is for comment and review only. The rcu branch needs to be rebased on upstream. Signed-off-by: Mike Day --- include/qemu/timer.h

Re: [Qemu-devel] [PATCH] [RFC] Convert Qemu Timer List and Active Timers to RCU

2014-02-13 Thread Mike Day
On Thu, Feb 13, 2014 at 4:25 AM, Paolo Bonzini wrote: > Il 13/02/2014 10:11, Alex Bligh ha scritto: >> >> I'll certainly have a look through this. However before I do, what >> problem is this trying to solve? Do we think there is possibility >> of contention on the active timers lock? I used to th

Re: [Qemu-devel] [PATCH] [RFC] Convert Qemu Timer List and Active Timers to RCU

2014-02-15 Thread Mike Day
but you appear to have >introduced a rcu_read_lock() outside the loop, but then >unlock it within the loop. If the loop iterates more than once, >won't it do more unlocks than locks? Yes, I think the right fix is to omit the last rcu_read_unlock. -- Mike Day | "Endurance is a Virtue"

Re: [Qemu-devel] [PATCH] [RFC] Convert Qemu Timer List and Active Timers to RCU

2014-02-17 Thread Mike Day
> 1. You seem to be removing the use of the active_timers_lock and replacing it > by >rcu (fine). However, you seem to have left the qemu_mutex_destroy in >timerlist_free, and left the mutex in QEMUTimerList. Any reason why we > need both? > I responded incorrectly to this yesterday. We

[Qemu-devel] [PATCH 0/2] [RFC] Convert Clock lists to RCU (V2)

2014-02-27 Thread Mike Day
The first patch in the series convers the clock->timerlists->active_timers list to RCU. The second patch converts clock->timerlists to RCU and also protects access to timerlists->active_timers->timer_list. Mike Day (2): [RFC] Convert active timers list to use RCU V2 [RFC

[Qemu-devel] [PATCH 1/2] [RFC] Convert active timers list to use RCU V2

2014-02-27 Thread Mike Day
b.com/bonzini/qemu/tree/rcu V2: - Addresses comments from Alex Bligh Signed-off-by: Mike Day --- include/qemu/timer.h | 19 +++ qemu-timer.c | 69 ++-- 2 files changed, 44 insertions(+), 44 deletions(-) diff --git a/include/qemu/ti

[Qemu-devel] [PATCH 2/2] [RFC] Convert Clock Timerlists to RCU V2

2014-02-27 Thread Mike Day
anch: https://github.com/bonzini/qemu/tree/rcu and also requires the previously submitted patch 03fba95 "Convert active timers list to use RCU for read operations V2." V2: - timerlists modifications split to a separate patch (this one). - Addressed Alex Blighs comments. Signed-off-by: Mike Day -

Re: [Qemu-devel] [PATCH 2/2] [RFC] Convert Clock Timerlists to RCU V2

2014-03-03 Thread Mike Day
On Fri, Feb 28, 2014 at 3:05 PM, Alex Bligh wrote: >> Rather than introduce a second mutex for timerlists, which would >> require nested mutexes to in orderwrite to the timerlists, use one >> QemuMutex in the QemuClock structure for all write access to any list >> hanging off the QemuClock struct

Re: [Qemu-devel] [PATCH v7 1/2] target-ppc: add PowerPCCPU::cpu_dt_id

2014-03-03 Thread Mike Day
alized from @cpu_index by default and can be fixed later > to meet the device tree requirements. > > This adds an API to handle @cpu_dt_id. > > This removes kvmppc_fixup_cpu() as it is not more needed, @cpu_dt_id > is calculated in ppc_cpu_realize(). > > This will be used

Re: [Qemu-devel] [PATCH v7 2/2] target-ppc: spapr: e500: fix to use cpu_dt_id

2014-03-03 Thread Mike Day
s @cpu_index fixup as @cpu_dt_id is used instead so QEMU monitor > can accept command-line CPU indexes again. > > This changes kvm_arch_vcpu_id() to use ppc_get_vcpu_dt_id() as at the moment > KVM CPU id and device tree ID are calculated using the same algorithm. > Signed-off-by: Ale

Re: [Qemu-devel] [PATCH v3] virtio: Introduce virtio-testdev

2014-01-30 Thread Mike Day
fig space back to zero > 3) EXIT:exit() from qemu with a status code > +static uint32_t virtio_testdev_get_features(VirtIODevice *vdev, uint32_t f) > +{ > +return f; > +} > + Is this meant to be a stub currently? Mike -- Mike Day | "Endurance is a Virtue"

[Qemu-devel] [PATCH] A hexdump function that also displays UTF-8 strings contained in the dumped buffer.

2013-11-11 Thread Mike Day
69 62 36 64 6a 01 06 03 gb5dh...ib6dj... 0020: 6b 62 37 64 6c 01 07 03 6d 62 38 64 6e 01 08 03 kb7dl...mb8dn... 0030: 6f 62 39 64 70 01 09 03 71 62 78 64ob9dp...qbxd Signed-off-by: Mike Day --- include/qemu-common.h | 2 ++ util/hexdump.c| 48

Re: [Qemu-devel] [PATCH v6] spapr_hcall: add address-translation-mode-on-interrupt resource in H_SET_MODE

2014-04-15 Thread Mike Day
On Tue, Apr 8, 2014 at 2:28 AM, Alexander Graf wrote: > On 22.03.14 14:03, Alexey Kardashevskiy wrote: >> >> This adds handling of the RESOURCE_ADDR_TRANS_MODE resource from >> the H_SET_MODE, for POWER8 (PowerISA 2.07) only. >> >> Signed-off-by: Alexey Kardas

[Qemu-devel] Monitor Readline - no terminal echo after exit

2014-04-23 Thread Mike Day
look for this code? Otherwise I'll start looking through main_loop and friends and vl.c for init and destroy routines. Mike -- Mike Day | "Endurance is a Virtue"

Re: [Qemu-devel] Monitor Readline - no terminal echo after exit

2014-04-24 Thread Mike Day
On Thu, Apr 24, 2014 at 3:31 AM, Markus Armbruster wrote: >> I believe someone on the list mentioned they are seeing a couple >> problems entering and exiting the Monitor. I'd like to look at this more >> closely, starting with my most pending issue: losing the terminal echo >> after exiting the M

[Qemu-devel] [PATCH] -nographic sometimes adds an extra chardev for stdio

2014-04-28 Thread Mike Day
checking for the existing chardev before adding another. Signed-off-by: Mike Day --- To reproduce, use -mon and -nographic together. I was able to reproduce it using # qemu-system-x86_64 -enable-kvm -m 1G -chardev stdio,id=mon0 \ # -mon chardev=mon0,mode=readline -nographic --- vl.c | 22

Re: [Qemu-devel] [PATCH] -nographic sometimes adds an extra chardev for stdio

2014-04-28 Thread Mike Day
On Mon, Apr 28, 2014 at 3:53 PM, Michael Tokarev wrote: > Gosh. This is uuugly. > > Maybe, at least, we can add some variable which gets incremented for > each -mon chardev= ? I dunno, that's about the same ugliness. Oh > well... :( Suggestions much appreciated, I think its ugly versus intr

Re: [Qemu-devel] [PATCH] -nographic sometimes adds an extra chardev for stdio

2014-04-29 Thread Mike Day
On Tue, Apr 29, 2014 at 3:09 AM, Gerd Hoffmann wrote: > > I don't feel like adding more band-aid to paper over the fundamental > issue. Too much band-aid tends to cause other unwanted side effects. Fair enough, I tend to agree. thanks for the review. Mike

Re: [Qemu-devel] [PATCH] -nographic sometimes adds an extra chardev for stdio

2014-04-29 Thread Mike Day
On Tue, Apr 29, 2014 at 1:02 AM, Michael Tokarev wrote: > I guess we should have some global variable like "stdio_occuped", set > it to 1 when -daemonize is specified, and set and check it each time > we try to use stdio for something. This way we'll prevent various > parts of qemu from fighting

Re: [Qemu-devel] [PULL 14/16] qemu-img: Improve error messages

2014-04-30 Thread Mike Day
On Sun, Apr 27, 2014 at 9:55 PM, Fam Zheng wrote: >> > /* not found */ >> > -help(); >> > -return 0; >> > +error_exit("Command not found: %s", cmdname); >> >> Looks like we just relied previously on the default 'not found' case >> for help() to provide the "--help" option. >> > >

Re: [Qemu-devel] [PULL 14/16] qemu-img: Improve error messages

2014-04-30 Thread Mike Day
On Wed, Apr 30, 2014 at 10:16 AM, Eric Blake wrote: > Additional patches: > https://lists.gnu.org/archive/html/qemu-devel/2014-04/msg04074.html > https://lists.gnu.org/archive/html/qemu-devel/2014-04/msg04468.html > both already on the queue for the next PULL request of the block branch. Excellen

[Qemu-devel] [PATCH] qemu-img: sort block formats in help message

2014-05-02 Thread Mike Day
ind a specific format in the list. Signed-off-by: Mike Day --- qemu-img.c | 33 - 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/qemu-img.c b/qemu-img.c index 96f4463..d8b7ef4 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -32,6 +32,7 @@ #in

Re: [Qemu-devel] [PATCH] qemu-img: sort block formats in help message

2014-05-05 Thread Mike Day
Thanks for the review! I've been able to shorten the next version quite a bit. On Mon, May 5, 2014 at 9:42 AM, Stefan Hajnoczi wrote: >> +static void GFunc_print_format(gpointer data, gpointer user) > > QEMU coding style is lowercase function and variable names. The > scripts/checkpatch.pl scri

[Qemu-devel] [PATCH] [v2 PATCH] qemu-img: sort block formats in help message

2014-05-05 Thread Mike Day
ind a specific format in the list. v2: Incorporated feedback from Stefan Hajnoczi Signed-off-by: Mike Day --- qemu-img.c | 27 --- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index 96f4463..a559108 100644 --- a/qemu-img.c +++ b

Re: [Qemu-devel] [PATCH] Update QEMU checkpatch.pl to current linux version

2014-05-06 Thread Mike Day
On Tue, May 6, 2014 at 2:28 PM, Peter Maydell wrote: > I think this is going to be difficult to review, to say the least. > > Where does your patch come from? Is the kernel's checkpatch.pl > just a single commit between 0.31 and 0.32 (surely not) or > a series of fixes? Yes, this is today's versi

Re: [Qemu-devel] [PATCH 1/6] xics: add flags for interrupts

2014-05-07 Thread Mike Day
+#define XICS_FLAGS_MSI 0x2 (nit) typo in the above comment Mike -- Mike Day | "Endurance is a Virtue"

Re: [Qemu-devel] [PATCH 2/6] xics: add find_server

2014-05-07 Thread Mike Day
Alexey Kardashevskiy writes: > PAPR allows having multiple interrupr servers. > typo above in the commit log entry, Mike -- Mike Day | "Endurance is a Virtue"

Re: [Qemu-devel] [PATCH v4 2/3] qemu-timer: make qemu_timer_mod_ns() and qemu_timer_del() thread-safe

2013-10-07 Thread Mike Day
a >> sensible option. > > I agree. Keeping the write side on the BQL is sane, but RCU-protecting > the read side actually makes the rules simpler. > > Mike, would you like to give it a shot? Yes, I will. I'll have a patchset for review within a couple of days. Mike

  1   2   >