From mboxrd@z Thu Jan 1 00:00:00 1970 From: Razvan Cojocaru Subject: Re: [PATCH] tools/tests: Add EIP check to test_x86_emulator.c Date: Thu, 07 Aug 2014 11:53:35 +0300 Message-ID: <53E33E8F.6070304@bitdefender.com> References: <1407399362-4106-1-git-send-email-rcojocaru@bitdefender.com> <53E3365E.5030507@citrix.com> <53E355B7020000780002A09F@mail.emea.novell.com> <53E33A46.5080302@bitdefender.com> <53E358B9020000780002A0CD@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <53E358B9020000780002A0CD@mail.emea.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: Andrew Cooper , stefano.stabellini@eu.citrix.com, ian.jackson@eu.citrix.com, ian.campbell@citrix.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On 08/07/2014 11:45 AM, Jan Beulich wrote: >>>> On 07.08.14 at 10:35, wrote: >> On 08/07/2014 11:32 AM, Jan Beulich wrote: >>>>>> On 07.08.14 at 10:18, wrote: >>>> On 07/08/2014 09:16, Razvan Cojocaru wrote: >>>>> The test now also checks that EIP was modified after emulating >>>>> instructions after (and including) the "movq %mm3,(%ecx)..." >>>>> code block. >>>>> >>>>> Signed-off-by: Razvan Cojocaru >>>> >>>> These checks do check that the instruction pointer has changed, which >>>> catches your problem, but doesn't check that it has changed correctly. >>>> You need to work out exactly how long the instruction is a verify that >>>> eip points to first byte of the next instruction. >>> >>> And apart from that this should be done for all tests, not just the >>> MMX/SSE/AVX ones. >> >> The other tests already do this, but there it's simpler to check. > > Ah, my bad then (both in not having checked the code before > replying, and in not having added these checks back when I > added those tests) - I'm sorry. Absolutely no problem at all, we're all friends here. Thanks, Razvan Cojocaru