From Intel developer manual I see
IA-32e mode allows software to operate in one of two sub-modes:
I have a quad-core with HT enabled i.e. 8 logical cores
With KVM I want to run 32 bit and 64 bit VMs on a 64 bit Host OS. I want to allocate resources as follows
If VM-1 2-VCPUs are assigned per-thread i.e. they can end up on 2 physical cores shared with VM-2. If this happens cpu switching between compatibility and 64-bit mode can impact performance?
If I make sure VM-1 2-VCPUs are assigned to 1 physical-core and its enabled for 64-bit mode and VM-2 6-VCPUs are assigned to 3-physical cores and enabled for compatibility mode then we can avoid mode switching?
In general will there be performance impact on switching between 2 CPU modes? What additional things I need to consider to run both 32-bit and 64-bit VMs without any performance impact?
Regardless of how you distribute the VMs between CPU cores, CPU will switch between 32 and 64-bit mode - at the very least to run the host code. I can't tell how expensive the switch is but IMO it is negligible compared to the costs of virtualization itself. If you want performance, avoid VMs of any kind.
Thanks andysem, in our case host is minimally involved because of mostly user-space code. Are there tools from Intel which can be used to measure a switch between 32 and 64bit mode?