stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wanpeng Li <wanpeng.li@linux.intel.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org,
	Fenghua Yu <fenghua.yu@intel.com>,
	stable@vger.kernel.org, Nadav Amit <namit@cs.technion.ac.il>,
	Andy Lutomirski <luto@amacapital.net>
Subject: Re: [CFT PATCH 2/2] KVM: x86: support XSAVES usage in the host
Date: Mon, 24 Nov 2014 10:10:09 +0800	[thread overview]
Message-ID: <20141124021009.GB27849@kernel> (raw)
In-Reply-To: <1416594678-13011-3-git-send-email-pbonzini@redhat.com>

Hi Paolo,
On Fri, Nov 21, 2014 at 07:31:18PM +0100, Paolo Bonzini wrote:
[...]
>+		u64 feature = valid & -valid;
>+		int index = fls64(feature) - 1;
>+		void *src = get_xsave_addr(xsave, feature);
>+
>+	        if (src) {
>+			u32 size, offset, ecx, edx;
>+			cpuid_count(XSTATE_CPUID, index,
>+				    &size, &offset, &ecx, &edx);
>+	                memcpy(dest + offset, src, size);

The offset you get is still for compact format, so you almost convert compat 
format to compat format instead of convert compact format to standard format. 
In addition, I think convert standard format to compact format should be 
implemented in put path.

Regards,
Wanpeng Li 


  parent reply	other threads:[~2014-11-24  2:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1416594678-13011-1-git-send-email-pbonzini@redhat.com>
2014-11-21 18:31 ` [CFT PATCH 1/2] kvm: x86: mask out XSAVES Paolo Bonzini
2014-11-21 18:31 ` [CFT PATCH 2/2] KVM: x86: support XSAVES usage in the host Paolo Bonzini
2014-11-21 20:06   ` Andy Lutomirski
2014-11-21 21:58     ` Paolo Bonzini
2014-11-24  2:10   ` Wanpeng Li [this message]
2014-11-24 10:07     ` Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20141124021009.GB27849@kernel \
    --to=wanpeng.li@linux.intel.com \
    --cc=fenghua.yu@intel.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=namit@cs.technion.ac.il \
    --cc=pbonzini@redhat.com \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).