Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
kernel_linux
提交
98001d8d
K
kernel_linux
项目概览
OpenHarmony
/
kernel_linux
上一次同步 3 年多
通知
13
Star
8
Fork
2
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
kernel_linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
98001d8d
编写于
5月 13, 2010
作者:
A
Avi Kivity
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
KVM: PPC: Add missing vcpu_load()/vcpu_put() in vcpu ioctls
Signed-off-by:
N
Avi Kivity
<
avi@redhat.com
>
上级
3dbe1415
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
24 addition
and
1 deletion
+24
-1
arch/powerpc/kvm/book3s.c
arch/powerpc/kvm/book3s.c
+10
-0
arch/powerpc/kvm/booke.c
arch/powerpc/kvm/booke.c
+14
-1
未找到文件。
arch/powerpc/kvm/book3s.c
浏览文件 @
98001d8d
...
@@ -1110,6 +1110,8 @@ int kvm_arch_vcpu_ioctl_get_sregs(struct kvm_vcpu *vcpu,
...
@@ -1110,6 +1110,8 @@ int kvm_arch_vcpu_ioctl_get_sregs(struct kvm_vcpu *vcpu,
struct
kvmppc_vcpu_book3s
*
vcpu3s
=
to_book3s
(
vcpu
);
struct
kvmppc_vcpu_book3s
*
vcpu3s
=
to_book3s
(
vcpu
);
int
i
;
int
i
;
vcpu_load
(
vcpu
);
sregs
->
pvr
=
vcpu
->
arch
.
pvr
;
sregs
->
pvr
=
vcpu
->
arch
.
pvr
;
sregs
->
u
.
s
.
sdr1
=
to_book3s
(
vcpu
)
->
sdr1
;
sregs
->
u
.
s
.
sdr1
=
to_book3s
(
vcpu
)
->
sdr1
;
...
@@ -1128,6 +1130,9 @@ int kvm_arch_vcpu_ioctl_get_sregs(struct kvm_vcpu *vcpu,
...
@@ -1128,6 +1130,9 @@ int kvm_arch_vcpu_ioctl_get_sregs(struct kvm_vcpu *vcpu,
sregs
->
u
.
s
.
ppc32
.
dbat
[
i
]
=
vcpu3s
->
dbat
[
i
].
raw
;
sregs
->
u
.
s
.
ppc32
.
dbat
[
i
]
=
vcpu3s
->
dbat
[
i
].
raw
;
}
}
}
}
vcpu_put
(
vcpu
);
return
0
;
return
0
;
}
}
...
@@ -1137,6 +1142,8 @@ int kvm_arch_vcpu_ioctl_set_sregs(struct kvm_vcpu *vcpu,
...
@@ -1137,6 +1142,8 @@ int kvm_arch_vcpu_ioctl_set_sregs(struct kvm_vcpu *vcpu,
struct
kvmppc_vcpu_book3s
*
vcpu3s
=
to_book3s
(
vcpu
);
struct
kvmppc_vcpu_book3s
*
vcpu3s
=
to_book3s
(
vcpu
);
int
i
;
int
i
;
vcpu_load
(
vcpu
);
kvmppc_set_pvr
(
vcpu
,
sregs
->
pvr
);
kvmppc_set_pvr
(
vcpu
,
sregs
->
pvr
);
vcpu3s
->
sdr1
=
sregs
->
u
.
s
.
sdr1
;
vcpu3s
->
sdr1
=
sregs
->
u
.
s
.
sdr1
;
...
@@ -1163,6 +1170,9 @@ int kvm_arch_vcpu_ioctl_set_sregs(struct kvm_vcpu *vcpu,
...
@@ -1163,6 +1170,9 @@ int kvm_arch_vcpu_ioctl_set_sregs(struct kvm_vcpu *vcpu,
/* Flush the MMU after messing with the segments */
/* Flush the MMU after messing with the segments */
kvmppc_mmu_pte_flush
(
vcpu
,
0
,
0
);
kvmppc_mmu_pte_flush
(
vcpu
,
0
,
0
);
vcpu_put
(
vcpu
);
return
0
;
return
0
;
}
}
...
...
arch/powerpc/kvm/booke.c
浏览文件 @
98001d8d
...
@@ -485,6 +485,8 @@ int kvm_arch_vcpu_ioctl_get_regs(struct kvm_vcpu *vcpu, struct kvm_regs *regs)
...
@@ -485,6 +485,8 @@ int kvm_arch_vcpu_ioctl_get_regs(struct kvm_vcpu *vcpu, struct kvm_regs *regs)
{
{
int
i
;
int
i
;
vcpu_load
(
vcpu
);
regs
->
pc
=
vcpu
->
arch
.
pc
;
regs
->
pc
=
vcpu
->
arch
.
pc
;
regs
->
cr
=
kvmppc_get_cr
(
vcpu
);
regs
->
cr
=
kvmppc_get_cr
(
vcpu
);
regs
->
ctr
=
vcpu
->
arch
.
ctr
;
regs
->
ctr
=
vcpu
->
arch
.
ctr
;
...
@@ -505,6 +507,8 @@ int kvm_arch_vcpu_ioctl_get_regs(struct kvm_vcpu *vcpu, struct kvm_regs *regs)
...
@@ -505,6 +507,8 @@ int kvm_arch_vcpu_ioctl_get_regs(struct kvm_vcpu *vcpu, struct kvm_regs *regs)
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
regs
->
gpr
);
i
++
)
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
regs
->
gpr
);
i
++
)
regs
->
gpr
[
i
]
=
kvmppc_get_gpr
(
vcpu
,
i
);
regs
->
gpr
[
i
]
=
kvmppc_get_gpr
(
vcpu
,
i
);
vcpu_put
(
vcpu
);
return
0
;
return
0
;
}
}
...
@@ -512,6 +516,8 @@ int kvm_arch_vcpu_ioctl_set_regs(struct kvm_vcpu *vcpu, struct kvm_regs *regs)
...
@@ -512,6 +516,8 @@ int kvm_arch_vcpu_ioctl_set_regs(struct kvm_vcpu *vcpu, struct kvm_regs *regs)
{
{
int
i
;
int
i
;
vcpu_load
(
vcpu
);
vcpu
->
arch
.
pc
=
regs
->
pc
;
vcpu
->
arch
.
pc
=
regs
->
pc
;
kvmppc_set_cr
(
vcpu
,
regs
->
cr
);
kvmppc_set_cr
(
vcpu
,
regs
->
cr
);
vcpu
->
arch
.
ctr
=
regs
->
ctr
;
vcpu
->
arch
.
ctr
=
regs
->
ctr
;
...
@@ -531,6 +537,8 @@ int kvm_arch_vcpu_ioctl_set_regs(struct kvm_vcpu *vcpu, struct kvm_regs *regs)
...
@@ -531,6 +537,8 @@ int kvm_arch_vcpu_ioctl_set_regs(struct kvm_vcpu *vcpu, struct kvm_regs *regs)
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
regs
->
gpr
);
i
++
)
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
regs
->
gpr
);
i
++
)
kvmppc_set_gpr
(
vcpu
,
i
,
regs
->
gpr
[
i
]);
kvmppc_set_gpr
(
vcpu
,
i
,
regs
->
gpr
[
i
]);
vcpu_put
(
vcpu
);
return
0
;
return
0
;
}
}
...
@@ -559,7 +567,12 @@ int kvm_arch_vcpu_ioctl_set_fpu(struct kvm_vcpu *vcpu, struct kvm_fpu *fpu)
...
@@ -559,7 +567,12 @@ int kvm_arch_vcpu_ioctl_set_fpu(struct kvm_vcpu *vcpu, struct kvm_fpu *fpu)
int
kvm_arch_vcpu_ioctl_translate
(
struct
kvm_vcpu
*
vcpu
,
int
kvm_arch_vcpu_ioctl_translate
(
struct
kvm_vcpu
*
vcpu
,
struct
kvm_translation
*
tr
)
struct
kvm_translation
*
tr
)
{
{
return
kvmppc_core_vcpu_translate
(
vcpu
,
tr
);
int
r
;
vcpu_load
(
vcpu
);
r
=
kvmppc_core_vcpu_translate
(
vcpu
,
tr
);
vcpu_put
(
vcpu
);
return
r
;
}
}
int
kvm_vm_ioctl_get_dirty_log
(
struct
kvm
*
kvm
,
struct
kvm_dirty_log
*
log
)
int
kvm_vm_ioctl_get_dirty_log
(
struct
kvm
*
kvm
,
struct
kvm_dirty_log
*
log
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录