|
[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 Thu, 15 May 2014 09:02:00 +0100
"Jan Beulich" <JBeulich@xxxxxxxx> wrote:
> >>> 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.
Yup, will check for both. With that I think we've resolved all issues
in this patch. I'm again looking at all paths to make sure foreign
entry can't go to non-present, and with that not need the BUG_ON
or ASSERT in ept_p2m_type_to_flags. paging/sharing paths are fenced
now, and I can't think of others. So after done checking all paths
again, will send next version.
thanks
mukesh
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |