On 26.02.2009, at 12:07, Piavlo wrote:
Alexander Graf wrote:
2) I want to optimize/recompile a gentoo VM system packages for the
chosen cpu - if that matters.
Does rebuilding the VM packages to fine tuned for the emulated cpu
give any advantages?
I don't think features like SSE3 matter that much in a normal
environment.
I just wanted to rebuild the guest with following basic CGLAGS
"-march=opteron -O2 -pipe" (no sse3 and like features) tuned for my
hardware node cpu.
In Xen then i use guest linux VM both in fully virtualized mode and
paravirtual mode I see in guest's /proc/cpuinfo the same
naitive cpu model as in hardware node (while of course some feature
flags like svm,sse3 are missing) - but I can build the guests
with cpu native gcc -march support anyway. While seeing emulated cpu
model in /proc/cpuinfo
model name : QEMU Virtual CPU version 0.9.1
is confusing and i'm not sure if i can use -march=opteron here?
You can still use all the optimizations you want. -cpu only modifies
the CPUID flags exposed to the guest, not the features supported by
the CPU. So if your CPU supports say SSE3 and you can't find "pni" in /
proc/cpuinfo in the guest, it still works.
You won't get too much more benefit from choosing a different CPU
type.
3) Do I have to boot a VM kernel with guest viritio drivers, to
get a
not emulated real cpu access - like I have in Xen?
virtio drivers have nothing to do with CPU.
Yes I mistakenly used the term "viritio drivers" instead of
"paravirtual guest support". So what I wanted to ask is if I build a
guest kernel with paravitual support
will it make the native hardware cpu features available inside the
guest
like in Xen kernel? Or paravirtual support is for device drivers only
and has no impact on CPU handling like in Xen?
I thought that KVM (as Xen) is a bare metal hypervisor with regards to
giving access native access to the CPU which have svm or vmx
support,
and not just CPU emulation.
I'm confused here - can someone shed some light on my ignorance on the
matter?
The features are there, you just don't see them in /proc/cpuinfo.
Paravirt support is completely unrelated to that.
Alex
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html