Re: [kvm-devel] Protected mode transitions and big real mode... still an issue

2008-05-15 Thread Guillaume Thouvenin
On Thu, 15 May 2008 10:33:38 +0300 Avi Kivity <[EMAIL PROTECTED]> wrote: > Marcelo Tosatti wrote: > > 1) add is storing the result in the wrong register > > > > 6486: 66 64 89 3e 72 01 mov%edi,%fs:0x172 > > 648c: 66 be 8d 03 00 00 mov$0x38d,%esi > > 6492

Re: [kvm-devel] Protected mode transitions and big real mode... still an issue

2008-05-14 Thread Guillaume Thouvenin
On Tue, 6 May 2008 20:05:39 +0300 "Mohammed Gamal" <[EMAIL PROTECTED]> wrote: > > > > WinXP fails with the patch applied too. Ubuntu 7.10 live CD and > > > > FreeDOS don't boot but complain about instruction mov 0x11,sreg not > > > > being emulated. Mohammed, can you try the patch at the end of

Re: [kvm-devel] Protected mode transitions and big real mode... still an issue

2008-05-06 Thread Guillaume Thouvenin
On Tue, 06 May 2008 09:30:44 -0500 Anthony Liguori <[EMAIL PROTECTED]> wrote: > > 8.04 is not a good test-case. 7.10 is what you want to try. Oh yes you're right. I tried 8.04 because Balaji had problems to boot it with the patch. > The good news is, 7.10 appears to work! The bad news is th

Re: [kvm-devel] Protected mode transitions and big real mode... still an issue

2008-05-06 Thread Guillaume Thouvenin
On Mon, 5 May 2008 16:29:21 +0300 "Mohammed Gamal" <[EMAIL PROTECTED]> wrote: > On Mon, May 5, 2008 at 3:57 PM, Anthony Liguori <[EMAIL PROTECTED]> wrote: > > > WinXP fails to boot with your patch applied too. FWIW, Ubuntu 8.04 has > > a fixed version of gfxboot that doesn't do nasty things wi

Re: [kvm-devel] [ kvm-Bugs-1958715 ] kvm-userspace failed to start linux kernel (kernel panic)

2008-05-06 Thread Guillaume Thouvenin
On Tue, 06 May 2008 06:13:18 -0700 "SourceForge.net" <[EMAIL PROTECTED]> wrote: > When I use the commit bae043c (kvm-userspace) I can start the liveCD > but the next commit c33833a produces a kernel panic. I see the screen > with different choice of installation but when I choose to install > l

Re: [kvm-devel] Protected mode transitions and big real mode... still an issue

2008-05-05 Thread Guillaume Thouvenin
On Sat, 3 May 2008 13:56:56 +0530 Balaji Rao <[EMAIL PROTECTED]> wrote: > With your patch applied ubuntu 8.04 livecd fails to boot. Not any better > with Marcelo's patch on top. Hi Balaji, And without the patch, can you boot the ubuntu 8.04 livecd? Regards, Guillaume -

Re: [kvm-devel] Protected mode transitions and big real mode... still an issue

2008-05-04 Thread Guillaume Thouvenin
On Thu, 1 May 2008 16:13:31 -0300 Marcelo Tosatti <[EMAIL PROTECTED]> wrote: > The code sequence is: > > 8235: 66 data16 > 8236: 0f 22 c0mov%eax,%cr0 > 8239: ea 3e 02 00 08 b8 00ljmp $0xb8,$0x800023e > > So it switches

[kvm-devel] Protected mode transitions and big real mode... still an issue

2008-04-29 Thread Guillaume Thouvenin
Hello, This patch should solve the problem observed during protected mode transitions that appears for example during the installation of openSuse-10.3. Unfortunately there is an issue that crashes kvm-userspace. I'm not sure if it's a problem introduced by the patch or if the patch is good and r

Re: [kvm-devel] Real Mode Improvement on Intel Hosts - GSoC Project

