From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <JBeulich@suse.com>,
xen-devel <xen-devel@lists.xenproject.org>
Cc: Tim Deegan <tim@xen.org>
Subject: Re: [PATCH] x86/paging: remove pointless current domain checks
Date: Fri, 29 May 2015 10:21:30 +0100 [thread overview]
Message-ID: <55682F9A.2010503@citrix.com> (raw)
In-Reply-To: <556848FA020000780007EDE4@mail.emea.novell.com>
[-- Attachment #1.1: Type: text/plain, Size: 1309 bytes --]
On 29/05/15 10:09, Jan Beulich wrote:
> Checking that the subject domain is not the current one is pointless
> when already having paused that domain: domain_pause() already
> ASSERT()s this to be the case.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
>
> --- a/xen/arch/x86/mm/hap/hap.c
> +++ b/xen/arch/x86/mm/hap/hap.c
> @@ -464,13 +464,6 @@ int hap_enable(struct domain *d, u32 mod
>
> domain_pause(d);
>
> - /* error check */
> - if ( (d == current->domain) )
> - {
> - rv = -EINVAL;
> - goto out;
> - }
> -
> old_pages = d->arch.paging.hap.total_pages;
> if ( old_pages == 0 )
> {
> --- a/xen/arch/x86/mm/shadow/common.c
> +++ b/xen/arch/x86/mm/shadow/common.c
> @@ -2972,8 +2972,7 @@ int shadow_enable(struct domain *d, u32
> domain_pause(d);
>
> /* Sanity check the arguments */
> - if ( (d == current->domain) ||
> - shadow_mode_enabled(d) ||
> + if ( shadow_mode_enabled(d) ||
> ((mode & PG_translate) && !(mode & PG_refcounts)) ||
> ((mode & PG_external) && !(mode & PG_translate)) )
> {
>
>
>
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel
[-- Attachment #1.2: Type: text/html, Size: 2208 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2015-05-29 9:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-29 9:09 [PATCH] x86/paging: remove pointless current domain checks Jan Beulich
2015-05-29 9:21 ` Andrew Cooper [this message]
2015-06-04 13:15 ` Tim Deegan
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=55682F9A.2010503@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=JBeulich@suse.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.