diff options
author | Dominik Dingel <dingel@linux.vnet.ibm.com> | 2013-07-26 15:04:07 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2013-07-29 09:03:53 +0200 |
commit | bf640876e21fe603f7f52b0c27d66b7716da0384 (patch) | |
tree | 981a401df9e8ede64cfe07aa0a86e20ff51153f9 /arch/s390 | |
parent | ea828ebf59f5b56e7261bfaeb94393c9dcb86260 (diff) | |
download | op-kernel-dev-bf640876e21fe603f7f52b0c27d66b7716da0384.zip op-kernel-dev-bf640876e21fe603f7f52b0c27d66b7716da0384.tar.gz |
KVM: s390: Make KVM_HVA_ERR_BAD usable on s390
Current common code uses PAGE_OFFSET to indicate a bad host virtual address.
As this check won't work on architectures that don't map kernel and user memory
into the same address space (e.g. s390), such architectures can now provide
their own KVM_HVA_ERR_BAD defines.
Signed-off-by: Dominik Dingel <dingel@linux.vnet.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/s390')
-rw-r--r-- | arch/s390/include/asm/kvm_host.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/s390/include/asm/kvm_host.h b/arch/s390/include/asm/kvm_host.h index 3238d40..e87ecaa 100644 --- a/arch/s390/include/asm/kvm_host.h +++ b/arch/s390/include/asm/kvm_host.h @@ -274,6 +274,14 @@ struct kvm_arch{ int css_support; }; +#define KVM_HVA_ERR_BAD (-1UL) +#define KVM_HVA_ERR_RO_BAD (-2UL) + +static inline bool kvm_is_error_hva(unsigned long addr) +{ + return IS_ERR_VALUE(addr); +} + extern int sie64a(struct kvm_s390_sie_block *, u64 *); extern char sie_exit; #endif |