From: "Alex Bennée" <alex.bennee@linaro.org>
To: qemu-devel@nongnu.org
Cc: richard.henderson@linaro.org, peter.maydell@linaro.org,
pbonzini@redhat.com, "Alex Bennée" <alex.bennee@linaro.org>,
"Peter Crosthwaite" <crosthwaite.peter@gmail.com>,
"Richard Henderson" <rth@twiddle.net>
Subject: [Qemu-devel] [RFC PATCH 1/6] accel/tcg: export some cputlb functions
Date: Fri, 20 Apr 2018 16:50:40 +0100 [thread overview]
Message-ID: <20180420155045.18862-2-alex.bennee@linaro.org> (raw)
In-Reply-To: <20180420155045.18862-1-alex.bennee@linaro.org>
In preparation for having softmmu helpers in their own file rather
than generated as part of softmmu-template.h we need to make a couple
of helper functions public outside of cputlb.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
accel/tcg/cputlb.c | 19 ++++++++++---------
accel/tcg/cputlb.h | 20 ++++++++++++++++++++
2 files changed, 30 insertions(+), 9 deletions(-)
create mode 100644 accel/tcg/cputlb.h
diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c
index 05439039e9..43a89d3010 100644
--- a/accel/tcg/cputlb.c
+++ b/accel/tcg/cputlb.c
@@ -20,6 +20,7 @@
#include "qemu/osdep.h"
#include "qemu/main-loop.h"
#include "cpu.h"
+#include "cputlb.h"
#include "exec/exec-all.h"
#include "exec/memory.h"
#include "exec/address-spaces.h"
@@ -760,9 +761,9 @@ static inline ram_addr_t qemu_ram_addr_from_host_nofail(void *ptr)
return ram_addr;
}
-static uint64_t io_readx(CPUArchState *env, CPUIOTLBEntry *iotlbentry,
- int mmu_idx,
- target_ulong addr, uintptr_t retaddr, int size)
+uint64_t io_readx(CPUArchState *env, CPUIOTLBEntry *iotlbentry,
+ int mmu_idx,
+ target_ulong addr, uintptr_t retaddr, int size)
{
CPUState *cpu = ENV_GET_CPU(env);
hwaddr physaddr = iotlbentry->addr;
@@ -796,10 +797,10 @@ static uint64_t io_readx(CPUArchState *env, CPUIOTLBEntry *iotlbentry,
return val;
}
-static void io_writex(CPUArchState *env, CPUIOTLBEntry *iotlbentry,
- int mmu_idx,
- uint64_t val, target_ulong addr,
- uintptr_t retaddr, int size)
+void io_writex(CPUArchState *env, CPUIOTLBEntry *iotlbentry,
+ int mmu_idx,
+ uint64_t val, target_ulong addr,
+ uintptr_t retaddr, int size)
{
CPUState *cpu = ENV_GET_CPU(env);
hwaddr physaddr = iotlbentry->addr;
@@ -831,8 +832,8 @@ static void io_writex(CPUArchState *env, CPUIOTLBEntry *iotlbentry,
/* Return true if ADDR is present in the victim tlb, and has been copied
back to the main tlb. */
-static bool victim_tlb_hit(CPUArchState *env, size_t mmu_idx, size_t index,
- size_t elt_ofs, target_ulong page)
+bool victim_tlb_hit(CPUArchState *env, size_t mmu_idx, size_t index,
+ size_t elt_ofs, target_ulong page)
{
size_t vidx;
for (vidx = 0; vidx < CPU_VTLB_SIZE; ++vidx) {
diff --git a/accel/tcg/cputlb.h b/accel/tcg/cputlb.h
new file mode 100644
index 0000000000..4645693eb5
--- /dev/null
+++ b/accel/tcg/cputlb.h
@@ -0,0 +1,20 @@
+/*
+ * CPU TLB Helperss
+ */
+
+#ifndef CPUTLB_H
+#define CPUTBL_H
+
+uint64_t io_readx(CPUArchState *env, CPUIOTLBEntry *iotlbentry,
+ int mmu_idx,
+ target_ulong addr, uintptr_t retaddr, int size);
+
+void io_writex(CPUArchState *env, CPUIOTLBEntry *iotlbentry,
+ int mmu_idx,
+ uint64_t val, target_ulong addr,
+ uintptr_t retaddr, int size);
+
+bool victim_tlb_hit(CPUArchState *env, size_t mmu_idx, size_t index,
+ size_t elt_ofs, target_ulong page);
+
+#endif
--
2.17.0
next prev parent reply other threads:[~2018-04-20 15:50 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-20 15:50 [Qemu-devel] [RFC PATCH 0/6] Convert softmmu-template into normal code Alex Bennée
2018-04-20 15:50 ` Alex Bennée [this message]
2018-04-20 15:50 ` [Qemu-devel] [RFC PATCH 2/6] accel/tcg: new softmmu.c with DATA_SIZE=1 Alex Bennée
2018-04-20 15:50 ` [Qemu-devel] [RFC PATCH 3/6] accel/tcg: add DATA_SIZE = 2 to softmmu Alex Bennée
2018-04-20 15:50 ` [Qemu-devel] [RFC PATCH 4/6] accel/tcg: create load_helper Alex Bennée
2018-04-20 15:50 ` [Qemu-devel] [RFC PATCH 5/6] accel/tcg: create store_helper Alex Bennée
2018-04-20 15:50 ` [Qemu-devel] [RFC PATCH 6/6] accel/tcg: convert 4/8 byte access and remove softmmu_template Alex Bennée
2018-04-20 21:36 ` Richard Henderson
2018-04-20 16:01 ` [Qemu-devel] [RFC PATCH 0/6] Convert softmmu-template into normal code no-reply
2018-04-20 16:05 ` no-reply
2018-04-20 16:16 ` Paolo Bonzini
2018-04-20 16:22 ` Peter Maydell
2018-04-20 16:26 ` no-reply
2018-04-20 18:35 ` Emilio G. Cota
2018-04-20 18:43 ` Alex Bennée
2018-04-20 19:11 ` Philippe Mathieu-Daudé
2018-04-20 20:02 ` Emilio G. Cota
2018-04-20 19:17 ` Alex Bennée
2018-04-23 10:35 ` Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180420155045.18862-2-alex.bennee@linaro.org \
--to=alex.bennee@linaro.org \
--cc=crosthwaite.peter@gmail.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=rth@twiddle.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).