lkml.org 
[lkml]   [2013]   [Jul]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 2/4] PF: Move architecture specifics to the backends
Date
From
On 2013-07-05 21:55, Dominik Dingel wrote:
> Current common codes 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), it is moved into architcture
> specific
> code.
>
> Signed-off-by: Dominik Dingel <dingel@linux.vnet.ibm.com>
> ---
> arch/arm/include/asm/kvm_host.h | 8 ++++++++
> arch/ia64/include/asm/kvm_host.h | 3 +++
> arch/mips/include/asm/kvm_host.h | 6 ++++++
> arch/powerpc/include/asm/kvm_host.h | 8 ++++++++
> arch/s390/include/asm/kvm_host.h | 12 ++++++++++++
> arch/x86/include/asm/kvm_host.h | 8 ++++++++
> include/linux/kvm_host.h | 8 --------
> 7 files changed, 45 insertions(+), 8 deletions(-)

[...]

> diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
> index a63d83e..210f493 100644
> --- a/include/linux/kvm_host.h
> +++ b/include/linux/kvm_host.h
> @@ -85,14 +85,6 @@ static inline bool is_noslot_pfn(pfn_t pfn)
> return pfn == KVM_PFN_NOSLOT;
> }
>
> -#define KVM_HVA_ERR_BAD (PAGE_OFFSET)
> -#define KVM_HVA_ERR_RO_BAD (PAGE_OFFSET + PAGE_SIZE)
> -
> -static inline bool kvm_is_error_hva(unsigned long addr)
> -{
> - return addr >= PAGE_OFFSET;
> -}
> -
> #define KVM_ERR_PTR_BAD_PAGE (ERR_PTR(-ENOENT))
>
> static inline bool is_error_page(struct page *page)

Nit: This breaks arm64. I suppose the patches have been created before
the arm64 code got merged, so I'd expect the next version of this series
to deal with arm64 as well.

Thanks,

M.
--
Fast, cheap, reliable. Pick two.


\
 
 \ /
  Last update: 2013-07-10 23:13    [W:0.126 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site