[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Thu, 3 Mar 2016 11:50:24 +0100
From: Paolo Bonzini <pbonzini@...hat.com>
To: Suravee Suthikulpanit <Suravee.Suthikulpanit@....com>,
Radim Krčmář <rkrcmar@...hat.com>
Cc: joro@...tes.org, alex.williamson@...hat.com, gleb@...nel.org,
kvm@...r.kernel.org, linux-kernel@...r.kernel.org, wei@...hat.com,
sherry.hurwitz@....com, "Wu, Feng" <feng.wu@...el.com>
Subject: Re: [PART1 RFC 5/9] svm: Add VMEXIT handlers for AVIC
On 03/03/2016 11:42, Suravee Suthikulpanit wrote:
> In facts, instead of setting up the vAPIC backing page address when
> calling kvm_arch_vcpu_load(), we should be able to do it when calling
> kvm_arch_vcpu_sched_in(). This seems more appropriate since the
> kvm_arch_vcpu_load() is also called in many unnecessary occasions via
> vcpu_load() (in the arch/x86/kvm/x86.c). The same goes for the
> kvm_arch_vcpu_put().
>
> However, there is no kvm_arch_vcpu_sched_out(). But that can be added
> easily.
>
> What do you think?
How much code is involved? It seems an unnecessary complication...
Unless you can profile a difference, I would leave it in
kvm_arch_vcpu_load()/kvm_arch_vcpu_put().
Note that sched_in and sched_out are not called once per invocation of
KVM_RUN---only through the preempt notifiers. So I'm not sure it is
enough to use sched_in and sched_out.
Paolo
Powered by blists - more mailing lists