From: Hu Tao <hutao@cn.fujitsu.com>
To: kvm list <kvm@vger.kernel.org>,
qemu-devel <qemu-devel@nongnu.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Daniel P. Berrange" <berrange@redhat.com>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
Jan Kiszka <jan.kiszka@siemens.com>,
Gleb Natapov <gleb@redhat.com>, Blue Swirl <blauwirbel@gmail.com>,
Eric Blake <eblake@redhat.com>, Andrew Jones <drjones@redhat.com>,
Marcelo Tosatti <mtosatti@redhat.com>,
Sasha Levin <levinsasha928@gmail.com>,
Luiz Capitulino <lcapitulino@redhat.com>,
Anthony Liguori <aliguori@us.ibm.com>,
Markus Armbruster <armbru@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Stefan Hajnoczi <stefanha@redhat.com>,
Juan Quintela <quintela@redhat.com>,
Orit Wasserman <owasserm@redhat.com>,
Kevin Wolf <kwolf@redhat.com>,
Wen Congyang <wency@cn.fujitsu.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
Alexander Graf <agraf@suse.de>,
Alex Williamson <alex.williamson@redhat.com>,
Peter Maydell <peter.maydell@linaro.org>
Subject: [PATCH v13 7/8] allower the user to disable pv event support
Date: Thu, 28 Feb 2013 20:13:18 +0800 [thread overview]
Message-ID: <1af3c134891e119a21268ac6c48434447a8f6ab2.1362051582.git.hutao@cn.fujitsu.com> (raw)
In-Reply-To: <cover.1362051581.git.hutao@cn.fujitsu.com>
Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
---
hw/pc_piix.c | 9 ++++++++-
qemu-options.hx | 3 ++-
vl.c | 4 ++++
3 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/hw/pc_piix.c b/hw/pc_piix.c
index 24a9bf3..82a421a 100644
--- a/hw/pc_piix.c
+++ b/hw/pc_piix.c
@@ -44,6 +44,7 @@
#include "exec/memory.h"
#include "exec/address-spaces.h"
#include "cpu.h"
+#include "qemu/config-file.h"
#ifdef CONFIG_XEN
# include <xen/hvm/hvm_info_table.h>
#endif
@@ -86,6 +87,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 = false;
pc_cpus_init(cpu_model);
pc_acpi_init("acpi-dsdt.aml");
@@ -218,7 +221,11 @@ static void pc_init1(MemoryRegion *system_memory,
pc_pci_device_init(pci_bus);
}
- if (kvm_enabled()) {
+ if (list && !QTAILQ_EMPTY(&list->head)) {
+ enable_pv_event = qemu_opt_get_bool(QTAILQ_FIRST(&list->head),
+ "enable_pv_event", false);
+ }
+ if (kvm_enabled() && enable_pv_event) {
kvm_pv_event_init(isa_bus);
}
}
diff --git a/qemu-options.hx b/qemu-options.hx
index 797d992..1ad4041 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -35,7 +35,8 @@ DEF("machine", HAS_ARG, QEMU_OPTION_machine, \
" 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"
- " mem-merge=on|off controls memory merge support (default: on)\n",
+ " mem-merge=on|off controls memory merge support (default: on)\n"
+ " enable_pv_event=on|off controls pv event support (default: off)\n",
QEMU_ARCH_ALL)
STEXI
@item -machine [type=]@var{name}[,prop=@var{value}[,...]]
diff --git a/vl.c b/vl.c
index 51d4922..5b3a279 100644
--- a/vl.c
+++ b/vl.c
@@ -427,6 +427,10 @@ static QemuOptsList qemu_machine_opts = {
.name = "usb",
.type = QEMU_OPT_BOOL,
.help = "Set on/off to enable/disable usb",
+ }, {
+ .name = "enable_pv_event",
+ .type = QEMU_OPT_BOOL,
+ .help = "handle pv event"
},
{ /* End of list */ }
},
--
1.8.1.4
next prev parent reply other threads:[~2013-02-28 12:13 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-28 12:13 [PATCH v13 0/8] pv event interface between host and guest Hu Tao
2013-02-28 12:13 ` [PATCH v13] kvm: notify host when the guest is panicked Hu Tao
2013-02-28 12:13 ` [PATCH v13 1/8] save/load cpu runstate Hu Tao
2013-02-28 21:12 ` Eric Blake
2013-03-01 7:36 ` Hu Tao
2013-03-01 16:29 ` Eric Blake
2013-03-04 9:30 ` Paolo Bonzini
2013-03-05 2:33 ` Hu Tao
2013-03-05 8:24 ` Paolo Bonzini
2013-02-28 12:13 ` [PATCH v13 2/8] start vm after resetting it Hu Tao
2013-02-28 13:23 ` Jan Kiszka
2013-03-05 3:05 ` Hu Tao
2013-03-04 9:32 ` Paolo Bonzini
2013-03-05 3:06 ` Hu Tao
2013-02-28 12:13 ` [PATCH v13 3/8] update kernel headers Hu Tao
2013-02-28 12:13 ` [PATCH v13 4/8] add a new runstate: RUN_STATE_GUEST_PANICKED Hu Tao
2013-03-04 9:40 ` Paolo Bonzini
2013-03-05 3:17 ` Hu Tao
2013-03-05 8:26 ` Paolo Bonzini
2013-03-06 9:03 ` Hu Tao
2013-02-28 12:13 ` [PATCH v13 5/8] add a new qevent: QEVENT_GUEST_PANICKED Hu Tao
2013-03-01 16:31 ` Eric Blake
2013-03-05 3:17 ` Hu Tao
2013-03-04 9:40 ` Paolo Bonzini
2013-02-28 12:13 ` [PATCH v13 6/8] introduce a new qom device to deal with panicked event Hu Tao
2013-03-04 9:42 ` Paolo Bonzini
2013-02-28 12:13 ` Hu Tao [this message]
2013-03-04 9:47 ` [PATCH v13 7/8] allower the user to disable pv event support Paolo Bonzini
2013-02-28 12:13 ` [PATCH v13 8/8] pv event: add document to describe the usage Hu Tao
2013-03-03 9:17 ` [PATCH v13 0/8] pv event interface between host and guest Gleb Natapov
2013-03-04 10:05 ` Paolo Bonzini
2013-03-04 10:21 ` Gleb Natapov
[not found] ` <51347735.9090204@redhat.com>
2013-03-04 10:43 ` Gleb Natapov
2013-03-04 10:49 ` Paolo Bonzini
2013-03-04 10:59 ` Gleb Natapov
2013-03-04 11:10 ` Paolo Bonzini
2013-03-04 11:20 ` Gleb Natapov
2013-03-04 11:35 ` Paolo Bonzini
2013-03-04 11:52 ` Gleb Natapov
2013-03-04 12:21 ` Paolo Bonzini
2013-03-06 8:56 ` Hu Tao
2013-03-06 9:07 ` Paolo Bonzini
2013-03-06 9:28 ` [Qemu-devel] " li guang
2013-03-06 9:38 ` Gleb Natapov
2013-03-06 9:48 ` Paolo Bonzini
2013-03-06 9:59 ` Gleb Natapov
2013-03-06 8:46 ` Hu Tao
2013-03-06 9:37 ` Gleb Natapov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1af3c134891e119a21268ac6c48434447a8f6ab2.1362051582.git.hutao@cn.fujitsu.com \
--to=hutao@cn.fujitsu.com \
--cc=agraf@suse.de \
--cc=alex.williamson@redhat.com \
--cc=aliguori@us.ibm.com \
--cc=armbru@redhat.com \
--cc=berrange@redhat.com \
--cc=blauwirbel@gmail.com \
--cc=drjones@redhat.com \
--cc=eblake@redhat.com \
--cc=gleb@redhat.com \
--cc=jan.kiszka@siemens.com \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=kvm@vger.kernel.org \
--cc=kwolf@redhat.com \
--cc=lcapitulino@redhat.com \
--cc=levinsasha928@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mst@redhat.com \
--cc=mtosatti@redhat.com \
--cc=owasserm@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
--cc=stefanha@redhat.com \
--cc=wency@cn.fujitsu.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).