From: Simon Kagstrom Subject: Re: Etherboot problems Date: Sat, 11 Nov 2006 14:27:13 +0100 Message-ID: <87r6wa9kr2.wl%simon.kagstrom@bth.se> References: <874pt8ip14.wl%simon.kagstrom@bth.se> <455354AB.8000908@qumranet.com> <45536A11.6050808@qumranet.com> <87odrfgvqf.wl%simon.kagstrom@bth.se> <4554A4BF.5020409@qumranet.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Return-path: To: Avi Kivity In-Reply-To: <4554A4BF.5020409-atKUWr5tajBWk0Htik3J/w@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org At Fri, 10 Nov 2006 18:11:43 +0200, Avi Kivity wrote: > > Simon Kagstrom wrote: > > What I've done is to remove the zeroing of all segment registers > > except %ss, which is shown in the trivial patch below. I don't > > remember enough of transfer-to-protected-mode assembly to know the > > correct solution to this (the %ss zeroing needs to be kept for > > example, not sure why). > > VT does a lot of checks when entering guest mode. These checks are > stricter than what the processor can handle, and stricter than what some > software expects. The upshot is that virtualizing real mode and the > transition between modes can't be made to work 100%. OK. Just out of curiosity: What is the reason for the zeroing of the segment selectors? I've been looking a bit in the developers manual (volume 3a), and section 9.9.1 says 7. After entering protected mode, the segment registers continue to hold the contents they had in real-address mode. The JMP or CALL instruction in step 4 resets the CS register. and thereafter the segment registers should be reloaded. It seems to me that KVM does this directly when the PE flag is set (and enter_pmode is called), which causes etherboot to not work. > The long term solution is to emulate rather than virtualize while in > these states. Short term, I'll see if there's some workaround we can > apply here (your patch probably makes other guests fail; I'll check this > though). I see. Grub and Linux starts with the patch, but I understand that it's not a real solution to the problem (but since I need etherboot, I'm attempted to continue using it for a while :-)). // Simon ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642