> >
>  I got the same behaviour here, and it seems that the reason is 32-bit
> machines does not use the CR8 register. But the code in vmx.c makes it
> a minimum requirement as in:
>
>         min = CPU_BASED_HLT_EXITING |
>               CPU_BASED_CR8_LOAD_EXITING |
>               CPU_BASED_CR8_STORE_EXITING |
>               CPU_BASED_USE_IO_BITMAPS |
>               CPU_BASED_MOV_DR_EXITING |
>               CPU_BASED_USE_TSC_OFFSETING;
>
> I think the solution is to enclose the CR8 constants in a ifdef
> CONFIG_X86_64, since putting them as optional won't do the right thing
> in 64-bit (and thus, core duo), machines.
>
> I was about to post a patch for it now.
>
> Avi, if you agree with the fix, I can do it right now.
>

BTW, in case you agree, here is the patch

-- 
Glauber de Oliveira Costa.
"Free as in Freedom"
http://glommer.net

"The less confident you are, the more serious you have to act."
commit 2863174b39dd8768cd7922832e45ea00d5c6442c
Author: Glauber de Oliveira Costa <[EMAIL PROTECTED]>
Date:   Tue Aug 14 15:51:22 2007 -0300

    don't create vmcs entries for cr8 when running on 32-bit
    
    This is because cr8 is not available on IA-32. It is just used in 64-bit mode.
    The rdmsr will then report this as not present, and it will lead us to return
    an -EIO.
    
    Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]>

diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c
index 4901339..906d4fa 100644
--- a/drivers/kvm/vmx.c
+++ b/drivers/kvm/vmx.c
@@ -864,8 +864,10 @@ static __init int setup_vmcs_config(struct vmcs_config *vmcs_conf)
 		return -EIO;
 
 	min = CPU_BASED_HLT_EXITING |
+#ifdef CONFIG_X86_64
 	      CPU_BASED_CR8_LOAD_EXITING |
 	      CPU_BASED_CR8_STORE_EXITING |
+#endif
 	      CPU_BASED_USE_IO_BITMAPS |
 	      CPU_BASED_MOV_DR_EXITING |
 	      CPU_BASED_USE_TSC_OFFSETING;
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel

Reply via email to