Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
ab78f7ad
K
Kernel
项目概览
openeuler
/
Kernel
大约 1 年 前同步成功
通知
6
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
ab78f7ad
编写于
12月 17, 2010
作者:
J
Jeremy Fitzhardinge
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
xen/trace: add segment desc tracing
Signed-off-by:
N
Jeremy Fitzhardinge
<
jeremy.fitzhardinge@citrix.com
>
上级
5f94fb5b
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
90 addition
and
1 deletion
+90
-1
arch/x86/xen/enlighten.c
arch/x86/xen/enlighten.c
+15
-1
include/trace/events/xen.h
include/trace/events/xen.h
+75
-0
未找到文件。
arch/x86/xen/enlighten.c
浏览文件 @
ab78f7ad
...
...
@@ -341,6 +341,8 @@ static void xen_set_ldt(const void *addr, unsigned entries)
struct
mmuext_op
*
op
;
struct
multicall_space
mcs
=
xen_mc_entry
(
sizeof
(
*
op
));
trace_xen_cpu_set_ldt
(
addr
,
entries
);
op
=
mcs
.
args
;
op
->
cmd
=
MMUEXT_SET_LDT
;
op
->
arg1
.
linear_addr
=
(
unsigned
long
)
addr
;
...
...
@@ -496,6 +498,8 @@ static void xen_write_ldt_entry(struct desc_struct *dt, int entrynum,
xmaddr_t
mach_lp
=
arbitrary_virt_to_machine
(
&
dt
[
entrynum
]);
u64
entry
=
*
(
u64
*
)
ptr
;
trace_xen_cpu_write_ldt_entry
(
dt
,
entrynum
,
entry
);
preempt_disable
();
xen_mc_flush
();
...
...
@@ -565,6 +569,8 @@ static void xen_write_idt_entry(gate_desc *dt, int entrynum, const gate_desc *g)
unsigned
long
p
=
(
unsigned
long
)
&
dt
[
entrynum
];
unsigned
long
start
,
end
;
trace_xen_cpu_write_idt_entry
(
dt
,
entrynum
,
g
);
preempt_disable
();
start
=
__this_cpu_read
(
idt_desc
.
address
);
...
...
@@ -619,6 +625,8 @@ static void xen_load_idt(const struct desc_ptr *desc)
static
DEFINE_SPINLOCK
(
lock
);
static
struct
trap_info
traps
[
257
];
trace_xen_cpu_load_idt
(
desc
);
spin_lock
(
&
lock
);
__get_cpu_var
(
idt_desc
)
=
*
desc
;
...
...
@@ -637,6 +645,8 @@ static void xen_load_idt(const struct desc_ptr *desc)
static
void
xen_write_gdt_entry
(
struct
desc_struct
*
dt
,
int
entry
,
const
void
*
desc
,
int
type
)
{
trace_xen_cpu_write_gdt_entry
(
dt
,
entry
,
desc
,
type
);
preempt_disable
();
switch
(
type
)
{
...
...
@@ -665,6 +675,8 @@ static void xen_write_gdt_entry(struct desc_struct *dt, int entry,
static
void
__init
xen_write_gdt_entry_boot
(
struct
desc_struct
*
dt
,
int
entry
,
const
void
*
desc
,
int
type
)
{
trace_xen_cpu_write_gdt_entry
(
dt
,
entry
,
desc
,
type
);
switch
(
type
)
{
case
DESC_LDT
:
case
DESC_TSS
:
...
...
@@ -684,7 +696,9 @@ static void __init xen_write_gdt_entry_boot(struct desc_struct *dt, int entry,
static
void
xen_load_sp0
(
struct
tss_struct
*
tss
,
struct
thread_struct
*
thread
)
{
struct
multicall_space
mcs
=
xen_mc_entry
(
0
);
struct
multicall_space
mcs
;
mcs
=
xen_mc_entry
(
0
);
MULTI_stack_switch
(
mcs
.
mc
,
__KERNEL_DS
,
thread
->
sp0
);
xen_mc_issue
(
PARAVIRT_LAZY_CPU
);
}
...
...
include/trace/events/xen.h
浏览文件 @
ab78f7ad
...
...
@@ -405,6 +405,81 @@ TRACE_EVENT(xen_mmu_pgd_unpin,
TP_printk
(
"mm %p pgd %p"
,
__entry
->
mm
,
__entry
->
pgd
)
);
/* CPU */
TRACE_EVENT
(
xen_cpu_write_ldt_entry
,
TP_PROTO
(
struct
desc_struct
*
dt
,
int
entrynum
,
u64
desc
),
TP_ARGS
(
dt
,
entrynum
,
desc
),
TP_STRUCT__entry
(
__field
(
struct
desc_struct
*
,
dt
)
__field
(
int
,
entrynum
)
__field
(
u64
,
desc
)
),
TP_fast_assign
(
__entry
->
dt
=
dt
;
__entry
->
entrynum
=
entrynum
;
__entry
->
desc
=
desc
;
),
TP_printk
(
"dt %p entrynum %d entry %016llx"
,
__entry
->
dt
,
__entry
->
entrynum
,
(
unsigned
long
long
)
__entry
->
desc
)
);
TRACE_EVENT
(
xen_cpu_write_idt_entry
,
TP_PROTO
(
gate_desc
*
dt
,
int
entrynum
,
const
gate_desc
*
ent
),
TP_ARGS
(
dt
,
entrynum
,
ent
),
TP_STRUCT__entry
(
__field
(
gate_desc
*
,
dt
)
__field
(
int
,
entrynum
)
),
TP_fast_assign
(
__entry
->
dt
=
dt
;
__entry
->
entrynum
=
entrynum
;
),
TP_printk
(
"dt %p entrynum %d"
,
__entry
->
dt
,
__entry
->
entrynum
)
);
TRACE_EVENT
(
xen_cpu_load_idt
,
TP_PROTO
(
const
struct
desc_ptr
*
desc
),
TP_ARGS
(
desc
),
TP_STRUCT__entry
(
__field
(
unsigned
long
,
addr
)
),
TP_fast_assign
(
__entry
->
addr
=
desc
->
address
),
TP_printk
(
"addr %lx"
,
__entry
->
addr
)
);
TRACE_EVENT
(
xen_cpu_write_gdt_entry
,
TP_PROTO
(
struct
desc_struct
*
dt
,
int
entrynum
,
const
void
*
desc
,
int
type
),
TP_ARGS
(
dt
,
entrynum
,
desc
,
type
),
TP_STRUCT__entry
(
__field
(
u64
,
desc
)
__field
(
struct
desc_struct
*
,
dt
)
__field
(
int
,
entrynum
)
__field
(
int
,
type
)
),
TP_fast_assign
(
__entry
->
dt
=
dt
;
__entry
->
entrynum
=
entrynum
;
__entry
->
desc
=
*
(
u64
*
)
desc
;
__entry
->
type
=
type
;
),
TP_printk
(
"dt %p entrynum %d type %d desc %016llx"
,
__entry
->
dt
,
__entry
->
entrynum
,
__entry
->
type
,
(
unsigned
long
long
)
__entry
->
desc
)
);
TRACE_EVENT
(
xen_cpu_set_ldt
,
TP_PROTO
(
const
void
*
addr
,
unsigned
entries
),
TP_ARGS
(
addr
,
entries
),
TP_STRUCT__entry
(
__field
(
const
void
*
,
addr
)
__field
(
unsigned
,
entries
)
),
TP_fast_assign
(
__entry
->
addr
=
addr
;
__entry
->
entries
=
entries
),
TP_printk
(
"addr %p entries %u"
,
__entry
->
addr
,
__entry
->
entries
)
);
#endif
/* _TRACE_XEN_H */
/* This part must be outside protection */
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录