mirror of
https://github.com/torvalds/linux.git
synced 2026-05-22 22:22:08 +02:00
KVM: s390: Introduce import_lock
Introduce import_lock to avoid future races when converting pages to secure. Acked-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
This commit is contained in:
parent
c98175b791
commit
cf3ce3d69d
|
|
@ -630,6 +630,8 @@ struct kvm_s390_pv {
|
|||
void *set_aside;
|
||||
struct list_head need_cleanup;
|
||||
struct mmu_notifier mmu_notifier;
|
||||
/* Protects against concurrent import-like operations */
|
||||
struct mutex import_lock;
|
||||
};
|
||||
|
||||
struct kvm_arch {
|
||||
|
|
|
|||
|
|
@ -3330,6 +3330,8 @@ int kvm_arch_init_vm(struct kvm *kvm, unsigned long type)
|
|||
char debug_name[16];
|
||||
int i, rc;
|
||||
|
||||
mutex_init(&kvm->arch.pv.import_lock);
|
||||
|
||||
rc = -EINVAL;
|
||||
#ifdef CONFIG_KVM_S390_UCONTROL
|
||||
if (type & ~KVM_VM_S390_UCONTROL)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user