x86/paging: remove pointless current domain checks
PATCH 1/1 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.
xen/arch/x86/mm/hap/hap.c +0 -7
@@ -464,13 +464,6 @@ int hap_enable(struct domain *d, u32 moddomain_pause (d); -/* error check */ -if ( (d == current->domain) ) - { - rv = -EINVAL ; - goto out; - } - old_pages = d->arch.paging.hap.total_pages;if ( old_pages ==0 ) {
xen/arch/x86/mm/shadow/common.c +1 -2
@@ -2972,8 +2972,7 @@ int shadow_enable(struct domain *d, u32domain_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)) ) {
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.
xen/arch/x86/mm/hap/hap.c +0 -7
@@ -464,13 +464,6 @@ int hap_enable(struct domain *d, u32 moddomain_pause (d); -/* error check */ -if ( (d == current->domain) ) - { - rv = -EINVAL ; - goto out; - } - old_pages = d->arch.paging.hap.total_pages;if ( old_pages ==0 ) {
xen/arch/x86/mm/shadow/common.c +1 -2
@@ -2972,8 +2972,7 @@ int shadow_enable(struct domain *d, u32domain_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
[email protected]
http://lists.xen.org/xen-devel
Quoted 5 lines · Jan Beulich
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 <[email protected]>
Quoted 34 lines
xen/arch/x86/mm/hap/hap.c +0
-7@@ -464,13 +464,6 @@ int hap_enable(struct domain *d, u32 moddomain_pause (d); -/* error check */ -if ( (d == current->domain) ) - { - rv = -EINVAL ; - goto out; - } - old_pages = d->arch.paging.hap.total_pages;if ( old_pages ==0 ) {xen/arch/x86/mm/shadow/common.c +1
-2@@ -2972,8 +2972,7 @@ int shadow_enable(struct domain *d, u32domain_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)) ) {
Quoted 4 lines
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 5 lines · Jan Beulich
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 <[email protected]>