From: Gianluca Guida <gianluca.guida@eu.citrix.com>
To: haicheng.li@intel.com, Keir Fraser <keir.fraser@eu.citrix.com>
Cc: Tim Deegan <Tim.Deegan@eu.citrix.com>,
"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: [PATCH] Fix OOS on domain crash.
Date: Wed, 13 Aug 2008 19:29:26 +0100 [thread overview]
Message-ID: <48A32806.3000207@eu.citrix.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 766 bytes --]
Hello,
I couldn't reproduce the Nevada crash on my testbox, but this should fix
the first Xen crash that was seen in the Nevada HVM (bugzilla #1322).
What I think most probably happened there is that the set_l2e call in
shadow_get_and_create_l1e() has tried to resync a page, but somehow we
weren't unable to remove the shadow (the real bug we should actually
look after). sh_resync() then removes the page from the OOS hash and
later in the page fault path we find the gw.l1mfn to be still OOS, so we
try to update the snapshot and the bug happens.
Attached patch should fix this and other unlikely (like sh_unsync()
failing to remove for hash collision the current gw.l1mfn) cases.
Gianluca
Signed-off-by: Gianluca Guida <gianluca.guida@eu.citrix.com>
[-- Attachment #2: fix-oos-on-domain-crash.patch --]
[-- Type: text/x-patch, Size: 782 bytes --]
diff -r b75f0b3e2a7e xen/arch/x86/mm/shadow/multi.c
--- a/xen/arch/x86/mm/shadow/multi.c Wed Aug 13 11:09:46 2008 +0100
+++ b/xen/arch/x86/mm/shadow/multi.c Wed Aug 13 14:05:57 2008 -0400
@@ -3290,6 +3290,16 @@ static int sh_page_fault(struct vcpu *v,
if ( sh_mfn_is_a_page_table(gmfn)
&& ft == ft_demand_write )
sh_unsync(v, gmfn);
+
+ if ( unlikely(d->is_shutting_down) )
+ {
+ /* We might end up with a crashed domain here if
+ * sh_remove_shadows() in a previous sh_resync() call has
+ * failed. We cannot safely continue since some page is still
+ * OOS but not in the hash table anymore. */
+ shadow_unlock(d);
+ return 0;
+ }
#endif /* OOS */
/* Calculate the shadow entry and write it */
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
reply other threads:[~2008-08-13 18:29 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=48A32806.3000207@eu.citrix.com \
--to=gianluca.guida@eu.citrix.com \
--cc=Tim.Deegan@eu.citrix.com \
--cc=haicheng.li@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.