Re: [kvm-devel] KVM: Fix the invlpg instruction emulation on AMD64

2007-10-17 Thread Aurelien Jarno
On Tue, Oct 16, 2007 at 12:12:18PM +0200, Avi Kivity wrote: Aurelien Jarno wrote: I have marked the invlpg instruction the same way as it is done in kvm-37 to know what happens. I get either modrm_reg = 4 or = 6 when the invlpg instruction is executed, but never = 7. Then it isn't

Re: [kvm-devel] KVM: Fix the invlpg instruction emulation on AMD64

2007-10-17 Thread Avi Kivity
Aurelien Jarno wrote: On Tue, Oct 16, 2007 at 12:12:18PM +0200, Avi Kivity wrote: Aurelien Jarno wrote: I have marked the invlpg instruction the same way as it is done in kvm-37 to know what happens. I get either modrm_reg = 4 or = 6 when the invlpg instruction is executed, but

Re: [kvm-devel] KVM: Fix the invlpg instruction emulation on AMD64

2007-10-17 Thread Aurelien Jarno
Aurelien Jarno a écrit : Avi Kivity a écrit : Aurelien Jarno wrote: On Tue, Oct 16, 2007 at 12:12:18PM +0200, Avi Kivity wrote: Aurelien Jarno wrote: I have marked the invlpg instruction the same way as it is done in kvm-37 to know what happens. I get either modrm_reg = 4 or = 6

Re: [kvm-devel] KVM: Fix the invlpg instruction emulation on AMD64

2007-10-17 Thread Avi Kivity
Aurelien Jarno wrote: diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c index e974ace..06e183b 100644 --- a/drivers/kvm/x86_emulate.c +++ b/drivers/kvm/x86_emulate.c @@ -825,12 +825,12 @@ modrm_done: c-src.bytes = 4; goto srcmem_common; case

Re: [kvm-devel] KVM: Fix the invlpg instruction emulation on AMD64

2007-10-17 Thread Aurelien Jarno
Aurelien Jarno a écrit : Avi Kivity a écrit : But invlpg is defined as having reg == 7! The manual says: 0F 01/7 INVLPG m where /7 is the notation for reg in the mod reg r/m byte: /digit — A digit between 0 and 7 indicates that the ModR/M byte of the instruction uses only the r/m

Re: [kvm-devel] KVM: Fix the invlpg instruction emulation on AMD64

2007-10-17 Thread Aurelien Jarno
Avi Kivity a écrit : Aurelien Jarno wrote: On Tue, Oct 16, 2007 at 12:12:18PM +0200, Avi Kivity wrote: Aurelien Jarno wrote: I have marked the invlpg instruction the same way as it is done in kvm-37 to know what happens. I get either modrm_reg = 4 or = 6 when the invlpg instruction

Re: [kvm-devel] KVM: Fix the invlpg instruction emulation on AMD64

2007-10-16 Thread Aurelien Jarno
Avi Kivity a écrit : Aurelien Jarno wrote: 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

Re: [kvm-devel] KVM: Fix the invlpg instruction emulation on AMD64

2007-10-16 Thread Avi Kivity
Aurelien Jarno wrote: Avi Kivity a écrit : Aurelien Jarno wrote: 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

[kvm-devel] KVM: Fix the invlpg instruction emulation on AMD64

2007-10-15 Thread Aurelien Jarno
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