Skip to contentSkip to conversation

monitor_table is getting set to 0 for domux86_64

PATCH New Nakajima, Jun 2 participants 2 messages Jun 18, 2005 – Jun 19, 2005

lore
Share & tools
lore
#0 lore raw
Quoted 8 lines · Scott Parish
Quoted 5 lines · Scott Parish

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.

Quoted 6 lines

I retract said patch--after understanding more of what i knew about TF_kernel_mode, and looking into the syscall problem, it seems clear that the problem is that TF_kernel_mode isn't set.

So now the question is, why is TF_kernel_mode is getting cleared by arch_set_info_guest()? (or why isn't VGCF_IN_KERNEL set?)

I think you need to set VGCF_IN_KERNEL for x86_64 domains in xc_linux_build.c for initialization.

For example, we are setting VGCF_VMX_GUEST in the builder (libxc/xc_vmx_build.c) like

    ctxt->flags = VGCF_VMX_GUEST; 
Quoted 2 lines

sRp

Jun
---
Intel Open Source Technology Center

#1 lore raw

PATCH 1/1 clear ctxt->flags before getdomaininfo

Quoted 6 lines · Jun

I think you need to set VGCF_IN_KERNEL for x86_64 domains in xc_linux_build.c for initialization.

For example, we are setting VGCF_VMX_GUEST in the builder (libxc/xc_vmx_build.c) like

    ctxt->flags = VGCF_VMX_GUEST; 

I like the attached patch a little better, but if i'm mistaken about how getdomaininfo is suppose to work, then yes, what you're suggesting is the right thing to do.

Also attached is fixes for formatting nits.

sRp

Signature · 2 lines
Scott Parish
Signed-off-by: [email protected]
tools/libxc/xc_linux_build.c +2 -2
@@ -486,6 +482,8 @@ int xc_linux_build(int xc_handle,
         return 1;
     }
 
+    ctxt->flags = 0;
+
     op.cmd = DOM0_GETDOMAININFO;
     op.u.getdomaininfo.domain = (domid_t)domid;
     if ( (do_dom0_op(xc_handle, &op) < 0) || 
@@ -527,8 +525,6 @@ int xc_linux_build(int xc_handle,
     if ( image != NULL )
         free(image);
 
-    ctxt->flags = 0;
-
     /*
      * Initial register values:
      *  DS,ES,FS,GS = FLAT_KERNEL_DS
tools/libxc/xc_linux_build.c +23 -27

91 lines not on this page · raw message

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel