[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 Wed, Aug 27, 2014 at 5:19 PM, Jan Beulich <JBeulich@xxxxxxxx> wrote:
>>> 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?

This patch really just sets up the ground for ARM where these checks are not required and will just return 1.

In the next series I'll actually relocate this function into architecture specific p2m.h and rename it p2m_mem_event_sanity_check. Same for the mem_access sanity check function.
 
 

> @@ -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

This certainly looks out of place, I need to double check, but just might just be a typo that creeped into the patch.

Tamas

Indeed, just a typo and since I was only compile testing on ARM it passed through the cracks. I'll compile test going forward on both architectures to avoid issues like this.

Tamas
 

_______________________________________________
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®.