From: "Scott Parish" Subject: [patch] monitor_table is getting set to 0 for domu x86_64 Date: Sat, 18 Jun 2005 19:49:11 +0000 Message-ID: <20050618194911.GG2912@us.ibm.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="H+4ONPRPur6+Ovig" Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --H+4ONPRPur6+Ovig Content-Type: text/plain; charset=us-ascii Content-Disposition: inline monitor_table is pfn 0 when __context_switch goes to set cr3 for a second domain. I hacked update_pagetables to print out what monitor_table gets set to, here's the output while launching a domu: (XEN) guest_table_user: 0x0 (XEN) shadow_table: 0x0 (XEN) guest_table: 0x169b (XEN) using guest_table_user: 0x0 .. (XEN) cs: monitor_table: 0x0 (XEN) Domain 1 (vcpu#0) crashed on cpu#0: .. While the attached patch takes care of the problem, and i don't understand everything i know about TF_kernel_mode and guest_table_user, so likely a better solution is in order. If somebody wouldn't mind saying a few words about either of these, i'd appreciate it. With this patch i can tell that a domU actually makes some progress (judging from the register state), before falling on its face when it makes its first syscall. Huge props to Jerone for pointing out sync_console to me! sRp -- Scott Parish Signed-off-by: srparish@us.ibm.com --H+4ONPRPur6+Ovig Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="monitor-table.diff" --- old-xen-build/xen/include/asm-x86/shadow.h 2005-06-07 13:50:19.000000000 +0000 +++ new-xen-build/xen/include/asm-x86/shadow.h 2005-06-18 20:34:14.000000000 +0000 @@ -1700,7 +1700,8 @@ static inline void update_pagetables(str if ( likely(!shadow_mode_external(d)) ) { #ifdef __x86_64__ - if ( !(v->arch.flags & TF_kernel_mode) ) + if ( !(v->arch.flags & TF_kernel_mode) && + pagetable_get_pfn(v->arch.guest_table_user) ) v->arch.monitor_table = v->arch.guest_table_user; else #endif --H+4ONPRPur6+Ovig Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --H+4ONPRPur6+Ovig--