# KVM on AMD Athlon(tm) II X2 220 Processor

## FelixBO

All,

I am pretty new to gentoo, not new to linux at all. I would like to install a secondary gentoo in a KVM to play around a bit.

I tried to install qemu-kvm and so on and got an output like this:

```

sudo merge --pretend --verbose -av qemu-kvm usbutils bridge-utils usermode-utilities iptables

Password: 

These are the packages that would be merged, in order:

Calculating dependencies... done!

!!! All ebuilds that could satisfy "app-emulation/qemu-kvm" have been masked.

!!! One of the following masked packages is required to complete your request:

- app-emulation/qemu-kvm-9999 (masked by: missing keyword)

- app-emulation/qemu-kvm-0.13.0 (masked by: ~amd64 keyword)

- app-emulation/qemu-kvm-0.12.5-r1 (masked by: ~amd64 keyword)

- app-emulation/qemu-kvm-0.12.5 (masked by: ~amd64 keyword)

- app-emulation/qemu-kvm-0.12.4-r1 (masked by: ~amd64 keyword)

- app-emulation/qemu-kvm-0.12.3-r1 (masked by: ~amd64 keyword)

- app-emulation/qemu-kvm-0.11.1-r1 (masked by: ~amd64 keyword)

```

Do I have to change everything to amd64 architecture or what else could I do?

My CPU-Type:

```

cat /proc/cpuinfo 

processor   : 0

vendor_id   : AuthenticAMD

cpu family   : 16

model      : 6

model name   : AMD Athlon(tm) II X2 220 Processor

stepping   : 3

cpu MHz      : 2813.284

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   : 5

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 pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc rep_good nonstop_tsc extd_apicid pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt npt lbrv svm_lock nrip_save

bogomips   : 5626.56

TLB size   : 1024 4K pages

clflush size   : 64

cache_alignment   : 64

address sizes   : 48 bits physical, 48 bits virtual

power management: ts ttp tm stc 100mhzsteps hwpstate

processor   : 1

vendor_id   : AuthenticAMD

cpu family   : 16

model      : 6

model name   : AMD Athlon(tm) II X2 220 Processor

stepping   : 3

cpu MHz      : 2813.284

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   : 5

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 pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc rep_good nonstop_tsc extd_apicid pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt npt lbrv svm_lock nrip_save

bogomips   : 5625.62

TLB size   : 1024 4K pages

clflush size   : 64

cache_alignment   : 64

address sizes   : 48 bits physical, 48 bits virtual

power management: ts ttp tm stc 100mhzsteps hwpstate

```

As you can see svm and svm_lock is supportet by this cpu. 

What do I have to do to get this up and running. 

Many thanks in advance, 

Felix

----------

## FelixBO

All,

I've found something on google. Sorry for bothering you.

http://www.linux-kvm.org/page/KvmOnGentoo

Requirement

a Gentoo install on a vt (Intel) or svm (AMD) machine

kernel compiled with at least, either y or m

     CONFIG_HAVE_KVM=y

     CONFIG_HAVE_KVM_IRQCHIP=y

     CONFIG_HAVE_KVM_EVENTFD=y

     CONFIG_KVM=y

     and CONFIG_KVM_INTEL=y or CONFIG_KVM_AMD=y depending if you are using Intel or AMD CPU

     optionally (if you want to use vhost)

     CONFIG_VHOST_NET=y

Installing

printf 'QEMU_SOFTMMU_TARGETS="i386 x86_64"\nQEMU_USER_TARGETS="i386 x86_64"\n' >> /etc/make.conf

echo "app-emulation/qemu-kvm ~amd64" >> /etc/portage/package.keywords

emerge app-emulation/qemu-kvm

This gave me the ability to install this package

----------

## jormartr

http://en.gentoo-wiki.com/wiki/Kvm

A great  wiki.   :Surprised: 

----------

## chithanh

And read http://www.gentoo.org/doc/en/handbook/handbook-amd64.xml?part=3&chap=3 how to install masked packages.

----------

