Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
cc9085b6
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
160
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
cc9085b6
编写于
10月 19, 2017
作者:
R
Radim Krčmář
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'kvm-ppc-fixes' of
git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
Fix potential host oops and hangs.
上级
33d930e5
ad98dd1a
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
25 addition
and
14 deletion
+25
-14
arch/powerpc/kvm/book3s_64_vio.c
arch/powerpc/kvm/book3s_64_vio.c
+14
-9
arch/powerpc/kvm/book3s_hv_rmhandlers.S
arch/powerpc/kvm/book3s_hv_rmhandlers.S
+10
-3
arch/powerpc/kvm/powerpc.c
arch/powerpc/kvm/powerpc.c
+1
-2
未找到文件。
arch/powerpc/kvm/book3s_64_vio.c
浏览文件 @
cc9085b6
...
...
@@ -478,28 +478,30 @@ long kvmppc_h_put_tce(struct kvm_vcpu *vcpu, unsigned long liobn,
return
ret
;
dir
=
iommu_tce_direction
(
tce
);
idx
=
srcu_read_lock
(
&
vcpu
->
kvm
->
srcu
);
if
((
dir
!=
DMA_NONE
)
&&
kvmppc_gpa_to_ua
(
vcpu
->
kvm
,
tce
&
~
(
TCE_PCI_READ
|
TCE_PCI_WRITE
),
&
ua
,
NULL
))
return
H_PARAMETER
;
tce
&
~
(
TCE_PCI_READ
|
TCE_PCI_WRITE
),
&
ua
,
NULL
))
{
ret
=
H_PARAMETER
;
goto
unlock_exit
;
}
entry
=
ioba
>>
stt
->
page_shift
;
list_for_each_entry_lockless
(
stit
,
&
stt
->
iommu_tables
,
next
)
{
if
(
dir
==
DMA_NONE
)
{
if
(
dir
==
DMA_NONE
)
ret
=
kvmppc_tce_iommu_unmap
(
vcpu
->
kvm
,
stit
->
tbl
,
entry
);
}
else
{
idx
=
srcu_read_lock
(
&
vcpu
->
kvm
->
srcu
);
else
ret
=
kvmppc_tce_iommu_map
(
vcpu
->
kvm
,
stit
->
tbl
,
entry
,
ua
,
dir
);
srcu_read_unlock
(
&
vcpu
->
kvm
->
srcu
,
idx
);
}
if
(
ret
==
H_SUCCESS
)
continue
;
if
(
ret
==
H_TOO_HARD
)
return
re
t
;
goto
unlock_exi
t
;
WARN_ON_ONCE
(
1
);
kvmppc_clear_tce
(
stit
->
tbl
,
entry
);
...
...
@@ -507,7 +509,10 @@ long kvmppc_h_put_tce(struct kvm_vcpu *vcpu, unsigned long liobn,
kvmppc_tce_put
(
stt
,
entry
,
tce
);
return
H_SUCCESS
;
unlock_exit:
srcu_read_unlock
(
&
vcpu
->
kvm
->
srcu
,
idx
);
return
ret
;
}
EXPORT_SYMBOL_GPL
(
kvmppc_h_put_tce
);
...
...
arch/powerpc/kvm/book3s_hv_rmhandlers.S
浏览文件 @
cc9085b6
...
...
@@ -989,13 +989,14 @@ ALT_FTR_SECTION_END_IFCLR(CPU_FTR_ARCH_300)
beq
no_xive
ld
r11
,
VCPU_XIVE_SAVED_STATE
(
r4
)
li
r9
,
TM_QW1_OS
stdcix
r11
,
r9
,
r10
eieio
stdcix
r11
,
r9
,
r10
lwz
r11
,
VCPU_XIVE_CAM_WORD
(
r4
)
li
r9
,
TM_QW1_OS
+
TM_WORD2
stwcix
r11
,
r9
,
r10
li
r9
,
1
stw
r9
,
VCPU_XIVE_PUSHED
(
r4
)
eieio
no_xive
:
#endif /* CONFIG_KVM_XICS */
...
...
@@ -1310,6 +1311,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_HAS_PPR)
bne
3
f
BEGIN_FTR_SECTION
PPC_MSGSYNC
lwsync
END_FTR_SECTION_IFSET
(
CPU_FTR_ARCH_300
)
lbz
r0
,
HSTATE_HOST_IPI
(
r13
)
cmpwi
r0
,
0
...
...
@@ -1400,8 +1402,8 @@ guest_exit_cont: /* r9 = vcpu, r12 = trap, r13 = paca */
cmpldi
cr0
,
r10
,
0
beq
1
f
/
*
First
load
to
pull
the
context
,
we
ignore
the
value
*/
lwzx
r11
,
r7
,
r10
eieio
lwzx
r11
,
r7
,
r10
/
*
Second
load
to
recover
the
context
state
(
Words
0
and
1
)
*/
ldx
r11
,
r6
,
r10
b
3
f
...
...
@@ -1409,8 +1411,8 @@ guest_exit_cont: /* r9 = vcpu, r12 = trap, r13 = paca */
cmpldi
cr0
,
r10
,
0
beq
1
f
/
*
First
load
to
pull
the
context
,
we
ignore
the
value
*/
lwzcix
r11
,
r7
,
r10
eieio
lwzcix
r11
,
r7
,
r10
/
*
Second
load
to
recover
the
context
state
(
Words
0
and
1
)
*/
ldcix
r11
,
r6
,
r10
3
:
std
r11
,
VCPU_XIVE_SAVED_STATE
(
r9
)
...
...
@@ -1420,6 +1422,7 @@ guest_exit_cont: /* r9 = vcpu, r12 = trap, r13 = paca */
stw
r10
,
VCPU_XIVE_PUSHED
(
r9
)
stb
r10
,
(
VCPU_XIVE_SAVED_STATE
+
3
)(
r9
)
stb
r0
,
(
VCPU_XIVE_SAVED_STATE
+
4
)(
r9
)
eieio
1
:
#endif /* CONFIG_KVM_XICS */
/
*
Save
more
register
state
*/
...
...
@@ -2788,6 +2791,10 @@ END_FTR_SECTION_IFSET(CPU_FTR_ARCH_207S)
PPC_MSGCLR
(6)
/
*
see
if
it
's a host IPI */
li
r3
,
1
BEGIN_FTR_SECTION
PPC_MSGSYNC
lwsync
END_FTR_SECTION_IFSET
(
CPU_FTR_ARCH_300
)
lbz
r0
,
HSTATE_HOST_IPI
(
r13
)
cmpwi
r0
,
0
bnelr
...
...
arch/powerpc/kvm/powerpc.c
浏览文件 @
cc9085b6
...
...
@@ -644,8 +644,7 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext)
break
;
#endif
case
KVM_CAP_PPC_HTM
:
r
=
cpu_has_feature
(
CPU_FTR_TM_COMP
)
&&
is_kvmppc_hv_enabled
(
kvm
);
r
=
cpu_has_feature
(
CPU_FTR_TM_COMP
)
&&
hv_enabled
;
break
;
default:
r
=
0
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录