# cpu doesn't support long mode (8.1-RC2 in Linux/KVM)



## cmeerw (Jul 17, 2010)

I tried booting FreeBSD-8.1-RC2-amd64-bootonly.iso in a Linux/KVM virtual machine, but only got a message saying "cpu doesn't support long mode"

Note that this is with a 64-bit version of Ubuntu Linux 10.04 running as the host operating system and netsd 5.1-rc3 amd64 works fine with the same setup.

Is this likely a problem with the FreeBSD<->KVM interaction or is FreeBSD not recognising my CPU as supporting 64-bit mode.

BTW, /proc/cpuinfo on Linux shows:


```
processor	: 0
vendor_id	: AuthenticAMD
cpu family	: 15
model		: 104
model name	: AMD Athlon(tm) X2 Dual Core Processor L310
stepping	: 2
cpu MHz		: 1200.186
cache size	: 512 KB
physical id	: 0
siblings	: 2
core id		: 0
cpu cores	: 2
apicid		: 0
initial apicid	: 0
fpu		: yes
fpu_exception	: yes
cpuid level	: 1
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext 
fxsr_opt rdtscp lm 3dnowext 3dnow rep_good extd_apicid pni cx16 lahf_lm cmp_legacy svm extapic cr8_legacy 3dnowprefetch
bogomips	: 2400.37
TLB size	: 1024 4K pages
clflush size	: 64
cache_alignment	: 64
address sizes	: 40 bits physical, 48 bits virtual
power management: ts fid vid ttp tm stc 100mhzsteps

processor	: 1
vendor_id	: AuthenticAMD
cpu family	: 15
model		: 104
model name	: AMD Athlon(tm) X2 Dual Core Processor L310
stepping	: 2
cpu MHz		: 1200.186
cache size	: 512 KB
physical id	: 0
siblings	: 2
core id		: 1
cpu cores	: 2
apicid		: 1
initial apicid	: 1
fpu		: yes
fpu_exception	: yes
cpuid level	: 1
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext 
fxsr_opt rdtscp lm 3dnowext 3dnow rep_good extd_apicid pni cx16 lahf_lm cmp_legacy svm extapic cr8_legacy 3dnowprefetch
bogomips	: 2400.10
TLB size	: 1024 4K pages
clflush size	: 64
cache_alignment	: 64
address sizes	: 40 bits physical, 48 bits virtual
power management: ts fid vid ttp tm stc 100mhzsteps
```


----------



## gordon@ (Jul 18, 2010)

sounds like the KVM is configured to boot it as a 32-bit OS instead of a 64-bit OS.


----------



## phoenix (Jul 19, 2010)

Read through the KVM and QEmu man pages.  There's an option to set the virtual CPU on the command-line.  I believe the default is to export the host CPU.  But you can select from others.  Be sure to select a 64-bit virtual CPU.

As a test, can you boot the VM using a Linux LiveCD and post the output of /proc/cpuinfo to compare?


----------



## cmeerw (Jul 19, 2010)

Looks like I did something stupid with qemu/kvm (using the wrong binary) which meant it didn't report the CPU as 64-bit capable. The amd64 iso image is booting now...


----------

