From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Tosatti Subject: Re: [PATCH kvm-unit-tests] emulator: test 64-bit mov with immediate operand Date: Thu, 13 Dec 2012 19:47:49 -0200 Message-ID: <20121213214748.GA8574@amt.cnet> References: <1355400716-21359-1-git-send-email-pbonzini@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm@vger.kernel.org, Nadav Amit To: Paolo Bonzini Return-path: Received: from mx1.redhat.com ([209.132.183.28]:47917 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753482Ab2LMVry (ORCPT ); Thu, 13 Dec 2012 16:47:54 -0500 Content-Disposition: inline In-Reply-To: <1355400716-21359-1-git-send-email-pbonzini@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Thu, Dec 13, 2012 at 01:11:55PM +0100, Paolo Bonzini wrote: > MOV immediate instruction (opcodes 0xB8-0xBF) may take 64-bit operand. > Some hypervisor implementations assumed the operand is 32-bit. This > should never happen because the instruction has no memory operand, but > (like the existing test_mmx_movq_mf) the testcase tricks the emulator > into executing one by mismatching the page tables and the corresponding > TLB entry. > > Cc: Nadav Amit > Signed-off-by: Paolo Bonzini > --- > x86/emulator.c | 33 +++++++++++++++++++++++++++++++++ > 1 file changed, 33 insertions(+) Wicked, missed that. If you're unlucky, though, TLB entry can be gone by then (unlikely, though). Applied, thanks.