Re: [PATCH v4] KVM: nVMX: Fully support of nested VMX preemption timer

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

 



On Mon, Sep 16, 2013 at 11:49:40AM +0200, Paolo Bonzini wrote:
> Il 16/09/2013 11:09, Gleb Natapov ha scritto:
> > On Mon, Sep 16, 2013 at 10:58:12AM +0200, Paolo Bonzini wrote:
> >>>>>  	vmx->__launched = vmx->loaded_vmcs->launched;
> >>>>> +	if (is_guest_mode(vcpu) && !(vmx->nested.nested_vmx_exit))
> >>>>> +		nested_adjust_preemption_timer(vcpu);
> >>>>
> >>>> Please leave the assignment to __launched last, since it's already
> >>>> initializing the asm below.
> >>>>
> >>>> I don't like the is_guest_mode check here... Maybe it's
> >>>> micro-optimizing, but I wonder if we already do too many checks in
> >>>> vmx_vcpu_run...  For example, is_guest_mode could be changed (I think)
> >>>> to a check for "vmx->loaded_vmcs == &vmx->vmcs1".
> >>>>
> >>> Why this will be more efficient that HF_GUEST_MASK check?
> >>
> >> Because we have already loaded vmx->loaded_vmcs, so it's one memory
> >> access less.
> >>
> > But we will have to load vmx->vmcs1 instead :)
> 
> That's not a memory load, it's an add.
> 
You assume that vmx->loaded_vmcs and vmx will be both in registers here,
isn't it too much to assume?

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