All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrange" <berrange@redhat.com>
To: xen-devel@lists.xensource.com
Subject: Re: Xen unstable fails to boot from cold on i386 core duo
Date: Tue, 18 Dec 2007 02:03:29 +0000	[thread overview]
Message-ID: <20071218020329.GB16446@redhat.com> (raw)
In-Reply-To: <20071218000057.GD19291@redhat.com>

On Tue, Dec 18, 2007 at 12:00:57AM +0000, Daniel P. Berrange wrote:
> Converting ff16420d / vmx_cpu_up+0x25d address into a line number with 
> eu-addr2line, it appears as if Xen is crashing & burning in the 'wrmsr' 
> call in the 2nd half of this conditional from arch/x86/hvm/vmx/vmcs.c:
> 
>     if ( eax & IA32_FEATURE_CONTROL_MSR_LOCK )
>     {
>         if ( !(eax & (IA32_FEATURE_CONTROL_MSR_ENABLE_VMXON_OUTSIDE_SMX |
>                       IA32_FEATURE_CONTROL_MSR_ENABLE_VMXON_INSIDE_SMX)) )
>         {
>             printk("CPU%d: VMX disabled by BIOS.\n", cpu);
>             return 0;
>         }
>     }
>     else
>     {
>         eax = (IA32_FEATURE_CONTROL_MSR_LOCK |
>                IA32_FEATURE_CONTROL_MSR_ENABLE_VMXON_OUTSIDE_SMX |
>                IA32_FEATURE_CONTROL_MSR_ENABLE_VMXON_INSIDE_SMX);
>         wrmsr(IA32_FEATURE_CONTROL_MSR, eax, 0);
>     }

[snip]

> Is it possible that older CPUs / BIOS don't play nice with the extra bit
> 
>    IA32_FEATURE_CONTROL_MSR_ENABLE_VMXON_INSIDE_SMX
> 
> ...if they don't have SMX support ?

I have confirmed that if I modify Xen with this patch:

--- xen-unstable-16606.orig/xen/arch/x86/hvm/vmx/vmcs.c	2007-12-13 04:31:03.000000000 -0500
+++ xen-unstable-16606/xen/arch/x86/hvm/vmx/vmcs.c	2007-12-17 20:21:43.000000000 -0500
@@ -265,8 +265,7 @@ int vmx_cpu_up(void)
 
     if ( eax & IA32_FEATURE_CONTROL_MSR_LOCK )
     {
-        if ( !(eax & (IA32_FEATURE_CONTROL_MSR_ENABLE_VMXON_OUTSIDE_SMX |
-                      IA32_FEATURE_CONTROL_MSR_ENABLE_VMXON_INSIDE_SMX)) )
+        if ( !(eax & (IA32_FEATURE_CONTROL_MSR_ENABLE_VMXON_OUTSIDE_SMX)))
         {
             printk("CPU%d: VMX disabled by BIOS.\n", cpu);
             return 0;
@@ -275,8 +274,7 @@ int vmx_cpu_up(void)
     else
     {
         eax = (IA32_FEATURE_CONTROL_MSR_LOCK |
-               IA32_FEATURE_CONTROL_MSR_ENABLE_VMXON_OUTSIDE_SMX |
-               IA32_FEATURE_CONTROL_MSR_ENABLE_VMXON_INSIDE_SMX);
+               IA32_FEATURE_CONTROL_MSR_ENABLE_VMXON_OUTSIDE_SMX);
         wrmsr(IA32_FEATURE_CONTROL_MSR, eax, 0);
     }
 


Everything works nicely again.   Obviously this patch will break stuff
related to SMX so a better solution is required by somebody with the
knowledge in this area....

Regards,
Dan.
-- 
|=- Red Hat, Engineering, Emerging Technologies, Boston.  +1 978 392 2496 -=|
|=-           Perl modules: http://search.cpan.org/~danberr/              -=|
|=-               Projects: http://freshmeat.net/~danielpb/               -=|
|=-  GnuPG: 7D3B9505   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505  -=| 

  reply	other threads:[~2007-12-18  2:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-17 15:42 Xen unstable fails to boot from cold on i386 core duo Daniel P. Berrange
2007-12-18  0:00 ` Daniel P. Berrange
2007-12-18  2:03   ` Daniel P. Berrange [this message]
2007-12-19 15:51     ` Keir Fraser

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20071218020329.GB16446@redhat.com \
    --to=berrange@redhat.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.