All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ling, Xiaofeng" <xiaofeng.ling@intel.com>
To: xen-devel <xen-devel@lists.xensource.com>
Subject: [PATCH] fix segmentation faults when booting FC3 in vmx domain
Date: Wed, 30 Nov 2005 16:16:11 +0800	[thread overview]
Message-ID: <438D5FCB.2080008@intel.com> (raw)

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

# HG changeset patch
# User Xiaofeng Ling <xiaofeng.ling@intel.com>
# Node ID 722429e8b618adc9f39340ff39fc0d7f4a6b1bec
# Parent  ccf76e51e7e6661df56c35c244fca0a52aa8f481
We need to do sync when mov_to_cr3 to a value already shadowed.
The L2 page and already shadowed L1 page may be out of sync.
This patch fix the problems of segmentation faults and strange prints
when booting Redhat FC3 and make kernel in FC3 in VMX domain.

Signed-off-by: Xiaofeng Ling <xiaofeng.ling@intel.com>

diff -r ccf76e51e7e6 -r 722429e8b618 xen/arch/x86/shadow.c
--- a/xen/arch/x86/shadow.c	Tue Nov 29 17:59:03 2005 +0100
+++ b/xen/arch/x86/shadow.c	Wed Nov 30 16:08:41 2005 +0800
@@ -2154,7 +2154,8 @@
  #elif CONFIG_PAGING_LEVELS == 4
          smfn = shadow_l4_table(d, gpfn, gmfn);
  #endif
-    }
+    }else
+        shadow_sync_all(d);
      if ( !get_shadow_ref(smfn) )
          BUG();
      old_smfn = pagetable_get_pfn(v->arch.shadow_table);
diff -r ccf76e51e7e6 -r 722429e8b618 xen/arch/x86/shadow32.c
--- a/xen/arch/x86/shadow32.c	Tue Nov 29 17:59:03 2005 +0100
+++ b/xen/arch/x86/shadow32.c	Wed Nov 30 16:08:41 2005 +0800
@@ -2911,6 +2911,8 @@
       */
      if ( unlikely(!(smfn = __shadow_status(d, gpfn, 
PGT_base_page_table))) )
          smfn = shadow_l2_table(d, gpfn, gmfn);
+    else
+        shadow_sync_all(d);
      if ( !get_shadow_ref(smfn) )
          BUG();
      old_smfn = pagetable_get_pfn(v->arch.shadow_table);

[-- Attachment #2: movcrsync.patch --]
[-- Type: text/x-patch, Size: 1409 bytes --]

# HG changeset patch
# User Xiaofeng Ling <xiaofeng.ling@intel.com>
# Node ID 722429e8b618adc9f39340ff39fc0d7f4a6b1bec
# Parent  ccf76e51e7e6661df56c35c244fca0a52aa8f481
We need to do sync when mov_to_cr3 to a value already shadowed.
The L2 page and already shadowed L1 page may out of sync.
This patch fix the problems of segmentation faults and strange prints
when booting Redhat FC3 and make kernel in FC3 in VMX domain.

Signed-off-by: Xiaofeng Ling <xiaofeng.ling@intel.com>

diff -r ccf76e51e7e6 -r 722429e8b618 xen/arch/x86/shadow.c
--- a/xen/arch/x86/shadow.c	Tue Nov 29 17:59:03 2005 +0100
+++ b/xen/arch/x86/shadow.c	Wed Nov 30 16:08:41 2005 +0800
@@ -2154,7 +2154,8 @@
 #elif CONFIG_PAGING_LEVELS == 4
         smfn = shadow_l4_table(d, gpfn, gmfn);
 #endif
-    }
+    }else
+        shadow_sync_all(d);
     if ( !get_shadow_ref(smfn) )
         BUG();
     old_smfn = pagetable_get_pfn(v->arch.shadow_table);
diff -r ccf76e51e7e6 -r 722429e8b618 xen/arch/x86/shadow32.c
--- a/xen/arch/x86/shadow32.c	Tue Nov 29 17:59:03 2005 +0100
+++ b/xen/arch/x86/shadow32.c	Wed Nov 30 16:08:41 2005 +0800
@@ -2911,6 +2911,8 @@
      */
     if ( unlikely(!(smfn = __shadow_status(d, gpfn, PGT_base_page_table))) )
         smfn = shadow_l2_table(d, gpfn, gmfn);
+    else
+        shadow_sync_all(d);
     if ( !get_shadow_ref(smfn) )
         BUG();
     old_smfn = pagetable_get_pfn(v->arch.shadow_table);

[-- 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:[~2005-11-30  8:16 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=438D5FCB.2080008@intel.com \
    --to=xiaofeng.ling@intel.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.