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

2008-02-19 Thread Avi Kivity
Anthony Liguori wrote: > > Keep in mind, this is not big real mode. The gfxboot code here was > actually rewritten to not use big real mode so that it worked with > Xen. It works with Xen because Xen uses vm86 mode within the host > whereas KVM uses vm86 mode in the guest's VT context. I don'

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

2008-02-18 Thread Anthony Liguori
Alexander Graf wrote: > Real mode segments are mere offsets. They get lshifted by 4 (as far as > I remember) and just added to the offset. SS is on some value here > Yes, this is correct. > 0x00046e60: and$0x,%esp > 0x00046e66: shl$0x4,%eax > 0x00046e6

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

2008-02-18 Thread Alexander Graf
On Feb 18, 2008, at 12:46 PM, Andi Kleen wrote: > Alexander Graf <[EMAIL PROTECTED]> writes: >> >> As everything except gfxboot works, we can simply change gfxboot in >> runtime to use a different value. Unfortunately the mov instruction, >> used to read the SS register is only 2 bytes long, so t

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

2008-02-18 Thread Andi Kleen
Alexander Graf <[EMAIL PROTECTED]> writes: > > As everything except gfxboot works, we can simply change gfxboot in > runtime to use a different value. Unfortunately the mov instruction, > used to read the SS register is only 2 bytes long, so there is no way to > binary patch the mov to something th

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

2008-02-18 Thread Alexander Graf
On Feb 18, 2008, at 10:34 AM, Alexander Graf wrote: > > On Feb 18, 2008, at 10:17 AM, Guillaume Thouvenin wrote: > >> 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

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

2008-02-18 Thread Alexander Graf
On Feb 18, 2008, at 10:17 AM, Guillaume Thouvenin wrote: > 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

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] [PATCH] enable gfxboot on VMX

2008-02-17 Thread Avi Kivity
Alexander Graf wrote: > > Emulating all of the real mode shouldn't be too much of a problem on > the performance side. I wouldn't be surprised if the vmenter/exits > take about as much time as the emulation overhead. > For the bootstrap process emulation is good enough, since the process is sho

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

2008-02-16 Thread Alexander Graf
On Feb 16, 2008, at 10:06 AM, Avi Kivity wrote: > Alexander Graf wrote: >>> >>> While enabling gfxboot over vmx is very desirable, I'd like to avoid >>> guest-specific hacks. IMO the correct fix is to set a >>> "non_vt_friendly" >>> flag when switching from real mode to protected mode, then c

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

2008-02-16 Thread Avi Kivity
Alexander Graf wrote: >> >> While enabling gfxboot over vmx is very desirable, I'd like to avoid >> guest-specific hacks. IMO the correct fix is to set a >> "non_vt_friendly" >> flag when switching from real mode to protected mode, then continue >> emulation, re-computing the flag after every in

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

2008-02-15 Thread Steffen Winterfeldt
On Fri, 15 Feb 2008, Alexander Graf wrote: > On Feb 15, 2008, at 3:56 PM, Anthony Liguori wrote: > > >Have you tried SLES-9 or openSUSE variants of the same age? The ss issue in > >gfxboot is only something recently introduced. Prior to that, gfxboot used > >big real mode so your patch wouldn't

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

2008-02-15 Thread Alexander Graf
On Feb 15, 2008, at 3:56 PM, Anthony Liguori wrote: > Alexander Graf wrote: >> Hi, >> >> this issue has already been talked about previously. Gfxboot on VMX >> is >> broken, because it reads SS after switching from real to protected >> mode, >> where SS contains an invalid value, which VMX do

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

2008-02-15 Thread Anthony Liguori
Alexander Graf wrote: > Hi, > > this issue has already been talked about previously. Gfxboot on VMX is > broken, because it reads SS after switching from real to protected mode, > where SS contains an invalid value, which VMX does not allow. > As far as I know, gfxboot is the only application that

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

2008-02-15 Thread Alexander Graf
On Feb 15, 2008, at 2:47 PM, Avi Kivity wrote: > Alexander Graf wrote: >> Hi, >> >> this issue has already been talked about previously. Gfxboot on VMX >> is >> broken, because it reads SS after switching from real to protected >> mode, >> where SS contains an invalid value, which VMX does no

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

2008-02-15 Thread Avi Kivity
Alexander Graf wrote: > Hi, > > this issue has already been talked about previously. Gfxboot on VMX is > broken, because it reads SS after switching from real to protected mode, > where SS contains an invalid value, which VMX does not allow. > As far as I know, gfxboot is the only application that