From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: KVM_EXIT_HALT and KVM_CREATE_IRQCHIP Date: Thu, 10 Jun 2010 13:54:10 +0300 Message-ID: <4C10C452.7070409@redhat.com> References: <4C10B5D8.2040409@cs.helsinki.fi> <4C10B858.1020500@redhat.com> <4C10BB2A.8010104@cs.helsinki.fi> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: KVM General , Cyrill Gorcunov , Asias He To: Pekka Enberg Return-path: Received: from mx1.redhat.com ([209.132.183.28]:33129 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752822Ab0FJKyY (ORCPT ); Thu, 10 Jun 2010 06:54:24 -0400 In-Reply-To: <4C10BB2A.8010104@cs.helsinki.fi> Sender: kvm-owner@vger.kernel.org List-ID: On 06/10/2010 01:15 PM, Pekka Enberg wrote: > > On 06/10/2010 12:52 PM, Pekka Enberg wrote: >>> I see there's a KVM_GET_MP_STATE ioctl that can be used to check if >>> state is KVM_MP_STATE_HALTED but as we never exit to the hypervisor, >>> how is this supposed to work? Am I missing something obvious here? > > On 6/10/10 1:03 PM, Avi Kivity wrote: >> In general you only rarely want to check the state (example are for >> debugging and for live migration). It's not a stable value (the guest >> executing HLT, or a guest interrupt delivered, will change its value). >> What's your use case? > > Well, power off, basically. Specifically, running a small test > 'kernel' that exists after it's done its work. I guess the thing I was > missing was that hlt is really for other purposes than power off. I > guess it's up to the hypervisor to emulate APM or something and stop > the hypervisor there? > HLT has nothing to do with power off. Qemu emulates ACPI power management, you can either do that or roll your own (for example an I/O port that calls exit(0) when the guest accesses it). -- error compiling committee.c: too many arguments to function