kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Add microcode patch level dummy
@ 2009-01-05 15:02 Alexander Graf
  2009-01-05 16:28 ` Anthony Liguori
  2009-01-06  9:29 ` Avi Kivity
  0 siblings, 2 replies; 8+ messages in thread
From: Alexander Graf @ 2009-01-05 15:02 UTC (permalink / raw)
  To: kvm; +Cc: avi

VMware ESX checks if the microcode level is correct when using a barcelona CPU, in
order to see if it actually can use SVM. Let's tell it we're on the safe side...

Signed-off-by: Alexander Graf <agraf@suse.de>

diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
index f53be7e..3f88416 100644
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -1928,6 +1928,9 @@ static int svm_get_msr(struct kvm_vcpu *vcpu, unsigned ecx, u64 *data)
 	case MSR_VM_CR:
 		*data = 0;
 		break;
+	case MSR_IA32_UCODE_REV:
+		*data = 0x01000065;
+		break;
 	default:
 		return kvm_get_msr_common(vcpu, ecx, data);
 	}

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] Add microcode patch level dummy
  2009-01-05 15:02 [PATCH] Add microcode patch level dummy Alexander Graf
@ 2009-01-05 16:28 ` Anthony Liguori
  2009-01-05 16:30   ` Alexander Graf
  2009-01-06  9:29 ` Avi Kivity
  1 sibling, 1 reply; 8+ messages in thread
From: Anthony Liguori @ 2009-01-05 16:28 UTC (permalink / raw)
  To: Alexander Graf; +Cc: kvm, avi

Alexander Graf wrote:
> VMware ESX checks if the microcode level is correct when using a barcelona CPU, in
> order to see if it actually can use SVM. Let's tell it we're on the safe side...
>   

Sounds like you're able to boot ESX?  Are you able to run a guest yet?

Regards,

Anthony Liguori

> Signed-off-by: Alexander Graf <agraf@suse.de>
>
> diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
> index f53be7e..3f88416 100644
> --- a/arch/x86/kvm/svm.c
> +++ b/arch/x86/kvm/svm.c
> @@ -1928,6 +1928,9 @@ static int svm_get_msr(struct kvm_vcpu *vcpu, unsigned ecx, u64 *data)
>  	case MSR_VM_CR:
>  		*data = 0;
>  		break;
> +	case MSR_IA32_UCODE_REV:
> +		*data = 0x01000065;
> +		break;
>  	default:
>  		return kvm_get_msr_common(vcpu, ecx, data);
>  	}
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>   


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] Add microcode patch level dummy
  2009-01-05 16:28 ` Anthony Liguori
@ 2009-01-05 16:30   ` Alexander Graf
  2009-01-05 16:38     ` David S. Ahern
  2009-01-05 16:40     ` Anthony Liguori
  0 siblings, 2 replies; 8+ messages in thread
From: Alexander Graf @ 2009-01-05 16:30 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: kvm, avi

Anthony Liguori wrote:
> Alexander Graf wrote:
>> VMware ESX checks if the microcode level is correct when using a
>> barcelona CPU, in
>> order to see if it actually can use SVM. Let's tell it we're on the
>> safe side...
>>   
>
> Sounds like you're able to boot ESX?  Are you able to run a guest yet?

The moment you wrote the mail I just managed to get ReactOS running in
ESX. It does not use SVM yet though. I wonder when/if ESX actually does
use SVM.

Alex


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] Add microcode patch level dummy
  2009-01-05 16:30   ` Alexander Graf
@ 2009-01-05 16:38     ` David S. Ahern
  2009-01-05 16:39       ` Alexander Graf
  2009-01-05 16:40     ` Anthony Liguori
  1 sibling, 1 reply; 8+ messages in thread
From: David S. Ahern @ 2009-01-05 16:38 UTC (permalink / raw)
  To: Alexander Graf; +Cc: Anthony Liguori, kvm, avi



Alexander Graf wrote:
> Anthony Liguori wrote:
>> Alexander Graf wrote:
>>> VMware ESX checks if the microcode level is correct when using a
>>> barcelona CPU, in
>>> order to see if it actually can use SVM. Let's tell it we're on the
>>> safe side...
>>>   
>> Sounds like you're able to boot ESX?  Are you able to run a guest yet?
> 
> The moment you wrote the mail I just managed to get ReactOS running in
> ESX. It does not use SVM yet though. I wonder when/if ESX actually does
> use SVM.
> 

Is the guest 64-bit? I am suspecting ESX 3.5 series does not use VT/SVM
for 32-bit guests, but have not been able to positively confirm it.

david


> Alex
> 
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] Add microcode patch level dummy
  2009-01-05 16:38     ` David S. Ahern
