From: Nadav Amit Subject: Re: 2 CPU Conformance Issue in KVM/x86 Date: Tue, 3 Mar 2015 12:18:38 +0200 Message-ID: <6EC0D209-63B4-4D08-976E-3BA15E736B0E@gmail.com> References: <54F58471.7020906@redhat.com> Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: kvm list , =?utf-8?Q?Radim_Kr=C4=8Dm=C3=A1=C5=99?= To: Paolo Bonzini Return-path: Received: from mail-wg0-f41.google.com ([74.125.82.41]:46020 "EHLO mail-wg0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756096AbbCCKSm convert rfc822-to-8bit (ORCPT ); Tue, 3 Mar 2015 05:18:42 -0500 Received: by wgha1 with SMTP id a1so38964859wgh.12 for ; Tue, 03 Mar 2015 02:18:41 -0800 (PST) In-Reply-To: <54F58471.7020906@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: Paolo, Thanks for the feedback. One small comment below. Paolo Bonzini wrote: >=20 >=20 > On 03/03/2015 09:34, Nadav Amit wrote: >> I got two conformance issues in x86/KVM. For the first one I have no >> solution. For the latter, my solution is not =E2=80=9Cgreat=E2=80=9D= =2E Ideas and feedback >> would be appreciated. >>=20 >> The first problem is caused by the deprecating of FPU CS/DS in new I= ntel >> CPUs. Assume the VM executes a floating point instruction in real mo= de (when >> CS !=3D 0), and later KVM exits to userspace, causing XSAVE/XRSTOR t= o save and >> restore the FPU state. At this point FPU CS/DS in new CPUs are zero.= If the >> VM then executes FSAVE in real-mode the save FPU IP would be wrong, = since it >> is actually calculated by the CPU as [FPU CS] * 4 + [FPU IP]. >=20 > I think this was analyzed a couple years ago and we decided that this= bit > was not virtualizable. I am fully aware of the previous reports ( https://lkml.org/lkml/2013/1= 0/16/258 ). However, one might have expected the conformance problem to be fully resolved now, since [FPU CS] and [FPU DS] are deprecated in new CPUs. Indeed, the problem is resolved in all modes, but not in real-mode. Regards, Nadav