From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dor Laor Subject: Re: Windows guest reboot failure Date: Wed, 26 Sep 2007 09:36:13 +0200 Message-ID: <46FA0BED.1060804@qumranet.com> References: <37E52D09333DE2469A03574C88DBF40FA9C256@pdsmsx414.ccr.corp.intel.com> Reply-To: dor.laor-atKUWr5tajBWk0Htik3J/w@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel To: "He, Qing" Return-path: In-Reply-To: <37E52D09333DE2469A03574C88DBF40FA9C256-wq7ZOvIWXbM/UvCtAeCM4rfspsVTdybXVpNB7YpNyf8@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 He, Qing wrote: > Hi folks, > I found that Windows guests often fail reboots in current > kvm.git. Either the guest hangs, or it reports double fault exception > which causes qemu aborts. This is not shown with -no-kvm-irqchip option. > > After some investigation, it seems that this is caused by lack > of in-kernel components reset. Several windows guests will write RESET > command to 8042, the keyboard controller. On receiving the command, qemu > device model will call qemu_system_reset() to reset everything to the > initial state. However, this mechanism is broken when in-kernel > components is introduced: qemu doesn't communicate the reset request to > kvm, so kvm uses stale device state on the next booting, which fails > reboot. > > To resolve this, there are at least two options: > 1. modify qemu_system_reset(), so that qemu destroys kvm context > and re-creates. > 2. introduce a new ioctl, say KVM_RESET, to kvm. On receiving > this ioctl, the kernel calls reset handlers registered by other > components (vcpu, lapic, pic, ioapic, pit, etc.), either against vm or > against each vcpu. > > IMO, the first one is easier in modification and maintaining, > but the second one is closer to qemu logics. Which do you think is more > appropriate? > > Any comment? > > Thanks, > Qing > I'm voting for option 2. As you said its closer to qemu's device model approach and it's also similar to kernel components (*pi*) save/restore methods. It also minimized qemu changes. Dor. ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/