All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@suse.de>
To: Xen devel list <xen-devel@lists.xensource.com>
Subject: [patch] kexec: minor xen tweaks
Date: Mon, 14 Aug 2006 16:34:00 +0200	[thread overview]
Message-ID: <44E089D8.9010301@suse.de> (raw)

[-- Attachment #1: Type: text/plain, Size: 562 bytes --]

  Hi,

The patch below makes two minor modifications to the xen kernel:

First it adds a printk when trying to switch page tables via idle page
table (happens when the new cr3 page table tree itself is valid, but
hasn't the old page table pages mapped read-only).  That helps alot when
trying to find the reason of error messages with verbose=y builds ;)

Second it allows the user baseptr being reset to 0 (unused) on x86_64,
which is needed for domU kexec.

please apply,

  Gerd

-- 
Gerd Hoffmann <kraxel@suse.de>
http://www.suse.de/~kraxel/julika-dora.jpeg

[-- Attachment #2: xen.diff --]
[-- Type: text/x-patch, Size: 1100 bytes --]

Signed-off-by: Gerd Hoffmann <kraxel@suse.de>
diff -r befab551b0e1 xen/arch/x86/mm.c
--- a/xen/arch/x86/mm.c	Sun Aug 13 09:44:07 2006 +0100
+++ b/xen/arch/x86/mm.c	Mon Aug 14 12:49:11 2006 +0200
@@ -1763,6 +1763,7 @@ int new_guest_cr3(unsigned long mfn)
         if ( unlikely(!okay) )
         {
             /* Switch to idle pagetable: this VCPU has no active p.t. now. */
+            MEM_LOG("New baseptr %lx: slow path via idle pagetables", mfn);
             old_base_mfn = pagetable_get_pfn(v->arch.guest_table);
             v->arch.guest_table = pagetable_null();
             update_pagetables(v);
@@ -2046,8 +2047,10 @@ int do_mmuext_op(
         
 #ifdef __x86_64__
         case MMUEXT_NEW_USER_BASEPTR:
-            okay = get_page_and_type_from_pagenr(
-                mfn, PGT_root_page_table, d);
+            okay = 1;
+            if (likely(mfn != 0))
+                okay = get_page_and_type_from_pagenr(
+                    mfn, PGT_root_page_table, d);
             if ( unlikely(!okay) )
             {
                 MEM_LOG("Error while installing new mfn %lx", mfn);

[-- 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:[~2006-08-14 14:34 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=44E089D8.9010301@suse.de \
    --to=kraxel@suse.de \
    --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.