2008-04-25 Thread Guillaume Thouvenin
On Fri, 25 Apr 2008 09:51:04 +0300 Avi Kivity <[EMAIL PROTECTED]> wrote: > > [60108.040894] emulation at (46e53) rip 6e13: ea 18 6e 18 > > > > Here cs.rpl == cpl == 0 > > > [60108.072108] emulation at (46e58) rip 6e18: 66 b8 20 00 > > [60108.103997] emulation at (46e5c) rip 6e1c: 8e d8 8c d0

Re: [kvm-devel] Real Mode Improvement on Intel Hosts - GSoC Project

2008-04-24 Thread Guillaume Thouvenin
On Thu, 24 Apr 2008 11:05:39 -0500 Anthony Liguori <[EMAIL PROTECTED]> wrote: > The first stage is to detect vmentry failures and run x86_emulate() for > a single instruction. If you look at the mailing list, you'll see > patches from myself and Guillaume. This should be enough to allow most

Re: [kvm-devel] [PATCH] gfxboot VMX workaround v2

2008-04-21 Thread Guillaume Thouvenin
On Fri, 18 Apr 2008 10:25:15 -0500 Anthony Liguori <[EMAIL PROTECTED]> wrote: > I'd prefer you not do an emulate_instruction loop at all. Just emulate > one instruction on vmentry failure and let VT tell you what instructions > you need to emulate. > > It's only four instructions so I don't th

Re: [kvm-devel] [PATCH] gfxboot VMX workaround v2

2008-04-18 Thread Guillaume Thouvenin
On Fri, 18 Apr 2008 08:23:07 -0500 Anthony Liguori <[EMAIL PROTECTED]> wrote: > This doesn't seem right. You should have been able to break out of the > emulator long before encountering an out instruction. The next > instruction you encounter should be a mov instruction. Are you sure > yo

Re: [kvm-devel] [PATCH] gfxboot VMX workaround v2

2008-04-18 Thread Guillaume Thouvenin
On Fri, 18 Apr 2008 14:18:16 +0200 Guillaume Thouvenin <[EMAIL PROTECTED]> wrote: > I added the code do dump the instruction and it seems that it's the > emulation of 0xe6 (== out imm8, al) that failed. I made modifications > to emulate it (see below) and now I have an

Re: [kvm-devel] [PATCH] gfxboot VMX workaround v2

2008-04-18 Thread Guillaume Thouvenin
On Tue, 15 Apr 2008 16:06:43 +0300 Avi Kivity <[EMAIL PROTECTED]> wrote: > > ... > > handle_vmentry_failure: invalid guest state > > handle_vmentry_failure: start emulation > > handle_vmentry_failure: emulation failed > > > > What instruction failed, exactly? > I added the code do dump the i

Re: [kvm-devel] [PATCH] gfxboot VMX workaround v2

2008-04-15 Thread Guillaume Thouvenin
On Mon, 07 Apr 2008 11:05:06 -0500 Anthony Liguori <[EMAIL PROTECTED]> wrote: > Perhaps a viable way to fix this upstream would be to catch the vmentry > failure, look to see if SS.CPL != CS.CPL, and if so, invoke > x86_emulate() in a loop until SS.CPL == CS.CPL. > > There are very few instruct

Re: [kvm-devel] [PATCH] gfxboot VMX workaround v2

2008-04-08 Thread Guillaume Thouvenin
On Tue, 08 Apr 2008 07:14:13 -0500 Anthony Liguori <[EMAIL PROTECTED]> wrote: > Guillaume Thouvenin wrote: > > On Mon, 07 Apr 2008 11:05:06 -0500 > > Anthony Liguori <[EMAIL PROTECTED]> wrote: > > > > > >> Perhaps a viable way to fix this upst

Re: [kvm-devel] [PATCH] gfxboot VMX workaround v2

2008-04-08 Thread Guillaume Thouvenin
On Mon, 07 Apr 2008 11:05:06 -0500 Anthony Liguori <[EMAIL PROTECTED]> wrote: > Perhaps a viable way to fix this upstream would be to catch the vmentry > failure, look to see if SS.CPL != CS.CPL, and if so, invoke > x86_emulate() in a loop until SS.CPL == CS.CPL. I tried this solution some time

Re: [kvm-devel] How guest virtual address is translated to physical address?

