|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH Altp2m cleanup 2/3 v12 1/3] Move altp2m specific functions to altp2m files.
>>> On 11.11.16 at 00:45, <paul.c.lai@xxxxxxxxx> wrote:
> @@ -66,6 +67,60 @@ altp2m_vcpu_destroy(struct vcpu *v)
> }
>
> /*
> + * allocate and initialize memory for altp2m portion of domain
> + *
> + * returns < 0 on error
> + * returns 0 on no operation & success
> + */
> +int
> +altp2m_domain_init(struct domain *d)
> +{
> + int rc;
> + unsigned int i;
> +
> + if ( !hvm_altp2m_supported() )
> + return 0;
> +
> + /* Init alternate p2m data. */
> + if ( (d->arch.altp2m_eptp = alloc_xenheap_page()) == NULL )
> + return -ENOMEM;
> +
> + for ( i = 0; i < MAX_EPTP; i++ )
> + d->arch.altp2m_eptp[i] = mfn_x(INVALID_MFN);
> +
> + for ( i = 0; i < MAX_ALTP2M; i++ )
> + {
> + rc = p2m_alloc_table(d->arch.altp2m_p2m[i]);
> + if ( rc != 0 )
> + {
> + altp2m_domain_teardown(d);
> + return rc;
> + }
> + }
> +
> + d->arch.altp2m_active = 0;
> +
> + return rc;
> +}
This new function has no caller, and hence does not replace any
existing code (rendering the description only partly correct).
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |