From: "Jan Beulich" Subject: Re: Possible problem emulating movntq, movss Date: Wed, 06 Aug 2014 10:54:18 +0100 Message-ID: <53E2176A0200007800029B53@mail.emea.novell.com> References: <53E1EDE1.5040207@bitdefender.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <53E1EDE1.5040207@bitdefender.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Razvan Cojocaru Cc: Andrew Cooper , keir@xen.org, "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org >>> On 06.08.14 at 10:57, wrote: > We found that our HVM guests froze when trying to emulate movntq > instructions. The solution seems to be to replace "goto done;" with > "break;" at line 4191 (when handling "case 0x7f:") in > xen/arch/x86/x86_emulate/x86_emulate.c. Otherwise the writeback part > doesn't happen. > > If you're happy with the fix I can prepare a patch, otherwise please let > me know if we're missing something. No, that doesn't look right: There's nothing left to be written back at that point (registers get updated with the instruction executed via the on-stack stub, and memory gets written with immediately preceding ops->write(). So without you being more specific about _what_ you see going wrong I don't think I can give further advice. Furthermore what you write is kind of inconsistent: For one, opcode 0x7f is movq/movdq[au] rather than movntdq (admitted they're being handled by the same code block, but you ought to be rather precise here). And then the subject of your mail mentions movss, but the body doesn't at all - is that because you mean the same would apply to that other similar code block? As to Andrew asking for added tests: movq, movdqu, and vmovdqu are all being tested with both operation directions (covering one of the two code blocks in question), and the set of tests for movsd, movaps, vmovsd, and vmovaps should be sufficient to cover the other of the two code blocks too. Jan