Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
17f84520
K
Kernel
项目概览
openeuler
/
Kernel
1 年多 前同步成功
通知
8
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看板
提交
17f84520
编写于
12月 04, 2020
作者:
M
Marc Zyngier
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'origin/kvm-arm64/misc-5.11' into kvmarm-master/queue
Signed-off-by:
N
Marc Zyngier
<
maz@kernel.org
>
上级
f86e5465
652d0b70
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
50 addition
and
11 deletion
+50
-11
Documentation/virt/kvm/arm/pvtime.rst
Documentation/virt/kvm/arm/pvtime.rst
+2
-2
arch/arm64/kvm/pvtime.c
arch/arm64/kvm/pvtime.c
+1
-5
arch/arm64/kvm/vgic/vgic-v4.c
arch/arm64/kvm/vgic/vgic-v4.c
+12
-0
arch/arm64/kvm/vgic/vgic.c
arch/arm64/kvm/vgic/vgic.c
+3
-0
drivers/irqchip/irq-gic-v3-its.c
drivers/irqchip/irq-gic-v3-its.c
+8
-4
drivers/irqchip/irq-gic-v4.c
drivers/irqchip/irq-gic-v4.c
+19
-0
include/kvm/arm_vgic.h
include/kvm/arm_vgic.h
+1
-0
include/linux/irqchip/arm-gic-v4.h
include/linux/irqchip/arm-gic-v4.h
+4
-0
未找到文件。
Documentation/virt/kvm/arm/pvtime.rst
浏览文件 @
17f84520
...
...
@@ -19,8 +19,8 @@ Two new SMCCC compatible hypercalls are defined:
These are only available in the SMC64/HVC64 calling convention as
paravirtualized time is not available to 32 bit Arm guests. The existence of
the PV_
FEATURES hypercall should be probed using the SMCCC 1.1 ARCH_FEATURES
mechanism before calling it.
the PV_
TIME_FEATURES hypercall should be probed using the SMCCC 1.1
ARCH_FEATURES
mechanism before calling it.
PV_TIME_FEATURES
============= ======== ==========
...
...
arch/arm64/kvm/pvtime.c
浏览文件 @
17f84520
...
...
@@ -53,7 +53,6 @@ gpa_t kvm_init_stolen_time(struct kvm_vcpu *vcpu)
struct
pvclock_vcpu_stolen_time
init_values
=
{};
struct
kvm
*
kvm
=
vcpu
->
kvm
;
u64
base
=
vcpu
->
arch
.
steal
.
base
;
int
idx
;
if
(
base
==
GPA_INVALID
)
return
base
;
...
...
@@ -63,10 +62,7 @@ gpa_t kvm_init_stolen_time(struct kvm_vcpu *vcpu)
* the feature enabled.
*/
vcpu
->
arch
.
steal
.
last_steal
=
current
->
sched_info
.
run_delay
;
idx
=
srcu_read_lock
(
&
kvm
->
srcu
);
kvm_write_guest
(
kvm
,
base
,
&
init_values
,
sizeof
(
init_values
));
srcu_read_unlock
(
&
kvm
->
srcu
,
idx
);
kvm_write_guest_lock
(
kvm
,
base
,
&
init_values
,
sizeof
(
init_values
));
return
base
;
}
...
...
arch/arm64/kvm/vgic/vgic-v4.c
浏览文件 @
17f84520
...
...
@@ -353,6 +353,18 @@ int vgic_v4_load(struct kvm_vcpu *vcpu)
return
err
;
}
void
vgic_v4_commit
(
struct
kvm_vcpu
*
vcpu
)
{
struct
its_vpe
*
vpe
=
&
vcpu
->
arch
.
vgic_cpu
.
vgic_v3
.
its_vpe
;
/*
* No need to wait for the vPE to be ready across a shallow guest
* exit, as only a vcpu_put will invalidate it.
*/
if
(
!
vpe
->
ready
)
its_commit_vpe
(
vpe
);
}
static
struct
vgic_its
*
vgic_get_its
(
struct
kvm
*
kvm
,
struct
kvm_kernel_irq_routing_entry
*
irq_entry
)
{
...
...
arch/arm64/kvm/vgic/vgic.c
浏览文件 @
17f84520
...
...
@@ -915,6 +915,9 @@ void kvm_vgic_flush_hwstate(struct kvm_vcpu *vcpu)
if
(
can_access_vgic_from_kernel
())
vgic_restore_state
(
vcpu
);
if
(
vgic_supports_direct_msis
(
vcpu
->
kvm
))
vgic_v4_commit
(
vcpu
);
}
void
kvm_vgic_load
(
struct
kvm_vcpu
*
vcpu
)
...
...
drivers/irqchip/irq-gic-v3-its.c
浏览文件 @
17f84520
...
...
@@ -3842,8 +3842,6 @@ static void its_vpe_schedule(struct its_vpe *vpe)
val
|=
vpe
->
idai
?
GICR_VPENDBASER_IDAI
:
0
;
val
|=
GICR_VPENDBASER_Valid
;
gicr_write_vpendbaser
(
val
,
vlpi_base
+
GICR_VPENDBASER
);
its_wait_vpt_parse_complete
();
}
static
void
its_vpe_deschedule
(
struct
its_vpe
*
vpe
)
...
...
@@ -3891,6 +3889,10 @@ static int its_vpe_set_vcpu_affinity(struct irq_data *d, void *vcpu_info)
its_vpe_deschedule
(
vpe
);
return
0
;
case
COMMIT_VPE
:
its_wait_vpt_parse_complete
();
return
0
;
case
INVALL_VPE
:
its_vpe_invall
(
vpe
);
return
0
;
...
...
@@ -4052,8 +4054,6 @@ static void its_vpe_4_1_schedule(struct its_vpe *vpe,
val
|=
FIELD_PREP
(
GICR_VPENDBASER_4_1_VPEID
,
vpe
->
vpe_id
);
gicr_write_vpendbaser
(
val
,
vlpi_base
+
GICR_VPENDBASER
);
its_wait_vpt_parse_complete
();
}
static
void
its_vpe_4_1_deschedule
(
struct
its_vpe
*
vpe
,
...
...
@@ -4128,6 +4128,10 @@ static int its_vpe_4_1_set_vcpu_affinity(struct irq_data *d, void *vcpu_info)
its_vpe_4_1_deschedule
(
vpe
,
info
);
return
0
;
case
COMMIT_VPE
:
its_wait_vpt_parse_complete
();
return
0
;
case
INVALL_VPE
:
its_vpe_4_1_invall
(
vpe
);
return
0
;
...
...
drivers/irqchip/irq-gic-v4.c
浏览文件 @
17f84520
...
...
@@ -232,6 +232,8 @@ int its_make_vpe_non_resident(struct its_vpe *vpe, bool db)
if
(
!
ret
)
vpe
->
resident
=
false
;
vpe
->
ready
=
false
;
return
ret
;
}
...
...
@@ -258,6 +260,23 @@ int its_make_vpe_resident(struct its_vpe *vpe, bool g0en, bool g1en)
return
ret
;
}
int
its_commit_vpe
(
struct
its_vpe
*
vpe
)
{
struct
its_cmd_info
info
=
{
.
cmd_type
=
COMMIT_VPE
,
};
int
ret
;
WARN_ON
(
preemptible
());
ret
=
its_send_vpe_cmd
(
vpe
,
&
info
);
if
(
!
ret
)
vpe
->
ready
=
true
;
return
ret
;
}
int
its_invall_vpe
(
struct
its_vpe
*
vpe
)
{
struct
its_cmd_info
info
=
{
...
...
include/kvm/arm_vgic.h
浏览文件 @
17f84520
...
...
@@ -402,6 +402,7 @@ int kvm_vgic_v4_unset_forwarding(struct kvm *kvm, int irq,
struct
kvm_kernel_irq_routing_entry
*
irq_entry
);
int
vgic_v4_load
(
struct
kvm_vcpu
*
vcpu
);
void
vgic_v4_commit
(
struct
kvm_vcpu
*
vcpu
);
int
vgic_v4_put
(
struct
kvm_vcpu
*
vcpu
,
bool
need_db
);
#endif
/* __KVM_ARM_VGIC_H */
include/linux/irqchip/arm-gic-v4.h
浏览文件 @
17f84520
...
...
@@ -39,6 +39,8 @@ struct its_vpe {
irq_hw_number_t
vpe_db_lpi
;
/* VPE resident */
bool
resident
;
/* VPT parse complete */
bool
ready
;
union
{
/* GICv4.0 implementations */
struct
{
...
...
@@ -104,6 +106,7 @@ enum its_vcpu_info_cmd_type {
PROP_UPDATE_AND_INV_VLPI
,
SCHEDULE_VPE
,
DESCHEDULE_VPE
,
COMMIT_VPE
,
INVALL_VPE
,
PROP_UPDATE_VSGI
,
};
...
...
@@ -129,6 +132,7 @@ int its_alloc_vcpu_irqs(struct its_vm *vm);
void
its_free_vcpu_irqs
(
struct
its_vm
*
vm
);
int
its_make_vpe_resident
(
struct
its_vpe
*
vpe
,
bool
g0en
,
bool
g1en
);
int
its_make_vpe_non_resident
(
struct
its_vpe
*
vpe
,
bool
db
);
int
its_commit_vpe
(
struct
its_vpe
*
vpe
);
int
its_invall_vpe
(
struct
its_vpe
*
vpe
);
int
its_map_vlpi
(
int
irq
,
struct
its_vlpi_map
*
map
);
int
its_get_vlpi
(
int
irq
,
struct
its_vlpi_map
*
map
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录