From patchwork Tue May 4 09:28:39 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 96698 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o449StMm024323 for ; Tue, 4 May 2010 09:28:55 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752085Ab0EDJ2w (ORCPT ); Tue, 4 May 2010 05:28:52 -0400 Received: from david.siemens.de ([192.35.17.14]:15011 "EHLO david.siemens.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750884Ab0EDJ2w (ORCPT ); Tue, 4 May 2010 05:28:52 -0400 Received: from mail1.siemens.de (localhost [127.0.0.1]) by david.siemens.de (8.12.11.20060308/8.12.11) with ESMTP id o449SdLQ017353; Tue, 4 May 2010 11:28:39 +0200 Received: from [139.25.109.167] (mchn012c.mchp.siemens.de [139.25.109.167] (may be forged)) by mail1.siemens.de (8.12.11.20060308/8.12.11) with ESMTP id o449SdSK002687; Tue, 4 May 2010 11:28:39 +0200 Message-ID: <4BDFE8C7.4040802@siemens.com> Date: Tue, 04 May 2010 11:28:39 +0200 From: Jan Kiszka User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 MIME-Version: 1.0 To: Marcelo Tosatti , Avi Kivity CC: kvm Subject: [PATCH] qemu-kvm: Process exit requests in kvm loop Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Tue, 04 May 2010 09:29:12 +0000 (UTC) diff --git a/qemu-kvm.c b/qemu-kvm.c index 91f0222..43d599d 100644 --- a/qemu-kvm.c +++ b/qemu-kvm.c @@ -2047,6 +2047,9 @@ int kvm_main_loop(void) vm_stop(EXCP_DEBUG); kvm_debug_cpu_requested = NULL; } + if (qemu_exit_requested()) { + exit(0); + } } pause_all_threads();