From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ingo Molnar Subject: Re: [patch] kvm: make cr3 loading more robust Date: Wed, 3 Jan 2007 13:28:14 +0100 Message-ID: <20070103122814.GA7350@elte.hu> References: <20070103021057.GA11316@elte.hu> <459B695C.5090004@qumranet.com> <20070103115230.GB937@elte.hu> <459B9AC7.6020506@qumranet.com> <20070103121301.GC2786@elte.hu> <459BA0B4.20804@qumranet.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel Return-path: To: Avi Kivity Content-Disposition: inline In-Reply-To: <459BA0B4.20804-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 * Avi Kivity wrote: > Note that the corner cases will never be 100% emulatable. For > example, you can set cr3 to point at your IDE DMA mmio space or > something like that. It's quite all right to kill the guest quietly > at that point, as no real-life guest will do that. yes. Or to map the lapic to the IDT ;-) (as yours truly has tried it years ago) that's why my suggestion is to just kill the guest. Loading such a cr3 is a serious bug that might be hard to debug in the guest. I had to debug at least one such bug in Linux before (years ago, in the lazy TLB switching code) and it was a royal PITA to track down. Having a hypervisor that points any cr3 load error out /before/ the effects of the error propagate further is a bonus, not an incompatibility. The CPU does not implement this not because the semantics is important, but i suspect mostly because it doesnt really know the boundaries and type of RAM. > The kvm goals do not include cycle accurate emulation. [...] yes. That's why i'm suggesting to kill the VM in such a scenario. A cr3 value is only valid if it points to real RAM. Ingo ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV