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

Re: [Xen-devel] [PATCH RFC v2 04/12] xen/mem_event: Abstract architecture specific sanity checks



>>> On 27.08.14 at 16:06, <tklengyel@xxxxxxxxxxxxx> wrote:
> --- a/xen/common/mem_event.c
> +++ b/xen/common/mem_event.c
> @@ -424,6 +424,19 @@ int __mem_event_claim_slot(struct domain *d, struct 
> mem_event_domain *med,
>          return mem_event_grab_slot(med, (current->domain != d));
>  }
>  
> +static inline bool_t mem_event_sanity_check(struct domain *d)
> +{
> +    /* Only HAP is supported */
> +    if ( !hap_enabled(d) )
> +        return 0;
> +
> +    /* Currently only EPT is supported */
> +    if ( !cpu_has_vmx )
> +        return 0;
> +
> +    return 1;
> +}

So what does it buy us to have this in a separate function, but
still in the same common file?

> @@ -558,6 +571,7 @@ int mem_event_domctl(struct domain *d, 
> xen_domctl_mem_event_op_t *mec,
>              rc = -EMLINK;
>              if ( unlikely(need_iommu(d)) )
>                  break;
> +            }
>  
>              rc = -EXDEV;
>              /* Disallow paging in a PoD guest */

I have a really hard time seeing how this can be a correct change -
does this even build (and if it does, do things build with only patches
1-3 in place)?

Jan


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


 


Rackspace

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