x86/paging: remove pointless current domain checks

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>
Reviewed-by: Tim Deegan <tim@xen.org>
This commit is contained in:
Jan Beulich committed 2015-06-05 12:09:18 +02:00
1 parent b248d32f4f
commit f17f08672f
2 files changed
+1 -9

No files matched your search

-7
View File
@@ -464,13 +464,6 @@ int hap_enable(struct domain *d, u32 mode)
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 )
{
+1 -2
View File
@@ -2972,8 +2972,7 @@ int shadow_enable(struct domain *d, u32 mode)
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)) )
{
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.