From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Thu, 4 Dec 2014 18:56:02 +0100 From: Radim =?utf-8?B?S3LEjW3DocWZ?= To: Paolo Bonzini Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, Wanpeng Li , Fenghua Yu , stable@vger.kernel.org, "H. Peter Anvin" Subject: Re: [PATCH 2/9] KVM: x86: support XSAVES usage in the host Message-ID: <20141204175602.GA18653@potion.brq.redhat.com> References: <1417708634-24333-1-git-send-email-pbonzini@redhat.com> <1417708634-24333-3-git-send-email-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1417708634-24333-3-git-send-email-pbonzini@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: 2014-12-04 16:57+0100, Paolo Bonzini: > Userspace is expecting non-compacted format for KVM_GET_XSAVE, but > struct xsave_struct might be using the compacted format. Convert > in order to preserve userspace ABI. > > Likewise, userspace is passing non-compacted format for KVM_SET_XSAVE > but the kernel will pass it to XRSTORS, and we need to convert back. > > Fixes: f31a9f7c71691569359fa7fb8b0acaa44bce0324 > Cc: Fenghua Yu > Cc: stable@vger.kernel.org > Cc: H. Peter Anvin > Reported-by: Nadav Amit > Tested-by: Nadav Amit > Signed-off-by: Paolo Bonzini > --- Reviewed-by: Radim Krčmář > +++ b/arch/x86/kvm/x86.c > @@ -3132,15 +3132,89 @@ static int kvm_vcpu_ioctl_x86_set_debugregs(struct kvm_vcpu *vcpu, > + u64 xstate_bv = xsave->xsave_hdr.xstate_bv; (This looks like the only change since last review.)