From patchwork Thu Aug 23 02:32:39 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wen Congyang X-Patchwork-Id: 179491 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id C578C2C008D for ; Thu, 23 Aug 2012 12:27:30 +1000 (EST) Received: from localhost ([::1]:55537 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T4N8q-0008Vb-Tw for incoming@patchwork.ozlabs.org; Wed, 22 Aug 2012 22:27:28 -0400 Received: from eggs.gnu.org ([208.118.235.92]:38744) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T4N8l-0008VR-Ko for qemu-devel@nongnu.org; Wed, 22 Aug 2012 22:27:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T4N8k-0006EB-Eq for qemu-devel@nongnu.org; Wed, 22 Aug 2012 22:27:23 -0400 Received: from [222.73.24.84] (port=16438 helo=song.cn.fujitsu.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T4N8k-0006E2-3s for qemu-devel@nongnu.org; Wed, 22 Aug 2012 22:27:22 -0400 X-IronPort-AV: E=Sophos;i="4.77,812,1336320000"; d="scan'208";a="5700352" Received: from unknown (HELO tang.cn.fujitsu.com) ([10.167.250.3]) by song.cn.fujitsu.com with ESMTP; 23 Aug 2012 10:26:14 +0800 Received: from fnstmail02.fnst.cn.fujitsu.com (tang.cn.fujitsu.com [127.0.0.1]) by tang.cn.fujitsu.com (8.14.3/8.13.1) with ESMTP id q7N2RJro004327; Thu, 23 Aug 2012 10:27:19 +0800 Received: from [10.167.225.226] ([10.167.225.226]) by fnstmail02.fnst.cn.fujitsu.com (Lotus Domino Release 8.5.3) with ESMTP id 2012082310271845-448804 ; Thu, 23 Aug 2012 10:27:18 +0800 Message-ID: <50359647.4060100@cn.fujitsu.com> Date: Thu, 23 Aug 2012 10:32:39 +0800 From: Wen Congyang User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100413 Fedora/3.0.4-2.fc13 Thunderbird/3.0.4 MIME-Version: 1.0 To: kvm list , qemu-devel , "linux-kernel@vger.kernel.org" , Avi Kivity , "Daniel P. Berrange" , KAMEZAWA Hiroyuki , Jan Kiszka , Gleb Natapov , Blue Swirl , Eric Blake , Andrew Jones , Marcelo Tosatti References: <50359561.9070001@cn.fujitsu.com> In-Reply-To: <50359561.9070001@cn.fujitsu.com> X-MIMETrack: Itemize by SMTP Server on mailserver/fnst(Release 8.5.3|September 15, 2011) at 2012/08/23 10:27:18, Serialize by Router on mailserver/fnst(Release 8.5.3|September 15, 2011) at 2012/08/23 10:27:18, Serialize complete at 2012/08/23 10:27:18 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 222.73.24.84 Subject: [Qemu-devel] [PATCH v9 6/6] allower the user to disable pv event support X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Wen Congyang --- hw/pc_piix.c | 6 +++++- qemu-config.c | 4 ++++ qemu-options.hx | 3 ++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/hw/pc_piix.c b/hw/pc_piix.c index f73fb85..76d3de1 100644 --- a/hw/pc_piix.c +++ b/hw/pc_piix.c @@ -151,6 +151,8 @@ static void pc_init1(MemoryRegion *system_memory, MemoryRegion *pci_memory; MemoryRegion *rom_memory; void *fw_cfg = NULL; + QemuOptsList *list = qemu_find_opts("machine"); + bool enable_pv_event; pc_cpus_init(cpu_model); @@ -289,8 +291,10 @@ static void pc_init1(MemoryRegion *system_memory, pc_pci_device_init(pci_bus); } + enable_pv_event = qemu_opt_get_bool(QTAILQ_FIRST(&list->head), + "enable_pv_event", false); #ifdef KVM_PV_EVENT_PORT - if (kvm_enabled()) { + if (kvm_enabled() && enable_pv_event) { kvm_pv_event_init(isa_bus); } #endif diff --git a/qemu-config.c b/qemu-config.c index c05ffbc..a58bf71 100644 --- a/qemu-config.c +++ b/qemu-config.c @@ -612,6 +612,10 @@ static QemuOptsList qemu_machine_opts = { .name = "dump-guest-core", .type = QEMU_OPT_BOOL, .help = "Include guest memory in a core dump", + }, { + .name = "enable_pv_event", + .type = QEMU_OPT_BOOL, + .help = "handle pv event" }, { /* End of list */ } }, diff --git a/qemu-options.hx b/qemu-options.hx index 3c411c4..c825d66 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -38,7 +38,8 @@ DEF("machine", HAS_ARG, QEMU_OPTION_machine, \ " supported accelerators are kvm, xen, tcg (default: tcg)\n" " kernel_irqchip=on|off controls accelerated irqchip support\n" " kvm_shadow_mem=size of KVM shadow MMU\n" - " dump-guest-core=on|off include guest memory in a core dump (default=on)\n", + " dump-guest-core=on|off include guest memory in a core dump (default=on)\n" + " enable_pv_event=on|off controls pv event support\n", QEMU_ARCH_ALL) STEXI @item -machine [type=]@var{name}[,prop=@var{value}[,...]]