* [PATCH] x86/shadow: make 1-bit-disable match 1-bit-enable
@ 2017-12-18 9:28 Jan Beulich
2017-12-20 8:02 ` Tim Deegan
0 siblings, 1 reply; 2+ messages in thread
From: Jan Beulich @ 2017-12-18 9:28 UTC (permalink / raw)
To: xen-devel; +Cc: Tim Deegan
shadow_one_bit_enable() sets PG_SH_enable (if not already set of course)
in addition to the bit being requested. Make shadow_one_bit_disable()
behave similarly - clear PG_SH_enable if that's the only bit remaining.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
--- a/xen/arch/x86/mm/shadow/common.c
+++ b/xen/arch/x86/mm/shadow/common.c
@@ -3383,7 +3383,10 @@ static int shadow_one_bit_disable(struct
}
/* Update the bits */
- sh_new_mode(d, d->arch.paging.mode & ~mode);
+ mode = d->arch.paging.mode & ~mode;
+ if ( mode == PG_SH_enable )
+ mode = 0;
+ sh_new_mode(d, mode);
if ( d->arch.paging.mode == 0 )
{
/* Get this domain off shadows */
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] x86/shadow: make 1-bit-disable match 1-bit-enable
2017-12-18 9:28 [PATCH] x86/shadow: make 1-bit-disable match 1-bit-enable Jan Beulich
@ 2017-12-20 8:02 ` Tim Deegan
0 siblings, 0 replies; 2+ messages in thread
From: Tim Deegan @ 2017-12-20 8:02 UTC (permalink / raw)
To: Jan Beulich; +Cc: xen-devel
At 02:28 -0700 on 18 Dec (1513564115), Jan Beulich wrote:
> shadow_one_bit_enable() sets PG_SH_enable (if not already set of course)
> in addition to the bit being requested. Make shadow_one_bit_disable()
> behave similarly - clear PG_SH_enable if that's the only bit remaining.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Tim Deegan <tim@xen.org>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-12-20 8:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-18 9:28 [PATCH] x86/shadow: make 1-bit-disable match 1-bit-enable Jan Beulich
2017-12-20 8:02 ` Tim Deegan
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).