From: Gianluca Guida <gianluca.guida@eu.citrix.com>
To: Keir Fraser <keir.fraser@eu.citrix.com>
Cc: "Xu, Jiajun" <jiajun.xu@intel.com>,
"Li, Haicheng" <haicheng.li@intel.com>,
xen-devel@lists.xensource.com
Subject: [PATCH] Fix OOS typecounting [was: Test report for Xen-3.3.0-rc4 (#18314)]
Date: Thu, 14 Aug 2008 16:14:28 +0100 [thread overview]
Message-ID: <48A44BD4.9090505@eu.citrix.com> (raw)
In-Reply-To: <C4C99CC3.1C2B4%keir.fraser@eu.citrix.com>
[-- Attachment #1: Type: text/plain, Size: 564 bytes --]
Hello,
Keir Fraser wrote:
> We still need to decide whether to fix the second issue or disable OOS.
The attached patch should fix this issue. It was an all-my-fault
breakage of set_l1e atomicity.
> We're not decided on that just yet. If it reproed more reliably for us then
> I'd be more optimistic about fixing it. Perhaps I will switch to 32pae as so
> far I've been running 32e host.
A very easy way to reproduce this bug is to set SHADOW_OOS_FIXUPS to 1
in xen/include/asm-x86/mm.h. This will reproduce very quickly the
typecount corruption.
Gianluca
[-- Attachment #2: fix-oos-typecount.patch --]
[-- Type: text/x-patch, Size: 1210 bytes --]
diff -r d3947223dfae xen/arch/x86/mm/shadow/multi.c
--- a/xen/arch/x86/mm/shadow/multi.c Thu Aug 14 13:46:48 2008 +0100
+++ b/xen/arch/x86/mm/shadow/multi.c Thu Aug 14 10:31:12 2008 -0400
@@ -1415,6 +1415,15 @@ static int shadow_set_l1e(struct vcpu *v
mfn_t new_gmfn = shadow_l1e_get_mfn(new_sl1e);
#endif
ASSERT(sl1e != NULL);
+
+#if SHADOW_OPTIMIZATIONS & SHOPT_OUT_OF_SYNC
+ if ( mfn_valid(new_gmfn) && mfn_oos_may_write(new_gmfn)
+ && ((shadow_l1e_get_flags(new_sl1e) & (_PAGE_RW|_PAGE_PRESENT))
+ == (_PAGE_RW|_PAGE_PRESENT)) )
+ {
+ oos_fixup_add(v, new_gmfn, sl1mfn, pgentry_ptr_to_slot(sl1e));
+ }
+#endif
old_sl1e = *sl1e;
@@ -1434,14 +1443,6 @@ static int shadow_set_l1e(struct vcpu *v
else
{
shadow_vram_get_l1e(new_sl1e, sl1e, sl1mfn, d);
-#if SHADOW_OPTIMIZATIONS & SHOPT_OUT_OF_SYNC
- if ( mfn_valid(new_gmfn) && mfn_oos_may_write(new_gmfn)
- && (shadow_l1e_get_flags(new_sl1e) & _PAGE_RW) )
- {
- oos_fixup_add(v, new_gmfn, sl1mfn, pgentry_ptr_to_slot(sl1e));
- }
-#endif
-
}
}
}
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
next prev parent reply other threads:[~2008-08-14 15:14 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-13 7:43 Test report for Xen-3.3.0-rc4 (#18314) Li, Haicheng
2008-08-13 8:30 ` Keir Fraser
2008-08-13 8:43 ` Keir Fraser
2008-08-13 9:32 ` Xu, Jiajun
2008-08-13 9:48 ` Keir Fraser
2008-08-13 12:25 ` Xu, Jiajun
2008-08-13 14:48 ` Keir Fraser
2008-08-13 15:18 ` Keir Fraser
2008-08-14 7:09 ` Xu, Jiajun
2008-08-14 7:26 ` Keir Fraser
2008-08-14 8:44 ` Keir Fraser
2008-08-14 9:03 ` Xu, Jiajun
2008-08-14 9:07 ` Keir Fraser
2008-08-14 15:32 ` Keir Fraser
2008-08-15 1:56 ` Xu, Jiajun
2008-08-14 15:14 ` Gianluca Guida [this message]
2008-08-14 10:13 ` Keir Fraser
2008-08-14 12:49 ` Xu, Jiajun
2008-08-14 13:46 ` Xu, Jiajun
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=48A44BD4.9090505@eu.citrix.com \
--to=gianluca.guida@eu.citrix.com \
--cc=haicheng.li@intel.com \
--cc=jiajun.xu@intel.com \
--cc=keir.fraser@eu.citrix.com \
--cc=xen-devel@lists.xensource.com \
/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.