xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Mukesh Rathor <mukesh.rathor@oracle.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: George.Dunlap@eu.citrix.com, tim@xen.org, eddie.dong@intel.com,
	keir.xen@gmail.com, jun.nakajima@intel.com,
	xen-devel@lists.xenproject.org
Subject: Re: [V12 PATCH 3/4] pvh dom0: Add and remove foreign pages
Date: Thu, 15 May 2014 18:39:28 -0700	[thread overview]
Message-ID: <20140515183928.012979ec@mantra.us.oracle.com> (raw)
In-Reply-To: <5374909802000078000126CD@mail.emea.novell.com>

On Thu, 15 May 2014 09:02:00 +0100
"Jan Beulich" <JBeulich@suse.com> wrote:

> >>> On 15.05.14 at 03:59, <mukesh.rathor@oracle.com> 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

  reply	other threads:[~2014-05-16  1:39 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-10  0:50 [V12 PATCH 0/4] pvh dom0 patches Mukesh Rathor
2014-05-10  0:50 ` [V12 PATCH 1/4] pvh dom0: construct_dom0 changes Mukesh Rathor
2014-05-10  0:50 ` [V12 PATCH 2/4] pvh dom0: Add checks and restrictions for p2m_is_foreign Mukesh Rathor
2014-05-10  0:50 ` [V12 PATCH 3/4] pvh dom0: Add and remove foreign pages Mukesh Rathor
2014-05-12 10:34   ` Jan Beulich
2014-05-13  1:02     ` Mukesh Rathor
2014-05-13  7:09       ` Jan Beulich
2014-05-14  0:55         ` Mukesh Rathor
2014-05-14  6:59           ` Jan Beulich
2014-05-15  1:59             ` Mukesh Rathor
2014-05-15  8:02               ` Jan Beulich
2014-05-16  1:39                 ` Mukesh Rathor [this message]
2014-05-10  0:50 ` [V12 PATCH 4/4] dom0: add opt_dom0pvh to setup.c Mukesh Rathor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140515183928.012979ec@mantra.us.oracle.com \
    --to=mukesh.rathor@oracle.com \
    --cc=George.Dunlap@eu.citrix.com \
    --cc=JBeulich@suse.com \
    --cc=eddie.dong@intel.com \
    --cc=jun.nakajima@intel.com \
    --cc=keir.xen@gmail.com \
    --cc=tim@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).