提交 a411edf1 编写于 作者: D David Hildenbrand 提交者: Christian Borntraeger

KVM: s390: vsie: add module parameter "nested"

Let's be careful first and allow nested virtualization only if enabled
by the system administrator. In addition, user space still has to
explicitly enable it via SCLP features for it to work.
Acked-by: NChristian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: NDavid Hildenbrand <dahi@linux.vnet.ibm.com>
Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com>
上级 5d3876a8
无相关合并请求
...@@ -125,6 +125,11 @@ struct kvm_stats_debugfs_item debugfs_entries[] = { ...@@ -125,6 +125,11 @@ struct kvm_stats_debugfs_item debugfs_entries[] = {
{ NULL } { NULL }
}; };
/* allow nested virtualization in KVM (if enabled by user space) */
static int nested;
module_param(nested, int, S_IRUGO);
MODULE_PARM_DESC(nested, "Nested virtualization support");
/* upper facilities limit for kvm */ /* upper facilities limit for kvm */
unsigned long kvm_s390_fac_list_mask[16] = { unsigned long kvm_s390_fac_list_mask[16] = {
0xffe6000000000000UL, 0xffe6000000000000UL,
...@@ -264,7 +269,7 @@ static void kvm_s390_cpu_feat_init(void) ...@@ -264,7 +269,7 @@ static void kvm_s390_cpu_feat_init(void)
* 64bit SCAO (SCA passthrough) and IDTE (for gmap_shadow unshadowing). * 64bit SCAO (SCA passthrough) and IDTE (for gmap_shadow unshadowing).
*/ */
if (!sclp.has_sief2 || !MACHINE_HAS_ESOP || !sclp.has_64bscao || if (!sclp.has_sief2 || !MACHINE_HAS_ESOP || !sclp.has_64bscao ||
!test_facility(3)) !test_facility(3) || !nested)
return; return;
allow_cpu_feat(KVM_S390_VM_CPU_FEAT_SIEF2); allow_cpu_feat(KVM_S390_VM_CPU_FEAT_SIEF2);
if (sclp.has_64bscao) if (sclp.has_64bscao)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
反馈
建议
客服 返回
顶部