2008-04-03 Thread Guillaume Thouvenin
On Wed, 02 Apr 2008 10:22:45 -0500 Anthony Liguori <[EMAIL PROTECTED]> wrote: > We can then obtain the faulting > virtual address from CR2 in the host and walk the guest's page table to > determine what guest physical address should be mapped at that guest > virtual address (if any at all). >

[kvm-devel] How guest virtual address is translated to physical address?

2008-04-02 Thread Guillaume Thouvenin
Hello, I have a question about how guest page table and shadow page table work together and more precisely, about how host is involved when guest access a page that it's already in the page table. The guest maintains its page table to translate guest virtual address to guest physical address. I

[kvm-devel] catch vmentry failure (was enable gfxboot on VMX)

2008-02-29 Thread Guillaume Thouvenin
On Mon, 18 Feb 2008 10:39:31 +0100 Alexander Graf <[EMAIL PROTECTED]> wrote: > > So if you want to see a VMentry failure, just remove the SS patching > > and you'll see one. My guess would be that you see a lot of problems > > with otherwise working code too then, though, as SS can be anything in

Re: [kvm-devel] [PATCH] enable gfxboot on VMX

2008-02-18 Thread Guillaume Thouvenin
On Sat, 16 Feb 2008 14:34:09 +0100 Alexander Graf <[EMAIL PROTECTED]> wrote: > > Whenever the register state becomes consistent with VT again. > > vmx_set_segment() looks like the right point for turning it off. > > Sounds good. As basically the only problem we have are the sanity > checks d

Re: [kvm-devel] [ToDo] Real Mode Support

2008-02-11 Thread Guillaume Thouvenin
On Sun, 10 Feb 2008 13:44:05 +0200 Avi Kivity <[EMAIL PROTECTED]> wrote: > Anthony Liguori wrote: > > So what we would like to do, is instead of setting up vm86 mode for the > > guest to execute real mode, use x86_emulate() to just emulate the code. > > This means that we wouldn't be using the

Re: [kvm-devel] [ToDo] Real Mode Support

2008-02-06 Thread Guillaume Thouvenin
On Wed, 06 Feb 2008 10:52:54 +0200 Izik Eidus <[EMAIL PROTECTED]> wrote: > > i am not expert for the emulator area, but as far as i remember: > > virtual 8086 have some checks related to segments (the big mode > problem), it mean that for some addresses it wont be able to execute > anything, you

[kvm-devel] [ToDo] Real Mode Support

2008-02-05 Thread Guillaume Thouvenin
ossible to just extend x86 emulator to support more instructions in real mode? I think that I'm missing something here so any help, hint, advice, link are welcome. Best Regards, -- Guillaume Thouvenin - This SF.ne

Re: [kvm-devel] Where are vmentry failure caugth?

2008-01-13 Thread Guillaume Thouvenin
On Sat, 12 Jan 2008 14:34:12 -0600 Anthony Liguori <[EMAIL PROTECTED]> wrote: > What version of gfxboot does openSUSE 10.3 use? gfxboot was broken for > KVM until very recently. This is probably what you're seeing. I don't know what version it is but do you talk about the bug due to the wron

Re: [kvm-devel] Where are vmentry failure caugth?

2008-01-10 Thread Guillaume Thouvenin
fo 0x8306 intr info 0x8b0d [86955.193194] pending exception: not handled yet [86955.219948] pending exception: not handled yet -- Guillaume Thouvenin - Check out the new SourceForge.net Marketplace. It's the best

Re: [kvm-devel] Where are vmentry failure caugth?

2008-01-10 Thread Guillaume Thouvenin
On Thu, 10 Jan 2008 11:19:58 +0100 Guillaume Thouvenin <[EMAIL PROTECTED]> wrote: > I tried but it didn't catch any vmentry failures (and I know that > there is at least one during the test). I think that there is a vmentry failure because qemu-system-x86_64 crashes wit

[kvm-devel] Where are vmentry failure caugth?

