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

Re: [Xen-devel] [PATCH Altp2m cleanup v6] altp2m cleanup work.



>>> On 26.09.16 at 19:52, <paul.c.lai@xxxxxxxxx> wrote:
> Indent goto labels by one space.
> Inline (header) altp2m functions.
> In do_altp2m_op(), during the sanity check of the passed command,
> return -ENONSYS if not a valid command.
> In do_altp2m_op(), when evaluating a command, ASSERT_UNREACHABLE()
> if the command is not recognizable.  The sanity check above should
> have triggered the return of -ENOSYS.
> 
> Changes since last version:
> 
> Fixing fall through in switch statement above ASSERT_UNREACHABLE() (in
> do_altp2m_op()).
> Make hvm_funcs.altp2m_supported "bool" instead of "bool_t".
> Make hvm_altp2m_supported() and altp2m_vcpu_emulate_ve() return
> bool (rather than return void()).

This changes section belongs ...

> Signed-off-by: Paul Lai <paul.c.lai@xxxxxxxxx>
> ---

... here, as it shouldn't end up in the commit message.

> @@ -5308,12 +5308,25 @@ static int do_altp2m_op(
>          return -EFAULT;
>  
>      if ( a.pad1 || a.pad2 ||
> -         (a.version != HVMOP_ALTP2M_INTERFACE_VERSION) ||
> -         (a.cmd < HVMOP_altp2m_get_domain_state) ||
> -         (a.cmd > HVMOP_altp2m_change_gfn) )
> +        (a.version != HVMOP_ALTP2M_INTERFACE_VERSION) )
>          return -EINVAL;
>  
> -    d = (a.cmd != HVMOP_altp2m_vcpu_enable_notify) ?
> +    switch ( a.cmd )
> +    {
> +    case HVMOP_altp2m_get_domain_state:
> +    case HVMOP_altp2m_set_domain_state:
> +    case HVMOP_altp2m_vcpu_enable_notify:
> +    case HVMOP_altp2m_create_p2m:
> +    case HVMOP_altp2m_destroy_p2m:
> +    case HVMOP_altp2m_switch_p2m:
> +    case HVMOP_altp2m_set_mem_access:
> +    case HVMOP_altp2m_change_gfn:
> +        break;
> +    default:
> +        return -ENOSYS;

Quite recently a patch went in to eliminate such bogus -ENOSYS
instances. Please use -EOPNOTSUPP instead.

With that corrected,
Acked-by: Jan Beulich <jbeulich@xxxxxxxx>

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

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