burcu flavor to the one that QEMU's RCU is using.
Note that the rcutorture under test/ doesn't work with --enable-liburcu,
since it relies on some internals of QEMU's RCU. liburcu is tested with
the urcutorture distributed with it.
Signed-off-by: Emilio G. Cota
---
config
Hi Paolo + all,
First off, thanks for your ongoing RCU work, which I'm closely
following.
As you stated in the initial RCU patch (7911747b), the intent
is to keep the same API as liburcu's. I checked whether this
was the case and found a couple of issues that I'm addressing
in the appended series
between
liburcu and QEMU's RCU implementation.
Signed-off-by: Emilio G. Cota
---
docs/rcu.txt | 21 ++---
include/qemu/rcu.h | 6 +++---
memory.c | 4 ++--
util/rcu.c | 2 +-
4 files changed, 16 insertions(+), 17 deletions(-)
diff --git a/docs/rcu
This matches the semantics of liburcu.
Signed-off-by: Emilio G. Cota
---
docs/rcu.txt | 33 +++--
include/qemu/atomic.h | 35 ++-
memory.c | 6 +++---
tests/rcutorture.c| 4 ++--
4 files changed, 38
On Wed, Feb 04, 2015 at 11:01:00 +0100, Paolo Bonzini wrote:
> On 03/02/2015 23:08, Emilio G. Cota wrote:
> > This matches the semantics of liburcu.
>
> This is not necessary. The two sets of macros are exactly the same, so
> it's okay to use atomic_rcu_read/write.
They&
On Wed, Feb 04, 2015 at 11:32:57 +0100, Paolo Bonzini wrote:
> On 03/02/2015 23:08, Emilio G. Cota wrote:
> > * The first two patches bring back the RCU API to exactly
> > match that of liburcu.
>
> Bringing over rcu_dereference/rcu_assign_pointer is unnecessary, I
>
On Wed, Feb 04, 2015 at 22:17:44 +0100, Paolo Bonzini wrote:
> > What I'm investigating now is how to do this in a manner that is palatable
> > to upstream. For this as it's well known we need a multi-threaded TCG,
> > and I believe quite a few bits from liburcu(-cds) might help to
> > get there.
>
It always evaluates to true.
Signed-off-by: Emilio G. Cota
---
translate-all.c | 4
1 file changed, 4 deletions(-)
diff --git a/translate-all.c b/translate-all.c
index 9f47ce7..11763c6 100644
--- a/translate-all.c
+++ b/translate-all.c
@@ -1334,8 +1334,6 @@ static inline void
Note that this test
if (b & ((1 << len) - 1))
can be simplified to
if (b & 1)
, since we know that iff the first bit of a tb is set,
all other bits from that tb are set too.
Signed-off-by: Emilio G. Cota
---
translate-all.c | 39 +
This brings down the size of the struct from 56 to 48 bytes.
Signed-off-by: Emilio G. Cota
---
tcg/tcg.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tcg/tcg.h b/tcg/tcg.h
index add7f75..3276924 100644
--- a/tcg/tcg.h
+++ b/tcg/tcg.h
@@ -429,8 +429,8 @@ typedef struct
Suggested-by: Paolo Bonzini
Signed-off-by: Emilio G. Cota
---
target-i386/cpu.h | 2 --
translate-all.c | 4
2 files changed, 6 deletions(-)
diff --git a/target-i386/cpu.h b/target-i386/cpu.h
index 15db6d7..4ee12ca 100644
--- a/target-i386/cpu.h
+++ b/target-i386/cpu.h
@@ -31,8 +31,6
igned-off-by: Emilio G. Cota
---
tcg/tcg.h | 22 +-
1 file changed, 13 insertions(+), 9 deletions(-)
diff --git a/tcg/tcg.h b/tcg/tcg.h
index add7f75..71ae7b2 100644
--- a/tcg/tcg.h
+++ b/tcg/tcg.h
@@ -193,7 +193,7 @@ typedef struct TCGPool {
typedef enum TCGType
e able to
> do a compile time check if TCG_TYPE_COUNT doesn't fit into
> TCG_TYPE_NR_BITS?
> > +#define TEMP_VAL_NR_BITS 2
>
> A similar compile time check could be added here.
Ack, addressed below.
On Fri, Mar 27, 2015 at 07:58:06 -0700, Richard Henderson wrote:
>
( +- 0.30% )
Suggested-by: Stefan Weil
Suggested-by: Richard Henderson
Signed-off-by: Emilio G. Cota
---
tcg/tcg.h | 26 ++
1 file changed, 14 insertions(+), 12 deletions(-)
diff --git a/tcg/tcg.h b/tcg/tcg.h
index add7f75..7f95132 100644
---
On Sat, Mar 21, 2015 at 02:25:42 -0400, Emilio G. Cota wrote:
> Note that this test
> if (b & ((1 << len) - 1))
> can be simplified to
> if (b & 1)
> , since we know that iff the first bit of a tb is set,
> all other bits from that tb are set too.
&g
Since commit
b7b5233a "bsd-user/mmap.c: Don't try to override g_malloc/g_free"
the exception we make here for usermode has been unnecessary.
Get rid of it.
Signed-off-by: Emilio G. Cota
---
translate-all.c | 18 ++
1 file changed, 2 insertions(+), 16 deletions
Since commit
b7b5233a "bsd-user/mmap.c: Don't try to override g_malloc/g_free"
the exception we make here for usermode has been unnecessary.
Get rid of it.
Signed-off-by: Emilio G. Cota
---
translate-all.c | 18 ++
1 file changed, 2 insertions(+), 16 deletions
Since commit
b7b5233a "bsd-user/mmap.c: Don't try to override g_malloc/g_free"
the exception we make here for usermode has been unnecessary.
Get rid of it.
Signed-off-by: Emilio G. Cota
---
translate-all.c | 18 ++
1 file changed, 2 insertions(+), 16 deletions
The callers have just looked up the page descriptor, so there's no
point in searching again for it.
Signed-off-by: Emilio G. Cota
---
translate-all.c | 11 +++
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/translate-all.c b/translate-all.c
index 11763c6..4d05898 1
On Wed, Apr 22, 2015 at 15:13:05 +0200, Paolo Bonzini wrote:
> On 21/03/2015 07:25, Emilio G. Cota wrote:
> > Note that this test
> > if (b & ((1 << len) - 1))
> > can be simplified to
> > if (b & 1)
> > , since we know that iff the first bit
Here we have an open-coded byte-based bitmap implementation.
Get rid of it since there's a ulong-based implementation to be
used by all code.
Signed-off-by: Emilio G. Cota
---
translate-all.c | 40 +++-
1 file changed, 7 insertions(+), 33 deletions(-)
On Wed, Apr 22, 2015 at 22:30:23 +0200, Paolo Bonzini wrote:
> On 22/04/2015 18:53, Emilio G. Cota wrote:
> > @@ -1221,8 +1194,9 @@ void tb_invalidate_phys_page_fast(tb_page_addr_t
> > start, int len)
> > return;
> > }
> > if (p->code_b
Here we have an open-coded byte-based bitmap implementation.
Get rid of it since there's a ulong-based implementation to be
used by all code.
Signed-off-by: Emilio G. Cota
---
translate-all.c | 42 +-
1 file changed, 9 insertions(+), 33 deletions(-)
It's defined in osdep.h and shouldn't be redefined here.
Signed-off-by: Emilio G. Cota
---
tests/i440fx-test.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/tests/i440fx-test.c b/tests/i440fx-test.c
index d0bc8de..33a7ecb 100644
--- a/tests/i440fx-test.c
+++ b/tests/i44
On Sun, Apr 26, 2015 at 19:18:41 -0700, Peter Crosthwaite wrote:
> On Sun, Apr 26, 2015 at 3:04 PM, Emilio G. Cota wrote:
> > It's defined in osdep.h and shouldn't be redefined here.
> >
> > Signed-off-by: Emilio G. Cota
>
>
> Reviewed-by: Peter Crost
Signed-off-by: Emilio G. Cota
---
cpus.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cpus.c b/cpus.c
index e6dcae3..62d157a 100644
--- a/cpus.c
+++ b/cpus.c
@@ -1016,7 +1016,7 @@ static void *qemu_tcg_cpu_thread_fn(void *arg)
qemu_cond_signal(&qemu_cpu_
Here is a hodge-podge of fixes for issues I found while reviewing
QTAILQ callers, with a .gitignore patch as a bonus.
Thanks,
Emilio
Signed-off-by: Emilio G. Cota
---
linux-user/elfload.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/linux-user/elfload.c b/linux-user/elfload.c
index 399c021..0ba9706 100644
--- a/linux-user/elfload.c
+++ b/linux-user/elfload.c
@@ -2887,8 +2887,7 @@ static int
Signed-off-by: Emilio G. Cota
---
.gitignore | 1 +
1 file changed, 1 insertion(+)
diff --git a/.gitignore b/.gitignore
index aed0e1f..025a841 100644
--- a/.gitignore
+++ b/.gitignore
@@ -62,6 +62,7 @@
*.fn
*.ky
*.log
+*.patch
*.pdf
*.pod
*.cps
--
1.9.1
Signed-off-by: Emilio G. Cota
---
ui/input-legacy.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/ui/input-legacy.c b/ui/input-legacy.c
index 2d4ca19..3e9bb38 100644
--- a/ui/input-legacy.c
+++ b/ui/input-legacy.c
@@ -57,8 +57,6 @@ struct QEMUPutLEDEntry {
static QTAILQ_HEAD
Signed-off-by: Emilio G. Cota
---
qemu-char.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/qemu-char.c b/qemu-char.c
index a405d76..d0c1564 100644
--- a/qemu-char.c
+++ b/qemu-char.c
@@ -973,7 +973,6 @@ typedef struct FDCharDriver {
CharDriverState *chr;
GIOChannel *fd_in
Signed-off-by: Emilio G. Cota
---
qemu-coroutine-lock.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/qemu-coroutine-lock.c b/qemu-coroutine-lock.c
index e4860ae..6b49033 100644
--- a/qemu-coroutine-lock.c
+++ b/qemu-coroutine-lock.c
@@ -108,7 +108,7 @@ bool
Hi Fred,
On Wed, Apr 22, 2015 at 14:26:14 +0200, Frederic Konrad wrote:
> git clone g...@git.greensocs.com:fkonrad/mttcg.git -b multi_tcg_v4
I've tried to run buildroot's vexpress-a9 with this, but unfortunately
it gets stuck before showing much progress towards boot:
[ messages in brackets are m
On Mon, Apr 27, 2015 at 12:28:00 -0600, Eric Blake wrote:
> On 04/27/2015 12:11 PM, Peter Crosthwaite wrote:
> > This Issue is discussed and I think it was concluded to not gitignore
> > patches. See:
> >
> > commit f3a22014e94dfaacb57277dafce66b41cd994869
> > Author: Michael Tokarev
> > Date:
On Tue, Apr 28, 2015 at 11:06:37 +0200, Paolo Bonzini wrote:
> On 27/04/2015 19:06, Emilio G. Cota wrote:
> > Note that I'm running with -smp 1. My guess is that the iothread
> > is starved, since patch 472f4003 "Drop global lock during TCG code
> > execution&quo
the missing piece to have this patch finally merged?
Thanks,
Emilio
commit ad45e590025c1197a7aef5164e1ae174894b0969
Author: Emilio G. Cota
Date: Tue Apr 28 16:54:44 2015 -0400
configure: require __thread support
The codebase doesn't build without __thread support.
Forma
On Mon, May 11, 2015 at 11:10:05 +0200, alvise rigo wrote:
> the last commit was b8df9208f357d2b36e1b19634aea973618dc7ba8.
Thanks.
Unfortunately a segfault still happens very early:
$ gdb arm-softmmu/qemu-system-arm
GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2.1) 7.4-2012.04
Copyright (C) 2012 Fr
On Sun, Mar 15, 2015 at 16:10:21 -0700, Richard Henderson wrote:
> On 03/15/2015 03:00 AM, Emilio G. Cota wrote:
> > On a TLB hit this is trivial (just do nothing), but on
> > a TLB miss I'm lost on what to do--I cannot even follow
> > where helper_ld/st go (grep
On Sun, Mar 15, 2015 at 20:42:31 -0400, Emilio G. Cota wrote:
> On Sun, Mar 15, 2015 at 16:10:21 -0700, Richard Henderson wrote:
> > It goes into softmmu_template.h. Which then tests a victim tlb, and finally
> > calls tlb_fill. You'll probably need to do the same.
>
&g
On Mon, Mar 16, 2015 at 22:23:24 +, Peter Maydell wrote:
> On 16 March 2015 at 20:08, Emilio G. Cota wrote:
> > I fail to see why calling tlb_fill() from the helper causes
> > trouble. What I thought would happen is that the exception
> > (if any) is started from the
On Wed, Sep 30, 2015 at 06:44:32 +0200, Paolo Bonzini wrote:
> I have a doubt about your patches for ll/sc emulation, that I hope you
> can clarify.
>
> From 1ft, both approaches rely on checking a flag during stores.
> This is split between the TLB and the CPUState for Alvise's patches (in
>
On Wed, Aug 12, 2015 at 18:41:00 +0200, Paolo Bonzini wrote:
> page_find is reading the radix tree outside all locks, so it has to
> use the RCU primitives. It does not need RCU critical sections
> because the PageDescs are never removed, so there is never a need
> to wait for the end of code sect
On Thu, Aug 13, 2015 at 10:13:32 +0200, Paolo Bonzini wrote:
> On 12/08/2015 22:37, Emilio G. Cota wrote:
> > > page_find is reading the radix tree outside all locks, so it has to
> > > use the RCU primitives. It does not need RCU critical sections
> > > because t
On Tue, Sep 08, 2015 at 18:34:38 +0100, Alex Bennée wrote:
> Emilio G. Cota writes:
(snip)
> > +static void rcu_init_child(void)
> > +{
> > +qemu_mutex_init(&rcu_registry_lock);
> > +}
> > #endif
> >
> > void rcu_after_fork(void)
On Thu, Sep 10, 2015 at 14:22:49 +0100, Alex Bennée wrote:
> Emilio G. Cota writes:
>
> > Signed-off-by: Emilio G. Cota
> > ---
> > util/qemu-thread-posix.c | 11 ++-
> > 1 file changed, 10 insertions(+), 1 deletion(-)
> >
> > diff --git a/u
On Thu, Sep 10, 2015 at 14:49:07 +0100, Alex Bennée wrote:
> Emilio G. Cota writes:
>
> > Having the physical address in the TLB entry will allow us
> > to portably obtain the physical address of a memory access,
> > which will prove useful when implementing a scalable
On Thu, Sep 10, 2015 at 15:25:50 +0100, Alex Bennée wrote:
>
> Emilio G. Cota writes:
>
> > This will be used by atomic instruction emulation code.
>
> If we are adding utility functions into the code base like this (which I
> can see being useful) we should at leas
On Thu, Sep 10, 2015 at 17:01:14 +0100, Alex Bennée wrote:
>
> Emilio G. Cota writes:
>
> > Signed-off-by: Emilio G. Cota
> > ---
> > tcg/tcg-op.h | 10 ++
> > 1 file changed, 10 insertions(+)
> >
> > diff --git a/tcg/tcg-op.h b/tcg/tcg-op.
l1_map is based on physical addresses in full-system mode, as pointed
out in an earlier comment. Said comment also mentions that virtual
addresses are only used in l1_map in user-only mode.
Signed-off-by: Emilio G. Cota
---
translate-all.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions
Signed-off-by: Emilio G. Cota
---
cpu-exec.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/cpu-exec.c b/cpu-exec.c
index f53475c..b8a11e1 100644
--- a/cpu-exec.c
+++ b/cpu-exec.c
@@ -330,6 +330,7 @@ static TranslationBlock *tb_find_slow(CPUState *cpu,
if (!tb) {
tb
Having the physical address in the TLB entry will allow us
to portably obtain the physical address of a memory access,
which will prove useful when implementing a scalable emulation
of atomic instructions.
Signed-off-by: Emilio G. Cota
---
cputlb.c| 1 +
include/exec/cpu-defs.h
Signed-off-by: Emilio G. Cota
---
include/qemu/seqlock.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/qemu/seqlock.h b/include/qemu/seqlock.h
index 3ff118a..f1256f5 100644
--- a/include/qemu/seqlock.h
+++ b/include/qemu/seqlock.h
@@ -62,7 +62,7 @@ static inline
We were unlocking this lock after fork, which is wrong since
only the thread that holds a mutex is allowed to unlock it.
Signed-off-by: Emilio G. Cota
---
util/rcu.c | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/util/rcu.c b/util/rcu.c
index 8ba304d..47c2bce 100644
With this change we make sure that the compiler will not
optimise the read of the sequence number in any way.
Signed-off-by: Emilio G. Cota
---
include/qemu/seqlock.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/qemu/seqlock.h b/include/qemu/seqlock.h
index
This is a thread-local variable and therefore all changes
to it will be seen in order by the owning thread. There is
no need for it to be volatile.
Signed-off-by: Emilio G. Cota
---
translate-all.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/translate-all.c b/translate
So that it applies to usermode as well.
Signed-off-by: Emilio G. Cota
---
cpu-exec.c | 2 ++
cpus.c | 1 -
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/cpu-exec.c b/cpu-exec.c
index b8a11e1..2b9a447 100644
--- a/cpu-exec.c
+++ b/cpu-exec.c
@@ -386,6 +386,8 @@ int cpu_exec
Signed-off-by: Emilio G. Cota
---
tcg/tcg-op.c | 5 +
tcg/tcg-op.h | 18 ++
tcg/tcg-opc.h | 5 +
3 files changed, 28 insertions(+)
diff --git a/tcg/tcg-op.c b/tcg/tcg-op.c
index 45098c3..6d5b1df 100644
--- a/tcg/tcg-op.c
+++ b/tcg/tcg-op.c
@@ -57,6 +57,11 @@ static
Signed-off-by: Emilio G. Cota
---
tcg/tcg.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/tcg/tcg.h b/tcg/tcg.h
index 8d30d61..9a873ac 100644
--- a/tcg/tcg.h
+++ b/tcg/tcg.h
@@ -599,6 +599,7 @@ void tb_lock(void);
void tb_unlock(void);
bool tb_lock_recursive(void);
void tb_lock_reset
On some parallel workloads this gives up to a 15% speed improvement.
Signed-off-by: Emilio G. Cota
---
include/qemu/thread-posix.h | 47 ++
include/qemu/thread.h | 6 --
util/qemu-thread-posix.c| 50
So that the declaration of tb_lock can be found.
Signed-off-by: Emilio G. Cota
---
hw/i386/kvmvapic.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/i386/kvmvapic.c b/hw/i386/kvmvapic.c
index 1c3b5b6..a9a33fd 100644
--- a/hw/i386/kvmvapic.c
+++ b/hw/i386/kvmvapic.c
@@ -13,6 +13,7
Signed-off-by: Emilio G. Cota
---
tcg/tcg-op.h | 10 ++
1 file changed, 10 insertions(+)
diff --git a/tcg/tcg-op.h b/tcg/tcg-op.h
index 52482c0..3ec9f13 100644
--- a/tcg/tcg-op.h
+++ b/tcg/tcg-op.h
@@ -716,6 +716,16 @@ static inline void tcg_gen_fence_full(void)
tcg_gen_op0
Signed-off-by: Emilio G. Cota
---
linux-user/syscall.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index f62c698..732936f 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -4513,6 +4513,7 @@ static void *clone_func(void *arg
This will be used by the atomic instruction emulation code.
Signed-off-by: Emilio G. Cota
---
softmmu_template.h | 48
tcg/tcg.h | 5 +
2 files changed, 53 insertions(+)
diff --git a/softmmu_template.h b/softmmu_template.h
index
Signed-off-by: Emilio G. Cota
---
util/qemu-thread-posix.c | 11 ++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/util/qemu-thread-posix.c b/util/qemu-thread-posix.c
index 04dae0f..3760e27 100644
--- a/util/qemu-thread-posix.c
+++ b/util/qemu-thread-posix.c
@@ -303,7
Note that user-only uses mmap_lock for this.
Signed-off-by: Emilio G. Cota
---
translate-all.c | 31 +++
1 file changed, 23 insertions(+), 8 deletions(-)
diff --git a/translate-all.c b/translate-all.c
index e7b4a31..8f8c402 100644
--- a/translate-all.c
+++ b
This will be used by atomic instruction emulation code.
Signed-off-by: Emilio G. Cota
---
include/qemu/radix-tree.h | 29 ++
util/Makefile.objs| 2 +-
util/radix-tree.c | 75 +++
3 files changed, 105 insertions(+), 1
Signed-off-by: Emilio G. Cota
---
aie-helper.c | 112 ++
include/exec/cpu-defs.h | 5 +++
include/qemu/aie-helper.h | 6 +++
3 files changed, 123 insertions(+)
create mode 100644 aie-helper.c
create mode 100644 include/qemu/aie
Hi all,
Here is MTTCG code I've been working on out-of-tree for the last few months.
The patchset applies on top of pbonzini's mttcg branch, commit ca56de6f.
Fetch the branch from: https://github.com/bonzini/qemu/commits/mttcg
The highlights of the patchset are as follows:
- The first 5 patches
Signed-off-by: Emilio G. Cota
---
include/exec/gen-icount.h | 1 +
translate-all.c | 2 ++
2 files changed, 3 insertions(+)
diff --git a/include/exec/gen-icount.h b/include/exec/gen-icount.h
index 05d89d3..f429821 100644
--- a/include/exec/gen-icount.h
+++ b/include/exec/gen-icount.h
Signed-off-by: Emilio G. Cota
---
tcg/i386/tcg-target.c | 20
1 file changed, 20 insertions(+)
diff --git a/tcg/i386/tcg-target.c b/tcg/i386/tcg-target.c
index 887f22f..6600c45 100644
--- a/tcg/i386/tcg-target.c
+++ b/tcg/i386/tcg-target.c
@@ -1123,6 +1123,13 @@ static void
Signed-off-by: Emilio G. Cota
---
Makefile.target| 1 +
aie.c | 57 ++
include/qemu/aie.h | 49 ++
translate-all.c| 2 ++
4 files changed, 109 insertions(+)
create mode 100644
Signed-off-by: Emilio G. Cota
---
include/qemu/rcu.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/qemu/rcu.h b/include/qemu/rcu.h
index 7df1e86..f6d1d56 100644
--- a/include/qemu/rcu.h
+++ b/include/qemu/rcu.h
@@ -71,7 +71,7 @@ struct rcu_reader_data {
/* Data
Signed-off-by: Emilio G. Cota
---
cpu-exec.c| 34 --
include/qom/cpu.h | 1 +
2 files changed, 29 insertions(+), 6 deletions(-)
diff --git a/cpu-exec.c b/cpu-exec.c
index fd57b9c..a1700ac 100644
--- a/cpu-exec.c
+++ b/cpu-exec.c
@@ -371,6 +371,29
Otherwise after an exception we end up in a deadlock.
Signed-off-by: Emilio G. Cota
---
bsd-user/mmap.c | 12
cpu-exec.c | 1 +
include/exec/exec-all.h | 2 ++
linux-user/mmap.c | 8
4 files changed, 23 insertions(+)
diff --git a/bsd-user
This paves the way for a lockless tb_find_fast.
Signed-off-by: Emilio G. Cota
---
cpu-exec.c| 8 +++-
exec.c| 2 ++
include/qom/cpu.h | 15 +++
qom/cpu.c | 2 +-
translate-all.c | 32 +++-
5 files changed, 56
Signed-off-by: Emilio G. Cota
---
translate-all.c | 28
1 file changed, 28 insertions(+)
diff --git a/translate-all.c b/translate-all.c
index df65c83..e7b4a31 100644
--- a/translate-all.c
+++ b/translate-all.c
@@ -252,6 +252,8 @@ static int cpu_restore_state_from_tb
Signed-off-by: Emilio G. Cota
---
aie-helper.c | 3 +-
linux-user/main.c | 4 +-
target-i386/cpu.h | 3 -
target-i386/excp_helper.c | 7 ++
target-i386/helper.h | 6 +-
target-i386/mem_helper.c | 39 +++--
target-i386/translate.c | 217
While at it, add an assertion in tb_flush to check for tb_lock
being held.
Signed-off-by: Emilio G. Cota
---
translate-all.c | 40 +++-
1 file changed, 11 insertions(+), 29 deletions(-)
diff --git a/translate-all.c b/translate-all.c
index f3f7fb2..378517d
Signed-off-by: Emilio G. Cota
---
cputlb.c | 39 +++
1 file changed, 11 insertions(+), 28 deletions(-)
diff --git a/cputlb.c b/cputlb.c
index d81a4eb..717a856 100644
--- a/cputlb.c
+++ b/cputlb.c
@@ -145,41 +145,24 @@ void tlb_flush_page(CPUState *cpu
This avoids the chance of reading a corrupted list of CPUs in usermode.
Note: this breaks hw/ppc/spapr due to the removal of CPU_FOREACH_REVERSE.
Signed-off-by: Emilio G. Cota
---
exec.c | 16 ++--
include/qom/cpu.h| 15 +++
linux-user/main.c| 2
Signed-off-by: Emilio G. Cota
---
cputlb.c | 41 +++--
1 file changed, 11 insertions(+), 30 deletions(-)
diff --git a/cputlb.c b/cputlb.c
index 1b3673e..d81a4eb 100644
--- a/cputlb.c
+++ b/cputlb.c
@@ -73,43 +73,24 @@ void tlb_flush(CPUState *cpu, int
Signed-off-by: Emilio G. Cota
---
cpu-exec.c | 9 ++---
exec.c | 2 +-
hw/openrisc/cputimer.c | 2 +-
qom/cpu.c | 4 ++--
target-arm/helper-a64.c| 2 +-
target-arm/helper.c
significantly
because threads are most of the time just exiting the CPU loop,
thereby causing great contention on the BQL.
Fix it by reverting to the old behaviour by which no
interrupt is raised, which shouldn't be an issue given that
we have now one thread per VCPU.
Signed-off-by: Emilio G.
This will allow us to safely look up TB's without taking any locks.
Note however that tb_lock protects the valid field, so if chaining
is an option then we'll have to acquire the lock.
Signed-off-by: Emilio G. Cota
---
cpu-exec.c | 23 +++---
include/exec/
It has no callers left.
Signed-off-by: Emilio G. Cota
---
cpu-exec.c| 10 -
cpus.c| 64 +--
include/qom/cpu.h | 24 +
3 files changed, 2 insertions(+), 96 deletions(-)
diff --git a/cpu-exec.c b
Signed-off-by: Emilio G. Cota
---
cpu-exec.c | 89 +
exec.c | 4 +++
include/exec/exec-all.h | 5 +++
include/qom/cpu.h | 20 +++
tcg/tcg.h | 1 +
translate-all.c | 23
t be OK to just leave it alone.
Signed-off-by: Emilio G. Cota
---
cpu-exec.c | 21 +---
include/exec/exec-all.h | 12 +---
translate-all.c | 52 -
3 files changed, 43 insertions(+), 42 deletions(-)
diff -
On Mon, Aug 24, 2015 at 18:08:37 +0200, Artyom Tarasenko wrote:
> On Mon, Aug 24, 2015 at 2:23 AM, Emilio G. Cota wrote:
> > * tb_lock must be held every time code is generated. The rationale is
> > that most of the time QEMU is executing code, not generating it.
>
>
Note that the right place to call rcu_register_thread() is
do_cpu_loop() and not just in clone_func(), since the
original 'main' thread needs to call rcu_register_thread()
as well.
Signed-off-by: Emilio G. Cota
---
linux-user/qemu.h| 1 +
linux-user/syscall.c | 1 +
2 files
There are as many versions of cpu_loop as architectures supported,
so introduce here a helper that is common to all of them.
Signed-off-by: Emilio G. Cota
---
linux-user/main.c| 2 +-
linux-user/qemu.h| 6 ++
linux-user/syscall.c | 2 +-
3 files changed, 8 insertions(+), 2 deletions
Note: cannot compile bsd-user here (linux), please compile-test.
Signed-off-by: Emilio G. Cota
---
bsd-user/main.c | 2 +-
bsd-user/qemu.h | 6 ++
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/bsd-user/main.c b/bsd-user/main.c
index ee68daa..0bea358 100644
--- a/bsd-user
Signed-off-by: Emilio G. Cota
---
cpus.c | 32 +---
1 file changed, 13 insertions(+), 19 deletions(-)
diff --git a/cpus.c b/cpus.c
index 81dda93..fd9e903 100644
--- a/cpus.c
+++ b/cpus.c
@@ -922,18 +922,23 @@ static void qemu_kvm_wait_io_event(CPUState *cpu
On Sun, Aug 23, 2015 at 20:23:41 -0400, Emilio G. Cota wrote:
> Signed-off-by: Emilio G. Cota
> ---
> linux-user/syscall.c | 2 ++
> 1 file changed, 2 insertions(+)
Just noticed that this patch is incomplete, since the 'main' thread
doesn't get to call rcu_register_
On Sun, Aug 23, 2015 at 18:04:46 -0700, Paolo Bonzini wrote:
> On 23/08/2015 17:23, Emilio G. Cota wrote:
> > On some parallel workloads this gives up to a 15% speed improvement.
> >
> > Signed-off-by: Emilio G. Cota
> > ---
> >
On Sun, Aug 23, 2015 at 19:02:30 -0700, Paolo Bonzini wrote:
> On 23/08/2015 17:23, Emilio G. Cota wrote:
> > This will be used by the atomic instruction emulation code.
>
> Is this a fast path? If not, we can use the existing addend field and
> convert the host address to a
On Sun, Aug 23, 2015 at 18:32:51 -0700, Paolo Bonzini wrote:
>
>
> On 23/08/2015 17:23, Emilio G. Cota wrote:
> > +case INDEX_op_fence_load:
> > +tcg_out_fence(s, 0xe8);
> > +break;
> > +case INDEX_op_fence_full:
> > +tcg
On Mon, Aug 24, 2015 at 20:41:10 -0400, Emilio G. Cota wrote:
> Note: cannot compile bsd-user here (linux), please compile-test.
>
> Signed-off-by: Emilio G. Cota
> ---
(snip)
> diff --git a/bsd-user/qemu.h b/bsd-user/qemu.h
> index 5902614..751efd5 100644
> --- a/bsd-us
On Mon, Aug 24, 2015 at 22:30:03 -0400, Emilio G. Cota wrote:
> On Sun, Aug 23, 2015 at 18:04:46 -0700, Paolo Bonzini wrote:
> > On 23/08/2015 17:23, Emilio G. Cota wrote:
> (snip)
> > Applied, but in the end the spinlock will probably simply use a simple
> > test-and-test
On Sun, Aug 23, 2015 at 18:09:48 -0700, Paolo Bonzini wrote:
> On 23/08/2015 17:23, Emilio G. Cota wrote:
> > Signed-off-by: Emilio G. Cota
> > ---
> > cpu-exec.c | 9 ++---
> > exec.c | 2 +-
> > hw/ope
On Sun, Aug 23, 2015 at 19:01:39 -0700, Paolo Bonzini wrote:
> On 23/08/2015 17:23, Emilio G. Cota wrote:
> > Otherwise after an exception we end up in a deadlock.
>
> Can you explain better the path that exits cpu_exec with the lock taken?
In fact I cannot :-) So please ignore
1 - 100 of 2303 matches
Mail list logo