Re: [PATCH 04/24] KVM: Provide current CPL as part of emulator context.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 03/09/2010 04:09 PM, Gleb Natapov wrote:
Eliminate the need to call back into KVM to get it from emulator.


@@ -3499,6 +3499,7 @@ int emulate_instruction(struct kvm_vcpu *vcpu,

  		vcpu->arch.emulate_ctxt.vcpu = vcpu;
  		vcpu->arch.emulate_ctxt.eflags = kvm_x86_ops->get_rflags(vcpu);
+		vcpu->arch.emulate_ctxt.cpl = kvm_x86_ops->get_cpl(vcpu);
  		vcpu->arch.emulate_ctxt.mode =
  			(!is_protmode(vcpu)) ? X86EMUL_MODE_REAL :
  			(vcpu->arch.emulate_ctxt.eflags&  X86_EFLAGS_VM)

This is an unconditional VMREAD, which is slow (extra slow if nested). Most common emulator ops do not need the cpl.

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

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux