[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <f47a38e12bf8728643b84869292f9f93e104b3aa.1358920534.git.hutao@cn.fujitsu.com>
Date: Wed, 23 Jan 2013 15:19:28 +0800
From: Hu Tao <hutao@...fujitsu.com>
To: kvm list <kvm@...r.kernel.org>, qemu-devel <qemu-devel@...gnu.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"Daniel P. Berrange" <berrange@...hat.com>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
Jan Kiszka <jan.kiszka@...mens.com>,
Gleb Natapov <gleb@...hat.com>,
Blue Swirl <blauwirbel@...il.com>,
Eric Blake <eblake@...hat.com>,
Andrew Jones <drjones@...hat.com>,
Marcelo Tosatti <mtosatti@...hat.com>,
Sasha Levin <levinsasha928@...il.com>,
Luiz Capitulino <lcapitulino@...hat.com>
Cc: Wen Congyang <wency@...fujitsu.com>
Subject: [PATCH v12 rebased 7/8] allower the user to disable pv event support
Signed-off-by: Wen Congyang <wency@...fujitsu.com>
Signed-off-by: Hu Tao <hutao@...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 fed6ccf..507c98b 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 4e2b499..7522f4a 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=@...{value}[,...]]
diff --git a/vl.c b/vl.c
index 5aae03f..aa15b23 100644
--- a/vl.c
+++ b/vl.c
@@ -424,6 +424,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.0.1.240.ge8a1f5a
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists