All of lore.kernel.org
 help / color / mirror / Atom feed
* switch out of 32e mode issue
@ 2007-07-03  6:51 Zhai, Edwin
  2007-07-03  8:57 ` Keir Fraser
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Zhai, Edwin @ 2007-07-03  6:51 UTC (permalink / raw)
  To: Ian Pratt; +Cc: xen-devel

Ian,

I have read the your changeset 13830
"[XEN] kexec: add compatability shim for kexec in 32on64 mode", which seems to 
be used for kexec a 32b kernel on 32e xen.

I borrow some of the code from xen/arch/x86/x86_64/compat_kexec.S for similar 
purpose(switch out of 32e mode in xen) by similar way:
1. setup identity map in idle_pg_table then switch to it.
2. ljmp to a identity map code in another code segment of compatibility mode
3. turn of paging by clear CR0.PG
4. load a new cr3 with legacy page table
5. clear EFER.LME
6. turn on paging by set CR0.PG
7. a branch instruction

But I always have a GP fault in step 3 when mov cr0:(
(XEN) ****************************************
(XEN) Panic on CPU 0:
(XEN) GENERAL PROTECTION FAULT
(XEN) [error_code=0000]
(XEN) ****************************************

Do you have successful run for the above code? Your code missed step 7, does it 
matter?

Do you have any comments for the GP fault?

Thanks a lot.


-- 
best rgds,
edwin

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-07-03  9:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-03  6:51 switch out of 32e mode issue Zhai, Edwin
2007-07-03  8:57 ` Keir Fraser
2007-07-03  9:32   ` Zhai, Edwin
2007-07-03  9:09 ` Ian Campbell
2007-07-03  9:48   ` Zhai, Edwin
2007-07-03  9:18 ` Ian Campbell

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.