Hi,
I decided run windows xp/7 under vm in gentoo. I'm start reading and I have some question:
1. What is relation between KVM, QEMU and XEN? QEMU somehow use KVM from kernel?
2. I'm confused since there is qemu flag in xen-tools and xen flag in qemu. I've enable KVM in my kernel as is shown in gentoo wiki and then try install qemu and I got:

QEmu is a software virtualization project. KVM forked QEmu and added support for using the hardware virtualization kernel module (and other things). The KVM project has been feeding changes back to the QEmu project, with the goal of eventually unifying them. QEmu has some HVM support now, and it will improve over time.

Your CPU has the feature flag svm, which is the AMD flag for virtualization.

You can play some games via virtualization, but beware that guests typically have much poorer support for advanced hardware features than real systems do. You probably cannot play graphics intensive games in a guest, but things from the late 1990s often work well. Generally, I found that running games via Wine was both faster and easier than running them in a Windows VM.

I often see people with the VirtualBox kernel drivers loaded reporting problems, but very rarely see problem reports where the KVM support is blamed. This may or may not mean that VirtualBox is less stable.

1. What is relation between KVM, QEMU and XEN? QEMU somehow use KVM from kernel?

I'm not entirely sure about KVM, so I will not speak to that, but as far as Xen goes, Qemu is used to create the emulated chipset, graphics card, disk drives, and network devices (e1000 typically) for Xen hardware virtual machine (HVM) devices. When you create a virtual machine for Windows, you must use HVM (which takes advantage of VT-x and AMD-V) because the Windows kernel is not paravirtual aware

Quite some time ago the Xen project forked off a version of Qemu for these purposes, but is now actively trying to merge their changes back into the mainstream Qemu codebase. I think that there is some so-far successful experimental work in getting Xen to work with upstream qemu, but it is missing some features like VGA passthrough. Eventually it is their hope that Xen will use mainline Qemu.

Quote:

I'm confused since there is qemu flag in xen-tools and xen flag in qemu. I've enable KVM in my kernel as is shown in gentoo wiki and then try install qemu and I got:

If you are building a Xen based hypervisor, just set the USE flag for qemu and hvm. You do not need to emerge Qemu seperately.

Quote:

I think my CPU supprt AMD-V but I don't have any setting regarding virtualisation in BIOS

According to the cpuinfo you posted, your cpu does indeed support AMD-V virtualization extensions. ( this is the svm flag)

Firstly, his CFLAG's are embarrassing. Don't do that.
VGA Passthrough is a special case of PCI-Passthrough that, as far as I know, only Xen is capable of. You can read more about it here: http://wiki.xen.org/wiki/Xen_VGA_Passthrough
Basically, in order for it to work your CPU and motherboard need to support hardware IOMMU ( VT-d ). You can check the Xen wiki page on Vt-d http://wiki.xen.org/wiki/VTdHowTo to see if your hardware is tested.

Quote:

5. I have VirtualBox install but I thing KVM/XEN is faster/more stable, is it true?

All of them are mature pieces of software. KVM is the default supported hypervisor in Red Hat Enterprise Linux so it must be pretty stable. Amazon uses Xen to run its entire EC2 cloud (which in turn runs major websites like netflix and reddit). VirtualBox is more like VMWare Workstation, but I personally have never had a problem with it.

As far as speed goes, the fastest possible would be a paravirtualized Xen guest This requires a kernel that is aware of the hypervisor and can make special hypercalls; bypassing the emulated hardware and communicating more efficiently to network, block, and cpu resources. Mainline linux kernels have been PV (DomU and Dom0) capable since ~3.0 or so. You can read more about it here: http://wiki.xen.org/wiki/XenParavirtOps. Windows is not PV capable and must be run in HVM mode.

Quote:

6. To use xen I need xen-sources, right?

Nope! xen-sources is a specially patched 2.6.32 kernel that was used (and is still used in some stable distros) before the pv ops code was accepted into the mainline kernel source code. With Gentoo today, you would build a xen pv-ops capable kernel using the normal gentoo-sources package. Refer to this page for help on setting up the kernel config: http://wiki.xen.org/wiki/Mainline_Linux_Kernel_Configs
I think Citrix still maintains the 2.6.32 codebase and forward/backward ports patches because there are a lot of distributions that still use a 2.6 kernel and Xen. It is considered very stable as far as I know.
Everything is backwards compatible, so you will be able to use a pv-ops Dom0 to host xen-sources based DomU hosts.
Most distributions 3.x kernels are capable of being paravirtualized out of the box.