From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Message-ID: <546FB57B.3000303@redhat.com> Date: Fri, 21 Nov 2014 22:58:19 +0100 From: Paolo Bonzini MIME-Version: 1.0 To: Andy Lutomirski , linux-kernel@vger.kernel.org, kvm@vger.kernel.org CC: Wanpeng Li , Fenghua Yu , stable@vger.kernel.org, Nadav Amit Subject: Re: [CFT PATCH 2/2] KVM: x86: support XSAVES usage in the host References: <1416594678-13011-1-git-send-email-pbonzini@redhat.com> <1416594678-13011-3-git-send-email-pbonzini@redhat.com> <546F9B59.7060800@amacapital.net> In-Reply-To: <546F9B59.7060800@amacapital.net> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: On 21/11/2014 21:06, Andy Lutomirski wrote: >> > + cpuid_count(XSTATE_CPUID, index, >> > + &size, &offset, &ecx, &edx); >> > + memcpy(dest + offset, src, size); > Is this really the best way to do this? cpuid is serializing, so this > is possibly *very* slow. The data is in arch/x86/kernel/xsave.c, but it is not exported. But this is absolutely not a hotspot. Paolo