VMX check in /xen/arch/x86/domain.c is invalid on x86-64 (at least AMD)
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 5 lines · Jerone Young
if (!(c->flags &
ECF_VMX_GUEST))if ( ((c->cpu_ctxt.cs & 3) == 0) || ((c->cpu_ctxt.ss & 3) == 0) ) return -EINVAL;
Quoted 8 lines
This check in /xen/arch/x86/domain.c (line 394) is invalid for AMD x86-64 as this field 1<<1 is a reserved field in the rflags (name for 64bit eflags) that reads as 1. This can be found in the AMD x86-64 Programming manual vol 2 on page 65. Below is the code, I'm not sure how to put an ifdef around since I'm not sure if Intel's EMT64 with VMX cpus have the same rflag reserved (which if this check is correct they do)? This helps break x86-64 building domU domains.
It is a reserved bit on Intel as well. Look at:
VMCS_EFLAGS_RESERVED_1 and the IA-32 vol1 Fig 3-7.
Are you mixing up ctxt->user_regs.rflags and ctxt->flags in xc_linux_build.c?
-Arun
Yes I am actually. Sorry guy. I got that one screwed up in my head. Pressed the send button too quickly. Thanks for the respsonses though.
Quoted 29 lines · Arun Sharma
Quoted 5 lines · Jerone Young
if (!(c->flags &
ECF_VMX_GUEST))if ( ((c->cpu_ctxt.cs & 3) == 0) || ((c->cpu_ctxt.ss & 3) == 0) ) return -EINVAL;Quoted 8 lines
This check in /xen/arch/x86/domain.c (line 394) is invalid for AMD x86-64 as this field 1<<1 is a reserved field in the rflags (name for 64bit eflags) that reads as 1. This can be found in the AMD x86-64 Programming manual vol 2 on page 65. Below is the code, I'm not sure how to put an ifdef around since I'm not sure if Intel's EMT64 with VMX cpus have the same rflag reserved (which if this check is correct they do)? This helps break x86-64 building domU domains.
It is a reserved bit on Intel as well. Look at:
VMCS_EFLAGS_RESERVED_1and the IA-32 vol1 Fig 3-7.Are you mixing up
ctxt->user_regs.rflagsandctxt->flagsinxc_linux_build.c?-Arun
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel