Messages in this thread | | | From | Vitaly Kuznetsov <> | Subject | Re: [PATCH 3/4] KVM: x86: kvm_hv_flush_tlb use inputs from XMM registers | Date | Thu, 08 Apr 2021 14:52:16 +0200 |
| |
Paolo Bonzini <pbonzini@redhat.com> writes:
> On 08/04/21 14:01, Vitaly Kuznetsov wrote: >> >> Also, we can probably defer kvm_hv_hypercall_read_xmm() until we know >> how many regs we actually need to not read them all (we will always >> need xmm[0] I guess so we can as well read it here). > > The cost is get/put FPU, so I think there's not much to gain from that. >
Maybe, I just think that in most cases we will only need xmm0. To make the optimization work we can probably do kvm_get_fpu() once we figured out that we're dealing with XMM hypercall and do kvm_put_fpu() when we're done processing hypercall parameters. This way we don't need to do get/put twice. We can certainly leave this idea to the (possible) future optimizations.
-- Vitaly
| |