From: Fabio Fantoni Subject: Re: Test if on newer xen all SSE2 and SSE3 instructions are effectively working Date: Fri, 22 Nov 2013 14:51:50 +0100 Message-ID: <528F6176.9030709@m2r.biz> References: <528DE5D7.60701@m2r.biz> <528E251E.1020907@citrix.com> <528E278D.4020102@eu.citrix.com> <528E2911.1040002@citrix.com> <528F4AB5.4090108@m2r.biz> <528F59490200007800105CE3@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <528F59490200007800105CE3@nat28.tlf.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich Cc: George Dunlap , Andrew Cooper , xen-devel , Eddie Dong , Jun Nakajima List-Id: xen-devel@lists.xenproject.org Il 22/11/2013 13:16, Jan Beulich ha scritto: >>>> On 22.11.13 at 13:14, Fabio Fantoni wrote: >> Il 21/11/2013 16:38, Andrew Cooper ha scritto: >>> On 21/11/13 15:32, George Dunlap wrote: >>>> On 21/11/13 15:22, Andrew Cooper wrote: >>>>> On 21/11/13 15:12, George Dunlap wrote: >>>>>> On Thu, Nov 21, 2013 at 10:52 AM, Fabio Fantoni >>>>>> wrote: >>>>>>> I'm trying to test if on newer xen all SSE2 and SSE3 instructions are >>>>>>> effectively working. >>>>>>> I tried this simple program to test SSE2: >>>>>>> http://forum.nasm.us/index.php?topic=1605.0 >>>>>>> But probably use only instructions with short operand because SSE2 >>>>>>> on this >>>>>>> program is working also on old xen 4.0 where Jan Beulich patches to >>>>>>> support >>>>>>> long operands are missing. >>>>>>> Are there any minimal program to test if SSE instructions with MMIO >>>>>>> operands >>>>>>>> 8 byte are working? >>>>>> I don't see the code there doing MMIO -- it's just doing operations on >>>>>> normal RAM, which is not emulated by Xen at all, but executed natively >>>>>> by the processor. >>>>>> >>>>>> What you need is a program that will do this to an MMIO region -- that >>>>>> will be a much trickier thing to set up, I think. >>>>>> >>>>>> -George >>>>> The problem with SSE is only when the guest performs an SSE (or larger) >>>>> operation on a piece of memory which ends up being emulated and handed >>>>> to qemu. The ioreq protocol doesn't have a way of signalling an operand >>>>> width greater than 64 bits. >>>> I'd like to emphasize the "and" in the first sentence. You might be >>>> able to trigger a Xen emulation in any number of ways (disabling HAP >>>> and then doing an SSE instruction on an in-use PT might do it). But >>>> Xen allegedly already does the actual emulation correctly -- as Andy >>>> said, it's only the path to qemu that wasn't working before. >>>> >>>> -George >>>> >>> Oops yes - I should have emphasised that a bit more. I believe Jan >>> submitted a hacked-fix for the qemu path which fixes the immediate issue >>> (for 128bit emulation) but is in need of a redesign for wider emulation; >>> 256bit is available with AVX, and 512bit is on its way with AVX2. >>> >>> As for testing individual instructions, there is >>> tools/tests/x86_emulator/test_x86_emulator.c which tests a token few >>> instructions against Xen's emulation code, but it is far from comprehensive. >>> >>> ~Andrew >> Thanks for all replies. >> I tried x86_emulator on dom0 and SSE2 instructions seems ok: > Sure. Which means you still didn't understand that you need to > try with SSE instructions accessing MMIO where the emulation > happens in qemu. > > Jan > I have understood that this test needs to be tried inside hvm domUs (as I have posted in my previous mail): > Same result on linux hvm domUs. What I do not understand if is there is a test to accessing MMIO with SEE2 on x86_emulator and if not, an alternate way to make this check. Thanks for any reply.