AArch64 TCG User Mode
cover AArch64 TCG User Mode
This series implements TCG User Mode for Aarch64.
It requires the reviewed but not committed yet series "[PATCH v4 0/3] ARM aarch64 TCG target" at:
http://lists.nongnu.org/archive/html/qemu-devel/2013-05/msg04200.html
It also requires the reviewed but not committed yet series "[PATCH 0/4] aarch64 TCG tlb fast lookup prerequisites" at:
http://lists.gnu.org/archive/html/qemu-devel/2013-06/msg00170.html
It also requires Peter's two linux-user changesets:
"[PATCH] linux-user: Allow getdents to be provided by getden" at:
http://lists.gnu.org/archive/html/qemu-devel/2013-06/msg00398.html
"[PATCH 0/2] linux-user: Drop direct use of openat etc sysca" at:
http://lists.gnu.org/archive/html/qemu-devel/2013-06/msg00015.html
Tested running on a x86-64 physical machine running Foundation v8, running a linux 3.8.0-rc6+ minimal host system based on linaro v8 image 201301271620 for user space.
Tested guest binaries: x86-64 small binary, PPC 'ls' binary from debian
Claudio Fontana (2):
user-exec.c: aarch64 initial implementation of cpu_signal_handler tcg/aarch64: implement user mode qemu ld/st
configure | 2 +- tcg/aarch64/tcg-target.c | 121 +++++++++++++++++++++++++++++++++++++++++++++-- user-exec.c | 15 ++++++ 3 files changed, 132 insertions(+), 6 deletions(-)
Signature · 1 line
1.8.1
PATCH 1/2 user-exec.c: aarch64 initial implementation of cpu_signal_handler
--- user-exec.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
user-exec.c +15 -0
@@ -448,6 +448,21 @@ int cpu_signal_handler(int host_signum, void *pinfo, &uc->uc_sigmask, puc); } +#elif defined(__aarch64__) + +int cpu_signal_handler (int host_signum,void *pinfo, +void *puc) +{ +siginfo_t *info = pinfo; +struct ucontext *uc = puc; +uint64_t pc; +int is_write =0 ;/* XXX how to determine? */ + + pc = uc->uc_mcontext.pc; +return handle_cpu_signal (pc, (uint64_t )info->si_addr, + is_write, &uc->uc_sigmask, puc); +} +#elif defined(__mc68000) int cpu_signal_handler(int host_signum, void *pinfo,
Signature · 1 line
1.8.1
Re: [Qemu-devel] [PATCH 1/2] user-exec.c: aarch64 initial implementation of cpu_signal_handler
Quoted 14 lines · Claudio Fontana
Signed-off-by Claudio Fontana <[email protected]>--- user-exec.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+)user-exec.c +0
-0@@ -448,6 +448,21 @@ int cpu_signal_handler(int host_signum, void *pinfo, &uc->uc_sigmask, puc); }
user-exec.c int cpu_signal_handler(int host_signum, void *pinfo, · line 459
Quoted 10 lines
user-exec.c +9
-0+#elif defined(__aarch64__) + +int cpu_signal_handler (int host_signum,void *pinfo, +void *puc) +{ +siginfo_t *info = pinfo; +struct ucontext *uc = puc; +uint64_t pc; +int is_write =0 ;/* XXX how to determine? */
The long-term answer to this XXX, incidentally, is that I need to persuade the kernel folk to expose the ESR (or at a minimum its WnR bit) to userspace. For the moment, always-0 is what other archs are doing here. (I'd rather not get into the "read and interpret faulting instruction" game if we can get the kernel fixed, given we're at a pretty early stage in aarch64 adoption/rollout.)
user-exec.c int cpu_signal_handler(int host_signum, void *pinfo, · line 465
Quoted 6 lines
user-exec.c +6
-0+ + pc = uc->uc_mcontext.pc; +return handle_cpu_signal (pc, (uint64_t )info->si_addr, + is_write, &uc->uc_sigmask, puc); +} +
-- PMM
PATCH 2/2 tcg/aarch64: implement user mode qemu ld/st
In reply to Claudio FontanaFrom: Jani Kokkonen <[email protected]>
also put aarch64 in the list of archs that do not need an ldscript.
--- configure | 2 +- tcg/aarch64/tcg-target.c | 121 +++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 117 insertions(+), 6 deletions(-)
configure +1 -1
@@ -4499,7 +4499,7 @@ fi if test "$target_linux_user" = "yes" -o "$target_bsd_user" = "yes" ; then case "$ARCH" in - alpha | s390x) + alpha | s390x | aarch64) # The default placement of the application is fine. ;; *)
tcg/aarch64/tcg-target.c +116 -5
160 lines not on this page · raw message
Signature · 1 line
1.8.1
Quoted 25 lines · Claudio Fontana
This series implements TCG User Mode for Aarch64.
It requires the reviewed but not committed yet series "[PATCH v4 0/3] ARM aarch64 TCG target" at:
http://lists.nongnu.org/archive/html/qemu-devel/2013-05/msg04200.htmlIt also requires the reviewed but not committed yet series "[PATCH 0/4] aarch64 TCG tlb fast lookup prerequisites" at:
http://lists.gnu.org/archive/html/qemu-devel/2013-06/msg00170.htmlIt also requires Peter's two linux-user changesets:
"[PATCH] linux-user: Allow getdents to be provided by getden" at:
http://lists.gnu.org/archive/html/qemu-devel/2013-06/msg00398.html"[PATCH 0/2] linux-user: Drop direct use of openat etc sysca" at:
http://lists.gnu.org/archive/html/qemu-devel/2013-06/msg00015.htmlTested running on a x86-64 physical machine running Foundation v8, running a linux 3.8.0-rc6+ minimal host system based on linaro v8 image 201301271620 for user space.
Tested guest binaries: x86-64 small binary, PPC 'ls' binary from debian
Quoted 9 lines
Claudio Fontana (2):
user-exec.c: aarch64 initial implementation ofcpu_signal_handlertcg/aarch64: implement user mode qemu ld/stconfigure | 2 +- tcg/aarch64/tcg-target.c | 121 +++++++++++++++++++++++++++++++++++++++++++++-- user-exec.c | 15 ++++++ 3 files changed, 132 insertions(+), 6 deletions(-)
r~