public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* KVM: Fix the invlpg instruction emulation on AMD64
@ 2007-10-15 19:08 Aurelien Jarno
       [not found] ` <20071015190823.GA11333-OqXK5JiLQY5aJl8KAwiEcA@public.gmane.org>
  0 siblings, 1 reply; 16+ messages in thread
From: Aurelien Jarno @ 2007-10-15 19:08 UTC (permalink / raw)
  To: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

The patch below removes the check for c->modrm_reg == 7 to detect the 
invlpg instruction, as it was the case before before commit 
aa38840d3d2e0a804e628077df8d8879b496d741. This fixes the boot of FreeBSD
on an AMD64 CPU.

It also moves the assignation of c->src.bytes after the test as it is
not needed for the invlpg instruction.

Signed-off-by: Aurelien Jarno <aurelien-rXXEIb44qovR7s880joybQ@public.gmane.org>

diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c
index fa33fcd..01aa952 100644
--- a/drivers/kvm/x86_emulate.c
+++ b/drivers/kvm/x86_emulate.c
@@ -824,12 +824,10 @@ modrm_done:
 		c->src.bytes = 4;
 		goto srcmem_common;
 	case SrcMem:
-		c->src.bytes = (c->d & ByteOp) ? 1 :
-							   c->op_bytes;
 		/* Don't fetch the address for invlpg: it could be unmapped. */
-		if (c->twobyte && c->b == 0x01
-				    && c->modrm_reg == 7)
+		if (c->twobyte && c->b == 0x01)
 			break;
+		c->src.bytes = (c->d & ByteOp) ? 1 : c->op_bytes;
 srcmem_common:
 		c->src.type = OP_MEM;
 		break;

-- 
  .''`.  Aurelien Jarno	            | GPG: 1024D/F1BCDB73
 : :' :  Debian developer           | Electrical Engineer
 `. `'   aurel32-8fiUuRrzOP0dnm+yROfE0A@public.gmane.org         | aurelien-rXXEIb44qovR7s880joybQ@public.gmane.org
   `-    people.debian.org/~aurel32 | www.aurel32.net

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/

^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2007-10-17 16:23 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-15 19:08 KVM: Fix the invlpg instruction emulation on AMD64 Aurelien Jarno
     [not found] ` <20071015190823.GA11333-OqXK5JiLQY5aJl8KAwiEcA@public.gmane.org>
2007-10-16  9:27   ` Avi Kivity
     [not found]     ` <47148403.6010603-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-10-16  9:46       ` Aurelien Jarno
     [not found]         ` <47148867.9070600-rXXEIb44qovR7s880joybQ@public.gmane.org>
2007-10-16 10:12           ` Avi Kivity
     [not found]             ` <47148E82.9090103-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-10-17 13:50               ` Aurelien Jarno
     [not found]                 ` <20071017135021.GA32185-OqXK5JiLQY5aJl8KAwiEcA@public.gmane.org>
2007-10-17 14:37                   ` Avi Kivity
     [not found]                     ` <47161E2B.1000006-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-10-17 15:31                       ` Aurelien Jarno
     [not found]                         ` <47162AD3.6070602-rXXEIb44qovR7s880joybQ@public.gmane.org>
2007-10-17 15:33                           ` Aurelien Jarno
     [not found]                             ` <47162B4F.3050002-rXXEIb44qovR7s880joybQ@public.gmane.org>
2007-10-17 15:40                               ` Avi Kivity
2007-10-17 15:37                           ` Avi Kivity
     [not found]                             ` <47162C30.9040106-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-10-17 15:43                               ` Aurelien Jarno
     [not found]                                 ` <47162DA7.7060501-rXXEIb44qovR7s880joybQ@public.gmane.org>
2007-10-17 15:45                                   ` Aurelien Jarno
2007-10-17 15:46                                   ` Aurelien Jarno
2007-10-17 15:46                                   ` Aurelien Jarno
2007-10-17 15:48                                   ` Aurelien Jarno
     [not found]                                     ` <47162ED9.8040902-rXXEIb44qovR7s880joybQ@public.gmane.org>
2007-10-17 16:23                                       ` Aurelien Jarno

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox