From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] 2/2: Fall back to plain Qemu if KVM is not present, report errors from libkvm Date: Tue, 14 Nov 2006 15:55:58 +0200 Message-ID: <4559CAEE.30203@qumranet.com> References: <20061114072601.GD28027@galon.ev-en.org> <4559834F.80905@qumranet.com> <8764di9y30.wl%simon.kagstrom@bth.se> <45598F42.5090400@qumranet.com> <871wo69uxb.wl%simon.kagstrom@bth.se> <4559AC1F.9080304@qumranet.com> <87y7qe8c43.wl%simon.kagstrom@bth.se> <4559B574.5000000@qumranet.com> <87wt5y89ik.wl%simon.kagstrom@bth.se> <4559C393.70001@qumranet.com> <87veli87vf.wl%simon.kagstrom@bth.se> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: KVM , Baruch Even Return-path: To: Simon Kagstrom In-Reply-To: <87veli87vf.wl%simon.kagstrom-6Uc+yI3S9P8@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 Simon Kagstrom wrote: >>> >>> >> Doesn't this bit will initialize kvm even if the user specified -no-kvm? >> > > Yes. Maybe I misunderstood you, but this is how I understood your > comments. > > I intended something like start with kvm_allowed = 1 if (-no-kvm) kvm_allowed = 0 if (kvm_allowed && !kvm_init() < 0) kvm_allowed = 0 > Sorry for spamming the list with patches. I'll send yet another > one. Keep on patching :) > This will check and possibly disable KVM after the command-line > options have been parsed. If -no-kvm has been given, nothing will > happen. > > > > +#if USE_KVM > + if (kvm_allowed) { > + if (kvm_qemu_init() < 0) { > + fprintf(stderr, "Could not initialize KVM, will disable KVM support\n"); > + kvm_allowed = 0; > + } > + } > +#endif > + > Yes, exactly what I meant. I'll apply this. Thanks! -- error compiling committee.c: too many arguments to function ------------------------------------------------------------------------- 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