Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
qemu
提交
6f03bef0
Q
qemu
项目概览
openeuler
/
qemu
通知
10
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Q
qemu
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
6f03bef0
编写于
8月 26, 2013
作者:
A
Andreas Färber
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
cpu: Move jmp_env field from CPU_COMMON to CPUState
Signed-off-by:
N
Andreas Färber
<
afaerber@suse.de
>
上级
8cd70437
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
9 addition
and
6 deletion
+9
-6
cpu-exec.c
cpu-exec.c
+5
-3
include/exec/cpu-defs.h
include/exec/cpu-defs.h
+0
-2
include/qom/cpu.h
include/qom/cpu.h
+2
-0
user-exec.c
user-exec.c
+2
-1
未找到文件。
cpu-exec.c
浏览文件 @
6f03bef0
...
...
@@ -28,7 +28,7 @@ void cpu_loop_exit(CPUArchState *env)
CPUState
*
cpu
=
ENV_GET_CPU
(
env
);
cpu
->
current_tb
=
NULL
;
siglongjmp
(
env
->
jmp_env
,
1
);
siglongjmp
(
cpu
->
jmp_env
,
1
);
}
/* exit the current TB from a signal handler. The host registers are
...
...
@@ -37,10 +37,12 @@ void cpu_loop_exit(CPUArchState *env)
#if defined(CONFIG_SOFTMMU)
void
cpu_resume_from_signal
(
CPUArchState
*
env
,
void
*
puc
)
{
CPUState
*
cpu
=
ENV_GET_CPU
(
env
);
/* XXX: restore cpu registers saved in host registers */
env
->
exception_index
=
-
1
;
siglongjmp
(
env
->
jmp_env
,
1
);
siglongjmp
(
cpu
->
jmp_env
,
1
);
}
#endif
...
...
@@ -284,7 +286,7 @@ int cpu_exec(CPUArchState *env)
/* prepare setjmp context for exception handling */
for
(;;)
{
if
(
sigsetjmp
(
env
->
jmp_env
,
0
)
==
0
)
{
if
(
sigsetjmp
(
cpu
->
jmp_env
,
0
)
==
0
)
{
/* if an exception is pending, we execute it here */
if
(
env
->
exception_index
>=
0
)
{
if
(
env
->
exception_index
>=
EXCP_INTERRUPT
)
{
...
...
include/exec/cpu-defs.h
浏览文件 @
6f03bef0
...
...
@@ -24,7 +24,6 @@
#endif
#include "config.h"
#include <setjmp.h>
#include <inttypes.h>
#include "qemu/osdep.h"
#include "qemu/queue.h"
...
...
@@ -141,7 +140,6 @@ typedef struct CPUWatchpoint {
CPUWatchpoint *watchpoint_hit; \
\
/* Core interrupt code */
\
sigjmp_buf jmp_env; \
int exception_index; \
\
/* user data */
\
...
...
include/qom/cpu.h
浏览文件 @
6f03bef0
...
...
@@ -21,6 +21,7 @@
#define QEMU_CPU_H
#include <signal.h>
#include <setjmp.h>
#include "hw/qdev-core.h"
#include "exec/hwaddr.h"
#include "qemu/queue.h"
...
...
@@ -216,6 +217,7 @@ struct CPUState {
uint32_t
interrupt_request
;
int
singlestep_enabled
;
int64_t
icount_extra
;
sigjmp_buf
jmp_env
;
AddressSpace
*
as
;
MemoryListener
*
tcg_as_listener
;
...
...
user-exec.c
浏览文件 @
6f03bef0
...
...
@@ -52,6 +52,7 @@ static void exception_action(CPUArchState *env1)
*/
void
cpu_resume_from_signal
(
CPUArchState
*
env1
,
void
*
puc
)
{
CPUState
*
cpu
=
ENV_GET_CPU
(
env1
);
#ifdef __linux__
struct
ucontext
*
uc
=
puc
;
#elif defined(__OpenBSD__)
...
...
@@ -71,7 +72,7 @@ void cpu_resume_from_signal(CPUArchState *env1, void *puc)
#endif
}
env1
->
exception_index
=
-
1
;
siglongjmp
(
env1
->
jmp_env
,
1
);
siglongjmp
(
cpu
->
jmp_env
,
1
);
}
/* 'pc' is the host PC at which the exception was raised. 'address' is
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录