@ 2009-01-05 16:39       ` Alexander Graf
  0 siblings, 0 replies; 8+ messages in thread
From: Alexander Graf @ 2009-01-05 16:39 UTC (permalink / raw)
  To: David S. Ahern; +Cc: Anthony Liguori, kvm, avi

David S. Ahern wrote:
> Alexander Graf wrote:
>   
>> Anthony Liguori wrote:
>>     
>>> Alexander Graf wrote:
>>>       
>>>> VMware ESX checks if the microcode level is correct when using a
>>>> barcelona CPU, in
>>>> order to see if it actually can use SVM. Let's tell it we're on the
>>>> safe side...
>>>>   
>>>>         
>>> Sounds like you're able to boot ESX?  Are you able to run a guest yet?
>>>       
>> The moment you wrote the mail I just managed to get ReactOS running in
>> ESX. It does not use SVM yet though. I wonder when/if ESX actually does
>> use SVM.
>>
>>     
>
> Is the guest 64-bit? I am suspecting ESX 3.5 series does not use VT/SVM
> for 32-bit guests, but have not been able to positively confirm it.
>   

I told VMware it's "an unknown 64-bit Linux guest". Oh well, I can try
to actually run 64-bit code in the VM :).

Alex


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] Add microcode patch level dummy
  2009-01-05 16:30   ` Alexander Graf
  2009-01-05 16:38     ` David S. Ahern
@ 2009-01-05 16:40     ` Anthony Liguori
  2009-01-05 17:08       ` Alexander Graf
  1 sibling, 1 reply; 8+ messages in thread
From: Anthony Liguori @ 2009-01-05 16:40 UTC (permalink / raw)
  To: Alexander Graf; +Cc: kvm, avi

Alexander Graf wrote:
> Anthony Liguori wrote:
>   
>> Alexander Graf wrote:
>>     
>>> VMware ESX checks if the microcode level is correct when using a
>>> barcelona CPU, in
>>> order to see if it actually can use SVM. Let's tell it we're on the
>>> safe side...
>>>   
>>>       
>> Sounds like you're able to boot ESX?  Are you able to run a guest yet?
>>     
>
> The moment you wrote the mail I just managed to get ReactOS running in
> ESX. It does not use SVM yet though. I wonder when/if ESX actually does
> use SVM.
>   

I'm pretty certain that if ESX detects that it is running under ESX, it 
disables SVM/VT.  There was a fair bit of noise a few months ago because 
a certain beta version of VMware didn't do this which meant you could no 
longer run ESX nested.  They quickly fixed that.

I'd try disabling vmport and the hypervisor present bit.

Regards,

Anthony Liguori

> Alex
>
>   


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] Add microcode patch level dummy
  2009-01-05 16:40     ` Anthony Liguori
@ 2009-01-05 17:08       ` Alexander Graf
  0 siblings, 0 replies; 8+ messages in thread
From: Alexander Graf @ 2009-01-05 17:08 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: kvm, avi

Anthony Liguori wrote:
> Alexander Graf wrote:
>> Anthony Liguori wrote:
>>  
>>> Alexander Graf wrote:
>>>    
>>>> VMware ESX checks if the microcode level is correct when using a
>>>> barcelona CPU, in
>>>> order to see if it actually can use SVM. Let's tell it we're on the
>>>> safe side...
>>>>         
>>> Sounds like you're able to boot ESX?  Are you able to run a guest yet?
>>>     
>>
>> The moment you wrote the mail I just managed to get ReactOS running in
>> ESX. It does not use SVM yet though. I wonder when/if ESX actually does
>> use SVM.
>>   
>
> I'm pretty certain that if ESX detects that it is running under ESX,
> it disables SVM/VT.  There was a fair bit of noise a few months ago
> because a certain beta version of VMware didn't do this which meant
> you could no longer run ESX nested.  They quickly fixed that.
>
> I'd try disabling vmport and the hypervisor present bit.

Now - that's the issue. VMware tries to detect the CPU TSC speed and
matches if that's a multiple of the bus speed (66Mhz). If not, it panics.
The only way I found around this was to expose the TSC frequency bits to
ESX using the VMware backdoor - but now it thinks it's actually running
inside VMware!

Alex


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] Add microcode patch level dummy
  2009-01-05 15:02 [PATCH] Add microcode patch level dummy Alexander Graf
  2009-01-05 16:28 ` Anthony Liguori
@ 2009-01-06  9:29 ` Avi Kivity
  1 sibling, 0 replies; 8+ messages in thread
From: Avi Kivity @ 2009-01-06  9:29 UTC (permalink / raw)
  To: Alexander Graf; +Cc: kvm

Alexander Graf wrote:
> VMware ESX checks if the microcode level is correct when using a barcelona CPU, in
> order to see if it actually can use SVM. Let's tell it we're on the safe side...
>   

Applied, thanks.

-- 
error compiling committee.c: too many arguments to function


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2009-01-06  9:30 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-05 15:02 [PATCH] Add microcode patch level dummy Alexander Graf
2009-01-05 16:28 ` Anthony Liguori
2009-01-05 16:30   ` Alexander Graf
2009-01-05 16:38     ` David S. Ahern
2009-01-05 16:39       ` Alexander Graf
2009-01-05 16:40     ` Anthony Liguori
2009-01-05 17:08       ` Alexander Graf
2009-01-06  9:29 ` Avi Kivity

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).