|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [V12 PATCH 3/4] pvh dom0: Add and remove foreign pages
>>> On 15.05.14 at 03:59, <mukesh.rathor@xxxxxxxxxx> wrote:
> Code wise several options, but seems mem_event.c would be the best
> place to put checks (would ENOSYS be more appropriate?):
I'd prefer -EOPNOTSUPP as you did.
> +++ b/xen/arch/x86/mm/mem_event.c
> @@ -538,6 +538,13 @@ int mem_event_domctl(struct domain *d,
> xen_domctl_mem_event
> case XEN_DOMCTL_MEM_EVENT_OP_PAGING_ENABLE:
> {
> struct p2m_domain *p2m = p2m_get_hostp2m(d);
> + struct domain *hwdom = rcu_lock_domain_by_id(hardware_domid);
> +
> + rcu_unlock_domain(hwdom);
Why not simply look at hardware_domain? But I think that's wrong
anyway, and you want to look at current->domain instead. And
even that would still assume that a guest controlled by other than
Dom0 would only ever have operations like this carried out by its
controlling domain - i.e. perhaps you need to check both.
> BTW, how come you let these get away without "fixme" tags :).. :
>
> /* Only HAP is supported */
> if ( !hap_enabled(d) )
> break;
>
> /* Currently only EPT is supported */
> if ( !cpu_has_vmx )
I don't think I was involved in the addition of these features.
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |