diff options
author | Claudio Imbrenda <imbrenda@linux.ibm.com> | 2022-06-28 15:56:10 +0200 |
---|---|---|
committer | Janosch Frank <frankja@linux.ibm.com> | 2022-07-19 12:05:57 +0000 |
commit | ca2fd0609b5ddd15fe57c917a41508a7a9fc17e1 (patch) | |
tree | 9dd07a7d5886f6a00ded48d6653477ee0aad59a5 /arch/s390/include/asm/kvm_host.h | |
parent | be48d86f77f0cbceecadf10fda6330d82a0a77b7 (diff) |
KVM: s390: pv: add mmu_notifier
Add an mmu_notifier for protected VMs. The callback function is
triggered when the mm is torn down, and will attempt to convert all
protected vCPUs to non-protected. This allows the mm teardown to use
the destroy page UVC instead of export.
Also make KVM select CONFIG_MMU_NOTIFIER, needed to use mmu_notifiers.
Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
Acked-by: Janosch Frank <frankja@linux.ibm.com>
Reviewed-by: Nico Boehr <nrb@linux.ibm.com>
Link: https://lore.kernel.org/r/20220628135619.32410-10-imbrenda@linux.ibm.com
Message-Id: <20220628135619.32410-10-imbrenda@linux.ibm.com>
[frankja@linux.ibm.com: Conflict resolution for mmu_notifier.h include
and struct kvm_s390_pv]
Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
Diffstat (limited to 'arch/s390/include/asm/kvm_host.h')
-rw-r--r-- | arch/s390/include/asm/kvm_host.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/s390/include/asm/kvm_host.h b/arch/s390/include/asm/kvm_host.h index fca4fcf72a2a..6f9fc8bb0303 100644 --- a/arch/s390/include/asm/kvm_host.h +++ b/arch/s390/include/asm/kvm_host.h @@ -20,6 +20,7 @@ #include <linux/seqlock.h> #include <linux/module.h> #include <linux/pci.h> +#include <linux/mmu_notifier.h> #include <asm/debug.h> #include <asm/cpu.h> #include <asm/fpu/api.h> @@ -929,6 +930,7 @@ struct kvm_s390_pv { unsigned long stor_base; void *stor_var; bool dumping; + struct mmu_notifier mmu_notifier; }; struct kvm_arch{ |