2008-01-10 Thread Guillaume Thouvenin
Hello, When a vmentry failure occurs, where is it caught? I see that VMX_EXIT_REASONS_FAILED_VMENTRY is defined but I don't see where it is used. Shouldn't there be something in handle_excetion() like: static int handle_exception(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run) { struct

Re: [kvm-devel] [patch 2 of 2][rewritten] Emulate CMPS instruction

2007-11-26 Thread Guillaume Thouvenin
override prefix (ES segment cannot be overriden). Signed-off-by: Guillaume Thouvenin <[EMAIL PROTECTED]> --- drivers/kvm/x86_emulate.c | 58 +++-- 1 files changed, 56 insertions(+), 2 deletions(-) diff --git a/drivers/kvm/x86_emulate.c b/drive

Re: [kvm-devel] [patch 2 of 2] Emulate CMPS instruction

2007-11-26 Thread Guillaume Thouvenin
On Fri, 23 Nov 2007 19:54:46 +0200 Avi Kivity <[EMAIL PROTECTED]> wrote: > > No new macros in the emulator please. Just inline it at the callsite. > Ok I make the modification. : c->dst.bytes); > > break; > > case 0xa6 ..

[kvm-devel] [patch 2 of 2] Emulate CMPS instruction

2007-11-23 Thread Guillaume Thouvenin
This patch emulates the CMPS instruction. Signed-off-by: Guillaume Thouvenin <[EMAIL PROTECTED]> --- drivers/kvm/x86_emulate.c | 54 +++-- 1 files changed, 52 insertions(+), 2 deletions(-) diff --git a/drivers/kvm/x86_emulate.c b/drive

[kvm-devel] [patch 1 of 2] Rename REP prefixes

2007-11-23 Thread Guillaume Thouvenin
This patch renames REP prefix with more suitable name. Signed-off-by:: Guillaume Thouvenin <[EMAIL PROTECTED]> --- drivers/kvm/x86_emulate.c |4 ++-- drivers/kvm/x86_emulate.h |4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/kvm/x86_emulate.c b/d

[kvm-devel] [patch 0 of 2] Emulate CMPS instruction

2007-11-23 Thread Guillaume Thouvenin
Hello, This patch emulates the CMPS instruction. It should fix the openbsd bug opened in sourceforge (it does on my computer). There are two patches. The first one renames the REP prefix definition to be more comprehensive and the second one is the emulation of the CMPS instruction. Regards, Gui

Re: [kvm-devel] [PATCH] make distinction between repeat prefixes F3 and F2

2007-11-22 Thread Guillaume Thouvenin
ff-by: Guillaume Thouvenin <[EMAIL PROTECTED]> --- drivers/kvm/x86_emulate.c |4 +++- drivers/kvm/x86_emulate.h |4 2 files changed, 7 insertions(+), 1 deletions(-) diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c index bebdcee..3eae1b1 100644 --- a/drivers/kvm/x8

Re: [kvm-devel] [PATCH] make distinction between repeat prefixes F3 and F2

2007-11-22 Thread Guillaume Thouvenin
On Thu, 22 Nov 2007 17:27:55 +0530 Amit Shah <[EMAIL PROTECTED]> wrote: > Can you just rename this to REP and REPNE? Yes I can. I send the new patch. > Does this fix the problems you saw with openbsd? No not yet. It will help to make the difference between REPE prefix and REPNE prefix because

[kvm-devel] [PATCH] make distinction between repeat prefixes F3 and F2

2007-11-22 Thread Guillaume Thouvenin
ff-by: Guillaume Thouvenin <[EMAIL PROTECTED]> --- drivers/kvm/x86_emulate.c |4 +++- drivers/kvm/x86_emulate.h |4 2 files changed, 7 insertions(+), 1 deletions(-) diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c index bebdcee..f8e7200 100644 --- a/

Re: [kvm-devel] multiple allocation for vmcs or am i missing something.

2007-02-09 Thread Guillaume Thouvenin
On Thu, 8 Feb 2007 21:06:37 +0545 "Manish Regmi" <[EMAIL PROTECTED]> wrote: > Later when vmx_create_vcpu is called, the vmcs area is allocated > (again) and this time for the cpu the code is currently executing on. > possibly it is already allocated. > > Is this a bug or i am missing something.