[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 4/9] x86/hvm: provide stubs for HVM guest accessors



>>> On 07.08.18 at 12:00, <wei.liu2@xxxxxxxxxx> wrote:
> --- a/xen/include/asm-x86/hvm/guest_access.h
> +++ b/xen/include/asm-x86/hvm/guest_access.h
> @@ -1,8 +1,32 @@
>  #ifndef __ASM_X86_HVM_GUEST_ACCESS_H__
>  #define __ASM_X86_HVM_GUEST_ACCESS_H__
>  
> +#if CONFIG_HVM
> +
>  unsigned long copy_to_user_hvm(void *to, const void *from, unsigned len);
>  unsigned long clear_user_hvm(void *to, unsigned int len);
>  unsigned long copy_from_user_hvm(void *to, const void *from, unsigned len);
>  
> +#else
> +
> +static inline
> +unsigned long copy_to_user_hvm(void *to, const void *from, unsigned len)
> +{
> +    return len;
> +}
> +
> +static inline
> +unsigned long clear_user_hvm(void *to, unsigned int len)
> +{
> +    return len;
> +}
> +
> +static inline
> +unsigned long copy_from_user_hvm(void *to, const void *from, unsigned len)
> +{
> +    return len;
> +}
> +
> +#endif

With BUG() or at least ASSERT_UNREACHABLE() put into all of them
Acked-by: Jan Beulich <jbeulich@xxxxxxxx>

Jan



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.