Oh, Missed the subject :-(>-----Original Message----- >From: xen-devel-bounces@lists.xensource.com >[mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of Li, Xin B >Sent: 2006年2月10日 16:56 >To: leendert@watson.ibm.com >Cc: xen-devel@lists.xensource.com >Subject: [Xen-devel] (no subject) > >Leendert, when I''m reading the vmxassist code, I think we need this >patch, can you take a look for me? >Thanks >-Xin > >diff -r 47013962e411 tools/firmware/vmxassist/setup.c >--- a/tools/firmware/vmxassist/setup.c Fri Feb 10 02:23:36 2006 >+++ b/tools/firmware/vmxassist/setup.c Fri Feb 10 15:28:17 2006 >@@ -363,7 +363,7 @@ > > initialize_real_mode = 1; > cr0 = get_cr0(); >-#ifndef TEST >+#ifdef TEST > set_cr0(cr0 | CR0_PE); > #endif > set_cr0(cr0 & ~CR0_PE); > >_______________________________________________ >Xen-devel mailing list >Xen-devel@lists.xensource.com >http://lists.xensource.com/xen-devel >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Leendert van Doorn
2006-Feb-11 03:23 UTC
[PATCH] Re: [Xen-devel] redundant set_cr0 in vmxassist setup.c
# >Leendert, when I''m reading the vmxassist code, I think we need this # >patch, can you take a look for me? Actually all that code can go. It used to be necessary to force Xen to switch to the right page table before switching to the vmxassist code. Asit&Jun removed that dependency a long time ago by using the 1-1 table that the vmx builder constructed (and that Xen now constructs). This code was left over. Leendert vmxassist/setup.c cleanup. It is no longer necessary to switch to an alternate page table before transfering into the real mode emulator. Signed-Off-By: "Li, Xin B" <xin.b.li@intel.com> Signed-Off-By: Leendert van Doorn <leendert@watson.ibm.com> diff -r 1d36cca98fc3 tools/firmware/vmxassist/setup.c --- a/tools/firmware/vmxassist/setup.c Fri Feb 10 11:35:19 2006 +++ b/tools/firmware/vmxassist/setup.c Fri Feb 10 23:12:49 2006 @@ -353,8 +353,6 @@ void start_bios(void) { - unsigned long cr0; - if (booting_cpu == 0) printf("Start BIOS ...\n"); else @@ -362,11 +360,7 @@ booting_cpu, booting_vector << 12); initialize_real_mode = 1; - cr0 = get_cr0(); -#ifndef TEST - set_cr0(cr0 | CR0_PE); -#endif - set_cr0(cr0 & ~CR0_PE); + set_cr0(get_cr0() & ~CR0_PE); panic("vmxassist returned"); /* "cannot happen" */ } _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel