From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 08/28] kvm tools: Fix KVM_RUN exit code check Date: Wed, 07 Dec 2011 16:12:31 +0200 Message-ID: <4EDF744F.6070904@redhat.com> References: <4EDD8E82.1010909@ozlabs.org> <1323159768.3882.9.camel@lappy> <4EDEB410.801@ozlabs.org> <5BE6CD00-B634-468E-8009-9CE9E68680C1@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Matt Evans , Sasha Levin , "kvm@vger.kernel.org" , "kvm-ppc@vger.kernel.org" To: Alexander Graf Return-path: In-Reply-To: <5BE6CD00-B634-468E-8009-9CE9E68680C1@suse.de> Sender: kvm-ppc-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On 12/07/2011 08:44 AM, Alexander Graf wrote: > On 07.12.2011, at 01:32, Matt Evans wrote: > > > On 06/12/11 19:22, Sasha Levin wrote: > >> If KVM_RUN can actually return anything besides 0 or -1 it may be also > >> worthwhile to update Documentation/virtual/kvm/api.txt . > >> > >> What are the cases where it happens? > > > > Well, on PPC the internal kvmppc_run_vcpu() returns either RESUME_GUEST (which > > stays in-kernel and drops back to the guest) or RESUME_HOST, which is propagated > > back out to userland as the return value of ioctl(KVM_RUN). So, anything > > kvmtool sees is either <0 for error or RESUME_HOST, i.e. 2. > > > > Alex, do you think the PPC KVM code should be forced to 0 on success, or is > > there any value to the expanded the return codes (and updating api.txt) for > > varying kinds of positive success? > > I don't think it's worth the potential ABI breakage to change the current behavior :). Even if we did change it, you would still have to touch kvm tool to work with older kernels. Well it deviates from api.txt, so please fix one or the other. -- error compiling committee.c: too many arguments to function