Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
qemu
提交
1b1ed8dc
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看板
提交
1b1ed8dc
编写于
12月 17, 2012
作者:
A
Andreas Färber
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
cpu: Move numa_node field to CPUState
Signed-off-by:
N
Andreas Färber
<
afaerber@suse.de
>
上级
66afd1ad
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
12 addition
and
7 deletion
+12
-7
cpus.c
cpus.c
+3
-1
exec.c
exec.c
+1
-3
hw/spapr.c
hw/spapr.c
+3
-1
include/exec/cpu-defs.h
include/exec/cpu-defs.h
+0
-1
include/qom/cpu.h
include/qom/cpu.h
+2
-0
monitor.c
monitor.c
+3
-1
未找到文件。
cpus.c
浏览文件 @
1b1ed8dc
...
...
@@ -1160,12 +1160,14 @@ static void tcg_exec_all(void)
void
set_numa_modes
(
void
)
{
CPUArchState
*
env
;
CPUState
*
cpu
;
int
i
;
for
(
env
=
first_cpu
;
env
!=
NULL
;
env
=
env
->
next_cpu
)
{
cpu
=
ENV_GET_CPU
(
env
);
for
(
i
=
0
;
i
<
nb_numa_nodes
;
i
++
)
{
if
(
test_bit
(
env
->
cpu_index
,
node_cpumask
[
i
]))
{
env
->
numa_node
=
i
;
cpu
->
numa_node
=
i
;
}
}
}
...
...
exec.c
浏览文件 @
1b1ed8dc
...
...
@@ -262,9 +262,7 @@ CPUArchState *qemu_get_cpu(int cpu)
void
cpu_exec_init
(
CPUArchState
*
env
)
{
#ifndef CONFIG_USER_ONLY
CPUState
*
cpu
=
ENV_GET_CPU
(
env
);
#endif
CPUArchState
**
penv
;
int
cpu_index
;
...
...
@@ -279,7 +277,7 @@ void cpu_exec_init(CPUArchState *env)
cpu_index
++
;
}
env
->
cpu_index
=
cpu_index
;
env
->
numa_node
=
0
;
cpu
->
numa_node
=
0
;
QTAILQ_INIT
(
&
env
->
breakpoints
);
QTAILQ_INIT
(
&
env
->
watchpoints
);
#ifndef CONFIG_USER_ONLY
...
...
hw/spapr.c
浏览文件 @
1b1ed8dc
...
...
@@ -140,6 +140,7 @@ static int spapr_fixup_cpu_dt(void *fdt, sPAPREnvironment *spapr)
{
int
ret
=
0
,
offset
;
CPUPPCState
*
env
;
CPUState
*
cpu
;
char
cpu_model
[
32
];
int
smt
=
kvmppc_smt_threads
();
uint32_t
pft_size_prop
[]
=
{
0
,
cpu_to_be32
(
spapr
->
htab_shift
)};
...
...
@@ -147,11 +148,12 @@ static int spapr_fixup_cpu_dt(void *fdt, sPAPREnvironment *spapr)
assert
(
spapr
->
cpu_model
);
for
(
env
=
first_cpu
;
env
!=
NULL
;
env
=
env
->
next_cpu
)
{
cpu
=
ENV_GET_CPU
(
env
);
uint32_t
associativity
[]
=
{
cpu_to_be32
(
0x5
),
cpu_to_be32
(
0x0
),
cpu_to_be32
(
0x0
),
cpu_to_be32
(
0x0
),
cpu_to_be32
(
env
->
numa_node
),
cpu_to_be32
(
cpu
->
numa_node
),
cpu_to_be32
(
env
->
cpu_index
)};
if
((
env
->
cpu_index
%
smt
)
!=
0
)
{
...
...
include/exec/cpu-defs.h
浏览文件 @
1b1ed8dc
...
...
@@ -195,7 +195,6 @@ typedef struct CPUWatchpoint {
CPUArchState *next_cpu;
/* next CPU sharing TB cache */
\
int cpu_index;
/* CPU index (informative) */
\
uint32_t host_tid;
/* host thread ID */
\
int numa_node;
/* NUMA node this cpu is belonging to */
\
int running;
/* Nonzero if cpu is currently running(usermode). */
\
/* user data */
\
void *opaque; \
...
...
include/qom/cpu.h
浏览文件 @
1b1ed8dc
...
...
@@ -59,6 +59,7 @@ struct kvm_run;
* CPUState:
* @nr_cores: Number of cores within this CPU package.
* @nr_threads: Number of threads within this CPU.
* @numa_node: NUMA node this CPU is belonging to.
* @created: Indicates whether the CPU thread has been successfully created.
* @stop: Indicates a pending stop request.
* @stopped: Indicates the CPU has been artificially stopped.
...
...
@@ -73,6 +74,7 @@ struct CPUState {
int
nr_cores
;
int
nr_threads
;
int
numa_node
;
struct
QemuThread
*
thread
;
#ifdef _WIN32
...
...
monitor.c
浏览文件 @
1b1ed8dc
...
...
@@ -1783,12 +1783,14 @@ static void do_info_numa(Monitor *mon)
{
int
i
;
CPUArchState
*
env
;
CPUState
*
cpu
;
monitor_printf
(
mon
,
"%d nodes
\n
"
,
nb_numa_nodes
);
for
(
i
=
0
;
i
<
nb_numa_nodes
;
i
++
)
{
monitor_printf
(
mon
,
"node %d cpus:"
,
i
);
for
(
env
=
first_cpu
;
env
!=
NULL
;
env
=
env
->
next_cpu
)
{
if
(
env
->
numa_node
==
i
)
{
cpu
=
ENV_GET_CPU
(
env
);
if
(
cpu
->
numa_node
==
i
)
{
monitor_printf
(
mon
,
" %d"
,
env
->
cpu_index
);
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录