From: "Jan Beulich" Subject: Re: fsincos emulation on AMD CPUs Date: Thu, 15 Dec 2011 13:19:59 +0000 Message-ID: <4EEA020F0200007800068244@nat28.tlf.novell.com> References: <4EE9FF4D020000780006821D@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser Cc: Paolo Bonzini , xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org >>> On 15.12.11 at 14:13, Keir Fraser wrote: > On 15/12/2011 13:08, "Jan Beulich" wrote: > >>>>> On 15.12.11 at 13:33, Keir Fraser wrote: >>> More detail: the full patch is ugly and hard to test all cases. And there's >>> no practical scenario where we want to emulate FSINCOS on AMD -- we don't >>> emulate realmode on AMD, FSINCOS on a shadowed page certainly indicates that >>> we should unshadow the page, FSINCOS on MMIO is mad or malicious. >> >> Those latter two cases can't really happen, as fsincos has no memory >> operand. > > Possibly if the instruction itself was in a recycled page-table page? Or in > an MMIO page, or the malicious race that Paolo described --- definitely > malicious either way. > > Anyhow the short answer is we never want to emulate it on AMD. :-) I just sent out the patch as quoted in the reply to Paolo, but you're suggesting to be even more drastic and ignore the CPU family. If you really want it done that way, I wonder whether we should bail on AMD for *all* x87 operations not having memory operands. Jan