On 02/08/2011 02:13 PM, Nadav Har'El wrote:
But while doing this, I came across a question that I wonder if you can clarify for me: Among the other things it sets up, vmx_vcpu_setup() sets rdmsrl(MSR_IA32_SYSENTER_ESP, a); vmcs_writel(HOST_IA32_SYSENTER_ESP, a); /* 22.2.3 */ Why is this needed here?
It's not needed here.
In vmx_vcpu_load(), when a cpu is known (or changed), we again have: rdmsrl(MSR_IA32_SYSENTER_ESP, sysenter_esp); vmcs_writel(HOST_IA32_SYSENTER_ESP, sysenter_esp); /* 22.2.3 */ So isn't the first setting, in vmx_vcpu_setup(), redundant?
It is. It's just historical baggage - these lines were introduced about 20 commits into kvm development (af9d6e204919016ca in qemu-kvm.git) and never removed, even after it was fixed to be per-cpu.
-- error compiling committee.c: too many arguments to function -- 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